Repository navigation
fix(agent-question): the first accepted decision stands when two devices decide one card (RFC-0014 step 5 drive) - #71
Merged
Conversation
…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
added a commit
that referenced
this pull request
Nov 19, 2026
…p on main Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'), inMemoryInbox.decidedand inSQL_DECIDEDalike;PostgresInbox.decidedanswers 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.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.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