#2404 change software state from patching to fixing to align with CAOS v0.8
This commit is contained in:
@@ -520,7 +520,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The patching takes two steps, so the reward hasn't changed yet. Let's do nothing for another timestep, the reward should improve.\n",
|
||||
"The fixing takes two steps, so the reward hasn't changed yet. Let's do nothing for another timestep, the reward should improve.\n",
|
||||
"\n",
|
||||
"The reward will increase slightly as soon as the file finishes restoring. Then, the reward will increase to 1 when both green agents make successful requests.\n",
|
||||
"\n",
|
||||
|
||||
@@ -305,7 +305,7 @@ class DatabaseService(Service):
|
||||
return super().apply_timestep(timestep)
|
||||
|
||||
def _update_fix_status(self) -> None:
|
||||
"""Perform a database restore when the patching countdown is finished."""
|
||||
"""Perform a database restore when the FIXING countdown is finished."""
|
||||
super()._update_fix_status()
|
||||
if self._fixing_countdown is None:
|
||||
self.restore_backup()
|
||||
|
||||
@@ -43,8 +43,8 @@ class SoftwareHealthState(Enum):
|
||||
"Unused state."
|
||||
GOOD = 1
|
||||
"The software is in a good and healthy condition."
|
||||
PATCHING = 2
|
||||
"The software is undergoing patching or updates."
|
||||
FIXING = 2
|
||||
"The software is undergoing FIXING or updates."
|
||||
COMPROMISED = 3
|
||||
"The software's security has been compromised."
|
||||
OVERWHELMED = 4
|
||||
@@ -198,7 +198,7 @@ class Software(SimComponent):
|
||||
"""Perform a fix on the software."""
|
||||
if self.health_state_actual in (SoftwareHealthState.COMPROMISED, SoftwareHealthState.GOOD):
|
||||
self._fixing_countdown = self.fixing_duration
|
||||
self.set_health_state(SoftwareHealthState.PATCHING)
|
||||
self.set_health_state(SoftwareHealthState.FIXING)
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -221,7 +221,7 @@ class Software(SimComponent):
|
||||
:param timestep: The current timestep of the simulation.
|
||||
"""
|
||||
super().apply_timestep(timestep)
|
||||
if self.health_state_actual == SoftwareHealthState.PATCHING:
|
||||
if self.health_state_actual == SoftwareHealthState.FIXING:
|
||||
self._update_fix_status()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user