Repository navigation
fix(client): report a due advisory plan whose notice the sink refused - #206
Merged
gregpriday merged 6 commits intoNov 19, 2026
Merged
Conversation
…rocesses see the plan due - Mark an advisory notice write_refused when its sink refuses a write the host admitted - Treat a refused notice as settled in the view, like a written one, and expose writeRefused - Let a non-receiving wait or get report advisory-expired for a refused notice - Clear the mark when a retry sends the notice again
- A refused notice write still gives advisory-expired with fallback_due true - Name the remaining case where get and the receiver's get_decision differ
…lied events - A refused notice still waits while an event of its question is stored and not applied - Say which sink failures refuse a notice, and which cases other processes still miss - Pin the refusal's error code, attempt counts and the observing waiter in the tests
- Look for an unapplied event of its question only when the row shows a refused notice - Hold it when the look is full, the store cannot be read, or the row moved on meanwhile - Say that an exec command's exit 75 is retried, not uncertain
…d events - More unapplied events than one look reads hold it two minutes at most, as a read does - Time the hold from the refused attempt, so every process reads the same bound
gregpriday
deleted the
bugfix/issue-183-wait-and-get-hide-a-due-advisory-plan
branch
November 19, 2026 14:07
Merged
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.
Resolves #183
decisions waitanddecisions getcan run in a process that does not receive: awaitwhilelistenormcpruns, or anyget. When the receiver's sink refused an advisory notice, the notice sat atneeds-attention, and nothing in the store said whether the receiver had read the relay before it tried the write. Sowaitran until--wait-timeout(exit 16), andgetreportedoutcome: nullandfallback_due: false. Meanwhile the receiver'sget_decisionsaidfallback_due: true.Changes
thread()and bothmustWait()checks under the lock. When it does,settleChunkmarks the notice's entrywrite_refused, in the same locked write that setsneeds-attention. A retry clears the mark.AdvisoryTimeoutView.writeRefusedexposes the mark. A refused notice no longer waits on the reading process's own ledger clock. ItsfallbackDuefollows the disposition, still recomputed from the current policy because nothing was typed. The receiver'sget_decisionand a bridge that never started now give the same answer.outcomeOfaccepts a refused notice from a non-receiving process, alongsidedeliveredanduncertain.waitexits 13 andgetreportsadvisory-expired, both withfallback_due: trueanddelivery: needs-attention.docs/operations.mddescribes the outcome and which sink failures count as a refusal. It also names the cases wheregetand the receiver'sget_decisionstill differ (a notice anexec:command asked to retry with exit 75, a notice that needs attention for another reason) and what recovers them.Known limit
The receiver's existing admission rule releases an advisory notice after a read of the relay has been under way for two minutes. A refused write in that window is marked, just as a successful write would be recorded as delivered. Observers already trust a delivered notice, so they report the refused one too. Distinguishing an active replay from a failed read would change delivery admission for every notice, which is outside this fix.
Testing
packages/cli/tests/ask-wait.test.ts: "reports a due advisory plan from another process while the receiver's sink cannot write its notice". Adaemonwith MCP and afile:sink in a missing directory, and awaitCmdconfirmed to be only observing. It got exit 16 before the change. It now exits 13 with one result record, andget --pane mcpmatchesget_decision.packages/client/tests/advisory-timeout.test.ts:outcomeOfunit cases.prettier --checkpasses on the changed files. The repo has notypecheck:changedscript, so no type check ran here.