Skip to content

fix(fleet-snapshot): stream backlog JSON into jq to avoid argv limit - #3675

Closed
VirtualRoboticHands wants to merge 1 commit into
kunchenguid:mainfrom
VirtualRoboticHands:fm/fm-fleet-snapshot-jq-arg-limit
Closed

VirtualRoboticHands wants to merge 1 commit into
kunchenguid:mainfrom
VirtualRoboticHands:fm/fm-fleet-snapshot-jq-arg-limit

Conversation

@VirtualRoboticHands

Copy link
Copy Markdown

What

fm-fleet-snapshot.sh now streams backlog JSON into jq via stdin instead of passing it as command-line arguments. Adds a regression test with an oversized backlog.

Why

On a large backlog (observed with 61 held items with long reasons), the snapshot failed with jq: Argument list too long because backlog data was passed on the argv, which is length-bounded. Streaming avoids the limit.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-04T00:04:31.762648Z 6a5b83e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified.

The backlog producer supplies one complete JSON value, each changed jq invocation consumes that value through stdin, existing error handling still observes jq failures, and the regression fixture verifies preserved snapshot output.

Reviews (1): Last reviewed commit: "fix: stream fleet backlog JSON into jq" | Re-trigger Greptile

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: this is waiting on the author (and is overlapped by a stronger open fix).

First look on HEAD 6a5b83e3a425a185350b7e03e0b84f7a69cf996c vs main f4d7875824ecc5e274b4bb896f10c1e1f207b7e4. CONFLICTING/DIRTY. Workflow approvals this pass: CI 33819883570 + Require no-mistakes 33819883568. VirtualRoboticHands is not a blocked author.

Attestation: MISSING. No pipeline attestation bind in the body.

Contract-class: restore. Streaming oversized backlog JSON into jq instead of --argjson restores the already-promised home-summary / fleet-snapshot publish path that dies on Linux’s per-argument limit. Motive matches a real field failure.

Overlap: main f4d78758 already streams the final multi-document jq -s assembly through stdin; residual --argjson / in-memory paths still bite large inventories. #3677 (haroarthur) rebases onto that tip and converts the remaining large transports to private temp files (--slurpfile) with broader regression coverage. Prefer helping / landing #3677 over competing on this tip. Also related: open #3418 (rrecheve) on the same argv-limit class.

Do not merge while CONFLICTING + MISSING attestation + superseded by #3677’s broader restore. If #3677 lands first, please close this as already fixed (or rebase only if #3677 leaves a gap this PR uniquely covers — unlikely from the current diffs). Security clean (no workflow edits).

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: follow-up — #3677 just squash-merged (31cba0db93f08f5d7ce87442d716fcb97fc00d5d) with the broader file-backed jq transport restore on current main. Please close this PR as already fixed unless you still see a unique gap after pulling that tip (unlikely from the prior diffs). Thank you for the report and the focused stdin fix.

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: closing as already fixed by #3677 (squash 31cba0db93f08f5d7ce87442d716fcb97fc00d5d). Thank you @VirtualRoboticHands — really appreciate you taking the time on this; the overlapping broader restore landed first.

@kunchenguid kunchenguid closed this Sep 4, 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.

2 participants