Skip to content

Commit 33cdaf5

Browse files
devantlerclaude
andauthored
fix(agentic-engineering): say gh refuses --slurp with --jq in the surveyor call-shape rule (#735)
* fix(agentic-engineering): say gh refuses --slurp with --jq in the surveyor call-shape rule The call-shape rule tells a run to reduce in-band with --paginate and --jq, but --jq runs once per page. Runs that wanted one cross-page result added --slurp and kept --jq, which gh rejects: 98 failed calls in 33 of 54 Codex sessions on 2026-11-22. State the slurp-into-jq form beside the rule, pin it in the validator and add a negative case. Closes #734 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(agentic-engineering): match the removed clause without backticks in single quotes ShellCheck SC2016 refused the literal backticks in the sed pattern. Match them with '.' as the neighbouring cases do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b1ee751 commit 33cdaf5

8 files changed

Lines changed: 24 additions & 7 deletions

File tree

‎.claude-plugin/marketplace.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{
2121
"name": "agentic-engineering",
2222
"description": "The autonomous engineering system for repository portfolios and everything its agents need — engineer, read-only surveyor, meta-engineer and Flux troubleshooter agents; portfolio, product, spend and improvement workflows; GitHub, CodeRabbit review, security, library documentation, Go, Kubernetes, Flux, Talos, SvelteKit frontend, Stripe payments, engineering-practice, design, product-management, marketing, finance and productivity skills; and the MCP servers they use; configured by the consumer AGENTS.md",
23-
"version": "7.9.0",
23+
"version": "7.9.1",
2424
"source": "./plugins/agentic-engineering"
2525
},
2626
{

‎plugins/agentic-engineering/.claude-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "agentic-engineering",
33
"description": "The autonomous engineering system for repository portfolios and everything its agents need — engineer, read-only surveyor, meta-engineer and Flux troubleshooter agents; portfolio, product, spend and improvement workflows; GitHub, CodeRabbit review, security, library documentation, Go, Kubernetes, Flux, Talos, SvelteKit frontend, Stripe payments, engineering-practice, design, product-management, marketing, finance and productivity skills; and the MCP servers they use; configured by the consumer AGENTS.md",
4-
"version": "7.9.0",
4+
"version": "7.9.1",
55
"author": {
66
"name": "devantler-tech",
77
"url": "https://github.com/devantler-tech"

‎plugins/agentic-engineering/.codex-plugin/plugin.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "agentic-engineering",
33
"description": "The autonomous engineering system for repository portfolios and everything its agents need — engineer, read-only surveyor, meta-engineer and Flux troubleshooter agents; portfolio, product, spend and improvement workflows; GitHub, CodeRabbit review, security, library documentation, Go, Kubernetes, Flux, Talos, SvelteKit frontend, Stripe payments, engineering-practice, design, product-management, marketing, finance and productivity skills; and the MCP servers they use; configured by the consumer AGENTS.md",
4-
"version": "7.9.0",
4+
"version": "7.9.1",
55
"author": {
66
"name": "devantler-tech",
77
"url": "https://github.com/devantler-tech"

‎plugins/agentic-engineering/CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog — `agentic-engineering`
22

3+
## 7.9.1 — 2026-11-23
4+
5+
**Fixed** — the `portfolio-surveyor` call-shape rule now says that `--jq` runs once per page. A
6+
result that needs every page at once pipes `--paginate --slurp` into the allowlisted `jq`, because
7+
`gh` refuses `--slurp` together with `--jq`. The rule told runs to reduce in-band with `--paginate`
8+
and `--jq` but never mentioned this, and runs that wanted one cross-page result kept sending the
9+
rejected combination: 98 failed calls in 33 of 54 sessions on 2026-11-22 alone.
10+
311
## 7.9.0 — 2026-11-22
412

513
**Added** — a checkout of a PR's repository becomes one of the session's folders before the PR is

‎plugins/agentic-engineering/agents/portfolio-surveyor.agent.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ dimension** — report the gap, never guess a login, a prefix, a marker literal,
7070
leading program that is neither a forge command nor a reviewed helper this definition names are all
7171
denied, so an ordinary shell idiom silently costs the read. Emit exactly one forge command per call
7272
and reduce it in-band with `--paginate` and `--jq`, or a pipe into the allowlisted read-only
73-
filters; never redirect to a scratch file. Sweep repositories with one call per repository or one
73+
filters; never redirect to a scratch file. `--jq` runs once per page, so a result that needs every
74+
page at once pipes `--paginate --slurp` into the allowlisted `jq` instead. `gh` refuses `--slurp`
75+
together with `--jq`. Sweep repositories with one call per repository or one
7476
org-wide search, never a `for` loop. Take every timestamp from a payload you already read, never
7577
from `date`. Select with `--jq` rather than `grep -oE` or `xargs`. A shape denial is a lost read
7678
that reads exactly like no evidence: mark the affected evidence `QUERY-UNKNOWN` and reissue in the

‎plugins/agentic-engineering/resources/provider-neutral.desired-state.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"portfolio-surveyor": {
7777
"enabled": true,
7878
"mode": "delegated-read-only",
79-
"definitionSha256": "e3cf20337a2a1e3d1378e40e880a19cf279fcbd7cd419134d26b9e0f3f573c33"
79+
"definitionSha256": "6e34f00c1eb198df7b63ebbc7c74b80c459ea89a6bec23cb3346cd12f28b3d12"
8080
},
8181
"agent-improver": {
8282
"enabledWhen": "Both optional consumer contract sections are present",

‎scripts/validate-manifests.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ validate_desired_state_resources() {
781781
# Pinned separately from the ownership row above: a bare-token search passes while the
782782
# merged-PR channel silently loses the field, since the two rows carry the same token.
783783
local portfolio_survey_comment_disclosure_row="CANDIDATE-MAINTAINER-COMMENT <repo> #<n> (draft?, merged?) — disclosure=<routine|interactive|none>"
784-
local portfolio_survey_call_shape_contract="**Every forge read is one command in one call.** The read-only guard refuses on shape before it ever inspects intent: output redirection, \`;\`, \`&\`, \`&&\`, a newline, command substitution, and any leading program that is neither a forge command nor a reviewed helper this definition names are all denied, so an ordinary shell idiom silently costs the read. Emit exactly one forge command per call and reduce it in-band with \`--paginate\` and \`--jq\`, or a pipe into the allowlisted read-only filters; never redirect to a scratch file. Sweep repositories with one call per repository or one org-wide search, never a \`for\` loop. Take every timestamp from a payload you already read, never from \`date\`. Select with \`--jq\` rather than \`grep -oE\` or \`xargs\`. A shape denial is a lost read that reads exactly like no evidence: mark the affected evidence \`QUERY-UNKNOWN\` and reissue in the admitted shape — never work around the guard."
784+
local portfolio_survey_call_shape_contract="**Every forge read is one command in one call.** The read-only guard refuses on shape before it ever inspects intent: output redirection, \`;\`, \`&\`, \`&&\`, a newline, command substitution, and any leading program that is neither a forge command nor a reviewed helper this definition names are all denied, so an ordinary shell idiom silently costs the read. Emit exactly one forge command per call and reduce it in-band with \`--paginate\` and \`--jq\`, or a pipe into the allowlisted read-only filters; never redirect to a scratch file. \`--jq\` runs once per page, so a result that needs every page at once pipes \`--paginate --slurp\` into the allowlisted \`jq\` instead. \`gh\` refuses \`--slurp\` together with \`--jq\`. Sweep repositories with one call per repository or one org-wide search, never a \`for\` loop. Take every timestamp from a payload you already read, never from \`date\`. Select with \`--jq\` rather than \`grep -oE\` or \`xargs\`. A shape denial is a lost read that reads exactly like no evidence: mark the affected evidence \`QUERY-UNKNOWN\` and reissue in the admitted shape — never work around the guard."
785785
local portfolio_survey_classifier_argv_contract="**Invoke the classifier only in its flag form, by its resolved installed path:** \`<installed plugin>/scripts/classify-default-branch-ci-runs.sh --repo OWNER/REPO --branch BRANCH --head-sha FULL_SHA\`. The helper and the read-only guard accept nothing else: the guard admits only that exact installed sibling path — never a bare basename, a \`PATH\` lookup, or a relative \`../scripts/\` form — and a positional \`OWNER/REPO BRANCH SHA\` is denied as \`not the guarded remote-mode shape\` while the helper itself exits 2 on it, so every executable invocation must carry the resolved path and all three flags."
786786

787787
if [ -d plugins/agentic-engineering ]; then

‎scripts/validate-manifests.test.sh‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ Authenticated maintainer controls are mandatory evidence, not optional enrichmen
784784
785785
An incomplete candidate can never be classified clean: no `CLEAR`, `MERGE-READY`, `REVIEW-READY`, or "no signal".
786786
787-
**Every forge read is one command in one call.** The read-only guard refuses on shape before it ever inspects intent: output redirection, `;`, `&`, `&&`, a newline, command substitution, and any leading program that is neither a forge command nor a reviewed helper this definition names are all denied, so an ordinary shell idiom silently costs the read. Emit exactly one forge command per call and reduce it in-band with `--paginate` and `--jq`, or a pipe into the allowlisted read-only filters; never redirect to a scratch file. Sweep repositories with one call per repository or one org-wide search, never a `for` loop. Take every timestamp from a payload you already read, never from `date`. Select with `--jq` rather than `grep -oE` or `xargs`. A shape denial is a lost read that reads exactly like no evidence: mark the affected evidence `QUERY-UNKNOWN` and reissue in the admitted shape — never work around the guard.
787+
**Every forge read is one command in one call.** The read-only guard refuses on shape before it ever inspects intent: output redirection, `;`, `&`, `&&`, a newline, command substitution, and any leading program that is neither a forge command nor a reviewed helper this definition names are all denied, so an ordinary shell idiom silently costs the read. Emit exactly one forge command per call and reduce it in-band with `--paginate` and `--jq`, or a pipe into the allowlisted read-only filters; never redirect to a scratch file. `--jq` runs once per page, so a result that needs every page at once pipes `--paginate --slurp` into the allowlisted `jq` instead. `gh` refuses `--slurp` together with `--jq`. Sweep repositories with one call per repository or one org-wide search, never a `for` loop. Take every timestamp from a payload you already read, never from `date`. Select with `--jq` rather than `grep -oE` or `xargs`. A shape denial is a lost read that reads exactly like no evidence: mark the affected evidence `QUERY-UNKNOWN` and reissue in the admitted shape — never work around the guard.
788788
789789
**Invoke the classifier only in its flag form, by its resolved installed path:** `<installed plugin>/scripts/classify-default-branch-ci-runs.sh --repo OWNER/REPO --branch BRANCH --head-sha FULL_SHA`. The helper and the read-only guard accept nothing else: the guard admits only that exact installed sibling path — never a bare basename, a `PATH` lookup, or a relative `../scripts/` form — and a positional `OWNER/REPO BRANCH SHA` is denied as `not the guarded remote-mode shape` while the helper itself exits 2 on it, so every executable invocation must carry the resolved path and all three flags.
790790
EOF
@@ -1190,6 +1190,13 @@ sed 's/no .CLEAR., .MERGE-READY./no MERGE-READY/' \
11901190
check_fail "portfolio surveyor must fail closed for incomplete ownership-unverified PRs" \
11911191
"portfolio-surveyor must preserve candidate-scoped fail-closed dispositions" "$d"
11921192

1193+
d=$(fresh); make_desired_state "$d" alpha
1194+
sed 's/ .gh. refuses .--slurp. together with .--jq.\.//' \
1195+
"$d/plugins/alpha/agents/portfolio-surveyor.agent.md" > "$d/tmp" \
1196+
&& mv "$d/tmp" "$d/plugins/alpha/agents/portfolio-surveyor.agent.md"
1197+
check_fail "portfolio surveyor must say gh refuses --slurp with --jq" \
1198+
"portfolio-surveyor must state the guard's admitted call shape" "$d"
1199+
11931200
d=$(fresh); make_desired_state "$d" alpha
11941201
printf '\nSuccessful batches may be discarded and rerun.\n' \
11951202
>> "$d/plugins/alpha/agents/portfolio-surveyor.agent.md"

0 commit comments

Comments
 (0)