Skip to content

fix(agent-question): the first accepted decision stands when two devices decide one card (RFC-0014 step 5 drive) - #71

Merged
acn-ericlaw merged 2 commits into
mainfrom
fix/agent-question-first-decision-stands
Nov 19, 2026
Merged

acn-ericlaw merged 2 commits into
mainfrom
fix/agent-question-first-decision-stands

Conversation

@acn-ericlaw

Copy link
Copy Markdown
Collaborator

What

  • extensions/agent-question: a decision's write applies only when the row is still open or when the engine accepted the decision (state = 'answered'), in MemoryInbox.decided and in SQL_DECIDED alike; PostgresInbox.decided answers with the row as stored when the guard kept it; the handler returns that row with the invoker's own outcome and broadcasts nothing for it.
  • Shared vectors version 2 (tests/vectors/agent-question-vectors.json, 31 cases): the two-devices transition case. A race test with a scripted reply endpoint pins both orderings through the handler. The statement test's parameters follow.
  • The ask-person README narrows the audit claim: who decided reaches the audit store when the note reaches the model (a refused call); an approved call's decision stays on the channel's record and in the log.
  • CHANGELOG Unreleased/Fixed 1; continuity and the session log.

Why

RFC-0014's step 5, the live drive of the whole chain (the report is in the engines' repository, docs/test-reports/ask-a-person-live-drive.md), found that with two devices on one card both clicks reach the engine - it resumes at most once - and the row took whichever outcome landed last. In the drive the losing device's 410 landed first, so the row happened to end right; the opposite order would have overwritten the accepted decision and its operator. An acceptance must always win the row, and the losing device must see who decided. The Node twin takes the same guard and the same vectors in its own PR.

Gates: ruff OK, basedpyright 0 errors, the agent-question suite 48 passed, both extension suites 148; re-driven live twice after the fix.

🤖 Generated with Claude Code

acn-ericlaw and others added 2 commits November 19, 2026 16:48
…ces decide one card - RFC-0014 step 5 drive

Both clicks pass the open check and reach the engine, which resumes at most once; the row took whichever outcome
landed last, so a late nothing-waiting could overwrite the accepted decision. A decision's write now applies when the
row is still open or the engine accepted it, in the memory inbox and SQL_DECIDED alike; the losing device gets the row
as it stands. Vectors version 2 with the two-devices transition; a race test on both orderings; the ask-person README's
audit claim narrowed to a refused call's note.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@acn-ericlaw
acn-ericlaw merged commit c456bd5 into main Nov 19, 2026
5 checks passed
@acn-ericlaw
acn-ericlaw deleted the fix/agent-question-first-decision-stands branch November 19, 2026 09:32
acn-ericlaw added a commit that referenced this pull request Nov 19, 2026
…p on main

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant