Skip to content

fix: preserve sanitized reflect smoke failure diagnostics - #11429

Merged
lpcox merged 1 commit into
mainfrom
lpcox-reflect-smoke-failure-diagnostics
Nov 10, 2026
Merged

lpcox merged 1 commit into
mainfrom
lpcox-reflect-smoke-failure-diagnostics

Conversation

@lpcox

@lpcox lpcox commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Preserve actionable, bounded failure evidence for the manual real-agent /reflect smoke without exposing request values or weakening acceptance. This is the focused diagnosis follow-up to #11371, not a production model rewrite or a claim of improved live-agent acceptance.

Relates to #11371, #10290, #10296, and #10297 (non-closing references).

  • Give each grading contract a static assertion ID. The collector publishes only the first recognized failedAssertion, never assertion diffs, exception messages/stacks or agent-supplied error properties.
  • Publish boolean shape comparisons for incoming and forwarded target requests: exact method/path/model, initial/supported effort, nonce-input and stream gates, and complete initial/corrected body equality. No values are copied.
  • Retain the credential-free backend's own status and fixed fixture_task_mismatch classification. Streamed upstream failures no longer disappear behind only stage: "grade" and an unclassified incoming 422.
  • Bound each sanitized trace to thirteen entries; allowlist strings, deduplicate diagnostic reasons and bound numeric fields. The grader still allows at most five requests.
  • Add provider-free real-fixture/collector/grader reproductions for all five retained failing chronologies, individual structural mismatch gates, production model-prefix normalization, original success paths, strict failure cases, and public-output leak/bounds checks.
  • Make only the mock host test's timeout executable self-contained, so local checks run on macOS without changing the Linux live harness's host deadline.

What the evidence establishes

Reviewed the sanitized artifacts from run 42678673312, source eeefa05f0d457b43d693dd74f68de2348d69ddc9: provider-free checks passed, only Copilot denial passed (1/6 live scenarios), and all CLIs exited zero.

The local tests reproduce:

Retained chronology Controlled local reproduction
Copilot recovery: 422 → GET 200 → 400 → 200 Submit task envelope, read diagnostics, submit exact initial request, then corrected request.
Claude recovery: 422 → GET 200 → 400 Same malformed envelope, diagnostic GET, exact initial request.
Claude denial: 422 → GET 200 → 403 Same malformed envelope under deny-all, diagnostic GET, exact initial request.
Codex recovery: 422 → GET 200 → GET 200 → 200 Same malformed envelope, two diagnostic reads, corrected request.
Codex denial: 403 → POST /reflect 403 Exact initial denial followed by the wrong diagnostic method; no successful GET.

Submitting the envelope rather than its nested request is a demonstrated possible local cause, not a finding about the historical agents. The old artifacts omit request bodies/shape flags and the failed assertion, so their 422 mismatch cause remains unknown. No canonical registry finding establishes a production fix. Exact requests still return the required production 400/403 locally, and both original success paths pass. No production model subsystem defect has been established or patched.

Acceptance and isolation unchanged

Keep the exact initial rejection; successful GET /reflect chronology/schema/reason/do_not_repeat; recovery's exactly two target POSTs, one upstream request and nonce-derived report; denial's exactly one POST, zero upstream requests and retry: false; request/inference/time caps; and host-owned evidence. Prompts, credentials, headers, raw bodies, nonce/results, transcripts and arbitrary agent/error strings remain excluded from published failure diagnostics. No guest prompt, production admission or workflow was changed.

Local validation

  • npm run test:reflect-smoke: 19 passing tests, no providers or Docker.
  • Installed ESLint recommended rules scoped to the smoke CommonJS scripts: clean.
  • node --check for smoke CommonJS files and bash -n for both harness scripts: pass.
  • Changed README Markdown lint and git diff --check: pass.
  • Repository pre-commit npm run lint and npm run build: pass (existing lint warnings).

No live inference, workflow dispatch/rerun, token exchange, auto-merge or merge was performed. Live acceptance remains pending separately authorized testing; these checks neither repair historical artifacts nor prove that an agent's behavior improved.

Record stable contract assertion IDs and bounded incoming/upstream shape comparisons
without publishing request values. Reproduce retained failure chronologies with the
real provider-free fixture while keeping acceptance strict.

Co-authored-by: Copilot App <[email protected]>
Copilot AI adaptive review requested due to automatic review settings November 10, 2026 19:39

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.

🟢 Approval recommended

No active review issues are recorded for the sanitized smoke-test diagnostics changes, though live-agent acceptance remains pending.

No open issues 🎉

What changed in this PR

Improves failure diagnostics for AWF’s manual real-agent /reflect smoke tests, following #11371. The changes preserve bounded, sanitized evidence without changing production model behavior or substantive acceptance requirements. Live-agent acceptance remains pending.

Changes:

  • Add static grading failure IDs and bounded incoming/upstream traces with boolean request-shape comparisons.
  • Preserve fixture backend status and mismatch classification without publishing request values or arbitrary error text.
  • Expand provider-free regression coverage and make the mock harness timeout self-contained.
File Description
scripts/​ci/​reflect-smoke/​README.md Documents sanitized evidence, historical uncertainty, and validation limits.
scripts/​ci/​reflect-smoke/​harness.test.cjs Adds output-sanitization checks and a self-contained mock timeout.
scripts/​ci/​reflect-smoke/​grade.cjs Assigns static failure IDs while retaining grading requirements.
scripts/​ci/​reflect-smoke/​fixture.test.cjs Covers retained failure chronologies, structural mismatches, and model normalization.
scripts/​ci/​reflect-smoke/​fixture.cjs Records upstream sequence, backend status, and fixed mismatch classification.
scripts/​ci/​reflect-smoke/​diagnostics.cjs Adds bounded trace sanitization and boolean request-shape comparisons.
scripts/​ci/​reflect-smoke/​collect.cjs Includes sanitized upstream traces and recognized assertion IDs in summaries.

Review effort: Balanced (auto)

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 93.84% 93.84% ➡️ +0.00%
Statements 92.39% 92.38% 📉 -0.01%
Functions 93.06% 93.06% ➡️ +0.00%
Branches 86.77% 86.77% ➡️ +0.00%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/commands/main-action.ts 92.0% → 91.7% (-0.25%) 91.7% → 91.4% (-0.24%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

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.

2 participants