Skip to content

fix: scope confirmation proximity for no_confirmation - #25

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:fix/confirmation-proximity-scope
Sep 16, 2026
Merged

royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:fix/confirmation-proximity-scope

Conversation

@sharadvc

Copy link
Copy Markdown
Contributor

What

no_confirmation searched all prior agent turns for any confirmation. A stale, unrelated confirmation (e.g. a balance check at turn 1) silenced the finding for a $200 refund at turn 5 — no proximity scoping.

Change

Scope the confirmation search to a short window (_CONFIRM_WINDOW = 3 turns) immediately before the consequential action. A confirmation that closely precedes the action still suppresses the finding (existing good_call flow preserved: confirm → yes → action).

Tests

Added a failing test first: an early different-topic confirmation (balance) followed by an unrelated later refund must still produce no_confirmation. Full suite: 67 passed.

Related

Closes #13

A confirmation anywhere in the call silenced no_confirmation for every
later action. Scope it to a short window before the consequential action
so a stale, unrelated confirmation no longer suppresses the finding.

Closes AgentPostmortem#13
@royalpinto007
royalpinto007 merged commit be607cf into AgentPostmortem:main Sep 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Any stale unrelated confirmation suppresses no_confirmation

2 participants