Skip to content

Reset agent.isUnderAttack only after evaluating all rules. - #90

Merged
DivineThreepwood merged 2 commits into
devfrom
bugfix/79-isunderattack-is-reset
Oct 14, 2026
Merged

DivineThreepwood merged 2 commits into
devfrom
bugfix/79-isunderattack-is-reset

Conversation

@tommy33790

Copy link
Copy Markdown
Contributor

Closes #79

📜 Description

Changes proposed in this pull request:

  • agent.isUnderAttack is no longer reset on read
  • Therefore it can be used in multiple rules again

🔨 Breaking Changes

  • None

✅ Checklist:

  • Created tests which fail without the change (if possible)
  • Extended the documentation (if necessary)
  • Checked the checklist and figures that nothing on it is possible

❓ Open Questions:

  • There's a slight possibility that the agent is attacked while evaluating rules. Therefore not all rules have access to the same information (in lower priority rules isUnderAttack might be true while it wasn't when evaluating high priority rules). Do we have to protect against that?

@DivineThreepwood DivineThreepwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good finding!

@DivineThreepwood
DivineThreepwood merged commit fe7b277 into dev Oct 14, 2026
2 checks passed
@DivineThreepwood
DivineThreepwood deleted the bugfix/79-isunderattack-is-reset branch October 14, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent.isUnderAttack is reset after evaluation in its highest rule

3 participants