proposal: a declared reopen returns the source when its target is retired - #48
Merged
Conversation
…ired A retired target stops blocking its source (proposal 0024), so the source's one slot is freed. Where the create-from also declares a completion hook, nothing can refill it: the hook exists to move the source OFF the status its own trigger qualifies on, and a lifecycle graph declares no edge back - so the source never re-qualifies and no event ever fires again. An event-only rule has no reissue path at all, and nothing says so. This proposes the hook's inverse on the same rule - where the source RETURNS when a target it produced is retired - so the reissue becomes the ordinary path: a real transition of the source, announced on the source's own channel, which the trigger already listens to. Nothing new declares what "retired" means: it is the same stage classification the guard reads, asked from the other end. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A retirement is delivered at-least-once, so it can arrive again after the replacement already exists - and by then the source is standing at sourceStatus once more, because the reissue put it there. The standing-status test alone would re-open a source with a live target against it. The reopen now runs exactly when a creation would be allowed through. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A create-from triggered only by a button carries no at-most-once guard, so nothing blocks a replacement - the button is itself the reissue, and there is no trigger for a reopen to re-fire. Co-Authored-By: Claude Opus 5 <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.
Adds
proposals/0025-declared-reopen-on-retire.md.Follow-up to 0024 (a retired target stops blocking its source), which left one combination unreachable.
The gap. An event-driven create-from may declare a completion hook — the status the SOURCE moves to once the target exists. It exists precisely so the guard-claimed source stops matching its own trigger. 0024 then made a retired target stop blocking, which frees the source's slot. Put the two together and the door is unlocked with nobody able to knock: the source stands at the post-generation status, a lifecycle graph declares no edge back, so the source never transitions through the qualifying status again and no qualifying event is ever published. Where a button is also declared a person can click it; an event-only rule — the shape the event axis exists for — has no reissue path at all, and nothing says so.
What this proposes. The hook's inverse on the same rule: where the source returns when a target it produced is retired. Retiring the target returns the source, which is a real transition announced on the source's own channel, so the ordinary trigger re-fires, the guard steps over the retired target, and the replacement is minted. The reissue is the ordinary path — assembled from rules already in the language, not a second creation route with semantics of its own. Nothing new declares what "retired" means: it is the same
stage:classification the guard reads, asked from the other end.Idempotence is by state, not a marker: the reopen acts only while the source still stands at that rule's own completion status. And whether the replacement is immediate stays the trigger's decision — returning the source to an earlier status (a draft, for correction) makes the reissue reviewable rather than automatic.
The two alternatives are recorded in the proposal: having the target's retirement re-deliver the source's qualifying event (fabricates a transition nobody made, and re-fires every other consumer of that channel), and documenting-plus-warning (honest, but leaves the automation inexpressible).
Numbered 0025 — 0021–0024 are taken by open PRs; renumber as you see fit.
Reference implementation: eclipse-dirigible/dirigible#6868.