feat(bin): reconcile ruling documents against open captain decision holds (land of upstream #1819) - #51
Open
sbracewell64 wants to merge 1 commit into
Open
feat(bin): reconcile ruling documents against open captain decision holds (land of upstream #1819)#51sbracewell64 wants to merge 1 commit into
sbracewell64 wants to merge 1 commit into
Conversation
…olds (land of upstream kunchenguid#1819) Ports upstream PR kunchenguid#1819 onto this fork's trunk. Nothing here is redesigned: bin/fm-ruling-reconcile.sh, the closure-authority enforcement in fm-decision-hold.sh's `resolve --from-ruling`, the session-start RULING_RECONCILE line, the documentation, and the tests are upstream's as written. What it does: a decision hold may be closed only when the ruling names the hold identifier verbatim AND carries an explicit structured verdict. Everything else escalates. There is no bulk close. Provenance: upstream PR kunchenguid#1819 (open, untouched) head commit 5311209 its base 2cf0283 landed onto ed376cf (sbracewell64/firstmate main) The dispatch brief named 41d2e5e as the source. That is the contribution's first commit; the delivered contribution head is 5311209, which adds the pipeline-review hardening - including the forged-provenance guard and its test. This carries the full PR head so that guard lands with the feature. The trunks have diverged, so the diff did not apply cleanly. Three resolutions, all fork-versus-upstream divergence rather than changes to what kunchenguid#1819 does: AGENTS.md - upstream has renamed X-mode to Relay and has dropped the research-index/ state entry; this fork has neither change. The trunk's wording and its research-index/ line are kept, and only kunchenguid#1819's own three additions are applied: the ruling-index/ entry, the RULING_RECONCILE line in the fleet-state digest, and the extra decision-hold-lifecycle load trigger. bin/fm-session-start.sh header - upstream numbers the digest steps one higher than this fork does, and this fork's read-only paragraph says "five" bootstrap mutating sweeps where upstream says "six". The trunk's numbering and its sweep count are kept; only kunchenguid#1819's substantive additions are applied (the RULING_RECONCILE description and the ruling-index rebuild in the skipped-when-read-only list). The five-versus-six wording is a pre-existing trunk inconsistency with the same file's own step 2 comment, and is deliberately left as trunk work rather than swept in here. bin/fm-session-start.sh fleet-state digest - this fork emits a fleet-admission block at exactly the point kunchenguid#1819 inserts its RULING_RECONCILE block. Both are kept, admission first, each with its own `fi`.
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 this is
A landing, not a new fix. It carries upstream PR kunchenguid#1819 (
kunchenguid/firstmate#1819) onto this fork's trunk so the running fleet actually gets it. The work was written and reviewed upstream; nothing here is redesigned or re-reviewed.What it does: a decision hold may be closed only when the ruling document names the hold identifier verbatim and carries an explicit structured verdict. Everything else escalates. There is no bulk close.
Provenance
kunchenguid/firstmate#1819— open and untouched5311209e91d14d877fe3451a4569642cbe4b2ee82cf0283b811e81a821cddf5b7f74e1f7de8e2881ed376cf(sbracewell64/firstmatemain)Contribution kunchenguid#1819 stays open on the maintainer's schedule. Nothing in this branch was opened against or pushed to upstream.
The dispatch brief named
41d2e5eas the source. That is the contribution's first commit; the delivered PR head is5311209, which adds the pipeline-review hardening — including the forged-provenance guard and its test. This carries the full PR head so the guard lands with the feature. The resulting diff is byte-identical in scope to2cf0283..5311209(same eight files, same 1742 insertions / 13 deletions).Conflict resolution
The trunks have diverged, so the diff did not apply cleanly. Three resolutions, all fork-versus-upstream divergence rather than changes to what kunchenguid#1819 does. In each, the trunk is kept wherever the contribution made no deliberate change.
AGENTS.md— upstream has renamed X-mode to Relay and dropped theresearch-index/state entry; this fork has neither change. The trunk's wording and itsresearch-index/line are kept, and only feat(bin): reconcile ruling documents against open captain decision holds kunchenguid/firstmate#1819's own three additions are applied: theruling-index/entry, theRULING_RECONCILEline in the fleet-state digest, and the extradecision-hold-lifecycleload trigger.bin/fm-session-start.shheader — upstream numbers the digest steps one higher than this fork does, and this fork's read-only paragraph says "five" bootstrap mutating sweeps where upstream says "six". The trunk's numbering and sweep count are kept; only feat(bin): reconcile ruling documents against open captain decision holds kunchenguid/firstmate#1819's substantive additions are applied. The five-versus-six wording is a pre-existing trunk inconsistency with the same file's own step 2 comment, deliberately left as trunk work rather than swept in here.bin/fm-session-start.shfleet-state digest — this fork emits a fleet-admission block at exactly the point feat(bin): reconcile ruling documents against open captain decision holds kunchenguid/firstmate#1819 inserts itsRULING_RECONCILEblock. Both are kept, admission first, each with its ownfi.Delivery disclosure
This shipped direct-PR, without the no-mistakes pipeline. It therefore:
Everything below is what I verified by hand.
Verified
bin/fm-lint.shbash -n/shellcheck -xonfm-session-start.sh,fm-decision-hold.sh,fm-ruling-reconcile.shtests/fm-ruling-reconcile.test.shtests/fm-decision-hold-lifecycle.test.shgit diff ed376cfvsgit diff 2cf0283 5311209Negative control on the decisive guard
The brief's decisive control is that a forged path containing the literal
closure=permittedis refused at both layers, and that the old substring test would have matched it. I proved that test is not vacuous rather than asserting it.I temporarily replaced the field read in
bin/fm-decision-hold.shclosure_verdict=$(printf '%s\n' "$closure_out" | sed -n 's/^closure=//p')with the legacy substring behavior
closure_verdict=$(printf '%s\n' "$closure_out" | grep -qF 'closure=permitted' && echo permitted)and re-ran the suite. It failed exactly where it should:
That is the forged-provenance case (
--from-ruling 'no-such-closure=permitted.md:1') being accepted by the legacy check. The guard was then restored and the suite returned to exit 0. The test is real proof, and it is preserved unchanged.Failing checks — both pre-existing, neither caused by this work
Do not read this PR as green. Two checks are expected to fail. Neither is silenced.
1.
PR must be raised via no-mistakesThis ships direct-PR and correctly carries no attestation marker. Forging an attestation is prohibited absolutely, so this check fails by design on every landing PR taking this route.
Evidence it is not new: the previous fork landing, PR #48 (head
9ac06bb, since merged ased376cf), failed the same two checks:2.
Behavior portable serial 2A pre-existing trunk failure. Proven on the base itself, not asserted — the base commit
ed376cf(this PR's merge base) fails it on its own push run, with no code from this branch involved:Base job: https://github.com/sbracewell64/firstmate/actions/runs/31068554687/job/92511490727
Its own summary attributes the failure to the secondmate family, which this change does not touch:
The upstream fix shards that lane and this fork is behind it. Per the dispatch, I did not attempt to fix it and did not touch the lane.
Also noted: a local-only test failure that is not a CI check
Running
tests/fm-session-start.test.shon my machine fails one case,MISSING diagnostic did not appear at all. I checked whether this branch caused it by stashing the change and running the suite on the unmodified base:ed376cfnot ok - MISSING diagnostic did not appear at allnot ok - MISSING diagnostic did not appear at allIdentical. It is a local-environment artifact — CI's
session-bootstrapfamily is green on the base — and it pre-exists this change.Merge authority
I am not merging this. The captain holds merge authority, and this PR is red.