Repository navigation
fix: harden no-mistakes validation contract - #97
Merged
Merged
Conversation
…f-fix duplication Rewrite the no-mistakes validation block scaffolded into every ship brief so a crewmate knows the right move at each gate: the pipeline owns every fix (including the fix for a real bug review finds in the crewmate's own code); respond, never self-implement/abort/re-run; the ask-user loop end to end (feed the decision back via axi respond, do not hand-fix); process every return (backgrounding ok, never idle-wait for auto-advance); avoid --yes (it auto-resolves ask-user with zero escalation); and review findings always gate (review auto-fix is disabled). Add the supervisor heuristic in AGENTS.md: firstmate keys off the no-mistakes run step status - running/fixing/ci means working, awaiting_approval/fix_review means parked (surfaced as awaiting_agent: parked <duration> on axi status) - not shell liveness, plus a self-fix-duplication red flag (hand-commits/abort/re-run mid-validation). Resolves the gate-park-deadlock and self-fix-duplication failure modes.
leo1oel
added a commit
to leo1oel/nemo
that referenced
this pull request
Jun 27, 2026
…liveness on drain (kunchenguid#101) (#12) Port two upstream fixes; both are harness-agnostic supervision/contract changes. kunchenguid#97 harden no-mistakes validation contract: - bin/fm-brief.sh: rewrite the ship brief's validation block - the pipeline owns every fix (incl. the fix for a real bug review finds in the crewmate's own code); respond, never self-implement/abort/re-run; process every return (backgrounding ok, never idle-wait for auto-advance); review findings always gate; avoid --yes (it auto-resolves ask-user with zero escalation). - AGENTS.md section 7: supervisor heuristic - judge a validating crewmate by the run step status (running/fixing/ci = working; awaiting_approval/fix_review = parked), not shell liveness, plus a self-fix-duplication red flag. - CONTRIBUTING.md: same crewmate-validation contract. kunchenguid#101 assert watcher liveness during wake drain: - bin/fm-wake-drain.sh: after draining, call fm-guard.sh (best-effort) so a lapsed supervision chain also surfaces on a plain drain-and-handle turn, not only when a guarded script runs. Graced/beacon-based, so silent right after a normal fire. - AGENTS.md section 8: unambiguous re-arm rules - keep exactly one live cycle, re-arm after each FIRE and never churn on a healthy/started no-op, run fm-watch-arm standalone (never bundled), never end a turn blind (holds included). - fm-guard.sh / fm-watch-arm.sh: comment clarifications; docs synced. - tests/fm-wake-queue.test.sh: pin FM_ROOT (drain now runs the tangle check) and add a regression test (drain warns on a lapse, silent after a fire). shellcheck clean; full suite green (96 checks).
This was referenced Aug 9, 2026
This was referenced Oct 7, 2026
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
* feat(bin): wake instantly on glasses mailbox and inbox file events Interrupt the watcher poll wait when the mailbox DB or bridge inbox changes so pending voice and photo checks run immediately instead of sitting until the next slow-check interval. Co-authored-by: Cursor <[email protected]> * no-mistakes(review): Preserve glasses wake race across herdr failures * no-mistakes(test): Suppress noclobber noise in watcher wake races * no-mistakes(document): Document instant glasses wake behavior * no-mistakes(lint): Captain: assert fractional poll propagation in file-wait race * no-mistakes: apply CI fixes --------- Co-authored-by: Cursor <[email protected]>
fritznoff
pushed a commit
to fritznoff/starship
that referenced
this pull request
Nov 2, 2026
* fix(fork-surface): repair glasses capability commit to the landed squash merge The glasses-file-event-wake entry still named pre-squash branch commit 74d836d, which no longer resolves anywhere in this clone or on origin, so the fork-surface check failed for every session. PR kunchenguid#97 landed as ecae812; record the same post-merge repair the bridge capability above documents. Upstream: none (fork-manifest hygiene, not a port) * fix(bin): correct session lock and attached watcher supervision (kunchenguid#1545) Port upstream 88b2a94 onto this fork's diverged supervision code, adapting rather than overwriting. Fault 1, session-lock identity and ownership. Upstream rewrote its bin/fm-session-lock-lib.sh; this fork never had that file, so the same semantics land in this fork's owners instead. bin/fm-primary-scope-lib.sh gains whole-path-component and argv[0] harness evidence (fm_harness_path_name, fm_harness_process_matches), a contiguous verified-harness ancestry walk (fm_harness_ancestry_pids), membership ownership (fm_harness_ancestry_contains), the outermost-of-run resolver (fm_harness_ancestry_pid), and a relation whose ancestry answer is membership rather than one chosen pid. bin/fm-lock.sh resolves harness_pid through that shared owner and now recognizes a live lock held inside this session's own ancestry as its own earlier acquisition, keeping the recorded owner instead of refusing or rewriting it. Fault 2, attached arms reporting delivered cycles as failures. The watcher publishes each printed reason to state/.watch-deliveries.log bound to its PID and process identity before releasing the singleton (bin/fm-watch.sh wake + bin/fm-wake-lib.sh, which owns the ledger once for watcher and arm), fm_watcher_healthy returns the matched identity, and bin/fm-watch-arm.sh tracks cycle identity and resolves an unobservable close against the delivery record: a matching record reports the delivered wake and exits zero, only a cycle that delivered nothing stays the typed nonzero failure. Covers started-child and attached closes on every harness protocol. Fork-preserving adaptations: - FM_HARNESS_RE keeps this fork's verified set (no pi-signed); loose holder-liveness survives as a boundary-checked argv-token tier so profile launchers named codex-primary still read as live holders while ordinary ~/.claude/hooks paths do not. - The ancestry walk keeps the fork's eight-parent budget, preserving documented parity with Pi's lockOwnership(). - docs/verification/supervision.md hunks skipped: this fork has no such file. - Upstream's e2e drove bin/fm-claude-stop-autoarm.sh, absent here; the end-to-end layer targets this fork's real bin/fm-lock.sh in orphaned version-named, daemon-parented, and combined process trees instead. - Hermeticity hardening for every supervision suite (incident-driven): tests/lib.sh drops inherited operational-home variables and pins a temp hermetic FM_HOME, teardown reaps only path-scoped children, and new tests/fm-supervision-test-isolation.test.sh proves a test watcher or --restart can never resolve or stop a real home. - tests/fm-test-run.sh registers the three suites in watcher-wake-lock and serial shard 2; fixture homes pinned explicitly in the affected suites per the hermeticity contract. Full bin/fm-test-run.sh --all passes at this tree (140 scripts, 0 failed); shellcheck clean via bin/fm-lint.sh on every touched script. Upstream: 88b2a94 * fix(bin): harden supervision health against fresh leftover beacons (kunchenguid#1495) Port the transferable core of upstream 33a4287: every supervision consumer now decides alarm state with the same identity-matched live-watcher and fresh-beacon predicate, so a dead or reused watcher pid with a leftover beacon can no longer read as healthy. bin/fm-guard.sh drops its beacon-fresh-only field and calls fm_watcher_healthy (bin/fm-wake-lib.sh) - the predicate the arm wrapper and turn-end guard already use. bin/fm-supervision-lib.sh's docstring records that split: banner text from the status fields, decisions from the shared predicate. Skipped as inapplicable to this fork, which has no Claude Stop auto-arm and no --claude guard mode: - bin/fm-claude-stop-autoarm.sh failure episodes, bounded retries, one-time attended fail-open, and post-alarm suppression; - lock role records (fm_lock_set_role/fm_lock_role) and fm_failure_episode_reset, whose only consumers are that subsystem; - the Claude repair-line rewording, X-mode-as-need source, and procevent sources, which would misdocument this fork's different continuity model. Regression coverage ports upstream's: a fresh beacon without a live watcher stays an alarm; healthy-recovery cases record genuinely live identity-matched holders instead of touching only the beacon; drain liveness asserts the same; secondmate config-push fixtures pin live watchers where they assert silent stderr. fork-surface.conf claims the ported surface as the supervision-recovery-port capability. Upstream: 33a4287 * fix(bin): name the true watcher-down reason and key episodes on it (kunchenguid#1661) Port the transferable core of upstream d0461e4: the pull guard's health verdict becomes model-aware and its banner names the real failing condition instead of always blaming the beacon. bin/fm-wake-lib.sh gains fm_supervision_model and fm_watcher_supervision_verdict. Under a between-turns arm-owner model (FM_SUPERVISION_MODEL=autoarm) a fresh beacon with no live watcher is healthy mid-turn and only a stale beacon alarms; under persistent models a live identity-matched watcher with a fresh beacon is still required. This fork maps every detected harness - Claude included - to the persistent model, because its Claude continuity runs tracked background arms rather than a Stop-hook auto-arm; the override keeps the model branch exercised and upstream-shaped. bin/fm-guard.sh consumes the verdict: the once-per-episode dedup keys on the failing condition instead of the beacon mtime (which any beacon touch used to churn into a fresh episode), and the banner now says whether the home lacks a live watcher process or a genuinely fresh beacon. The turn-end guard keeps the PID-strict predicate unchanged, as does the arm layer. Skipped as inapplicable: upstream's spawn-time FM_SUPERVISION_MODEL injection for secondmates (this fork launches every harness under the persistent default), the autoarm/claude-protocol doc rewrites, and the procevent/X-mode need sources this fork's guard has never had. docs/scripts.md rows for the guard and drain reflect the supervision- health wording. Upstream: d0461e4 * no-mistakes(review): Fix path-scoped test process cleanup * no-mistakes(document): Document supervision recovery contracts * no-mistakes: apply CI fixes
|
Approved spec change (phone sheet, more than 5 departures): in the phone booking sheet (below 1024px), a tour with more than 5 upcoming departures now lists them as scrollable departure cards with their spots-left badges, instead of the dropdown, so phones never open a native picker on top of the sheet. The desktop panel (1024px and up) keeps the dropdown above 5 departures. The captain approved this change in the booking sheet UX review (choice 6, option B). |
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
Harden firstmate's no-mistakes validation contract to stop two related crewmate failure modes when driving the no-mistakes pipeline: (A) the gate-park deadlock - idle-waiting at a parked gate expecting it to auto-advance - and (B) self-fix duplication - a crewmate aborting an active run and hand-implementing fixes, including fixes for real bugs review found in its OWN code, instead of letting the pipeline apply them via 'axi respond'. Both stem from the contract saying what NOT to do without naming the right move at the gate.
This is a wording/contract change only: no bin/ script logic beyond the brief text, and no changes to the no-mistakes tool itself (separate repo).
Changes:
Deliberate decisions a reviewer reading only the diff would not know: I intentionally steered the contract AWAY from --yes even though an earlier internal design investigation recommended --yes as a robust deadlock-proof default, because --yes bypasses the ask-user human-escalation contract and the captain wants the human in the loop on genuine product/intent decisions. The wording is grounded in an internal run-model investigation of the no-mistakes axi run/respond/gate behavior (return-vs-block semantics, --yes resolving ask-user findings, the unbounded approval-gate wait) and uses the actual merged field name 'awaiting_agent: parked '. This resolves the queued gate-park-deadlock item and the self-fix-duplication failure mode.
What Changed
Risk Assessment
✅ Low: Captain, the change is a narrow instruction-only update with no substantiated merge-blocking risks found in the changed contract text.
Testing
Exercised the existing brief-generation regression test and an evidence-producing end-to-end brief scaffold; the generated markdown and supervisor contract show the intended gate-driving behavior, with no UI surface involved.
Evidence: Generated no-mistakes ship brief
Evidence: Brief contract and supervisor heuristic evidence
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
tests/fm-tangle-guard.test.shGenerated a real no-mistakes-mode ship brief withFM_HOME=/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KW2TARPF8J51M5T5VY2B6VPF/fm-brief-contract-home bin/fm-brief.sh gate-contract-e2e alphaand asserted the new validation contract text with focusedgrepchecks.CheckedAGENTS.mdwith focusedgrepassertions forrunning/fixing/ci,awaiting_approval/fix_review,awaiting_agent: parked <duration>, andRed flag - self-fix duplication, plus absence of the oldnever backgrounding or idle-waitingcontradiction.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.