fix: ground Bearings in measured liveness and live PR state - #1735
Closed
coreldh wants to merge 13 commits into
Closed
fix: ground Bearings in measured liveness and live PR state#1735coreldh wants to merge 13 commits into
coreldh wants to merge 13 commits into
Conversation
…tes,landed,reports,queued,recorded-prs,unhealthy,pr-repos}; summary-argjson/home-liveness-env remain
3 tasks
Author
|
Superseded by #1985, which republishes this change cleanly from current This PR was measured as |
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
Close the one candidate-only Bearings round 6 regression by updating the decision-hold lifecycle baseline to the correct guarded property: a completed-but-unreclaimed in-flight task with verified-absent endpoint and worker must surface as a measured-liveness gate. Prove that property goes RED when the measured-liveness selector is neutralized. Preserve production semantics and preserve the pre-existing held/queued captain-decision gate; a held row must not receive a measured-liveness gate, while a genuinely active worker must not gate. Restore and execute all nine decision-hold lifecycle functions. Publish this validated change as a PR against kunchenguid/firstmate. The PR body must state honestly that six full-suite assertion failures fail identically on main and are inherited, not introduced; do not imply a clean full suite. Do not merge and do not contact the external maintainer. Stop when CI first goes green rather than monitoring the approval queue. Any ask-user finding requires captain escalation and must not be answered automatically.
What Changed
mainand are inherited, not introduced.Risk Assessment
✅ Low: Captain, the focused correction safely normalizes the supported trailing-slash URL form while retaining live MERGED-only classification and the required liveness invariants.
Testing
No outer baseline output was supplied. Local targeted execution passed all nine restored lifecycle functions; direct CLI JSON evidence demonstrates the guarded, held, active-worker, active-run, and neutralized outcomes, while an isolated production-selector mutation made the focused regression fail as required. This is a CLI/JSON change, so screenshots were not applicable. Transient worktree artifacts were removed.
Evidence: Guarded versus neutralized Bearings comparison
Evidence: Guarded Bearings response
Evidence: Selector-neutralized Bearings response
Evidence: Selector-neutralization mutation failure
Evidence: Nine-function targeted test run
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 2 issues found → auto-fixed ✅
bin/fm-crew-state.sh- merge conflict rebasing onto origin/maindocs/architecture.md- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
🔧 **Review** - 5 issues found → auto-fixed (2) ✅
tests/fm-decision-hold-lifecycle.test.sh:155- Required criterion is absent: “Prove that property goes RED when the measured-liveness selector is neutralized.” This test only exercises the positive selector path; it never neutralizes the gate selector and verifies the phantom-gate assertion fails. Add a controlled neutralized run and require RED.bin/fm-liveness-snapshot.sh:428- This contradicts “a genuinely active worker must not gate.” A missing endpoint forcibly sets worker presence and activity to absent, even when both process samples prove a matching active worker. Bearings then emits a false measured-liveness gate. Derive worker presence independently from process evidence and do not let endpoint absence erase it.bin/fm-bearings-snapshot.sh:510- A matching active no-mistakes run can report current_state=working while its retained harness is temporarily static/parked during CI; this selector ignores that authoritative run-step state and emits a measured-liveness gate. Use one effective-working predicate that accepts either authoritative active run-state or measured activity, while preserving the absent phantom case.bin/fm-bearings-snapshot.sh:588- The live PR result is not applied to Recently Landed: every local Done row is emitted even when candidate_prs verifies its PR as OPEN or NOT_VERIFIABLE. This conflicts with the changed Bearings contract that Recently Landed contains merged PRs and local PR state must not replace forge evidence. Join selected PR artifacts to their live verification before classifying them as landed.bin/fm-bearings-snapshot.sh:297- Named PRs are verified sequentially with two separately bounded calls per URL. With default bounds, an outage can delay plain Bearings by up to roughly 17 minutes; --include-prs can grow much larger. Add a total verification budget or bounded concurrency and emit NOT_VERIFIABLE for rows left when that budget expires.🔧 Fix: Fix Bearings liveness and landed PR classification
1 warning still open:
bin/fm-bearings-snapshot.sh:429- The verifier accepts PR URLs with a trailing slash, but stores GitHub's canonical URL without it; this exact-string join then treats a verified merged.../pull/7/as missing and excludes it from Recently Landed. Normalize the source URL before joining or retain the requested URL as the join key.🔧 Fix: Normalize trailing-slash PR joins for landed classification
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bin/fm-test-run.sh tests/fm-decision-hold-lifecycle.test.shexecuted all nine lifecycle functionsREPO_ROOT="$PWD" EVIDENCE_DIR=… bash …/capture-bearings-liveness-fixture.shcaptured realfm-bearings-snapshot.sh --jsonresponsesjq -n --slurpfile guarded … --slurpfile neutralized …produced and asserted the lane comparisonIsolated mutation changed the production measured-liveness selector tofalse;bash .no-mistakes-test-mutation/tests/fm-decision-hold-lifecycle.test.shexited 1 at the intended four-lane assertionVerified 9 definitions, 9 invocations, the expected mutation failure, comparison invariants, transient-fixture removal, and a clean worktree✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.