PYR0D-351: Pass the contribution-input backlog to jq as files, not arguments #40
Loading…
Reference in a new issue
No description provided.
Delete branch "fm/fm-snapshot-argv-limit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Story: PYR0D-351 - Firstmate: session-start fleet snapshot fails with "Argument list too long" on a large backlog
What was wrong
bin/fm-fleet-snapshot.sh --contribution-inputhanded the whole backlog JSON to jq as a command-line argument (jq -n --argjson backlog "$BACKLOG_JSON" ...). On this home's backlog that one argument is far past the kernel's 128 KiB single-argument limit, so jq never ran:line 1994: /usr/bin/jq: Argument list too long. The error printed at the top of every session-start summary since the upgrade, and the contribution check got no input.What changed
--slurpfile, the same pattern the full snapshot path already uses a few lines below. The existing EXIT trap removes the directory.test_contribution_input_survives_oversized_backlogintests/fm-contributions.test.shbuilds an 800-record synthetic backlog whose JSON exceeds 128 KiB, and checks every record and the task list survive. It fails against the old code.Evidence
bin/fm-lint.sh(ShellCheck, actionlint) clean; all 45 contribution tests pass.Out of scope
No other snapshot or startup behaviour changes.