Skip to content

fix(bin): stream large snapshot JSON inputs to jq - #1893

Open
TheKingJulian wants to merge 8 commits into
kunchenguid:mainfrom
TheKingJulian:fm/firstmate-stream-large-snapshot-json-v1
Open

fix(bin): stream large snapshot JSON inputs to jq#1893
TheKingJulian wants to merge 8 commits into
kunchenguid:mainfrom
TheKingJulian:fm/firstmate-stream-large-snapshot-json-v1

Conversation

@TheKingJulian

@TheKingJulian TheKingJulian commented Aug 7, 2026

Copy link
Copy Markdown

Intent

Fix the live fm-bearings-snapshot.sh failure caused by fm-fleet-snapshot.sh passing payload-sized JSON documents through jq --argjson command-line arguments. Reproduce the end-user path with the current private backlog, separating the initiating trigger, Linux MAX_ARG_STRLEN masking threshold, and visible Bearings failure. Inspect every payload-sized --argjson crossing in bin/fm-fleet-snapshot.sh and replace large JSON process-argument transport with a scalable streaming or file-backed design while retaining small scalar --argjson uses. Preserve every existing projection, output mode, bound, failure contract, and local-only default. Do not reduce, prune, or reinterpret the captain's backlog. Add an executable end-to-end regression through the public snapshot interface using parsed backlog JSON over Linux MAX_ARG_STRLEN and assert successful output plus preserved decisions or inventory behavior. Run focused snapshot and Bearings tests, bin/fm-lint.sh, broader required suites, and the full no-mistakes pipeline. Preserve the existing commits and PR 1893, use the supported fork push path, and do not bypass the Stock macOS Bash snapshot compatibility check. Reproduce and fix that macOS check failure through the public interface, then report the PR only when all checks are green.

What Changed

  • Stream payload-sized snapshot JSON into jq through file-backed inputs while retaining --argjson for bounded scalar values.
  • Preserve backlog, task, decision, inventory, and secondmate projections without Linux process-argument size failures.
  • Add a public-interface regression for parsed backlogs above MAX_ARG_STRLEN and include it in the stock macOS Bash CI count.

Risk Assessment

✅ Low: The payload transport change is well-bounded, preserves existing snapshot behavior, and the prior portability and backlog-path contract regressions are resolved.

Testing

After session bootstrap and diff inspection, focused snapshot and Bearings suites passed. An end-to-end base-versus-target reproduction showed Linux MAX_ARG_STRLEN causing the original public snapshot failure, while the repaired snapshot preserved the full oversized backlog and Bearings rendered normally. No lint or broad suites were run because this assigned phase explicitly forbids lint and reserves broad validation for remote CI; Stock macOS Bash remains unverified locally.

Evidence: Base failure and repaired end-to-end CLI transcript
command=FM_HOME=<large-backlog-home> bin/fm-fleet-snapshot.sh --json
base_commit=70aeba855527f7693082f6dd1bc731e334d0269f
exit=1
stderr:
/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/base-public-interface/bin/fm-fleet-snapshot.sh: line 611: /usr/sbin/jq: Argument list too long
fm-fleet-snapshot: main inventory summary failed

target command=FM_HOME=<large-backlog-home> bin/fm-fleet-snapshot.sh --json
target exit=0
{
  "schema": "fm-fleet-snapshot.v1",
  "backlog_json_bytes": 871948,
  "backlog_records": 851,
  "main_inventory": {
    "valid": false,
    "reason": "in-flight backlog item has no child metadata",
    "orphan_in_flight": [
      "preserved-orphan"
    ],
    "unstructured_current_count": 0
  },
  "last_queued": {
    "id": "queued-0850",
    "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  }
}

target command=FM_HOME=<large-backlog-home> bin/fm-bearings-snapshot.sh
target exit=0
schema: fm-bearings.v1
home: 01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home
generated: "2026-08-07T17:09:29Z"
prs: "not_requested (run: /bearings include PRs)"
in_flight: []
secondmates: []
decisions_open: []
landed: []
gates[20]{id,title,blocked_by,reason,owner}:
  (main-inventory),in-flight backlog item has no child metadata,"-",main inventory,(main)
  queued-0001,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0002,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0003,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0004,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0005,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0006,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0007,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0008,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0009,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0010,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0011,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0012,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0013,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0014,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0015,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0016,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0017,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0018,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0019,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
reports: []
recorded_prs: []
omitted[9]{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"
  "main in-flight backlog item(s) have no child metadata: 1",inspect main data/backlog.md In flight vs state/*.meta
  gates showing 20 of 851,"--all-queued"
  live PR discovery + checks,"--include-prs"
Evidence: Linux MAX_ARG_STRLEN counterfactual
single_argument_bytes=132002
/usr/bin/bash: line 5: /usr/sbin/jq: Argument list too long
legacy_exit=126
Evidence: Repaired snapshot summary
{
  "schema": "fm-fleet-snapshot.v1",
  "backlog_json_bytes": 871948,
  "backlog_records": 851,
  "main_inventory": {
    "valid": false,
    "reason": "in-flight backlog item has no child metadata",
    "orphan_in_flight": [
      "preserved-orphan"
    ],
    "unstructured_current_count": 0
  },
  "last_queued": {
    "id": "queued-0850",
    "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  }
}
Evidence: Complete repaired snapshot response
{
  "schema": "fm-fleet-snapshot.v1",
  "generated": "2026-08-07T17:09:29Z",
  "fm_home": "/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home",
  "roots": {
    "fm_root": "/root/.no-mistakes/worktrees/fd90d89c02eb/01KZEG8K4V3XGYNGSS2MGZ84H9",
    "state": "/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home/state",
    "data": "/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home/data",
    "config": "/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home/config",
    "projects": "/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home/projects"
  },
  "backlog": {
    "path": "/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home/data/backlog.md",
    "present": true,
    "records": [
      {
        "order": 1,
        "state": "in_flight",
        "structured": true,
        "id": "preserved-orphan",
        "checked": false,
        "title": "Preserve this inventory contradiction",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] preserved-orphan - Preserve this inventory contradiction (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "worker",
        "requires_child_metadata": true,
        "captain_actionable": false
      },
      {
        "order": 2,
        "state": "queued",
        "structured": true,
        "id": "queued-0001",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0001 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 3,
        "state": "queued",
        "structured": true,
        "id": "queued-0002",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0002 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 4,
        "state": "queued",
        "structured": true,
        "id": "queued-0003",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0003 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 5,
        "state": "queued",
        "structured": true,
        "id": "queued-0004",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0004 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 6,
        "state": "queued",
        "structured": true,
        "id": "queued-0005",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
     

... [1152817 bytes truncated] ...

ata": false,
        "captain_actionable": false
      },
      {
        "order": 847,
        "state": "queued",
        "structured": true,
        "id": "queued-0846",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0846 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 848,
        "state": "queued",
        "structured": true,
        "id": "queued-0847",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0847 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 849,
        "state": "queued",
        "structured": true,
        "id": "queued-0848",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0848 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 850,
        "state": "queued",
        "structured": true,
        "id": "queued-0849",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0849 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      },
      {
        "order": 851,
        "state": "queued",
        "structured": true,
        "id": "queued-0850",
        "checked": false,
        "title": "Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "repo": "alpha",
        "kind": "ship",
        "priority": null,
        "hold_reason": null,
        "hold_kind": null,
        "blocked_by": null,
        "blocked_by_ids": [],
        "blocked_reason": null,
        "since": null,
        "merged": null,
        "reported": null,
        "done": null,
        "completion": {
          "verb": null,
          "date": null
        },
        "links": [],
        "pr_url": null,
        "report_path": null,
        "local_note": null,
        "raw": "- [ ] queued-0850 - Queued payload 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 (repo: alpha) (kind: ship)",
        "body_lines": [],
        "body_excerpt": null,
        "unresolved_blocker_ids": [],
        "current_role": "queued",
        "requires_child_metadata": false,
        "captain_actionable": false
      }
    ]
  },
  "tasks": [],
  "main_inventory": {
    "valid": false,
    "reason": "in-flight backlog item has no child metadata",
    "orphan_in_flight": [
      "preserved-orphan"
    ],
    "unstructured_current_count": 0
  },
  "scout_reports": [],
  "secondmate_current": {
    "registry": {
      "present": false,
      "available": true,
      "complete": true,
      "reason": null,
      "provenance": "registered-table",
      "path": "/tmp/no-mistakes-evidence/01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home/data/secondmates.md",
      "freshness": {
        "status": "fresh",
        "observed_at": "2026-08-07T17:09:29Z"
      },
      "records": [],
      "input_truncated": false,
      "records_truncated": false,
      "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: Repaired end-user Bearings output
schema: fm-bearings.v1
home: 01KZEG8K4V3XGYNGSS2MGZ84H9/large-backlog-home
generated: "2026-08-07T17:09:29Z"
prs: "not_requested (run: /bearings include PRs)"
in_flight: []
secondmates: []
decisions_open: []
landed: []
gates[20]{id,title,blocked_by,reason,owner}:
  (main-inventory),in-flight backlog item has no child metadata,"-",main inventory,(main)
  queued-0001,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0002,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0003,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0004,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0005,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0006,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0007,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0008,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0009,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0010,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0011,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0012,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0013,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0014,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0015,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0016,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0017,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0018,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
  queued-0019,Queued payload 000000000000000000000000000000000000000000000…,"-","-",(main)
reports: []
recorded_prs: []
omitted[9]{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"
  "main in-flight backlog item(s) have no child metadata: 1",inspect main data/backlog.md In flight vs state/*.meta
  gates showing 20 of 851,"--all-queued"
  live PR discovery + checks,"--include-prs"
- Outcome: ⚠️ 1 warning across 1 run (3m51s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed (2) ✅
  • 🚨 tests/fm-bearings-snapshot.test.sh:456 - The required criterion says, “do not bypass the Stock macOS Bash snapshot compatibility check” and “fix that macOS check failure through the public interface.” The changed fixture ln -s /proc/1/mem &#34;$unreadable/data/backlog.md&#34; is Linux-only. On macOS /proc/1/mem is absent, so the dangling symlink is classified as a missing backlog and produces missing structured backlog, which line 487's accepted-reason regex excludes. The macOS Bearings suite therefore remains reachable as a failure. Replace this with a platform-neutral unreadable fixture, or use explicit Darwin/Linux fixture branches with matching behavioral assertions.

🔧 Fix: Make unreadable backlog fixture portable across platforms
1 error still open:

  • 🚨 bin/fm-fleet-snapshot.sh:257 - The requirement says, “Preserve every existing projection, output mode, bound, failure contract, and local-only default.” This condition changes the established handling of a directory, symlink-to-directory, or dangling symlink at data/backlog.md: the base regular-file check returned a successful snapshot with backlog.present=false (and a secondmate summary reason of missing structured backlog), while the new check sends it to jq and makes the snapshot fail. The test then accepts the new snapshot failed reason. Restore the regular-file absence contract and create the platform-neutral access failure through the test boundary without broadening production path semantics, unless the captain explicitly approves this contract change.

🔧 Fix: Preserve backlog contract with portable failure injection
✅ Re-checked - no issues remain.

⚠️ **Test** - 1 warning
  • ⚠️ .github/workflows/ci.yml:350 - Required Stock macOS Bash 3.2 compatibility could not be demonstrated locally because this test phase ran on Linux with GNU Bash 5.3. Keep the macOS CI gate mandatory and do not report PR 1893 green until that job passes.
  • bin/fm-session-start.sh
  • Inspected git diff 70aeba855527f7693082f6dd1bc731e334d0269f..d6a72f2ce55d1a821ff4fec83d6425330b560e56 to identify the affected public interfaces and regression coverage.
  • /bin/bash tests/fm-fleet-snapshot-view.test.sh
  • /bin/bash tests/fm-bearings-snapshot.test.sh
  • Executed base commit 70aeba855527f7693082f6dd1bc731e334d0269f through fm-fleet-snapshot.sh --json with an 851-record backlog; it exited 1 at jq with Argument list too long.
  • Passed a 132,002-byte JSON value through jq --argjson; Linux rejected the process argument with exit 126.
  • Executed target bin/fm-fleet-snapshot.sh --json with the same backlog and verified an 871,948-byte parsed backlog, 851 preserved records, and the orphan inventory contradiction.
  • Executed target bin/fm-bearings-snapshot.sh with the same backlog and verified successful bounded TOON output with the main-inventory gate and omitted-count disclosure.
  • uname -srm and /bin/bash --version confirmed the available environment was Linux with GNU Bash 5.3, not Stock macOS Bash 3.2.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@TheKingJulian TheKingJulian changed the title fix(bin): stream large snapshot JSON through file-backed inputs fix(bin): stream large snapshot JSON inputs to jq Aug 7, 2026
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