Repository navigation
fix(bin): let a released task land through the sanctioned merge path - #34
Merged
Merged
Conversation
The captain's parked-completion ruling releases a ship worker once its pull request is done, green, and mergeable - that is, before it lands. Cleanup then removes state/<id>.meta, and both bin/fm-pr-merge.sh and bin/fm-pr-check.sh refused with "task metadata is unavailable" without it. Following the ruling therefore stranded the pull request from the only sanctioned merge command, and AGENTS.md section 7 forbids reaching around that guard with a lower-level one. Landing identity now comes from the forge rather than from the caller: - bin/fm-teardown.sh leaves a minimal private state/<id>.landing record (pr, the forge's pr_head, project) when it releases a ship task whose request has not landed. The forge decides: the record is written unless the forge positively reports the request merged, because an unreachable forge is not evidence that anything landed. A failed write warns and never blocks cleanup, and the pending landing is reported so the released request is not forgotten. - bin/fm-pr-lib.sh resolves "the task's PR identity record" in one place, as the meta while a task is live and the landing record once it is released. The merge poll's validity and retirement checks go through that resolver, so a released task's merge watch can be rearmed and still retires normally. - bin/fm-pr-check.sh and bin/fm-pr-merge.sh accept a released task through that record, and rebuild one from a forge read of the request itself for a task released before landing records existed. Nothing is asserted by the caller. - A merge through a landing record re-reads the request at its forge and refuses unless it is still open, so no stale local value decides anything. It arms no poll, because a released task has nothing left to watch and the merge is synchronous, and the spent record is removed once the request lands. The metadata refusal is preserved exactly where it still means something: a task with no meta, no landing record, and no request the forge can resolve is refused before gh-axi is called, as before.
sbracewell64
added a commit
that referenced
this pull request
Aug 9, 2026
Squash-reconcile of the fork trunk (48 commits through ed376cf, fork PRs #8-#48 plus CI mirrors) rebased onto upstream main at 74230fc, resolving 72 conflicted files. The fork trunk carries: the fm-launch-lib.sh one-owner launch refactor, the slot-base/contribution-target task base contract (fm-task-base-lib.sh), the zero-budget model registry, fleet admission control stages 0/1, the wake-outcome ledger, the LoopSpec canonical representation, the research-approved-work corpus scanner, the 70% compaction doctrine, from-firstmate steer markers, the fleet launcher menu and Windows-to-WSL bridge, forge-verified merge gates, and the fleet-view per-argument cap fix. Conflict-resolution decisions a reviewer cannot see from the diff alone: - Where the fork carried an older in-flight import of upstream work (delivery contracts kunchenguid#1563, remote secondmate homes kunchenguid#1576, trace context kunchenguid#995, and every add/add remote-secondmate file), upstream's landed and further-evolved version wins outright; nothing fork-specific lived in those copies (verified blob-by-blob against upstream history). - Upstream's --relaunch lifecycle control plane and the fork's task base contract both survive: base derivation and the brief base-contract guard are gated to fresh spawns (RELAUNCH=0) because a relaunch reuses the recorded worktree and bases, and the trunk may have moved since. - Launch commands stay one-owner in bin/fm-launch-lib.sh: upstream's Muse Code adapter is ported into the library (template arm, model flag, effort mapping with max->ultra) instead of resurrecting the inline fm-spawn template, and fm-spawn's post-template FM_PI_HARNESS prefix is dropped because the library's pi templates carry the marker themselves. - Herdr presentation spaces keep upstream's 0.8.0-floor semantics (config off/on/empty, two-argument fm_backend_herdr_presentation_enabled) across spawn, config inheritance, docs, and tests. - fm-pr-check derives its per-task lock from state/<id>.meta explicitly so upstream's kunchenguid#1568 meta locking coexists with the fork's #34 landing records (fm_meta_lock_path rejects a .landing path). - tests/lib.sh keeps both the fork's identity-verified background-process reaper and upstream's fm_fake_version_tool fixture. - Merged prose follows upstream's X-mode -> Relay rename. Pre-existing on both parents, not introduced here: tests/fm-calm-pi-extension.test.sh fails under system Node 22 (ERR_UNKNOWN_FILE_EXTENSION), verified identical on the base commit. Co-Authored-By: Claude Fable 5 <[email protected]>
sbracewell64
added a commit
that referenced
this pull request
Aug 9, 2026
…34) * fix(bin): keep a released task's PR landable through the sanctioned path The captain's parked-completion ruling releases a ship worker once its pull request is done, green, and mergeable - that is, before it lands. Cleanup then removes state/<id>.meta, and both bin/fm-pr-merge.sh and bin/fm-pr-check.sh refused with "task metadata is unavailable" without it. Following the ruling therefore stranded the pull request from the only sanctioned merge command, and AGENTS.md section 7 forbids reaching around that guard with a lower-level one. Landing identity now comes from the forge rather than from the caller: - bin/fm-teardown.sh leaves a minimal private state/<id>.landing record (pr, the forge's pr_head, project) when it releases a ship task whose request has not landed. The forge decides: the record is written unless the forge positively reports the request merged, because an unreachable forge is not evidence that anything landed. A failed write warns and never blocks cleanup, and the pending landing is reported so the released request is not forgotten. - bin/fm-pr-lib.sh resolves "the task's PR identity record" in one place, as the meta while a task is live and the landing record once it is released. The merge poll's validity and retirement checks go through that resolver, so a released task's merge watch can be rearmed and still retires normally. - bin/fm-pr-check.sh and bin/fm-pr-merge.sh accept a released task through that record, and rebuild one from a forge read of the request itself for a task released before landing records existed. Nothing is asserted by the caller. - A merge through a landing record re-reads the request at its forge and refuses unless it is still open, so no stale local value decides anything. It arms no poll, because a released task has nothing left to watch and the merge is synchronous, and the spent record is removed once the request lands. The metadata refusal is preserved exactly where it still means something: a task with no meta, no landing record, and no request the forge can resolve is refused before gh-axi is called, as before. * no-mistakes(review): enforce landing identity before reconstruction * no-mistakes(document): Document released-task landing identity
sbracewell64
added a commit
that referenced
this pull request
Aug 10, 2026
…34) * fix(bin): keep a released task's PR landable through the sanctioned path The captain's parked-completion ruling releases a ship worker once its pull request is done, green, and mergeable - that is, before it lands. Cleanup then removes state/<id>.meta, and both bin/fm-pr-merge.sh and bin/fm-pr-check.sh refused with "task metadata is unavailable" without it. Following the ruling therefore stranded the pull request from the only sanctioned merge command, and AGENTS.md section 7 forbids reaching around that guard with a lower-level one. Landing identity now comes from the forge rather than from the caller: - bin/fm-teardown.sh leaves a minimal private state/<id>.landing record (pr, the forge's pr_head, project) when it releases a ship task whose request has not landed. The forge decides: the record is written unless the forge positively reports the request merged, because an unreachable forge is not evidence that anything landed. A failed write warns and never blocks cleanup, and the pending landing is reported so the released request is not forgotten. - bin/fm-pr-lib.sh resolves "the task's PR identity record" in one place, as the meta while a task is live and the landing record once it is released. The merge poll's validity and retirement checks go through that resolver, so a released task's merge watch can be rearmed and still retires normally. - bin/fm-pr-check.sh and bin/fm-pr-merge.sh accept a released task through that record, and rebuild one from a forge read of the request itself for a task released before landing records existed. Nothing is asserted by the caller. - A merge through a landing record re-reads the request at its forge and refuses unless it is still open, so no stale local value decides anything. It arms no poll, because a released task has nothing left to watch and the merge is synchronous, and the spent record is removed once the request lands. The metadata refusal is preserved exactly where it still means something: a task with no meta, no landing record, and no request the forge can resolve is refused before gh-axi is called, as before. * no-mistakes(review): enforce landing identity before reconstruction * no-mistakes(document): Document released-task landing identity
sbracewell64
added a commit
that referenced
this pull request
Aug 11, 2026
…34) * fix(bin): keep a released task's PR landable through the sanctioned path The captain's parked-completion ruling releases a ship worker once its pull request is done, green, and mergeable - that is, before it lands. Cleanup then removes state/<id>.meta, and both bin/fm-pr-merge.sh and bin/fm-pr-check.sh refused with "task metadata is unavailable" without it. Following the ruling therefore stranded the pull request from the only sanctioned merge command, and AGENTS.md section 7 forbids reaching around that guard with a lower-level one. Landing identity now comes from the forge rather than from the caller: - bin/fm-teardown.sh leaves a minimal private state/<id>.landing record (pr, the forge's pr_head, project) when it releases a ship task whose request has not landed. The forge decides: the record is written unless the forge positively reports the request merged, because an unreachable forge is not evidence that anything landed. A failed write warns and never blocks cleanup, and the pending landing is reported so the released request is not forgotten. - bin/fm-pr-lib.sh resolves "the task's PR identity record" in one place, as the meta while a task is live and the landing record once it is released. The merge poll's validity and retirement checks go through that resolver, so a released task's merge watch can be rearmed and still retires normally. - bin/fm-pr-check.sh and bin/fm-pr-merge.sh accept a released task through that record, and rebuild one from a forge read of the request itself for a task released before landing records existed. Nothing is asserted by the caller. - A merge through a landing record re-reads the request at its forge and refuses unless it is still open, so no stale local value decides anything. It arms no poll, because a released task has nothing left to watch and the merge is synchronous, and the spent record is removed once the request lands. The metadata refusal is preserved exactly where it still means something: a task with no meta, no landing record, and no request the forge can resolve is refused before gh-axi is called, as before. * no-mistakes(review): enforce landing identity before reconstruction * no-mistakes(document): Document released-task landing identity
sbracewell64
added a commit
that referenced
this pull request
Aug 11, 2026
…34) * fix(bin): keep a released task's PR landable through the sanctioned path The captain's parked-completion ruling releases a ship worker once its pull request is done, green, and mergeable - that is, before it lands. Cleanup then removes state/<id>.meta, and both bin/fm-pr-merge.sh and bin/fm-pr-check.sh refused with "task metadata is unavailable" without it. Following the ruling therefore stranded the pull request from the only sanctioned merge command, and AGENTS.md section 7 forbids reaching around that guard with a lower-level one. Landing identity now comes from the forge rather than from the caller: - bin/fm-teardown.sh leaves a minimal private state/<id>.landing record (pr, the forge's pr_head, project) when it releases a ship task whose request has not landed. The forge decides: the record is written unless the forge positively reports the request merged, because an unreachable forge is not evidence that anything landed. A failed write warns and never blocks cleanup, and the pending landing is reported so the released request is not forgotten. - bin/fm-pr-lib.sh resolves "the task's PR identity record" in one place, as the meta while a task is live and the landing record once it is released. The merge poll's validity and retirement checks go through that resolver, so a released task's merge watch can be rearmed and still retires normally. - bin/fm-pr-check.sh and bin/fm-pr-merge.sh accept a released task through that record, and rebuild one from a forge read of the request itself for a task released before landing records existed. Nothing is asserted by the caller. - A merge through a landing record re-reads the request at its forge and refuses unless it is still open, so no stale local value decides anything. It arms no poll, because a released task has nothing left to watch and the merge is synchronous, and the spent record is removed once the request lands. The metadata refusal is preserved exactly where it still means something: a task with no meta, no landing record, and no request the forge can resolve is refused before gh-axi is called, as before. * no-mistakes(review): enforce landing identity before reconstruction * no-mistakes(document): Document released-task landing identity
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.
Intent
Repair the sanctioned landing path so a task released before its PR lands can still be landed
through it. The captain's parked-completion ruling releases a worker once its PR is green and
mergeable — before it lands — which stranded every such PR from the only sanctioned merge
command with
task metadata is unavailable.What changed
Teardown now preserves a minimal landing record for a task released with an unlanded PR, and
the merge/check commands accept a task whose metadata is gone, deriving landing identity
from the forge rather than from the caller. Two defects the review caught were fixed in the
same round:
pr=must now match the requested URL; reconstructionhappens only when no record exists. Previously a caller-supplied URL could silently rebind
any open PR to a released task id and merge it — on a repo where one branch is
simultaneously a fork PR and a live upstream contribution, that is not theoretical.
absent is correct; reconstruction on malformed defeated the tamper guard.
Validation
Suites green on the moved trunk:
fm-pr-merge16,fm-teardown43,fm-pr-check-security41, plus lint, doc-audience and the coverage guard — and four independent negative
controls, each constructing the failing condition and confirming the refusal fires.
merge-treeagainst trunk1149178fexits 0, and its result tree equals this branch'stree exactly, so no trunk content is lost.
Provenance
This is a fork-landing branch built from current trunk. It carries no pipeline signature and
none was copied — the pipeline raises against upstream, where this work is already open as
PR 1561, whose branch is deliberately left untouched. The signature check is expected to fail
for that reason, not because the content is unvalidated.