Repository navigation
Move issue-scope to GPT-5.6 Luna via OpenRouter - #337
Merged
Merged
Conversation
Switches the engine from copilot to codex with OPENAI_BASE_URL pointed at OpenRouter and the model set to openai/gpt-5.6-luna, following the same direct-OpenRouter pattern the triage workflows already use. Threat detection is pinned to copilot so it keeps working: detection does not inherit the engine's base-URL override, and callers already grant copilot-requests: write. The APM skills target becomes `all` because apm-action has no codex target. The bash tool is removed rather than widened to `["*"]` — codex cannot honour a per-command allowlist, and the only command, `date`, fetched a value the prompt never used. Callers need no changes: all of them use `secrets: inherit`, and the workflow reads OPENROUTER_API_KEY by the org's existing name. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Dropping tools.bash entirely left shell access at the engine default, and with min-integrity: none the compiler warns that community-authored issues could reach a shell. The agent has no shell needs — its only command was a date lookup the prompt never used — so bash: false states the intent and clears the warning. Co-Authored-By: Claude Fable 5.1 <[email protected]>
The apm CLI rejects `all` ("Unknown target 'all'") and lists codex among
its valid harness targets, so the sandbox run died in the apm job before
the agent started. The README I relied on was stale; action.yml and the
CLI agree that codex is supported.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
LGTM — no blocking issues found.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
`threat-detection: engine: copilot` pinned the engine but the detection job still inherited the workflow's top-level model, so it asked the Copilot CLI for openai/gpt-5.6-luna, which Copilot does not serve. The engine failed and detection fell open on every run — the sandbox log shows COPILOT_MODEL set to the Luna slug in the detection step. The object form with an explicit model restores the combination the pre-switch baseline actually ran and verified: copilot + claude-sonnet-5, which produced a real detection_result.json. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Use gh-aw's `sonnet` alias for the copilot detection engine instead of a pinned `claude-sonnet-5`. The alias resolves to whatever sonnet Copilot serves, so the pin survives a sonnet-5 → sonnet-6 rollover without a recompile. Co-Authored-By: Claude Fable 5.1 <[email protected]>
The mcp-servers allowlist and the scoper prompt named SemanticSearch, GetDocumentByUrl, FindRelatedDocs, and FindInconsistencies. The server at www.elastic.co/docs/_mcp/ exposes search_docs, get_document_by_url, find_related_docs, and find_docs_inconsistencies. No name matched, so the allowlist filtered every tool out and each run logged "tools/list returned 0 tools for 'elastic-docs'" — under copilot and codex alike. Scope has been assessing docs impact without access to the docs corpus. Pre-existing; surfaced while testing the engine switch. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Codex CLI contacts ab.chatgpt.com at startup; the firewall denied it twice per run. Allowing it removes the denial noise. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…names Same defect as issue-scope: the allowlist named SemanticSearch, GetDocumentByUrl, FindRelatedDocs, and FindInconsistencies, none of which the server exposes, so it filtered every tool out. The sweeps and docs-review use `allowed: ['*']` and were never affected. Co-Authored-By: Claude Fable 5.1 <[email protected]>
The detection job inherits the main engine's env, so OPENAI_BASE_URL pointed at OpenRouter inside a sandbox configured for copilot. The AWF entrypoint saw an OpenAI base URL, ran its codex-style connectivity pre-flight, could not reach it, and killed the container before threat-detect started — every run since the engine switch. Pinning the model was necessary but not sufficient. Setting OPENAI_BASE_URL to an empty string on the detection engine overrides the inherited value so the pre-flight is skipped. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… names, quality gate Model section now describes the codex engine on openai/gpt-5.6-luna with detection on Copilot sonnet and the OPENROUTER_API_KEY requirement. The MCP tool names match what the server exposes. Adds the quality-gate outcome and human-needed label that PR #335 introduced but the README never documented. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Takes #336 (empty project-instructions-path handling). The scope lock file conflicted; regenerated it with gh aw compile from the merged source rather than resolving by hand. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves
issue-scopeoff the Copilot engine ontoopenai/gpt-5.6-lunaserved through OpenRouter, using the same direct-OpenRouter pattern the triage workflows adopted today.copilotcodexwithOPENAI_BASE_URL: https://openrouter.ai/api/v1claude-sonnet-5openai/gpt-5.6-luna(1.05M ctx; $0.20/M in, $1.20/M out)${{ secrets.OPENROUTER_API_KEY }}model: sonnet,OPENAI_BASE_URLblankedclaudecodextools.bash["date"]false(explicit)network.allowed+ openrouter.ai,+ ab.chatgpt.comWhy each non-obvious choice
Detection pinned to copilot and to a Copilot model. gh-aw has one top-level
model:; any engine instance without its ownengine.modelinherits it. With the string formengine: copilot, the detection job inheritedopenai/gpt-5.6-luna(COPILOT_MODELin the job env), Copilot couldn't serve it, and detection failed open — caught in the sandbox. The object form withmodel: sonnetgives detection its own model;engine.modeloverriding the top-level model per instance is gh-aw #54366, present in v0.88.7.sonnetis the alias from gh-aw's runtime model map (copilot/*sonnet*), so it survives a sonnet-5 → sonnet-6 rollover. Every scope caller already grantscopilot-requests: write.That was necessary but not sufficient: the detection job also inherits
engine.env, soOPENAI_BASE_URLpointed at OpenRouter inside a sandbox configured for copilot. The AWF entrypoint's pre-flight saw an OpenAI base URL, tested connectivity, failed ([health-check][ERROR] Cannot connect to OpenAI API proxy), and killed the container beforethreat-detectstarted — norun startline at all. Blanking it on the detection engine (env: { OPENAI_BASE_URL: "" }) overrides the inherited value so the pre-flight is skipped.APM
target: codex. The apm CLI's valid harness targets areclaude, codex, copilot, cursor, gemini, opencode, windsurf;codexcompiles the skill bundles into the layout Codex reads. (An earlier revision usedall, which the CLI rejects — caught in the sandbox, where the apm job failed before the agent ran.)Bash disabled explicitly, not widened. gh-aw refuses to compile
bash: ["date"]for codex because per-command allowlists are silently ignored at runtime for this engine. The alternative wasbash: ["*"]; that's a full shell for one command whose output — today's date — the prompt fetched and never referenced anywhere. Deleting the step and settingbash: falseis the least-privilege fix — leavingtools.bashunset would have left shell access at the engine default, which the compiler flags whenmin-integrity: noneis set.Caller impact
None. All four scope callers (
docs-content×2,docs-content-internal, sandbox) usesecrets: inherit, and the workflow readsOPENROUTER_API_KEYby the name those repos already define.copilot-requests: writemust stay granted — it now serves detection rather than the main engine.Also fixed here: the elastic-docs MCP server was delivering zero tools
Surfaced by the sandbox logs (
tools/list still returned 0 tools for 'elastic-docs' after 5 retries). Themcp-servers.elastic-docs.allowedlist and the scoper prompt usedSemanticSearch,GetDocumentByUrl,FindRelatedDocs,FindInconsistencies; the server atwww.elastic.co/docs/_mcp/actually exposessearch_docs,get_document_by_url,find_related_docs,find_docs_inconsistencies(pluscheck_docs_coherence,analyze_document_structure). No name matched, so the filter removed every tool. Pre-existing and engine-independent — the copilot baseline run shows the same zero-tool result — meaning scope has been producing docs-impact assessments without access to the docs corpus. Renamed all seven references. Not a firewall issue:www.elastic.cowas already allowed and no denial was logged. Drive-by:docs-agent-experimental.mdhad the identical four wrong names in its allowlist — fixed in the same way. The seven docs sweeps anddocs-reviewuseallowed: ['*']and were never affected.MCP fix verified on #118 (run 34479263895)
Zero "0 tools" retries.
mcp-logs/tools.jsonlists all four elastic-docs tools;rpc-messages.jsonlshows the scoper callingsearch_docs×3 andget_document_by_url×3 (plus githubget_file_contents×14,issue_read×7,search_code×7). Result: 🟠 partial withhoursapplied — effort was estimated; the 🟠 is the scoper reporting "Ownership: Unavailable; no CODEOWNERS" (a sandbox artifact) and medium confidence with no linked PR. 24.1 AIC. No firewall denials after allowingab.chatgpt.com.OpenRouter attribution — known gap on the codex path
Triage (claude engine) sends OpenRouter's documented attribution headers via
ANTHROPIC_CUSTOM_HEADERS:HTTP-Referer: https://github.com/<caller repo>(the app identifier) andX-OpenRouter-Title: <caller repo>/<caller workflow>(display name), plus a customX-Session-ID: <repo>/<workflow>/<run_id>. Scope on codex sends none: gh-aw writes Codex a[model_providers.openai-proxy]config pointing at the AWF sidecar (http://172.30.0.30:10000,wire_api = "responses") with nohttp_headershook, and the sidecar forwards toopenrouter.aiwithout adding attribution. Per OpenRouter, withoutHTTP-Refererno app page is created. In the OpenRouter dashboard, scope traffic is identifiable by model only —openai/gpt-5.6-lunais used by nothing else — under the sharedOPENROUTER_API_KEY. Adding attribution needs a gh-aw feature (codexhttp_headerspassthrough or sidecar header injection); tracked as a follow-up.Follow-up worth considering
Scope still uses three sub-agents (quality-checker, scoper, sizer). Today's triage work showed that on a mid-tier model the parent→sub-agent hand-off can rewrite the return contract and drop fields. Luna is a mid-tier model. Not changed here — out of scope and scope's contract has been stable on sonnet-5 — but if quality drifts, collapsing the sub-agents is the first thing to try.
Test plan (sandbox,
elastic/docs-actions-sandbox)gh aw compileclean; lock file carries the model slug and base URL verbatim,threat-detect --engine copilot, APMtarget: codex,bash: false, zero compile warnings/scopeon a well-formed issue (Reduce docs-review suggestion noise #117) → 🟠 partial assessment posted; footercodex · gpt56, metaengine: codex, model: openai/gpt-5.6-luna; api-proxy log shows 17/17 requests toopenai/gpt-5.6-lunaviaopenrouter.ai/scopeon a vague issue (Bump the github-actions group across 8 directories with 8 updates #112) → 🔴 quality gate,human-needed, scoper/sizer skipped (7.39 AIC)detection_result.json— verified on Reduce docs-review suggestion noise #117 (run 34480489074):[threat-detect] run start: engine=copilot model=sonnet, alias resolved toclaude-sonnet-5via the Copilot CLI, verdict{"prompt_injection":false,"secret_leak":false,"malicious_patch":false}. Model-pin-only runs had still failed open on the pre-flight; the blankedOPENAI_BASE_URLwas the missing pieceapi.openai.com— not added tonetwork.allowed. The only denials wereab.chatgpt.com×2 (Codex CLI startup); now allowed to remove the denial noiseAgent log shows the APM skills being invoked— finding: zero invocations undertarget: codex, and zero in the pre-switch copilot baseline too. The skills have never been used by this workflow; the APM import is dead weight. Not a regression — follow-up: either fix discovery or drop the import and the apm job🤖 Generated with Claude Code
Related to #399