Repository navigation
test: exercise real Copilot, Claude and Codex with /reflect diagnostics - #11371
Conversation
Exercise Copilot, Claude and Codex against isolated production proxy diagnostics. Use deterministic target inference and fail-closed grading. Keep live execution manual and add provider-free CI coverage. Co-authored-by: Copilot App <[email protected]>
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 28cd2e4 |
There was a problem hiding this comment.
🟡 Changes recommended
Critical startup and artifact-collection failures block the smoke runs, while unsafe host executable lookup threatens evidence integrity and non-Copilot jobs receive unnecessary inference permissions.
5 open issues
What changed in this PR
Adds a manual Docker smoke test to check whether real Copilot, Claude Code and Codex CLIs use AWF’s /reflect diagnostics after reasoning-effort and model-policy rejections. Live acceptance remains pending a separately authorized manual run.
Changes:
- Runs three pinned CLIs in parallel against AWF built from the dispatched checkout.
- Adds a credential-free production-proxy fixture, host-side grading and sanitized evidence collection.
- Adds provider-free regression tests, Build Verification integration and documentation.
| File | Description |
|---|---|
scripts/ci/reflect-smoke/run.sh |
Orchestrates scenarios, inference bounds, fixture collection and cleanup. |
scripts/ci/reflect-smoke/README.md |
Documents architecture, grading, limits and pending live acceptance. |
scripts/ci/reflect-smoke/harness.test.cjs |
Checks workflow structure, host orchestration and CLI invocation contracts. |
scripts/ci/reflect-smoke/guest.sh |
Launches each real CLI with the task and structured reporting instructions. |
scripts/ci/reflect-smoke/grade.cjs |
Validates rejection, diagnostic access, correction and refusal evidence. |
scripts/ci/reflect-smoke/fixture.test.cjs |
Exercises production HTTP paths and fail-closed grading. |
scripts/ci/reflect-smoke/fixture.cjs |
Hosts the production proxy fixture, deterministic upstream and evidence journal. |
scripts/ci/reflect-smoke/Dockerfile |
Packages the fixture using the checkout-built API-proxy image. |
scripts/ci/reflect-smoke/collect.cjs |
Validates report files and emits sanitized verdicts, traces and versions. |
package.json |
Adds the provider-free smoke test command. |
docs/INTEGRATION-TESTS.md |
Links the smoke documentation and distinguishes local checks from live acceptance. |
.github/workflows/build.yml |
Runs provider-free smoke checks on Node 22. |
.github/workflows/agent-reflect-smoke.yml |
Adds manual parallel agent jobs, checkout-specific builds and artifact uploads. |
Review effort: Max (auto)
| timeout-minutes: 40 | ||
| permissions: | ||
| contents: read | ||
| copilot-requests: write |
| export DISABLE_AUTOUPDATER=1 | ||
| export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 | ||
| mkdir -p "$HOME" "$CODEX_HOME" | ||
| "$agent" --version > agent-version.txt |
| fixture="awf-reflect-$agent-$scenario-${GITHUB_RUN_ID:?}-${GITHUB_RUN_ATTEMPT:?}" | ||
| docker run --detach --name "$fixture" --network none \ | ||
| --read-only --cap-drop ALL --security-opt no-new-privileges \ | ||
| --tmpfs /evidence:rw,noexec,nosuid,size=2m,mode=1777 \ |
| --read-only --cap-drop ALL --security-opt no-new-privileges \ | ||
| --tmpfs /evidence:rw,noexec,nosuid,size=2m,mode=1777 \ | ||
| --tmpfs /tmp:rw,noexec,nosuid,size=4m \ | ||
| --env "SCENARIO=$scenario" "awf-reflect/fixture:$sha" > /dev/null |
| docker rm "$fixture" > /dev/null | ||
| fixture='' | ||
| # Remove the external peer before Compose tears down its network. | ||
| sudo docker compose --file "$compose" down -v -t 1 > "$trusted/cleanup.log" 2>&1 || overall=1 |
|
@copilot address review feedback |
Co-authored-by: lpcox <[email protected]>
Addressed in |
|
✅ Copilot review passed with no inline comments. @lpcox Add the |

Summary
Add a manual-only, three-job parallel real-agent utilization smoke for the new
/reflectmodel diagnostics. Copilot, Claude Code and Codex each execute their actual pinned CLI through AWF's Docker runtime. There is no new scheduled or PR-triggered paid inference, and no workflow has been dispatched for this change.Relates to #10290, #10296, and #10297. These are non-closing references.
Architecture
latest. Record source, image identities and CLI version.createProviderServer, model-body transform, policy/effort admission, runtime catalog, decision observation and/reflect. Only its loopback upstream inference is deterministic; it does not fabricate diagnostics or weaken a production rejection.Required behavior and grading
/reflectGET containing the actual rejection → exactly one narrowly corrected POST → HTTP 200, exactly one approved upstream request and the actual nonce-derived result./reflectGET containing the policy rejection → no further POST or upstream request, normal CLI exit and explicit structured refusal withretry: false.Both require completed response evidence and the real diagnostics schema/reason/
do_not_repeat. Maximum five target requests, only the prescribed endpoints/methods. Missing/no-action/no-reflect evidence, repeated invalid attempts, model switching, reasoning omission, unexpected endpoints, wrong results, malformed or unsafe report files, nonzero exits and truncation fail closed. An agent-written marker or transcript cannot authorize a pass.The normal effort error already advertises supported values. This verifies observable diagnostic utilization, not that
/reflectwas causally necessary or that the agent internally understood it.Bounds and authentication
Per engine/scenario: 24 AWF inference turns, 30 AI credits, 12 provider requests/minute and 30/hour, 1 MiB request bytes/minute, one upstream auth denial, six agent minutes and an eight-minute host deadline with termination grace. The target refuses further requests after twelve; the grader is stricter. These are production enforcement limits, not dollar estimates or a claim that in-flight billing cannot overshoot. No accounting or policy bypass is introduced.
Only the relevant engine credential is supplied to each job. Missing credentials fail, rather than producing a skip. The fixture has no real credential, Docker socket, state endpoint or agent-shared evidence mount. No production proxy/resolver/pricing/selection surfaces were changed.
Validation performed locally
npm run test:reflect-smoke: 9 passing tests, including actual production HTTP fixture recovery/denial, tampered/missing/repeated/evasion evidence, sanitized collection, mock host cleanup/orchestration and mock process invocation for all three real CLI command contracts.npm run build,npm run type-check, andnpm run lint -- --quietpassed.copilot-requestspermission scope excluded; the same permission is already used by the daily runtime regression workflow.Build Verification now runs the provider-free smoke on Node 22 after installing proxy dependencies. These checks use no provider credentials, Docker containers or paid inference.
Pending live acceptance
No live agent inference, container run or workflow dispatch was performed. A separately authorized manual run must pass both scenarios for all three CLIs before claiming live-agent acceptance. Docker only; no Cloud Hypervisor/NVX/ARC coverage is claimed.
Harness architecture, exact grading thresholds, artifact handling and the provider-free local command are documented in
scripts/ci/reflect-smoke/README.md.