Skip to content

test: exercise real Copilot, Claude and Codex with /reflect diagnostics - #11371

Merged
lpcox merged 2 commits into
mainfrom
lpcox-agent-diagnostics-smoke
Nov 9, 2026
Merged

lpcox merged 2 commits into
mainfrom
lpcox-agent-diagnostics-smoke

Conversation

@lpcox

@lpcox lpcox commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a manual-only, three-job parallel real-agent utilization smoke for the new /reflect model 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

  • Build the dispatched checkout's CLI and Squid/agent/API-proxy images, tagged with the exact source SHA. Never substitute the published release or latest. Record source, image identities and CLI version.
  • Keep each CLI's real inference on AWF's normal credential-isolating sidecar. Deliberately failing target requests go to a fresh, credential-free topology-attached fixture container for each engine/scenario.
  • The target uses the production 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.
  • Seed a known-priced model with a randomized supported effort and fresh nonce. Give agents the initial request, task/report format, configured diagnostics address and general evidence/stop guidance—not a recovery script or correct effort.
  • Keep reference state and the grader outside the small mounted guest workspace. Stop the fixture, copy its journal via host Docker, remove the external peer, then explicitly tear down Compose services. Upload sanitized evidence only, never raw agent/provider logs.

Required behavior and grading

Scenario Passing evidence
Unsupported effort Unchanged initial POST → real HTTP 400 → successful /reflect GET containing the actual rejection → exactly one narrowly corrected POST → HTTP 200, exactly one approved upstream request and the actual nonce-derived result.
Permanent model policy denial Initial POST → real HTTP 403 → successful /reflect GET containing the policy rejection → no further POST or upstream request, normal CLI exit and explicit structured refusal with retry: 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 /reflect was 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.
  • Existing API-proxy targeted suites: 35 passing tests across model-decision reflection, reasoning-effort validation and model policy.
  • npm run build, npm run type-check, and npm run lint -- --quiet passed.
  • Shell syntax, changed-document Markdown lint and whitespace checks passed.
  • Actions syntax passed with the installed actionlint's known unsupported copilot-requests permission 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.

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]>
Copilot AI adaptive review requested due to automatic review settings November 9, 2026 16:38
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-11371 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 28cd2e4

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
Comment thread scripts/ci/reflect-smoke/run.sh Outdated
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
Comment thread scripts/ci/reflect-smoke/run.sh Outdated
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
@lpcox

lpcox commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot address review feedback

Copilot AI commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@copilot address review feedback

Addressed in cf9f450: Copilot permissions are isolated to its job; the guest prepends the pinned CLI directory; fixture evidence uses a removable persistent volume; the fixture disconnects from none before AWF attaches; and host executables are resolved before agent execution.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants