Repository navigation
Retire a buffer from any state - #124
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…elved; retired ends its hold Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…eases every version Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…edelivery, and says what it released with no round Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <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.
A buffer can be retired from wherever it is. Until now
retirewas accepted only where a buffer serves (ready,idle), so a buffer that was cancelled, never started, stopped atneeds-humanor shelved could not be retired.Stacked on #122. Spec:
docs/specs/2026-11-26-retire-anywhere.md.What changes
buffer-api accepts it (
1348d3b)STAGE_ACTIONShasretireat every buffer stage butretired.unshelveandretire; a shelved dataset or request takesunshelvealone, as before.retired, its hold ends in the same transaction, with a timeline entry that says so. A retired buffer then reads the statusdone.The workflow acts on it where the buffer is (
295715d,5f5a930,4510e17)retire_events, besidecancel_events), so no step of a round refuses it.retired. The same holds for areadybuffer whose late datasets still source.live_buffers), not from the workflow's state, so a run that the retire itself started releases what earlier runs registered.retirednames who retired the buffer and each version released, or says that nothing was registered.needs-humansaying so, as a cancel does; a retire sent there finishes it.workflow.patched("retire-anywhere"), taken in the signal handler. The keeper's retire of one idle version stays a lifecycle signal.The page asks first (
2de6a38)Docs (
9e753c4,35c88eb,f462d7f,dbc2424): the spec and plan,AGENTS.md(a new rule, the stage-table and shelving rules),docs/development.md, the README and the page's guide.Known limits
gothere behaves the same way. Ending it needs the rebuild to unwind as a round does; the spec records it as a known gap (§3.6).readyandidle) until it rolls over.goand aretirethat both wait while the buffer rests are taken retire first. The page sends one action at a time.Deployment
The buffers worker and buffer-api restart together: the workflow calls an activity the worker must have registered, and buffer-api reads the stage table when it starts.
Checks
new,needs-humanwith a buffer registered,cancelled), insourcing, at the plan gate and atstaged, atreadywith a superseded version and with a late dataset still waiting, with a job that cannot be killed, atretired, across a rollover, and redelivered.buffer_history_retire.jsonis a new replay fixture; the recorded fixtures replay unchanged._rulesfor a shelved buffer, the hold ending with theretiredwrite,live_buffers, and the confirmation text per state (imported under node).4510e17with tests: a retire of areadybuffer with a late dataset waiting was neither acted on nor refused, a redelivered retire could end a later round, and a retire that started the run wroteretiredwithout an entry.🤖 Generated with Claude Code