Repository navigation
Repair primary regression completion and Codex routing evidence gates - #11191
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The collector stops evaluating routing after 100 audit entries, allowing unsuccessful attempts to hide a later successful response and incorrectly report failure.
2 open issues
What changed in this PR
Updates the shared primary-runtime regression harness to recognize valid NVX completion lines and verify Codex API-proxy routing without requiring token-usage records.
Changes:
- Adds bounded, redacted marker diagnostics with strict LF/CRLF completion checks.
- Uses persisted HTTP and WebSocket upstream statuses for routing evidence, with enclave audit compatibility.
- Adds fixtures for affected runtime cells and transport edge cases, and documents the evidence contract.
| File | Description |
|---|---|
src/enclave/proxy-usage.ts |
Accepts WebSocket status observations without changing usage totals. |
src/enclave/proxy-usage.test.ts |
Tests valid and malformed WebSocket status observations. |
scripts/ci/run-agent-runtime-regression.sh |
Enforces classified completion and routing evidence. |
scripts/ci/collect-agent-regression-evidence.test.ts |
Adds marker, routing, and producer fixtures. |
scripts/ci/collect-agent-regression-evidence.cjs |
Collects marker diagnostics and audit-based routing reports. |
scripts/ci/agent-runtime-regression.test.ts |
Exercises affected runtime cells and evidence rejection cases. |
docs/INTEGRATION-TESTS.md |
Documents retained evidence and success requirements. |
containers/api-proxy/token-tracker-ws.js |
Audits parsed upstream WebSocket handshake statuses. |
Review effort: Max (auto)
| if (report.requests.length === MAX_ROUTING_RECORDS) { diagnostics.truncated = true; break; } | ||
| report.requests.push({ transport: websocket ? 'websocket' : 'http', path: endpoint, status: record.status }); | ||
| } | ||
| diagnostics.pending = pending.size; | ||
| if (report.requests.some(request => request.transport === 'websocket' ? | ||
| request.status === 101 : request.status >= 200 && request.status < 300)) { | ||
| report.status = 'successful'; | ||
| } else if (report.requests.length) report.status = 'failed'; | ||
| else if (diagnostics.malformed || diagnostics.wrongSource || diagnostics.invalidStatus || diagnostics.partialLine) { | ||
| report.status = 'rejected'; | ||
| } |
There was a problem hiding this comment.
Fixed in 64f3865: the collector now scans the full bounded audit after the 100-record projection cap and tracks success independently. Added a 100×429 followed by 200 regression case.
| ${event === 'close' ? 'client' : 'response'}.emit(${JSON.stringify(event)}); | ||
| response.emit('end'); | ||
| closeLogStream().catch(() => { process.exitCode = 1; }); | ||
| `], { env: { ...process.env, AWF_TOKEN_LOG_DIR: directory, AWF_VERSION: '0.0.0-test' }, encoding: 'utf8', timeout: 10000 }); | ||
| expect(result.status).toBe(0); | ||
| expect(result.stderr).toBe(''); | ||
| expect(fs.readFileSync(path.join(directory, 'token-usage.jsonl'), 'utf8')).toBe(''); | ||
| fs.mkdirSync(destination); | ||
| collectCodexRoutingEvidence(path.join(directory, 'token-tracker-audit.jsonl'), destination); | ||
| expect(JSON.parse(fs.readFileSync(path.join(destination, 'codex-routing.json'), 'utf8'))).toMatchObject({ | ||
| status: 'successful', requests: [{ transport: 'http', path: '/v1/responses', status: 200 }], | ||
| diagnostics: { starts: 1, ends: 1, pending: 0, noUsage: 1 }, |
There was a problem hiding this comment.
Fixed in 64f3865: the close case now emits only the downstream close, and asserts pending: 1, ends: 0, and noUsage: 0; the upstream-end case retains its finalized expectations.
|
@copilot merge main, resolve conflicts, and address all review feedback |
…y-regression-gates Co-authored-by: lpcox <[email protected]>
Co-authored-by: lpcox <[email protected]>
|
⏳ Copilot review left inline comments. @copilot To proceed:
|
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 2eace9b |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (2 files)
Coverage comparison generated by |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓
|
|
🔌 Smoke Services is testing service connectivity for this pull request... |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
✅ Smoke Claude passed
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
✅ Build Test Suite completed successfully!
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — FAIL Java failure: Maven could not download plugins from Maven Central: .NET note: dotnet only worked after I set
|
|
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS — cc @lpcox
|
Smoke Test: Copilot BYOK (Direct) Mode✅ PASS — Direct BYOK mode validated
Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY via api-proxy sidecar)
|
|
OTEL smoke test
|
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
|
|
Smoke Claude Results
Overall result: PASS
|
|
Smoke Copilot: PRs: "chore: refresh canonical model sources", "docs: sync schemas and specs with source changes"
PASS —
|
Smoke Test
|
Chroot Version Comparison
Result: Not all tests passed (Node.js mismatch), so the
|


Five primary-runtime jobs rejected exit-0 results at shared evidence gates. NVX completion failures lacked byte-level classification, while Codex routing depended on token-usage records that can be absent after successful inference.
Completion evidence
marker-check.jsonclassifications without claiming to resolve historical private-log bytes.Codex routing
token-tracker-audit.jsonl: HTTP upstream statuses and newly observed WebSocket handshake statuses.Compatibility and fixtures