Repository navigation
test(secondmate): trim redundant spawn ordering assertions - #56
Conversation
The spawn home-validation test re-proved "no tmux window created before validation" for all 10 rejection reasons. All spawn validation runs inside validate_firstmate_home_for_spawn, which returns before the caller reaches tmux new-window, so a per-reason ordering regression cannot occur. The repeats tested a structurally impossible condition. Keep one canonical ordering proof (with a comment so the repeats are not re-added) and let each rejection assert only its own refusal message. Every distinct rejection guard, and every security guard (symlink, path-escape, nested/overlapping home, force-teardown safety), is unchanged. All 54 cases still pass.
…enguid#56) * fix(hermes): reap persistent TUI process tree Bind each Firstmate Hermes launch to its lifecycle token and require the matching metadata, state, and registry proof before teardown signals the marked roots and descendants. Harden live E2E cleanup and record tmux and isolated Herdr verification that task-owned processes are removed without touching personal Hermes sessions. * no-mistakes(review): fix(hermes): track reap set across KILL and allow legacy teardown * no-mistakes(review): fix(hermes): legacy fallback, defunct survivors, lsof-absent group reap * no-mistakes(review): fix(hermes): jq-optional ownership proof, forkless marker scan, live active teardown * no-mistakes(review): perf(hermes): bounded ps marker scan, token-root closure scope * no-mistakes(review): fix(hermes): portable process-environment ownership scan * no-mistakes(review): fix(hermes): try every environment ps form, propagate scan failures * no-mistakes(review): fix(hermes): drop defunct pids, pane-seeded live capture * no-mistakes(review): fix(hermes): refuse unprovable identities, drop live settle retry * no-mistakes(review): docs(hermes): record final-head live teardown verification * no-mistakes(review): fix(hermes): fail closed on unreadable procfs, document refusal recovery * no-mistakes(review): fix(hermes): live marker scan falls through unreadable procfs * no-mistakes(review): docs(hermes): final-head evidence, clarify missing-vs-inconsistent proof * no-mistakes(document): docs(hermes): correct post-probe commit scope in verification record * no-mistakes: apply CI fixes
… kills it silently (kunchenguid#56) * fix(bin): close the Claude Stop auto-arm park before the hook timeout Claude registers the Stop auto-arm with "timeout": 28800 and TERMs the whole hook process tree at that timeout without delivering any rewake. On a quiet fleet every no-change heartbeat is absorbed, so one watcher park can outlive the timeout; the watcher then dies with the hook, the claim stays frozen at arming, and nothing re-arms until someone types into the session. - The hook runs the arm as a tracked child and starts a park-boundary timer (a relative sleep, immune to wall-clock steps). At fm_claude_park_seconds (default 27000, always below 28800) it TERMs the arm, stops this home's watcher through the new fm-watch-arm.sh --stop, and closes the park as an ordinary exit-2 rewake, so the handling turn's Stop starts a fresh park. - An arming claim older than the park boundary is no longer open, so a Stop that lands just before an old park is killed supersedes it instead of deferring to it. - fm-watch-arm.sh --restart and --stop share one home-scoped stop. - Tests: a quiet park closes at the boundary with one rewake, an expired claim is superseded, the boundary stays below the hook timeout, and --stop ends a real watcher with downtime published and no re-arm. * no-mistakes(document): docs: describe the Claude Stop park boundary, drop stale foreground/claim-open prose --------- Co-authored-by: NewAiCoder <claude@theinbtw.com>
Measured on CI (final — 3 runs on this PR)
Steady state: ~19 billed minutes vs ~22 baseline, image build 8 m 21 s → 19–22 s on every future PR, and 11+ minutes of margin under the 30-minute timeout (the old gate was cancelled at the cliff). Why not 4–6 minutes: shared 4-vCPU runner; per-case latency roughly triples at 4-way concurrency (5.3 s → ~14 s), capping throughput gains at ~1.5–1.8×, with the heavy oracle tail degrading further. Breaking that cap means reusing pytest processes/containers — exactly what the per-case isolation guarantee (#49) forbids. Run-to-run noise (±15%) also puts finer tuning (3 vs 4 workers, Everything else in the description stands: isolation unchanged (fresh container + dataset per case), same pass/fail semantics, worker sizing 4 × ~2.3 GB ≈ 11 GB inside 16 GB, Frontend-only skip evidence: the |
|
Pushmeldingen op Android werken op staging. Met de APK met Firebase op een emulator, ingelogd als testaccount: na de eerste vraag vraagt de app om toestemming, en met de app op de achtergrond komt binnen een halve minuut "Managed Cowork / Your answer is ready". Tikken opent de chat met het antwoord. Productie heeft de sleutel ook al. Daar gaat het aan met de uitrol van https://github.com/RentMagic/infodatek.managed-cowork/pull/765, die de mount meebrengt. iPhone wacht nog op de APNs-sleutel. |
…unchenguid#56) * fix(continuity): allow fm-session-start.sh in the watcher-continuity gate fm-session-start.sh acquires the home lock first and drains the wake queue itself, making it a recovery command, but the continuity gate's recovery set omitted it, so every fresh session hit a deny on the exact command AGENTS.md mandates be run first. * no-mistakes(review): clarify continuity deny guidance and bootstrap allow boundary * no-mistakes(review): use verifiable session-start precondition in continuity deny guidance * no-mistakes(review): document session-start allowance limitation and fix guidance drift * no-mistakes(review): describe visible-status projection as a write, not a read * no-mistakes(document): add session-start allowance to stale continuity-gate doc copies * docs(continuity): correct known-limitation feasibility claim The gate does not currently distinguish a fresh pre-lock session from a mid-session re-run, but that is a scope deferral, not an inherent limitation: fm-sessionstart-nudge.sh's lock_is_in_ancestry() already does the equivalent same-process distinction, so point at it as the feasible reference for follow-up work instead of overclaiming the gate cannot do this. * no-mistakes(document): fix over-broad model_live claim in continuity known limitation * no-mistakes(review): scope continuity deny guidance by shared session-lock ancestry
…chenguid#56) * feat(bin): tell a Mothership room card how the work taken on for it goes A backlog task filed for a room request the owner took on carries a `mothership: <room>/<card>` ref in its body, which the accepted line now names. Its card then hears one short line at each lifecycle step: progress when the work is dispatched, progress with the PR address when its PR is recorded, a problem for each new blocker in its status log, and a result when it lands, which settles the ship's part of the card. Each line runs through the room's allow-list under the task's project and through the link's private word check, with a client id fixed per task and event. A send the link refuses or cannot make wakes the first mate and never holds up the step that asked for it; a task with no ref sends nothing. * no-mistakes(review): Read quoted card refs; blocked-scan never waits on task locks * no-mistakes(test): Wait for task lock before blocked-scan cleanup check * no-mistakes(document): Name the card ref in tap-desk accepted-work filing * fix(fork-surface): claim the room-card report suite under mothership-monitor
Brings in the Mothership room-card reports (kunchenguid#56) and the one-at-a-time Factory pane rebuild (kunchenguid#57), so the fresh pipeline run starts on top of current main and keeps the upstream merge commit.
Intent
Trim tests/fm-secondmate.test.sh to remove over-defensive/redundant test cases without losing any distinct behavior coverage. The suite grew during a defensive review-hardening pass. After a thorough audit (including the production code structure and two independent reviews), I found the suite is overwhelmingly load-bearing: the three scripts fm-home-seed.sh, fm-spawn.sh, fm-teardown.sh each INDEPENDENTLY re-implement their own home path-escape/symlink/nested-home validation (no shared library), so testing the same scenario through seed AND spawn AND teardown is legitimate separate coverage, not redundancy. I deliberately kept ALL security guards intact (symlink-escape, path-escape, nested/overlapping-home rejection, and the --force teardown safety tests). The ONLY genuine over-defensive redundancy I removed is in test_secondmate_spawn_requires_seeded_matching_home: it re-proved 'no tmux window was created before validation' for all 10 rejection reasons, but all spawn validation runs inside validate_firstmate_home_for_spawn which returns before the caller reaches 'tmux new-window' (verified at fm-spawn.sh line 292 vs 321), so a per-reason ordering regression is structurally impossible. I consolidated those 9 repeats to one canonical ordering proof (kept on the first sub-case, with an explanatory comment so the repeats are not re-added) plus removed 9 now-dead ': > $log' resets, while keeping every per-reason rejection-message assertion. I intentionally did NOT trim the one-per-function ordering checks in the teardown tests because those are self-contained per-scenario coverage, not intra-function repetition, and they sit in the protected categories. Net change is 4 insertions, 19 deletions in one file; no production scripts changed; all 54 test cases still pass. This is a test-suite-only cleanup.
What Changed
new-windowordering assertions from secondmate spawn rejection sub-cases, captain, keeping one canonical pre-validation side-effect check.tests/fm-secondmate.test.sh.Risk Assessment
✅ Low: Captain, risk is low because this is a narrow test-only cleanup that preserves the per-reason rejection assertions plus one fresh-log ordering check before launch.
Testing
Exercised the changed secondmate shell behavior suite and a focused end-to-end spawn-validation CLI transcript; no baseline run was provided, no UI surface was involved, and all verification completed without findings.
Evidence: fm-secondmate behavior test transcript
Evidence: spawn validation CLI transcript
Focused CLI transcript covers 10 spawn rejection cases and ends withtmux new-window observed: no.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.
Inspected the target diff withgit diff --find-renames 7651a3c08341e065d582881b2360d44f7f3abd41..1ea4359963876316e98fca0039e274803caedf97 -- tests/fm-secondmate.test.sh.Verified the production ordering path withrg -n "validate_firstmate_home_for_spawn|new-window|secondmate home" bin/fm-spawn.shandsed -n '250,340p' bin/fm-spawn.sh.Rantests/fm-secondmate.test.sh > /var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KVV2KCZHCT72JPJ4MDBS6M9X/fm-secondmate-test-output.txt 2>&1.Ran a focused inlinebashCLI scenario that invokedbin/fm-spawn.sh domain <home> codex --secondmateagainst the seeded-home rejection cases and wrote/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KVV2KCZHCT72JPJ4MDBS6M9X/spawn-validation-cli-transcript.txt.Checked cleanup withgit status --short; the working tree remained clean.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.