Skip to content

Four gatherer and Publisher builds still deliver whole fleet-state aggregates to jq in argv

Id: TD-PPagop-26081503 · Status: resolved · Filed: 2026-08-15 · Resolved: 2026-08-15 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/437

Found reviewing TD-PPagop-26081406 (PR #389). That item’s enumeration came from a grep -n -- --argjson over agent-cycle.sh, lib/ and scripts/, and it converted every site that grep named. What the grep could not show is that its own list was not the whole residue: requirement 4g’s rule is about what rides in a single argv element, and these sites still carry a fleet-state aggregate there.

None is known to be near MAX_ARG_STRLEN (131072 bytes) today. They are listed loudest-failure-first, on the same terms TD-PPagop-26081401 and TD-PPagop-26081406 used.

  • scripts/gather-source-state.sh:182-186 — --argjson issues, --argjson workflows and --argjson open_prs in the final state build: one repo’s whole open-issue list, workflow list and open-PR list. Three separate unbounded values in one execve, and the largest single exposure on this list.
  • scripts/gather-findings.sh:138 — --argjson dep and --argjson cs, a repo’s whole Dependabot and code-scanning alert lists. A repo with a large backlog of open alerts is exactly the repo whose findings band matters most, and past the cap it comes back empty.
  • scripts/gather-register-hygiene.sh:289,302,303 — --argjson a/--argjson b in the problems merge, and --argjson problems plus --arg body in the final build. This is the direct analogue of scripts/gather-human-visibility-hygiene.sh’s own problems-and-body build, which TD-PPagop-26081406 converted; the two scripts have the same shape and the same growth, and only one of them was on that item’s list. Convert both values together — the body is rendered from the same set as the problems array and is the larger of the two, so moving only the array leaves the threshold where it was.
  • scripts/publish-dashboard.sh:1698 — --argjson prs and --argjson claims in the github_json build: the whole cross-repo PR index and the claims cache, both of which grow with the fleet. Requirement 4g says in terms that “The rule is the Publisher’s too”, and several neighbouring Publisher sites were converted for exactly this reason; these two were not.

The fix is the same mechanical conversion the two predecessor items established: concatenate the documents (docs="$(printf '%s\n' "$a" "$b")"), deliver with a here-string, bind positionally with input as $name in the printed order, and leave only configuration-bounded values in argv. Convert each site together with a test that pins its fail-safe direction past the cap, as requirement 4g’s own acceptance discipline requires — test/review-feedback.test.sh and test/gather-human-visibility-hygiene.test.sh are the nearest references, and both show the extracted-block technique for a build that cannot be driven end-to-end. Where a converted site currently fails loudly, keep it loud.

Requirement 4g in docs/IMPLEMENTATION-PIPELINE-SPEC.md named this item, alongside TD-PPagop-26081501 and TD-PPagop-26081502, as the residue outstanding after TD-PPagop-26081406. This item and TD-PPagop-26081501 are resolved; the residue that requirement now names is TD-PPagop-26081502 and TD-PPagop-26081506.