Skip to content

fix(bin): fail closed on fleet snapshot framing and jq argv overflow - #3

Merged
willchen95 merged 3 commits into
mainfrom
fm/fm-fleet-snapshot-correct-r90
Aug 13, 2026
Merged

fix(bin): fail closed on fleet snapshot framing and jq argv overflow#3
willchen95 merged 3 commits into
mainfrom
fm/fm-fleet-snapshot-correct-r90

Conversation

@willchen95

Copy link
Copy Markdown
Owner

Intent

Correct remaining fleet read-framing duplicate-ID and cleanup false successes. Also fix the jq argv overflow path used by bearings (oversized --argjson) so fm-bearings-snapshot.sh works on this fleet size. Firstmate shared tracked fix. Load firstmate-coding-guidelines before edit. Tests must stay green. Do not force-push.

What Changed

  • Fleet snapshot now enumerates scout reports from a checked NUL-terminated find stream and fails closed with no JSON on incomplete framing, non-regular paths, or duplicate ids/paths.
  • Large snapshot and bearings payloads are staged in process-local files instead of --argjson, so oversized homes no longer hit the kernel argv limit.
  • Snapshot publication now requires verified workspace cleanup and signal-aware teardown; cleanup or post-stage failures emit no JSON.

Risk Assessment

✅ Low: Both prior findings are verifiably fixed at the shared file-staging boundary, the full diff satisfies every source-verifiable intent constraint, behavior-based fail-closed tests cover the new framing and cleanup paths, and no residual argv-scaling or new defects were found.

Testing

Ran the two changed behavior suites (all green), then exercised the public snapshot and bearings CLIs on the live firstmate home and an oversized disposable home. The live 327KB snapshot and 1.4MB oversized snapshot both publish complete JSON and project through bearings; the old --argjson transport still fails with Argument list too long on that live payload. Duplicate IDs, truncated report-list framing, and cleanup failure all fail closed with empty stdout and no leftover workspace.

Evidence: Reviewer packet tying live, overflow, and fail-closed evidence
# Fleet snapshot / bearings correction — operator evidence

## Live firstmate home (FM_HOME=/home/willc/firstmate)

- 65,542-byte backlog, 701 scout reports, 6 live task metas
- `bin/fm-fleet-snapshot.sh --json` → 327,031-byte `fm-fleet-snapshot.v1` in 5.71s
- 701 unique scout IDs and paths; `main_inventory.valid=true`
- `bin/fm-bearings-snapshot.sh --json --all-landed --all-reports` → 109,302-byte `fm-bearings.v1` with 701 reports
- Default TOON bearings rendered the same live home (10,077 bytes)

That 327KB snapshot is larger than this host's per-argument exec limit.

## Old jq --argjson path vs new file path

Against the live 327KB snapshot:

- `jq -n --argjson snap "$(cat snapshot)" '$snap.schema'` → rc 126, empty stdout, `Argument list too long`
- `jq -er '.schema' < snapshot` → `fm-fleet-snapshot.v1`

## Oversized disposable home (211,233-byte backlog, 1,200 done rows)

- `fm-fleet-snapshot.sh --json` → 1,433,679-byte snapshot, 1,200 done records
- `fm-bearings-snapshot.sh --json --all-landed` → 1,200 landed rows
- no leftover `fm-fleet-snapshot.*` / `fm-bearings-snapshot.*` workspaces from this run

## Fail-closed public CLI

- duplicate scout IDs → rc 1, empty stdout, `scout report read failed`, no leftover workspace
- cleanup `rm` failure → rc 1, empty stdout, `final snapshot publication failed`, no leftover workspace
- truncated NUL report list → rc 1, empty stdout, `scout report read failed`, no leftover workspace
Evidence: Live fleet snapshot transcript

FM_HOME=/home/willc/firstmate backlog_bytes=65542 scout_reports=701 snapshot_rc=0 snapshot_bytes=327031 elapsed_sec=5.71

=== live fleet snapshot (worktree bin/fm-fleet-snapshot.sh --json) ===
FM_HOME=/home/willc/firstmate
backlog_bytes=65542
scout_reports=701
state_metas=6

snapshot_rc=0
snapshot_bytes=327031
--- time/stderr ---
elapsed_sec=5.71 max_rss_kb=19892 exit=0
Evidence: Live fleet snapshot summary

schema=fm-fleet-snapshot.v1 backlog_records=99 tasks=6 scout_reports=701 unique_ids=701 unique_paths=701 main_inventory.valid=true

=== live snapshot summary ===
{
  "schema": "fm-fleet-snapshot.v1",
  "generated": "2026-08-13T14:23:16Z",
  "fm_home": "/home/willc/firstmate",
  "backlog_present": true,
  "backlog_records": 99,
  "tasks": 6,
  "scout_reports": 701,
  "main_inventory": {
    "valid": true,
    "reason": null,
    "orphan_in_flight": [],
    "unstructured_current_count": 0
  },
  "secondmate_current_total": 0,
  "secondmate_current_shown": 0,
  "secondmate_landed": 0
}

=== unique scout report IDs / paths ===
{
  "unique_ids": 701,
  "unique_paths": 701,
  "count": 701
}

=== leftover snapshot workspaces after success ===
/tmp/fm-bearings-snapshot.3617949.1541
Evidence: Live fleet snapshot JSON
{
  "schema": "fm-fleet-snapshot.v1",
  "generated": "2026-08-13T14:23:16Z",
  "fm_home": "/home/willc/firstmate",
  "roots": {
    "fm_root": "/home/willc/.no-mistakes/worktrees/93a00de1dbec/01KZXPPT95NPM8EGP8E0NBEME3",
    "state": "/home/willc/firstmate/state",
    "data": "/home/willc/firstmate/data",
    "config": "/home/willc/firstmate/config",
    "projects": "/home/willc/firstmate/projects"
  },
  "backlog": {
    "path": "/home/willc/firstmate/data/backlog.md",
    "present": true,
    "records": [
      {
        "order": 1,
        "state": "in_flight",
        "structured": true,
        "id": "fm-snapshot-needsyou-p1",
        "checked": false,
        "title": "Snapshot: needs-you kinds, age, lifecycle stage",
        "repo": "firstmate",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": "2026-08-13",
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] fm-snapshot-needsyou-p1 - Snapshot: needs-you kinds, age, lifecycle stage (repo: firstmate) (kind: ship) (since 2026-08-13)",
        "body_lines": [
          "Firstmate read contract. Add needs-you kinds (review-ready PR, failed, credential), human age, lifecycle stage on fleet snapshot so ClearBridge Glance can show them without guessing. Load firstmate-coding-guidelines. mode=no-mistakes yolo=off. Grok 4.6. Owns bin/fm-fleet-snapshot.sh and colocated tests. Do not touch personal-cockpit."
        ],
        "body_excerpt": "Firstmate read contract. Add needs-you kinds (review-ready PR, failed, credential), human age, lifecycle stage on fleet snapshot so ClearBridge Glance can show them without guessing. Load firstmate-coding-guidelines. mode=no-mistakes yolo=o",
        "unresolved_blocker_ids": [],
        "current_role": "worker",
        "requires_child_metadata": true,
        "captain_actionable": false
      },
      {
        "order": 2,
        "state": "in_flight",
        "structured": true,
        "id": "pc-phone-attention-p1",
        "checked": false,
        "title": "ClearBridge phone: Needs-you, Now, view-only board, real rooms",
        "repo": "personal-cockpit",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": "2026-08-13",
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] pc-phone-attention-p1 - ClearBridge phone: Needs-you, Now, view-only board, real rooms (repo: personal-cockpit) (kind: ship) (since 2026-08-13)",
        "body_lines": [
          "Phase 3+4 phone. Glance is the 390px open screen. Needs-you from real open decisions (and PR/failure/credential when snapshot has them). Now is 1 primary + 1 optional from live tasks. Board is view-only columns bound to real lifecycle. Rooms Build/Business/Memory/Graveyard filter the same snapshot — honest empty if a room has nothing. No fake cards. No third write. No drag-to-act. Tests exec production. mode=direct-PR yolo=on. Grok 4.6. Owns public/index.html + client tests in server.test.js."
        ],
        "body_excerpt": "Phase 3+4 phone. Glance is the 390px open screen. Needs-you from real open decisions (and PR/failure/credential when snapshot has them). Now is 1 primary + 1 optional from live tasks. Board is view-only columns bound to real lifecycle. Room",
        "unresolved_blocker_ids": [],
        "current_role": "worker",
        "requires_child_metadata": true,
        "captain_actionable": false
      },
      {
        "order": 3,
        "state": "in_flight",
        "structured": true,
        "id": "fm-fleet-snapshot-correct-r90",
        "checked": false,
        "title": "Correct remaining fleet read-framing duplicate-ID and cleanup false successes",
        "repo": "firstmate",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": "2026-07-29",
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] fm-fleet-snapshot-correct-r90 - Correct remaining fleet read-framing duplicate-ID and cleanup false successes (repo: firstmate) (kind: ship) (since 2026-07-29)",
        "body_lines": [
          "Recovered preserved unlanded Firstmate candidate from the dead historical endpoint; do not tear down or discard its stale recorded copy. Evidence report: `/home/willc/.treehouse/willade-492785/3/willade/fm-fleet-snapshot-correct-r90/report.md`. Verified bundle: `/home/willc/.treehouse/willade-492785/3/willade/fm-fleet-snapshot-correct-r90/fleet-correction.bundle`, SHA-256 `96cbdb498fe31c7e234da82ad038f9ca762952d3e2909f14d8eb0b943a14091b`; branch tip `80300801d38399bdb2f864f754ecfe2d41a12fb1`, parent `84834dbc4924d6a665d7a102ff58a9d2607c9775`. The bundle history includes `ee9a4d7` oversized-argv repair, `84834db` scout-report read hardening, and `8030080` incomplete-snapshot rejection. Recover through a fresh isolated Firstmate task based on current default branch, load firstmate-coding-guidelines, reconcile/rebase or reconstruct only intended changes, preserve known baseline failures honestly, add a current-large-fleet argv regression, and ship through the normal no-mistakes PR path. Never force, reset, or clean the preserved historical directory before accepted work is safely reproduced."
        ],
        "body_excerpt": "Recovered preserved unlanded Firstmate candidate from the dead historical endpoint; do not tear down or discard its stale recorded copy. Evidence report: `/home/willc/.treehouse/willade-492785/3/willade/fm-fleet-snapshot-correct-r90/report.",
        "unresolved_blocker_ids": [],
        "current_role": "worker",
        "requires_child_metadata": true,
        "captain_actionable": false
      },
      {
        "order": 4,
        "state": "queued",
        "structured": true,
        "id": "rk-indexeddb-p14",
        "checked": false,
        "title": "Migrate Recital Kit persistence safely to IndexedDB",
        "repo": "recital-kit",
        "kind": "ship",
        "priority": null,
        "hold_reason": "PARKED recital-kit: no active sprint unless captain names it. Ghost blocker cleared 2026-08-04; decided work ready when captain greenlights RK foundation.",
        "hold_kind": "captain",
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": "2026-07-22",
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] rk-indexeddb-p14 - Migrate Recital Kit persistence safely to IndexedDB (repo: recital-kit) (kind: ship) (since 2026-07-22) (hold: PARKED recital-kit: no active sprint unless captain names it. Ghost blocker cleared 2026-08-04; decided work ready when captain greenlights RK foundation.) (hold-kind: captain)",
        "body_lines": [
          "Captain chose local-first IndexedDB with versioned migration from existing v1/v2/v3 localStorage, separate cover blobs, multi-tab protection, and preserved backup/recovery. No accounts or cloud sync. Decision record: data/decisions/rk-persistence-architecture-2026-07-22.md. Await all decisions and independent 

... [310647 bytes truncated] ...

-final-v22/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-remote-pairing-contract-p9",
      "path": "/home/willc/firstmate/data/willade-remote-pairing-contract-p9/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-research-gap-map-s1",
      "path": "/home/willc/firstmate/data/willade-research-gap-map-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-research-image-paste-s1",
      "path": "/home/willc/firstmate/data/willade-research-image-paste-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-research-mobile-sync-s1",
      "path": "/home/willc/firstmate/data/willade-research-mobile-sync-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-residual-f36-f44-r97",
      "path": "/home/willc/firstmate/data/willade-residual-f36-f44-r97/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-rung1-evidence-s1",
      "path": "/home/willc/firstmate/data/willade-rung1-evidence-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-rung2-cockpit-s1",
      "path": "/home/willc/firstmate/data/willade-rung2-cockpit-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-runtime-fm-integration-research-s1",
      "path": "/home/willc/firstmate/data/willade-runtime-fm-integration-research-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-runtime-start-tiers-2026-08-06",
      "path": "/home/willc/firstmate/data/willade-runtime-start-tiers-2026-08-06/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-scale-fuzz-a35",
      "path": "/home/willc/firstmate/data/willade-scale-fuzz-a35/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-sprint-synthesis-a9",
      "path": "/home/willc/firstmate/data/willade-sprint-synthesis-a9/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-t3-portfolio-audit-v6",
      "path": "/home/willc/firstmate/data/willade-t3-portfolio-audit-v6/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-translation-bridge-wire-s1",
      "path": "/home/willc/firstmate/data/willade-translation-bridge-wire-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-translation-final-v17",
      "path": "/home/willc/firstmate/data/willade-translation-final-v17/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-translation-final-v9",
      "path": "/home/willc/firstmate/data/willade-translation-final-v9/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-translation-for-masses-r7",
      "path": "/home/willc/firstmate/data/willade-translation-for-masses-r7/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-translation-pedagogy-p12",
      "path": "/home/willc/firstmate/data/willade-translation-pedagogy-p12/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-contract-r59",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-contract-r59/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-correct-r63",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-correct-r63/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-correct-r67",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-correct-r67/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-correct-r71",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-correct-r71/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-correct-r75",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-correct-r75/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-correct-r78",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-correct-r78/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-correct-r84",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-correct-r84/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-correct-r94",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-correct-r94/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-final-r66",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-final-r66/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-final-r70",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-final-r70/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-final-r74",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-final-r74/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-final-r76",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-final-r76/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-final-r83",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-final-r83/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-final-r89",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-final-r89/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-typed-adapter-review-r62",
      "path": "/home/willc/firstmate/data/willade-typed-adapter-review-r62/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-worktree-leases-p5",
      "path": "/home/willc/firstmate/data/willade-worktree-leases-p5/report.md",
      "kind": "scout"
    },
    {
      "id": "willade-worlds-disanalogy-requirement",
      "path": "/home/willc/firstmate/data/willade-worlds-disanalogy-requirement/report.md",
      "kind": "scout"
    },
    {
      "id": "willchen-ai-fable-content-audit-s1",
      "path": "/home/willc/firstmate/data/willchen-ai-fable-content-audit-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willchen-ai-fable-help-s1",
      "path": "/home/willc/firstmate/data/willchen-ai-fable-help-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willchen-ai-fable-overhaul-assist-s1",
      "path": "/home/willc/firstmate/data/willchen-ai-fable-overhaul-assist-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "willchen-ai-kimi-site-c-design-s1",
      "path": "/home/willc/firstmate/data/willchen-ai-kimi-site-c-design-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "windhawk-zen-text-s1",
      "path": "/home/willc/firstmate/data/windhawk-zen-text-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "worlds-identity-doctrine-s5",
      "path": "/home/willc/firstmate/data/worlds-identity-doctrine-s5/report.md",
      "kind": "scout"
    },
    {
      "id": "worlds-prototype-v5-audit",
      "path": "/home/willc/firstmate/data/worlds-prototype-v5-audit/report.md",
      "kind": "scout"
    },
    {
      "id": "wsl-repo-migrate-s1",
      "path": "/home/willc/firstmate/data/wsl-repo-migrate-s1/report.md",
      "kind": "scout"
    },
    {
      "id": "xai-xsearch-auth-path-s1",
      "path": "/home/willc/firstmate/data/xai-xsearch-auth-path-s1/report.md",
      "kind": "scout"
    }
  ],
  "secondmate_current": {
    "registry": {
      "present": true,
      "available": true,
      "reason": null,
      "provenance": "registered-table",
      "path": "/home/willc/firstmate/data/secondmates.md",
      "freshness": {
        "status": "fresh",
        "observed_at": "2026-08-13T14:23:16Z"
      },
      "records": [],
      "input_truncated": false,
      "records_truncated": false,
      "complete": true,
      "reasons": [],
      "lines_in_window": 0,
      "records_in_window": 0
    },
    "records": [],
    "total_registered": 0,
    "total": 0,
    "shown": 0,
    "truncated": 0
  },
  "secondmate_landed": {
    "records": [],
    "truncated": [],
    "unreadable": [],
    "partial": []
  },
  "secondmate_guidance": {
    "note": "For kind=secondmate, bearings selects validated structured state from that registered home; parent events and bounded terminal evidence are fallback-only supplements and never current-state authority."
  }
}
Evidence: Live bearings --json transcript

bearings_rc=0 bearings_bytes=109302 schema=fm-bearings.v1 reports=701 landed=9 decisions_open=20 of 57

=== live bearings (worktree bin/fm-bearings-snapshot.sh --json) ===
bearings_rc=0
bearings_bytes=109302
--- time/stderr ---
elapsed_sec=7.14 max_rss_kb=19404 exit=0

=== live bearings summary ===
{
  "schema": "fm-bearings.v1",
  "home": "willc/firstmate",
  "generated": "2026-08-13T14:23:40Z",
  "prs": "not_requested (run: /bearings include PRs)",
  "in_flight": 4,
  "landed": 9,
  "reports": 701,
  "decisions_open": 20,
  "omitted": [
    {
      "surface": "backlog item bodies",
      "reveal": "--fields bodies"
    },
    {
      "surface": "task paths",
      "reveal": "--fields paths"
    },
    {
      "surface": "watch/steer actions",
      "reveal": "--fields actions"
    },
    {
      "surface": "healthy endpoint detail",
      "reveal": "--fields endpoints"
    },
    {
      "surface": "superseded queued items",
      "reveal": "--all-queued"
    },
    {
      "surface": "decisions_open showing 20 of 57",
      "reveal": "--all-decisions"
    },
    {
      "surface": "gates showing 20 of 29",
      "reveal": "--all-queued"
    },
    {
      "surface": "live PR discovery + checks",
      "reveal": "--include-prs"
    }
  ]
}
- Evidence: Live bearings JSON (local file: /tmp/no-mistakes-evidence/01KZXPPT95NPM8EGP8E0NBEME3/live-bearings.json)
Evidence: Default TOON bearings on the live home
=== leftover workspaces immediately after live bearings success ===
/tmp/fm-bearings-snapshot.3617949.1541

=== default TOON bearings (operator default, bounded) ===
toon_rc=0
toon_bytes=10077
--- first 80 lines ---
schema: fm-bearings.v1
home: willc/firstmate
generated: "2026-08-13T14:24:16Z"
prs: "not_requested (run: /bearings include PRs)"
in_flight[4]{id,kind,state,doing}:
  fm-dispatch-main-home-isolation-q2,ship,unknown,"backend target gone: default:w28:p2"
  fm-fleet-snapshot-correct-r90,ship,working,harness busy (pi-ext)
  rules-md-audit-s1,scout,unknown,"backend target gone: default:wDR:p2"
  willade-typed-adapter-v8-fix-p1,ship,unknown,"backend target gone: default:w2Z:pJ"
secondmates: []
decisions_open[20]{id,key,verb,summary,owner}:
  willade-oracle-cloud-plan-s1-decision-oci-account-home-region,willade-oracle-cloud-plan-s1-decision-oci-account-home-region,captain-hold,"Choose OCI account type and immutable home region: PARKED 2026-08-02: no cloud work is sch…",(main)
  willade-oracle-cloud-plan-s1-decision-oci-data-boundary,willade-oracle-cloud-plan-s1-decision-oci-data-boundary,captain-hold,"Define which WillADE data may be copied to OCI: PARKED 2026-08-02: part of the future clou…",(main)
  willade-oracle-cloud-plan-s1-decision-oci-authority-boundary,willade-oracle-cloud-plan-s1-decision-oci-authority-boundary,captain-hold,"Decide whether OCI may ever hold WillADE authority: PARKED 2026-08-02: part of the future …",(main)
  bcs-crosscut-full-audit-a3-decision-research-telemetry-policy,bcs-crosscut-full-audit-a3-decision-research-telemetry-policy,captain-hold,"Decide whether and how research telemetry may continue: PARKED BCS captain 2026-08-02. Do …",(main)
  bcs-crosscut-full-audit-a3-decision-family-data-retention,bcs-crosscut-full-audit-a3-decision-family-data-retention,captain-hold,"Approve a family-data retention and backup disposition policy: PARKED BCS captain 2026-08-…",(main)
  bcs-platform-operations-r8-decision-data-lifecycle-consent-policy,bcs-platform-operations-r8-decision-data-lifecycle-consent-policy,captain-hold,"Choose household data lifecycle and consent policy: PARKED BCS captain 2026-08-02. Do not …",(main)
  bcs-platform-operations-r8-decision-payment-automation-boundary,bcs-platform-operations-r8-decision-payment-automation-boundary,captain-hold,"Choose payment automation boundary: PARKED BCS captain 2026-08-02. Do not surface until ca…",(main)
  bcs-platform-operations-r8-decision-calendar-authority,bcs-platform-operations-r8-decision-calendar-authority,captain-hold,"Choose schedule and calendar authority: PARKED BCS captain 2026-08-02. Do not surface unti…",(main)
  willade-translation-for-masses-r7-decision-identity-phrase,willade-translation-for-masses-r7-decision-identity-phrase,captain-hold,"Choose public Translation for the Masses phrase: PARKED 2026-08-02: folded into the public…",(main)
  bcs-portal-platform-upgrade-s5-decision-target-architecture,bcs-portal-platform-upgrade-s5-decision-target-architecture,captain-hold,"Approve the Portal vNext target architecture: PARKED BCS captain 2026-08-02. Do not surfac…",(main)
  model-task-economics-r16-decision-authorize-private-lab,model-task-economics-r16-decision-authorize-private-lab,captain-hold,"Choose the private model-economics lab scope and budget: PARKED model-research captain 202…",(main)
  model-task-economics-r16-decision-choose-model-portfolio,model-task-economics-r16-decision-choose-model-portfolio,captain-hold,"Choose the model subscription and routing portfolio: PARKED model-research captain 2026-08…",(main)
  bcs-tuition-pricing-research-r20-decision-packages,bcs-tuition-pricing-research-r20-decision-packages,captain-hold,"Choose prepaid-package policy: PARKED BCS captain 2026-08-02. Do not surface until captain…",(main)
  bcs-tuition-pricing-research-r20-decision-pricing-path,bcs-tuition-pricing-research-r20-decision-pricing-path,captain-hold,"Choose tuition correction path: PARKED BCS captain 2026-08-02. Do not surface until captai…",(main)
  model-research-evidence-a17-decision-k3-pilot,model-research-evidence-a17-decision-k3-pilot,captain-hold,"Authorize the Kimi K3 Bel Canto pilot: PARKED model-research captain 2026-08-02. Do not su…",(main)
  model-research-evidence-a17-decision-codex-fast-pilot,model-research-evidence-a17-decision-codex-fast-pilot,captain-hold,"Authorize Codex Fast versus Standard measurement: PARKED model-research captain 2026-08-02…",(main)
  model-research-final-synthesis-a18-decision-route-default,model-research-final-synthesis-a18-decision-route-default,captain-hold,"Choose default model routing policy: PARKED model-research captain 2026-08-02. Do not surf…",(main)
  model-research-final-synthesis-a18-decision-codex-fast-screen,model-research-final-synthesis-a18-decision-codex-fast-screen,captain-hold,"Authorize Codex Fast comparison: PARKED model-research captain 2026-08-02. Do not surface …",(main)
  model-research-final-synthesis-a18-decision-fireworks-pilot,model-research-final-synthesis-a18-decision-fireworks-pilot,captain-hold,"Authorize capped Fireworks pilot: PARKED model-research captain 2026-08-02. Do not surface…",(main)
  bcs-inhome-rate-market-r21-decision-pricing-schedule,bcs-inhome-rate-market-r21-decision-pricing-schedule,captain-hold,"Choose new-family in-home price option: PARKED BCS captain 2026-08-02. Do not surface unti…",(main)
landed[6]{id,what,artifact,owner}:
  rules-captainmd-rewrite-p1,Rewrite captain.md into the audited six-part structure,"-",(main)
  pc-mirror-actions-p1,"ClearBridge: Answer/Ask/desk-open as first-class actions inside the mi…","https://github.com/willchen95/clearbridge/pull/16",(main)
  pc-appearance-v1-p1,"ClearBridge Appearance v1: Termius theme set + three glass levels","https://github.com/willchen95/clearbridge/pull/15",(main)
  pc-appearance-fable-s1,"Fable audit: ClearBridge Appearance v1 PR 15",data/pc-appearance-fable-s1/report.md,(main)
  lg-master-plan-p1,"Compile 10 lead-gen reports into master pitch plan, prompter guide, an…",data/lg-master-plan-p1/report.md,(main)
  fm-spawn-plain-names-p1,Spawn labels Herdr workspaces with the plain naming law automatically,"https://github.com/willchen95/firstmate/pull/2",(main)
gates[20]{id,title,blocked_by,reason,owner}:
  fm-snapshot-needsyou-p1,"Snapshot: needs-you kinds, age, lifecycle stage","-",Captain rejected attention-layer theater…,(main)
  pc-phone-attention-p1,"ClearBridge phone: Needs-you, Now, view-only board, real roo…","-",Captain rejected attention-layer theater…,(main)
  rk-indexeddb-p14,Migrate Recital Kit persistence safely to IndexedDB,"-","PARKED recital-kit: no active sprint unl…",(main)
  rk-schema-validation-p15,Add strict recoverable Recital Kit schema validation and imp…,"-","PARKED recital-kit: no active sprint unl…",(main)
  gui-b-b3-monitor-mode,"B3: read-only live trail stream connect; mic/insertion stay …","-",Hard-gated on the owner-run correction#2…,(main)
  fm-turnend-liveness-miscount-q1,"BLOCKER: turn-end guard counts recorded endpoints not live o…","-","L4 BLOCKER 2026-07-24: guard fired 3x wi…",(main)
  fm-seal-writer-scope-q1,"Seal writer-confirmation scope defect: external survivor idl…","-","L4 2026-07-24: confirmation claimed 19 e…",(main)
  fm-watcher-agentless-pane-q3,Watcher has no agentless-pane state; escalates empty shells …,fm-turnend-liveness-miscount-q1,Guard may not be touched until the misco…,(main)
  f061a0f-assembly-audit-fail,"BLOCKER: Bridge final assembly f061a0f FAILED cross-family a…","-",PARKED with WillADE/bridgemind per capta…,(main)
  synthetic-daemon-rpc-authorize,"Captain decision (12th, previously dropped): authorize PS-5 …",f061a0f-assembly-audit-fail,Captain decision,(main)
  fm-harness-identity-argv-match-q1,"FALSE-GREEN: argv string-matching accepts lookalike processe…","-","Owner ruling R-D: stop matching on argv;…",(main)
  ata-proof-labeling-b3,Label all ATA stock imagery as illustrative and stage verifi…,"-","PARKED: ATA no active sprint unless capt…",(main)
  tape-runtime-trust-b6,"Implement approved TAPE runtime trust: real auth, provider r…","-","PARKED: tape no active sprint unless cap…",(main)
  tape-transcript-transport-b7,Implement approved transient no-raw-storage TAPE transcript …,tape-runtime-trust-b6,"-",(main)
  tape-queue-evolution-b8,Implement approved TAPE queue and data evolution migration p…,tape-transcript-transport-b7,"-",(main)
  tape-source-deletion-b9,Implement TAPE source deletion as soft-delete with bounded r…,tape-queue-evolution-b8,"-",(main)
  bcs-rotation-tool-b10,Build the first-class guarded portal-token rotation tool,"-",PARKED BCS captain 2026-08-02. Do not su…,(main)
  bcs-provider-log-review-b13,"Read-only Netlify log review for the token exposure window, …","-",PARKED BCS captain 2026-08-02. Do not su…,(main)
  bcs-history-cleanup-b14,Rewrite git history and purge deploy artifacts for the expos…,"-",PARKED BCS captain 2026-08-02. Do not su…,(main)
  ata-a11y-findings-b15,Recover the accessibility and HTTP-evidence findings discard…,ata-proof-labeling-b3,"-",(main)
reports[3]{id,path}:
  lg-master-plan-p1,/home/willc/firstmate/data/lg-master-plan-p1/report.md
  pc-appearance-fable-s1,/home/willc/firstmate/data/pc-appearance-fable-s1/report.md
  rules-md-audit-s1,/home/willc/firstmate/data/rules-md-audit-s1/report.md
recorded_prs[1]{id,url}:
  fm-dispatch-main-home-isolation-q2,"https://github.com/kunchenguid/firstmate/pull/1092"
unhealthy_endpoints[3]{id,backend,target,exists,agent}:
  fm-dispatch-main-home-isolation-q2,herdr,"default:w28:p2",false,not_checked
  rules-md-audit-s1,herdr,"default:wDR:p2",false,not_checked
  willade-typed-adapter-v8-fix-p1,herdr,"default:w2Z:pJ",false,not_checked
omitted[10]{surface,reveal}:
  backlog item bodies,"--fields bodies"
  task paths,"--fields paths"
  watch/steer actions,"--fields actions"
  healthy endpoint detail,"--fields endpoints"
  full scout-report inventory,"--all-reports"
  superseded queued items,"--all-queued"
  landed per-home capped at 6 for 1 home(s),"--all-landed"
  decisions_open showing 20 of 57,"--all-decisions"
  gates showing 20 of 29,"--all-queued"
  live PR discovery + checks,"--include-prs"
--- last 20 lines ---
  lg-master-plan-p1,/home/willc/firstmate/data/lg-master-plan-p1/report.md
  pc-appearance-fable-s1,/home/willc/firstmate/data/pc-appearance-fable-s1/report.md
  rules-md-audit-s1,/home/willc/firstmate/data/rules-md-audit-s1/report.md
recorded_prs[1]{id,url}:
  fm-dispatch-main-home-isolation-q2,"https://github.com/kunchenguid/firstmate/pull/1092"
unhealthy_endpoints[3]{id,backend,target,exists,agent}:
  fm-dispatch-main-home-isolation-q2,herdr,"default:w28:p2",false,not_checked
  rules-md-audit-s1,herdr,"default:wDR:p2",false,not_checked
  willade-typed-adapter-v8-fix-p1,herdr,"default:w2Z:pJ",false,not_checked
omitted[10]{surface,reveal}:
  backlog item bodies,"--fields bodies"
  task paths,"--fields paths"
  watch/steer actions,"--fields actions"
  healthy endpoint detail,"--fields endpoints"
  full scout-report inventory,"--all-reports"
  superseded queued items,"--all-queued"
  landed per-home capped at 6 for 1 home(s),"--all-landed"
  decisions_open showing 20 of 57,"--all-decisions"
  gates showing 20 of 29,"--all-queued"
  live PR discovery + checks,"--include-prs"
- Evidence: Default TOON bearings output (local file: /tmp/no-mistakes-evidence/01KZXPPT95NPM8EGP8E0NBEME3/live-bearings-default.toon)
Evidence: Old --argjson E2BIG vs new file-fed jq

snapshot_bytes=327031 old_argjson_rc=126 stderr=/home/willc/.local/bin/jq: Argument list too long; new file path rc=0 schema=fm-fleet-snapshot.v1

=== kernel argv limits ===
ARG_MAX=2097152
snapshot_bytes=327031

=== old bearings path: jq --argjson snap "$(cat snapshot)" -n '$snap.schema' ===
old_argjson_rc=126
old_argjson_stdout_bytes=0
--- stderr ---
/bin/bash: line 10: /home/willc/.local/bin/jq: Argument list too long

=== new bearings path: jq ' .schema' < snapshot ===
new_file_jq_rc=0
new_file_jq_stdout=fm-fleet-snapshot.v1
new_file_jq_stderr_bytes=0
Evidence: Oversized-home snapshot and bearings CLI

backlog_bytes=211233 snapshot_rc=0 snapshot_bytes=1433679 done_count=1200 bearings_rc=0 landed=1200 no leftover workspaces

=== oversized-home snapshot + bearings (public CLI) ===
backlog_bytes=211233
kernel_max_arg_probe: 131072-byte argv fails on this host (see argjson-overflow-transcript.txt)

