Skip to content

fix(qa): authenticate actual scenario execution evidence - #117004

Merged
steipete merged 1 commit into
mainfrom
codex/qa300-qa-truthful-execution
Jul 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa300-qa-truthful-execution

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

QA suite gates could incorrectly report a passing campaign without any actual completed scenario. A fabricated aggregate pass could hide an observed skipped-only run, and malformed count containers or negative/fractional counters could be normalized into a false-green result.

Why This Change Was Made

The existing suite-summary owner now validates the shape and exact non-negative safe-integer value of reported counters, trusts observed completed scenario/evidence rows over unsupported aggregate passes, and rejects a positive total without proof of completed work.

Count-only legitimate legacy summaries remain supported. Crucially, every declared or observed failure still dominates incomplete scenario rows: the intentional fail-closed failure/blocking behavior and optional-skip contracts remain unchanged.

User Impact

  1. A QA command cannot claim success when it executed zero real scenarios.
  2. Skipped-only scenario rows cannot be authenticated by a fabricated aggregate pass count.
  3. Corrupt summary count containers and unsafe, negative, or fractional counters fail visibly.

No provider, scenario execution, runtime, public configuration, SDK, security, persistence, or gateway behavior changes.

Evidence

  • Frozen canonical baseline: 36b80ada3ceae2de21b3d8710b883d778e4c4578.

  • Immutable reviewed candidate: fd7a8a0cb05b0a357294ec30006da5cce8322a8e.

  • Actual frozen/candidate production exports reproduce and correct all three causes across both failure-only and failure-or-skip readers.

  • Direct product evidence explicitly preserves count-only legitimate passes, real declared failures with incomplete/skipped rows, optional report-only skip handling, and maximum-failure dominance.

  • Focused exact-head owner command:

    node scripts/run-vitest.mjs extensions/qa-lab/src/suite-summary.test.ts
  • Exact immutable candidate proof: 53/53 owner tests passed in 22.65 seconds.

  • A first authorized remote proof exposed three real candidate regressions; all were repaired before the final passing run. A second remote attempt correctly failed its exact-head guard before running tests; both leases were stopped and verified completed, and no remote success is claimed.

  • Production delta: 25 additions / 9 deletions = +16 lines; targeted regression tests: 66 additions / 3 deletions.

  • Genuine precommit full-priority Codex/Sol high-reasoning review: zero P0/P1/P2/P3 findings, 0.96 confidence.

  • Exact immutable full-branch P0–P3 structured autoreview: zero findings, patch is correct, 0.96 confidence, genuine TruffleHog clean.

  • Passing trusted focused owner proof, both stopped remote leases, independent complete-owner review, frozen merge-base, clean worktree, targeted formatting, and git diff --check all verified.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jul 31, 2026
@clawsweeper

clawsweeper Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 31, 2026, 3:13 PM ET / 19:13 UTC.

ClawSweeper review

What this changes

The branch makes QA suite-summary readers reject malformed counts and aggregate-only success claims unless completed scenario or evidence rows authenticate execution.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 5 items remain

Keep this PR open for maintainer review. Current main still accepts a positive aggregate passed/failed count as proof that work executed, so the reported false-green condition remains relevant; however, the exact PR source blobs could not be hydrated in this read-only checkout because the promisor remote could not resolve, and the protected maintainer label requires explicit human handling.

Priority: P2
Reviewed head: fd7a8a0cb05b0a357294ec30006da5cce8322a8e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The repair direction is source-supported, but exact-head source hydration and inspectable after-fix behavior proof are still needed for a merge-ready assessment.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The PR body reports focused tests and production-export reproduction, but this review could not inspect an attached terminal transcript, log, artifact, or media proving the after-fix runtime behavior; redact private details in any added evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR body reports focused tests and production-export reproduction, but this review could not inspect an attached terminal transcript, log, artifact, or media proving the after-fix runtime behavior; redact private details in any added evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current false-green path: Current main floors/clamps any finite count, then treats positive passed or failed aggregate counts as completed work; a skipped-only summary can therefore be authenticated by a claimed positive pass count.
Gate consumes this result: The parity preflight calls the strict failure-or-skip reader before deciding whether to return or throw, so this summary boundary controls observable QA-gate results.
Existing regression boundary: Current focused tests cover zero-work, skipped-only, optional-skip, and failure-tolerant cases, but do not cover a claimed positive pass count paired with only skipped scenario rows.
Findings None None.
Security None None.

How this fits together

QA Lab writes a JSON suite summary after running scenarios, and CLI QA gates read that artifact to decide whether a campaign can pass or must report failures. This PR changes the summary-validation boundary before those gates consume the reported counts.

flowchart LR
  A[QA scenario run] --> B[Suite summary JSON]
  B --> C[Summary validation]
  C --> D[Failure and skip counters]
  D --> E[CLI QA gate]
  E --> F[Pass or visible failure]
  B --> G[Scenario and evidence rows]
  G --> C
Loading

Decision needed

Question Recommendation
Should QA gates adopt the proposed stricter summary-artifact contract, accepting that malformed or aggregate-only reports fail visibly while legitimate count-only legacy reports remain supported? Validate and accept strict summaries: Rehydrate the exact head, verify the claimed malformed/skipped-only failures and count-only legacy pass, then keep the stricter validation contract.

Why: The change deliberately alters the acceptance boundary of QA automation, and the protected maintainer label plus unavailable exact-head blobs prevent safely inferring approval from the partial local evidence.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR body reports focused tests and production-export reproduction, but this review could not inspect an attached terminal transcript, log, artifact, or media proving the after-fix runtime behavior; redact private details in any added evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - This intentionally stricter QA artifact contract can turn previously tolerated malformed or aggregate-only summaries into visible QA-gate failures; validate both legitimate count-only legacy summaries and scenario/evidence-backed summaries on the exact PR head before merging.
  • Resolve merge risk (P1) - The exact candidate source and the latest filtered ClawSweeper comment could not be retrieved because the local promisor remote and GitHub API were unreachable, so the branch needs a refreshed exact-head review rather than a merge verdict from partial diff context.
  • Complete next step (P2) - The protected maintainer label, unavailable exact-head blobs, and missing inspectable real-behavior artifact require maintainer review rather than automated repair or closure.
Agent review details

Security

None.

PR surface

Source +16, Tests +63. Total +79 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 25 9 +16
Tests 1 66 3 +63
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 91 12 +79

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Refresh exact-head QA proof (recommended)
    Make the candidate blobs available and attach a redacted terminal or log transcript showing both false-green rejection and a legitimate count-only legacy summary passing.
  2. Pause pending QA contract decision
    Leave the draft open until maintainers confirm that strict rejection is appropriate for all supported summary producers.

Technical review

Best possible solution:

Retain one canonical summary validator that accepts only safe integer counters and authenticates success from completed rows when rows are present, while preserving documented count-only legacy summaries; then show an exact-head terminal or redacted log transcript for the affected QA command and its valid legacy counterpart.

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

Yes, source-reproducible: current main treats positive counts.passed or counts.failed as completed execution even when the observed scenario rows are only skips. Read-only review did not run the fixture because tests create temporary artifacts.

Is this the best way to solve the issue?

Unclear pending exact-head hydration, but the proposed owner boundary is the right one: validate the summary where all QA gates first consume it rather than compensating in individual callers.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 652a47e6449d.

Labels

Label changes:

  • add P2: A false-green QA campaign can hide real test coverage gaps, but the affected surface is a bounded QA artifact gate rather than an end-user runtime outage.
  • add merge-risk: 🚨 automation: The PR changes the validation rules that determine whether QA CLI gates pass or fail, so existing generated or legacy summaries may change automation outcomes.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body reports focused tests and production-export reproduction, but this review could not inspect an attached terminal transcript, log, artifact, or media proving the after-fix runtime behavior; redact private details in any added evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: A false-green QA campaign can hide real test coverage gaps, but the affected surface is a bounded QA artifact gate rather than an end-user runtime outage.
  • merge-risk: 🚨 automation: The PR changes the validation rules that determine whether QA CLI gates pass or fail, so existing generated or legacy summaries may change automation outcomes.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body reports focused tests and production-export reproduction, but this review could not inspect an attached terminal transcript, log, artifact, or media proving the after-fix runtime behavior; redact private details in any added evidence. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current false-green path: Current main floors/clamps any finite count, then treats positive passed or failed aggregate counts as completed work; a skipped-only summary can therefore be authenticated by a claimed positive pass count. (extensions/qa-lab/src/suite-summary.ts:110, 652a47e6449d)
  • Gate consumes this result: The parity preflight calls the strict failure-or-skip reader before deciding whether to return or throw, so this summary boundary controls observable QA-gate results. (extensions/qa-lab/src/cli.runtime.ts:369, 652a47e6449d)
  • Existing regression boundary: Current focused tests cover zero-work, skipped-only, optional-skip, and failure-tolerant cases, but do not cover a claimed positive pass count paired with only skipped scenario rows. (extensions/qa-lab/src/suite-summary.test.ts:33, 652a47e6449d)
  • Current implementation provenance: Blame attributes the current execution-authentication logic to the commit that introduced this file on main, identifying the most relevant current-area history owner. (extensions/qa-lab/src/suite-summary.ts:141, 642ded397bc1)
  • PR remains unmerged: The candidate commit has parent 36b80ad, its parent is contained by main, and the candidate itself is not contained by main or any local release tag. (fd7a8a0cb05b)
  • Exact-head inspection blocked: The local candidate tree references a promised source blob that this checkout attempted to fetch, but DNS/network resolution for the promisor remote failed; no claim of full exact-head source inspection is made. (extensions/qa-lab/src/suite-summary.ts, fd7a8a0cb05b)

Likely related people:

  • Vincent Koc: Current main attributes the suite-summary execution-authentication block to this commit, making this the strongest available routing signal for the existing behavior. (role: current implementation introducer; confidence: high; commits: 642ded397bc1; files: extensions/qa-lab/src/suite-summary.ts)

Rank-up moves

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

  • Attach a redacted terminal or log transcript showing skipped-only aggregate claims now fail and a legitimate count-only legacy summary still passes.
  • Refresh the review once the exact candidate blobs are available so the full changed source and latest review comment can be checked.

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.

@steipete
steipete marked this pull request as ready for review July 31, 2026 19:26
@steipete
steipete merged commit 6d33976 into main Jul 31, 2026
260 of 269 checks passed
@steipete
steipete deleted the codex/qa300-qa-truthful-execution branch July 31, 2026 20:03
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 31, 2026
* origin/main: (22 commits)
  fix(cron): preserve lazy ownership and bounded notification lifetimes (#117018)
  fix: live updater no-op restarts healthy gateways (#117038)
  fix(bedrock): release streaming clients (#117039)
  fix(google): restore canonical Gemini and Vertex provider invariants (#117042)
  fix(channels): preserve accepted LINE and Mattermost delivery (#117024)
  fix(feishu): unify truthful delivery and media ownership (#117023)
  fix(ui): isolate gateway observer lifecycles (#117017)
  fix(tui): keep reset transitions isolated from stale input (#116873)
  fix(gateway): centralize streamed media descriptor ownership (#117000)
  feat(plugins): externalize OpenCode provider (#117035)
  fix(onboarding): restore skill dependency consent (#116644)
  fix(streaming): preserve incomplete bracket tails in final replies (#116983)
  fix: allow slower gateway readiness after updates (#117032)
  fix(plugin-state): avoid shared SQLite corruption when CLI starts during gateway runtime (#113204)
  fix(cli): keep config file output raw under JSON logging (#116968)
  fix(ai): malformed Anthropic stream frames expose raw event payloads (#116938)
  fix(qa): authenticate actual scenario execution evidence (#117004)
  feat(plugins): externalize NovitaAI provider (#117007)
  fix(text): preserve fenced tool markers in visible-text sanitizer (#116939) (#116971)
  fix(channels): reset metadata memos with plugin lifecycle (#117005)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 1, 2026
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 merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant