Skip to content

refactor(tests): simplify QA evidence and planning tests - #156908

Draft
vincentkoc wants to merge 3 commits into
mainfrom
refactor/qa-evidence-test-oracles-20260924
Draft

vincentkoc wants to merge 3 commits into
mainfrom
refactor/qa-evidence-test-oracles-20260924

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

QA evidence tests repeat redaction runs and fixture bookkeeping, while a stale planning coverage selector silently omits three catalog rows. Gallery temporary roots also lack consistent cleanup ownership.

Why This Change Was Made

Reuse the existing temporary-directory tracker, protect scorecard setup with its cleanup scope, and consolidate blocked-producer and redaction checks around their surviving literal assertions. Restore the three planning rows, add an explicit catalog-membership guard, and move ordering/eligibility assertions into stronger survivors.

User Impact

No production behavior changes. Eight test/support files change: tests +286/-357 (-71), support -5, production 0; net -76 lines.

Static registrations change from 93 to 90 and statically expanded cases remain 150, with changed membership: two duplicate redaction executions are removed; three planning rows and one membership guard are added while two dominated shells are removed. Gallery's 20, script-evidence's 30 and scorecard's 13 cases remain.

Evidence

Current-Main Integration Note (October 14)

Source-only comparison of head 687a0a7194e0d4897f2a7404c714857c82fe60c2 against main 769d14b937f580b9bac2118f64943d1059b2e5dd narrows two integration decisions:

  • Retain the gallery temporary-repository cleanup work. Main's evidence-gallery.test.ts still uses createTempRepo without a suite cleanup hook; the support helper still returns an untracked temporary directory. This is remaining test-fixture ownership work, not a production defect.
  • Drop the obsolete composite-case integration hunk in suite-planning.test.ts. Merged PR #168028 (4e97b5ca74f8a4d0f237472d9dd125652563edb3) deleted the case this draft strengthens. Do not revive it; preserve main's current prototype-mutation and deletion/recreation ordering tests. This does not establish equivalent coverage of every encounter-order assertion.

These are two bounded source findings, not a complete eight-file audit, proof that cleanup is the sole residual, or supersession of this PR. The branch has not been rebased or narrowed. The counts and validation below describe the existing candidate; they do not qualify a future integration. Held YAML inputs, fs-safe qualification, execution proof, owner/review and current-head CI/native landing gates remain outstanding.

  • Independent source review completed. Qualified oxfmt 0.67 WRITE/CHECK and whitespace checks passed; the final formatting pass changed zero bytes.
  • The original native source review completed all 25 passes with no P0–P2 findings; all 147 admitted inputs and eight postimages remained unchanged. Context was partitioned across passes. This is scoped source evidence, not runtime proof.
  • Native coverage excludes unchanged qa/scenarios/personal/redaction-no-secret-leak.yaml and qa/scenarios/security/secret-redaction-tool-logs.yaml. Exact upstream dependency sources are outside the native inputs; exact fs-safe 0.18.2 implementation and runtime qualification remain unproven.
  • The canonical staged hook failed once because repository formatter dependencies were absent. Three scoped signed commits used the documented --no-verify exception after separate pinned formatting proof. The configured literal scan was disabled (unset); no full hook or runtime pass is claimed.
  • Tests, collection, types, fault experiments, ratchet, performance and CI remain unrun under CI HOLD.
  • Draft; maintainer approval and execution proof remain pending. Auto-merge is disabled.

@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR consolidates QA evidence tests, shares temporary-directory cleanup, and restores three planning scenarios to lane coverage.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful, coherent source changes have limited validation confidence because their tests remain unexecuted.
Proof confidence 🦪 silver shellfish (2/6) The MEMBER-authored, test-only PR is outside the external-contributor runtime-proof gate. No executed proof of the changed tests is supplied, and source review is not credited as runtime evidence; no stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes
Reason: Restoring silently omitted lane checks and reducing duplicated fixture ownership provides concrete QA maintenance value without adding product surface.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR retains a useful planning-coverage repair that current main still lacks. Source review found no concrete introduced bug, but the changed tests remain unexecuted and overlapping main changes need reconciliation.

Priority: P3
Reviewed head: 687a0a7194e0d4897f2a7404c714857c82fe60c2

Before merge

  • Complete next step - Sync the branch with current main and reconcile overlapping QA test changes before validating the resulting head.

Findings

None.

Tests

  • Missing end-to-end proof: The changed test files have not been collected or executed. Confirm the three restored planning cases run, the retained evidence assertions pass, and gallery cleanup completes; provide per-file wall times. The read-only review cannot establish execution or a base/head negative control.
Agent review details

How this fits together

QA Lab selects test scenarios and turns their results and artifacts into evidence galleries and coverage reports. These tests check scenario eligibility, evidence interpretation, and fixture cleanup.

flowchart TD
  A[Scenario catalog] --> B[Lane and suite planning]
  B --> C[Scenario execution]
  C --> D[Results and artifacts]
  D --> E[Evidence gallery and scorecard]
  F[QA tests and temporary fixtures] --> B
  F --> E
Loading

Technical review

Best possible solution:

Retain the catalog-selector repair and assertion-preserving cleanup while adapting the test consolidation to current main's existing audits.

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

Yes, by source inspection: current main's obsolete coverage IDs match none of the three intended catalog rows, leaving their parameterized lane checks empty. Collection and execution were not performed.

Is this the best way to solve the issue?

Yes: updating the selector, guarding its membership, and consolidating assertions at their existing test owners is a bounded solution; runtime correctness of the revised tests remains unverified.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3ed1e21065ea.

Provenance checked

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

  • Verified introduced scope: The pinned merge-base-to-head delta changes tests and test support only; production owners, dependencies, workflows, and stored-data formats are unchanged. (687a0a7194e0)
  • Planning repair remains necessary on main: Current main selects runtime.no-meta-leak and workspace.planning, while the catalog declares openai.codex-harness-no-meta-leak, openai.codex-harness-planning, and agent-runtime.external-harness-selection-planning. The PR replaces the obsolete IDs and guards membership. These assertions exercise OpenClaw catalog metadata and lane selection, not the upstream Codex runtime or protocol. (extensions/qa-lab/src/scenario-lane.test.ts:15, 3ed1e21065ea)
  • Related merged work preserves this ownership: The merged refactor(qa-lab): deslop QA Lab fourth pass #159582 explicitly says its duplicate planning-selector repair was removed because this PR owns it; that merged work does not supersede the remaining repair. (9a202d4c145b)
  • Cleanup uses the existing lifecycle owner: The shared tracker registers cleanup with afterEach, records each created directory, and removes tracked directories after the test. Gallery fixtures now consume that existing owner rather than the removed untracked createTempRepo helper. (test/helpers/temp-dir.ts:89, 687a0a7194e0)
  • Execution evidence remains absent: The full live PR body still states that collection, tests, types, performance, and CI execution remain unrun. The previous review's focused-test and per-file timing request therefore remains unresolved; skipped checks do not establish test execution. (687a0a7194e0)
  • Shared area history: Current-main history connects Vincent Koc to evidence retention and provider-lane enforcement, Dallin Romney to planning-lane coverage, and Peter Steinberger to channel expansion and subsequent test audits. A deeper blame attempt failed because a historical blob could not be fetched from the promisor remote (HTTP 403); no source-line introduction attribution is claimed. (extensions/qa-lab/src/scenario-lane.ts, 30337c896212)

PR surface

Tests -76. Total -76 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 8 286 362 -76
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 286 362 -76

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This improves test coverage and fixture maintenance without changing production behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

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

  • Complete the prior focused-test validation request and report measured per-file costs.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-24T01:31:05.886Z sha 687a0a7 :: blocked before merge. :: none

Reviewed October 8, 2026, 1:37 PM ET / 17:37 UTC (Revision 2).

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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. and removed P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026

This branch has not been deployed

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

Labels

extensions: qa-lab P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant