Repository navigation
Read review rules inline instead of forking a skill per file - #355
Conversation
… per file docs-review on `v1` cannot finish a multi-file PR. Claude Code runs forked skills in the foreground in non-interactive mode, which is how gh-aw runs it: the orchestrator emitted ten Skill calls within six seconds and the results arrived over 27 minutes. A six-file sandbox PR needed 36 forks at ~52s each, hit the 30-minute cap at 31 of them, and posted nothing for $5.41. Reading the six SKILL.md bodies into the orchestrator's context once per run removes every fork. Measured on identical six-file content: 4m21s and a complete review with 6/6 correctly anchored comments, against a timeout. Wall clock is near-flat in file count -- 3m34s for one file, 4m21s for six -- because reading the rules is a fixed cost and each extra file adds only a read. The catalog is untouched. `context: fork` stays, and is still the right default for local use, where forks run in the background and give real concurrency. Also: - Anchor every inline comment to a line derived with `grep -n`, with an exactly-one-match pre-flight and a fall back to the review body. Across nine runs, `grep -n` usage predicted anchor correctness perfectly; without it, comments landed on lines up to 134 away from the text they described, with bodies contradicting their own anchor. - Require elastic.co for documentation links. elastic.com is not an Elastic docs domain; the safe-output sanitizer strips those URLs and leaves mangled markdown in the posted comment. - Send OpenRouter attribution from gh-aw-issue-scope via the codex provider's http_headers (openai/codex#1473). Scope runs were landing with a null app_id and a random-hash session. Verified end-to-end on the OpenRouter dashboard. Known gap: inlining removes the per-criterion evidence gathering that forks forced -- 31 elastic-docs MCP calls forked, 3 inlined. Tracked separately. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01H3vJ764kbRQMFqEtZxh42b
a371943 to
09a2d96
Compare
…omment Reading the rules inline removed the per-criterion evidence gathering that forks forced: 31 elastic-docs calls forked, 3 inlined. The fact checks are the half worth keeping -- they are what found "dead letter queue" used for what is now the failure store, port 8220 applied to Serverless where it does not exist, and a Fleet Diagnostics button the UI no longer has. The rule names the tool and takes something away: skip the search and the finding loses its inline slot. The same shape moved gh-aw-issue-scope from zero docs-MCP calls in every prior run to search_docs firing before the first repo read in 3 of 3 sandbox runs. Style-guide pages are deliberately not pre-fetched. The agent already reads the six SKILL.md bodies, which encode those rules; the published pages add 110 KB (~27.6K tokens) against a review whose entire input was 22K. Verify from the run log, not the review body -- three models today reported using the MCP server while making zero calls: grep tools/call in mcp-logs/rpc-messages.jsonl, count server_id elastic-docs Baseline is 3. Forked scored 31. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01H3vJ764kbRQMFqEtZxh42b
There was a problem hiding this comment.
Requesting changes: the inline comments identify two workflow-instruction regressions that can break execution and should be resolved before merge.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
|
|
||
| # Append engine-level custom Codex config | ||
| cat >> "/tmp/gh-aw/mcp-config/config.toml" << GH_AW_CODEX_CUSTOM_CONFIG_354d4e24d0867f5e_EOF | ||
| [model_providers.openai-proxy.http_headers] |
There was a problem hiding this comment.
[HIGH] Duplicate TOML table declaration in generated Codex config
[model_providers.openai-proxy.http_headers] is emitted twice in this file (line 919 and this line). The startup script copies the first occurrence into /tmp/gh-aw/mcp-config/config.toml and then appends the same table again, which can make TOML parsing fail at runtime due to table redefinition.
Please keep a single insertion path for this table (in source .md, then regenerate the lock) so the final config contains one http_headers table.
| After completing Step 3, run the contradictions skill on the eligible changed files with `Skill({skill: "docs-check-contradictions", args: "<file-path>"})` to find places in the existing docs — both in the local repo and in published Elastic docs — that contradict or conflict with the new or updated content. | ||
| After completing Step 3, apply the `docs-check-contradictions` rules you read in Step 3 to the eligible changed files, to find places in the existing docs — both in the local repo and in published Elastic docs — that contradict or conflict with the new or updated content. | ||
|
|
||
| Call the skill once for each eligible file, passing the file path as the argument. If there are many eligible files, group them by directory and call the skill once per directory instead. |
There was a problem hiding this comment.
[MEDIUM] Step 4 still instructs forbidden Skill invocation
This workflow now states Do not use the Skill tool in this workflow (line 352), but this line still says to call the skill per file. The conflicting instructions can push the agent back into Skill calls and break the intended inlined-rules execution path.
Update Step 4 to apply the already-read docs-check-contradictions rules directly (no Skill calls), matching the Step 3 model.
Why
docs-review on
v1cannot finish a multi-file PR. Claude Code runs forked skills in the foreground in non-interactive mode — which is exactly how gh-aw runs it — so one fork per skill per file serialises. The orchestrator asks for parallelism and the harness takes it away: tenSkillcalls emitted within six seconds, results arriving over 27 minutes.On a six-file sandbox PR that meant 36 forks at roughly 52s each. It hit the 30-minute cap at 31 of them and posted nothing, for $5.41. docs-content PRs are routinely multi-file, so this is the common case, not an edge case.
What changes
The six rule sets are now
Readinto the orchestrator's context once per run instead of invoked through theSkilltool. Same model, same engine, same rubric — no subagents.Measured on identical six-file content:
v1today)Wall clock is near-flat in file count — 3m34s for one file, 4m21s for six. Reading the rules is a fixed cost; each extra file adds only a read. A 20-file PR extrapolates to about 6-7 minutes, against roughly 3.5 hours forked.
The catalog is untouched.
context: forkstays on the skills and is still the right default locally, where forks run in the background and give real concurrency. This only changes how the workflow consumes them.Also in here
Anchor comments to a line derived with
grep -n, with an exactly-one-match pre-flight and a fall back to the review body when a snippet can't be made unique. Across nine sandbox runs,grep -nusage predicted anchor correctness perfectly — six arms, no exceptions. Without it, comments landed up to 134 lines from the text they described, with bodies contradicting their own anchor ("in this sentence", pointing at a heading 37 lines away).Require
elastic.cofor documentation links.elastic.comis not an Elastic docs domain; the safe-output sanitizer strips those URLs and leaves mangled markdown like[formatting guidelines]((www.elastic.com/redacted)in the posted comment.OpenRouter attribution for
gh-aw-issue-scope, via the codex provider'shttp_headers(openai/codex#1473). Scope runs were landing with a nullapp_id, emptyorigin, and a random-hash session, so that spend couldn't be attributed to a workflow. Verified end-to-end on the OpenRouter dashboard.Known gap
Inlining removes the per-criterion evidence gathering that forks forced: 31
elastic-docsMCP calls forked, 3 inlined. Each forked skill independently fetched the published guidance its criterion needed; the orchestrator with all six rule sets in context satisfices instead.On one dense page that cost roughly a third of recall. On six files it doesn't come close to mattering, because the alternative posts nothing at all — but it should be closed. Two halves, tracked separately:
curlagainst the anonymous MCP endpoint withincludeBody: true— 110 KB, ~27.6K tokens for all six style pages.Not in here
The model. Seven arms were compared on one 23-defect page today; Sonnet had the best recall (~21/23 at $1.46) and Luna the best value (15/23 at $0.10). That's a separate decision, and worth making after this lands so a regression can be attributed to one change rather than two.
🤖 Generated with Claude Code
https://claude.ai/code/session_01H3vJ764kbRQMFqEtZxh42b
Related to #402