fix(bin): read Helm sync schema-check records from file to avoid ARG_MAX - #29
Merged
Merged
Conversation
added 2 commits
September 17, 2026 00:29
… limits fm-helm-sync.sh passed a board group's whole desired-records JSON as a literal jq --argjson command-line argument. Real fleet card bodies exceed Linux's per-argument limit, so the schema check silently failed on every board at real fleet scale, reporting fields and options as unavailable even when they were present. Switch to --slurpfile, the same pattern the file's plan-building jq call already uses. Audited fm-helm-lib.sh and fm-helm-project-map.sh for the same pattern; every other --argjson call in the Helm sync path passes a small, bounded value, so nothing else needed changing. Adds a regression test with a fleet-scale (100-card) fixture whose combined desired-records JSON exceeds the real argv limit.
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
Land, properly reviewed and tested, a production hotfix firstmate already applied and verified live: fm-helm-sync.sh's per-board schema check passes a potentially-large JSON array as a literal command-line argument, which exceeds the OS argument-list limit at real fleet scale and broke Helm sync for the live production board. This task lands the already-proven fix through the normal path - it is not a design task.
What Changed
bin/fm-helm-sync.sh: the per-board schema check now passes the desired-records JSON tojqvia--slurpfile records_wrap "$group_desired"(unwrapped as$records_wrap[0]) instead of--argjson records "$(cat "$group_desired")", so the array is read from a file instead of being expanded into a literal command-line argument that can exceed the OS ARG_MAX limit at fleet scale.tests/fm-helm-sync.test.sh: adds a regression test that builds a board and backlog large enough to exceed ARG_MAX (2097152 bytes) and asserts the sync still completes and needs no writes when the schema already matches.docs/bugs/2026-09-17-helm-sync-schema-check-argv-limit.mddocumenting the bug and registers it indocs/documentation-audiences.json.Risk Assessment
✅ Low: The change swaps one --argjson (which embeds JSON as a literal argv string) for --slurpfile (which reads the same file directly), a minimal one-line-of-logic fix matching the already-proven production pattern used a few lines below in the same file, backed by a real end-to-end test that runs the actual sync binary against an oversized fixture and checks observable output.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated🔧 Fix: Confirm helm-sync argv fix passes; unrelated pre-existing timing tests flaky
1 error still open:
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.