Repository navigation
Normalize replayed apply_patch function-call IDs - #8944
Conversation
Co-authored-by: lpcox <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The targeted fix is correct and covers the reported replay scenarios without altering unrelated calls.
Review effort: Balanced
Findings: None
What changed in this PR
Normalizes replayed apply_patch calls for Copilot Responses compatibility.
Changes:
- Converts
ctc_*item IDs tofc_*while preservingcall_id. - Adds regression coverage for replayed calls and unchanged valid IDs.
| File | Description |
|---|---|
containers/api-proxy/codex-compat.js |
Normalizes translated function-call IDs. |
containers/api-proxy/codex-compat.test.js |
Tests normalization and identity preservation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
[!TIP] tools:
github:
mode: gh-proxySee GitHub Tools for more information on To allow these domains, add them to the network:
allowed:
- defaults
- "api.github.com"
- "example.com"See Network Configuration for more information.
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... Warning Firewall blocked 12 domainsThe following domains were blocked by the firewall during workflow execution:
[!TIP] tools:
github:
mode: gh-proxySee GitHub Tools for more information on To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"
- "accounts.google.com"
- "api.github.com"
- "clients2.google.com"
- "collector.github.com"
- "contentautofill.googleapis.com"
- "github.com"
- "github.githubassets.com"
- "msfeed25.pkgs.visualstudio.com"
- "update.googleapis.com"
- "www.google.com"
- "www.gstatic.com"See Network Configuration for more information.
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
❌ Smoke Gemini reports failed. Facets need polishing... Warning Firewall blocked 3 domainsThe following domains were blocked by the firewall during workflow execution:
[!TIP] tools:
github:
mode: gh-proxySee GitHub Tools for more information on To allow these domains, add them to the network:
allowed:
- defaults
- "api.github.com"
- "github.com"
- "play.googleapis.com"See Network Configuration for more information.
|
|
✅ Smoke Claude passed Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.anthropic.com"See Network Configuration for more information.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed. Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"
- "github.com"See Network Configuration for more information.
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "o205451.ingest.us.sentry.io"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
✅ Build Test Suite completed successfully! Warning Firewall blocked 8 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.nuget.org"
- "bun.sh"
- "dc.services.visualstudio.com"
- "deno.land"
- "dl.deno.land"
- "github.com"
- "releaseassets.githubusercontent.com"
- "repo.maven.apache.org"See Network Configuration for more information.
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
✅ Security Guard completed successfully! Security review of PR #8944: No security concerns found. The change normalizes function-call IDs in the API proxy compatibility layer (containers/api-proxy/codex-compat.js) by transforming ctc_ prefixes to fc_ format. This is a cosmetic transformation with no impact on firewall rules, network access controls, capabilities, seccomp profiles, input validation, or credential handling. PR passes security review.
|
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
Smoke Test: Copilot Engine
Overall: PASS cc
|
Smoke Test: Cloud Hypervisor + Copilot
Result: ALL PASS Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"
- "github.com"See Network Configuration for more information.
|
|
Smoke Test: Copilot BYOK Mode ✅ PASS
Running in direct BYOK mode via api-proxy sidecar → api.githubcopilot.com
|
|
Copilot Network Isolation Smoke Test
Overall: PASS Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
[!TIP] tools:
github:
mode: gh-proxySee GitHub Tools for more information on To allow these domains, add them to the network:
allowed:
- defaults
- "api.github.com"
- "example.com"See Network Configuration for more information.
|
|
Smoke Test: Services Connectivity
Overall: PASS
|
Smoke Test: Claude Engine Validation
Overall result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.anthropic.com"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing — All Scenarios Pass ✅
No unexpected failures. OTEL tracing integration in the api-proxy sidecar is working as designed. Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "o205451.ingest.us.sentry.io"
- "registry.npmjs.org"See Network Configuration for more information.
|
Chroot Version Comparison Results
Overall: FAILED — Node.js version mismatch between host and chroot environments. The
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Note: Maven's default Warning Firewall blocked 8 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "api.nuget.org"
- "bun.sh"
- "dc.services.visualstudio.com"
- "deno.land"
- "dl.deno.land"
- "github.com"
- "releaseassets.githubusercontent.com"
- "repo.maven.apache.org"See Network Configuration for more information.
|
<!-- --> ## Motivation The CI Outer-Loop Failure Scanner has been failing repeatedly rather than completing its scan. The investigation found 49 consecutive failures after its last successful run on October 9, with two distinct errors: - [The October 9 failure](https://github.com/dotnet/runtime/actions/runs/37932617438) shows the Responses API rejecting tool history after a file edit: `400 Invalid 'input[...].id': 'ctc_call_...'. Expected an ID that begins with 'fc'.` This matches [github/gh-aw#68667](github/gh-aw#68667). The upgraded AWF includes the replayed `apply_patch` function-call ID normalization from [github/gh-aw-firewall#8944](github/gh-aw-firewall#8944). - [The November 2 failure](https://github.com/dotnet/runtime/actions/runs/41445909589) fails at the first inference request: `400 Model "gpt-6.1-sol" has no AI credits pricing and no default pricing is configured.` gh-aw v1.0.1 compiles the model's catalog pricing into the AWF configuration, so startup no longer depends on runtime discovery supplying that pricing. The local read-only reproduction with the upgraded stack completed real scan startup and model/tool continuations after file edits, exercising both previously failing paths. This supports the upgrade as a fix for these errors, but does not establish that production CI authentication is valid or that the full workflow will complete. ## Summary Upgrade gh-aw from v0.89.21 to v1.0.1 and regenerate all six agentic workflows. The resulting workflows use AWF v0.29.0 and Copilot CLI 1.0.103, including explicit compiled pricing for `gpt-6.1-sol`. Also update the companion setup action and versioned authoring references, and give the optional PAT-selection seed an empty default so omitted inputs compile to valid Actions YAML without changing random selection. The README points to the compiler version recorded in lock-file metadata instead of duplicating a version number. ## Why the breaking-change workflow changed Most of this workflow's source diff is moving and reindenting its existing outcome validator, with a diagnostic-name correction required by the upgraded collector: - **Required migration:** the new compiler rejects agent `post-steps` that inspect safe-output files. Move the validator to `safe-outputs.steps`, where it still runs before publication. Keep the successful-agent requirement and the existing checks for the source PR, exact raw comment/draft agreement, complete drafts, explicit no-op outcomes, and dry-run behavior. - **Cross-job artifact handling:** the validator now runs in a separate job, so download the breaking-change drafts there and read the raw comment intents from the downloaded `/tmp/gh-aw/safeoutputs.jsonl`. Draft uploading remains in the agent job. Pattern-based downloading permits legitimate no-op runs with no draft artifact. - **Canonical diagnostics:** reject `report_missing_tool`, `report_missing_data`, and `report_incomplete`, including when a diagnostic accompanies an otherwise-valid comment. The pinned collector normalizes legacy names before writing the file consumed by the validator, so aliases are not needed here. Update the prompt to use the canonical tool name and commit compound regression fixtures for both source and compiled validators. - **Compiler diagnostics and version alignment:** add the explicit acknowledgement for the existing trigger and a per-PR concurrency discriminator, update the artifact actions, and explicitly name `pwsh` in the helper instructions to avoid a command-permission warning. These smaller edits are not themselves fixes for the scanner failure. ## Validation - `gh aw compile --schedule-seed dotnet/runtime --validate --validate-images` — passed for all six workflows, with zero compiler warnings. - `gh aw lint .github/workflows/*.lock.yml .github/workflows/validate-pat-pool.yml` — actionlint passed for all seven files. - Repeated `gh aw compile --schedule-seed dotnet/runtime` — passed and produced byte-identical generated output. - `node --test .github/workflows/evals/breaking-change-doc.test.mjs` — passed 43 checks: 21 fixture cases against each actual inline validator plus source/compiled-script equality. Running the same suite against the original published scripts produced exactly four expected failures: a valid comment plus either canonical missing-tool/data diagnostic, in both source and compiled scripts; the other 39 checks passed. The fixtures are committed. - `npm test --prefix .github/workflows/evals` — passed all 71 Node tests, including existing scanner tests and the new documentation-validator fixtures. - `bash <session-artifacts>/repro-v1.0.1/controller.sh` — bounded read-only local scanner reproduction passed using AWF v0.29.0, Copilot CLI 1.0.103, and `gpt-6.1-sol`. It fetched 25 completed builds for pipeline 154, selected source build 1658360 and follow-up 1659071, read an 835-record timeline and a failed task's 1,762-line log, and completed model/tool continuations after file edits. No GitHub writes, workflow dispatches, or repository builds were performed. The harness is not committed. - `git diff --check` — passed. The local reproduction verifies startup and initial scan work using local authentication. It does not validate production CI credentials, the full scan, MCP integration, or publication. The committed documentation tests exercise the validators, not the live agent or collector. No .NET product builds or tests were run for these workflow-only changes. > [!NOTE] > This PR description and the changes were prepared with GitHub Copilot. --------- Co-authored-by: Copilot App <[email protected]>
Copilot rejects replayed Responses
function_callitems whoseidstill uses the Codex custom-toolctc_prefix. The compatibility adapter converted replayedapply_patchcalls tofunction_callbut preserved the invalid item ID, causing retries to fail on the same history.apply_patchitem IDs fromctc_*tofc_*.call_id, so pairedfunction_call_outputitems still match the call.apply_patchhistory withctc_IDs.fc_IDs, absent IDs, ordinary function calls, and call/output identity remain unchanged.