Skip to content

fix(agentic-engineering): say gh refuses --slurp with --jq in the surveyor call-shape rule - #735

Merged
devantler merged 2 commits into
mainfrom
claude/surveyor-slurp-jq-rule
Nov 23, 2026
Merged

devantler merged 2 commits into
mainfrom
claude/surveyor-slurp-jq-rule

Conversation

@devantler

@devantler devantler commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Generated by the Agent Improver

Closes #734.

What

The surveyor's call-shape rule told runs to "reduce it in-band with --paginate and --jq". It now also says that --jq runs once per page, so a result that needs every page at once pipes --paginate --slurp into the allowlisted jq, because gh refuses --slurp together with --jq. The validator's pinned contract string carries the new sentences. A new negative case removes the refusal sentence and expects portfolio-surveyor must state the guard's admitted call shape. The desired-state digest is refreshed, agentic-engineering moves 7.9.0 → 7.9.1, and the changelog has an entry.

Why (measured)

Codex runs the survey inline. Failed CommandExecution items reading "the --slurp option is not supported with --jq or --template": 25 (11-16), 13 (11-17), 3 (11-21), 98 in 33 of 54 sessions (11-22). It is the top non-empty Codex failure signature in the 1-day miner (103 of 1,924). The runs' own memory has recorded the lesson at least six times since September and they still repeat it, because the rule they follow at the point of use never mentions it. Details are in #734.

Validation

  • ./scripts/validate-manifests.sh exits 0 on this branch.
  • Ablation: with the refusal sentence removed and the digest refreshed, the validator exits 1 with only portfolio-surveyor must state the guard's admitted call shape, so the pinned sentence is what fires.
  • On main the sentence is absent, so the new negative case fails there for the right reason.
  • The full validate-manifests.test.sh stalled locally on a storage-backed Go build cache. CI's lint-scripts job verifies it.

The monorepo surveyor overlay ports this rule word for word and follows in a separate PR once this is released.

…veyor 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>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agent Improver

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T05:47:04.666322Z 5f2e7e6 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: e5ffc6812a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

… 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>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agent Improver

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 5f2e7e6410

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agent Improver

Readiness at head 5f2e7e64109c00f3f3a1a72e690b71a9049f8c9d:

  • Tested: validate-manifests.sh exits 0. The self-test passes 471 of 471 locally, including the new case portfolio surveyor must say gh refuses --slurp with --jq. An ablation (clause removed, digest refreshed) fails with only must state the guard's admitted call shape. All 23 CI checks are green, including CI - Required Checks.
  • Reviewed: Codex is green at this head (no findings). No review threads are open.
  • Tried as a user: gh api --paginate --slurp 'orgs/devantler-tech/repos?type=all&per_page=100' --jq length fails with the exact refusal, exit 1. The prescribed gh api --paginate --slurp … | jq '[.[][]|select(.archived==false)]|length' under pipefail returns 24, exit 0.

Promoting and merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Surveyor call-shape rule invites the rejected gh --paginate --slurp --jq form

1 participant