--- bin/fm-fleet-snapshot.sh --json ---
snapshot_rc=0
snapshot_bytes=1433679
snapshot_stderr=
{
  "schema": "fm-fleet-snapshot.v1",
  "backlog_present": true,
  "done_count": 1200,
  "main_inventory_valid": true
}

--- leftover fleet workspaces ---

--- bin/fm-bearings-snapshot.sh --json --all-landed ---
bearings_rc=0
bearings_bytes=212156
bearings_stderr=
{
  "schema": "fm-bearings.v1",
  "landed": 1200,
  "prs": "not_requested (run: /bearings include PRs)"
}

--- leftover bearings workspaces ---
- Evidence: Oversized-home fleet snapshot JSON (local file: /tmp/no-mistakes-evidence/01KZXPPT95NPM8EGP8E0NBEME3/oversized-fleet.json) - Evidence: Oversized-home bearings JSON (local file: /tmp/no-mistakes-evidence/01KZXPPT95NPM8EGP8E0NBEME3/oversized-bearings.json)
Evidence: Fail-closed duplicate-ID, cleanup, and truncated-framing CLI

Source: Fail-closed duplicate-ID, cleanup, and truncated-framing CLI (local file: /tmp/no-mistakes-evidence/01KZXPPT95NPM8EGP8E0NBEME3/fail-closed-transcript.txt)

duplicate IDs rc=1 empty stdout 'scout report read failed'; cleanup rm failure rc=1 empty stdout 'final snapshot publication failed'; truncated NUL framing rc=1 empty stdout; no leftover workspaces

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ⚠️ bin/fm-bearings-snapshot.sh:283 - Residual jq argv overflow path of the same class this change fixes: the candidate-PR accumulation loop round-trips the growing rows array through jq -n --argjson a &#34;$rows&#34; on every repo iteration. With --all-pr-repos or a raised FM_BEARINGS_PR_LIMIT (the script's own omitted-disclosure at line 506 directs users to raise it), the aggregate can exceed Linux's 128 KiB per-argument limit (MAX_ARG_STRLEN) and fail with E2BIG. The CANDIDATE_PRS_FILE staging added at line 305 only protects payload sizes that this earlier --argjson would already have crashed on, making that staging moot until this site is also converted. Fix at the same shared boundary the rest of the change uses: append each repo_rows document to a staged file under $BEARINGS_TMP and combine once with jq -s &#39;add&#39;. Default caps (10 repos x 20 PRs) stay well under the limit, so the stated "works on this fleet size" goal is still met.
  • ℹ️ bin/fm-bearings-snapshot.sh:196 - Cleanup-trap asymmetry introduced in the same commit: fm-fleet-snapshot.sh traps HUP/INT/TERM to exit so its EXIT cleanup runs on signal death, but fm-bearings-snapshot.sh registers only trap cleanup_bearings_tmp EXIT. Bash does not run EXIT traps when killed by an untrapped signal, so an interrupted bearings run leaks its $BEARINGS_TMP directory under /tmp. Adding the same three signal traps used by the fleet script closes the gap.

🔧 Fix: stage candidate-PR rows in file and trap signals for cleanup
1 info still open:

  • ℹ️ bin/fm-bearings-snapshot.sh:295 - The fix-round PR-rows staging (pr-rows.jsonl + jq -s &#39;add // []&#39;) has no dedicated regression test reproducing the oversized candidate-PR aggregate, unlike the SNAP_FILE overflow which got test_oversized_canonical_snapshot_survives_projection. The mechanism is identical to the already-tested file-staging boundary and the code is straightforwardly verifiable, so this is informational only.
✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-fleet-snapshot-view.test.sh
  • bash tests/fm-bearings-snapshot.test.sh
  • FM_HOME=/home/willc/firstmate bin/fm-fleet-snapshot.sh --json on the live firstmate home (65,542-byte backlog, 701 scout reports)
  • FM_HOME=/home/willc/firstmate bin/fm-bearings-snapshot.sh --json --all-landed --all-reports
  • FM_HOME=/home/willc/firstmate bin/fm-bearings-snapshot.sh default TOON
  • jq -n --argjson snap &#34;$(cat live-fleet-snapshot.json)&#34; &#39;$snap.schema&#39; vs jq -er &#39;.schema&#39; &lt; live-fleet-snapshot.json
  • FM_HOME=&lt;oversized-home&gt; bin/fm-fleet-snapshot.sh --json then bin/fm-bearings-snapshot.sh --json --all-landed (211,233-byte backlog / 1,200 done rows)
  • manual bin/fm-fleet-snapshot.sh --json against duplicate-ID, truncated NUL framing, and first-rm cleanup mutants
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Reject truncated or duplicate scout-report framing and refuse to publish
JSON when staged cleanup fails. Stage large snapshot and bearings
payloads on disk so jq never hits the kernel argv limit.
@willchen95
willchen95 merged commit 49184b9 into main Aug 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant