Skip to content

fix(qa): reject suite summaries with missing outcomes - #125122

Merged
steipete merged 1 commit into
mainfrom
fix/qa-suite-summary-accounting
Aug 17, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/qa-suite-summary-accounting

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where direct QA suite commands could report success when a summary omitted required outcomes or contradicted its own scenario/evidence rows.

Why This Change Was Made

Complete total/passed/failed/skipped counts now share one accounting invariant across direct suite gates and confidence reports. Invalid accounting is surfaced as a typed artifact error, while legacy partial-count fallback, all-skipped handling, and report-only optional scenarios retain their existing behavior.

User Impact

QA operators no longer get a false-green exit from internally inconsistent complete suite summaries. Corrupt or incomplete accounting fails closed instead.

Evidence

  • Pre-fix regression run: 8 focused failures, including both deterministic false-green fixtures.
  • node scripts/run-vitest.mjs extensions/qa-lab/src/suite-summary.test.ts extensions/qa-lab/src/confidence-report.test.ts extensions/qa-lab/src/cli.runtime.test.ts — 223/223 tests passed.
  • node scripts/check-changed.mjs -- extensions/qa-lab/src/errors.ts extensions/qa-lab/src/suite-summary.ts extensions/qa-lab/src/suite-summary.test.ts extensions/qa-lab/src/confidence-report.ts extensions/qa-lab/src/confidence-report.test.ts extensions/qa-lab/src/cli.runtime.test.ts — all changed-file gates passed, including extension typechecks, type-aware lint, dead-export scan, formatting, and import-cycle checks.
  • Structured autoreview was attempted; the Codex reviewer was unavailable because its authentication request failed, so no clean autoreview claim is made.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 9:16 AM ET / 13:16 UTC.

ClawSweeper review

What this changes

The PR gives QA suite summaries one shared accounting validator so direct gates and confidence reports reject inconsistent complete outcome counts.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. The latest head addresses the prior scenario-granularity finding: complete counts now reconcile with scenario outcomes without incorrectly counting lower-level blocked evidence rows. Current main still has separate, weaker direct-gate and confidence-report validation; wait for exact-head CI and the maintainer-owned merge decision.

Priority: P2
Reviewed head: c3a88da7635874e135b89c7c9e46da326c5df8ec

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has a coherent shared owner-boundary repair and focused regression coverage, with exact-head CI still pending.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned QA validation PR is not subject to the external-contributor real-behavior-proof gate; its body records focused before/after regression evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned QA validation PR is not subject to the external-contributor real-behavior-proof gate; its body records focused before/after regression evidence.
Evidence reviewed 6 items Current-main gap: Current main validates count shapes and zero execution in the direct reader, while confidence reporting separately validates count sums; it has no shared complete-count reconciliation against scenario rows.
Canonical repair: The proposed shared validator checks complete count sums, compares complete counts to recognized scenario outcomes, and only treats failed evidence as contradictory; both direct readers call it before deriving gate counts.
Sibling consumer: Confidence reporting delegates accounting validation to the same helper before its report-specific classification logic.
Findings None None.
Security None None.

How this fits together

QA Lab writes a suite-summary artifact after running scenarios and collecting evidence. Direct QA commands and confidence reports consume that artifact to determine whether an operator sees a valid passing result.

flowchart LR
A[QA scenario execution] --> B[Suite summary artifact]
B --> C[Shared accounting validation]
C --> D[Direct suite command]
C --> E[Confidence report]
D --> F[QA operator result]
E --> F
Loading

Before merge

  • Resolve merge risk (P1) - The bug fix adds about 65 production lines; the shared validator replaces duplicated consumer validation and adds the missing owner-boundary reconciliation, so retain that canonical path rather than adding further downstream checks.
  • Resolve merge risk (P1) - The branch is behind current main and required checks were still running; GitHub reports a clean merge, but exact-head checks should complete before merge.
  • Complete next step (P2) - No actionable repair remains on the reviewed head; await normal maintainer merge review and exact-head CI.
Agent review details

Security

None.

PR surface

Source +65, Tests +128, Other 0. Total +193 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 3 174 109 +65
Tests 4 186 58 +128
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 8 361 168 +193

Review metrics

Metric Value Why it matters
Production versus test delta production +65, tests +128 The production growth centralizes previously split validation and adds scenario/evidence reconciliation; the test growth covers direct gates, confidence reporting, and Telegram fixture compatibility.

Stored data model

Persistent data-model change detected: serialized state: extensions/qa-lab/src/cli.runtime.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the shared validator after exact-head checks pass, keeping scenario results as aggregate-count ownership and lower-level evidence as corroborating evidence only.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the shared validator after exact-head checks pass, keeping scenario results as aggregate-count ownership and lower-level evidence as corroborating evidence only.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: a complete summary can report counts that differ from its scenario outcomes, and current-main direct gates do not reconcile that invariant. The PR adds focused regression coverage for the false-green shapes.

Is this the best way to solve the issue?

Yes. A shared validator at the suite-summary boundary is the narrowest maintainable repair because both direct gates and confidence reports consume the same artifact contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7068006c78a1.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned QA validation PR is not subject to the external-contributor real-behavior-proof gate; its body records focused before/after regression evidence.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.
  • remove merge-risk: 🚨 other: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This prevents false-green QA artifact evaluation with limited blast radius outside QA operations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned QA validation PR is not subject to the external-contributor real-behavior-proof gate; its body records focused before/after regression evidence.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the recent QA summary correctness fixes and artifact refactor that define this validation boundary. (role: recent QA artifact and summary contributor; confidence: high; commits: 2970ccb53fb7, 6d339763186a, 47601cf5b41d; files: extensions/qa-lab/src/suite-summary.ts, extensions/qa-lab/src/suite-artifacts.ts)
  • Vincent Koc: History credits Vincent Koc with earlier direct-suite exit and skipped-summary behavior in the same summary reader. (role: prior suite-summary contributor; confidence: medium; commits: e12141fa9f3b, 3dc6ac38021d; files: extensions/qa-lab/src/suite-summary.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the required checks complete on c3a88da before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-08-17T06:46:41.442Z sha a6fab12ccde4ffab76935fda175daa6c30a246ab :: needs changes before merge. :: [P1] Validate the canonical nested evidence entries
  • reviewed 2026-08-17T07:10:53.265Z sha 036a2972ecd474095420c7ede89a375c8147797f :: found issues before merge. :: [P1] Validate canonical nested evidence entries
  • reviewed 2026-08-17T07:47:09.995Z sha 1f1bd30 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T09:18:29.324Z sha 2e61e61 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-17T09:25:31.975Z sha 2e61e61 :: needs changes before merge. :: [P1] Compare evidence at scenario granularity
  • reviewed 2026-08-17T10:41:18.472Z sha 2e61e61 :: found issues before merge. :: [P1] Compare evidence at scenario granularity

@steipete
steipete force-pushed the fix/qa-suite-summary-accounting branch 2 times, most recently from 036a297 to 1f1bd30 Compare August 17, 2026 07:40
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 17, 2026
@steipete steipete self-assigned this Aug 17, 2026
@steipete
steipete force-pushed the fix/qa-suite-summary-accounting branch from 1f1bd30 to 2e61e61 Compare August 17, 2026 09:12

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 17, 2026
@steipete
steipete force-pushed the fix/qa-suite-summary-accounting branch from 2e61e61 to c3a88da Compare August 17, 2026 13:10

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. label Aug 17, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 17, 2026
@steipete
steipete merged commit bc277fa into main Aug 17, 2026
173 checks passed
@steipete
steipete deleted the fix/qa-suite-summary-accounting branch August 17, 2026 13:19

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants