Skip to content

refactor(qa): share harness drift result construction - #146903

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/qa-harness-drift-results-20260913
Sep 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/qa-harness-drift-results-20260913

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

QA harness comparisons repeat the same result metadata in eight drift branches, making those reports harder to maintain consistently.

User Impact

No user-visible behavior changes. Comparison priority, diagnostics, token deltas, and transcript drift positions are preserved.

Why This Change Was Made

One typed local constructor now owns drift results. The no-drift result still omits drift details and the first drift turn. Production changes: −56 lines; tests: +106 lines.

Evidence

  • Exact-head CI attempt 1 passed, including the required openclaw/ci-gate.
  • Job 103710855310 passed all 14 harness-parity tests, including nine complete-result cases; 83 files and 825 tests passed. Actual module parity also matched 672 before/after cases.
  • Primary and independent source reviews, fresh P2 autoreview, and the exact-head ClawSweeper review are clean. Native main comparison confirms both original files remain unchanged on main.
  • A separate Labeler job failed with an installation-token permission error. Current branch rules require only openclaw/ci-gate; no permission changes or retries were made.
  • No live provider or Codex runtime behavior is changed or claimed.

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

clawsweeper Bot commented Sep 13, 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 6:41 AM ET / 10:41 UTC (Revision 2).

ClawSweeper review

What this changes

QA Lab now uses one local constructor for harness comparison drift results and adds table-driven coverage for complete result metadata.

Merge readiness

✅ Ready for maintainer review

Keep open: this member-authored cleanup remains distinct from current main, and the pinned diff introduces no actionable correctness or security findings.

Priority: P3
Reviewed head: b9f2edcb0e54a08c2665da8fe2336d8ad76d85a7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving refactor with useful metadata coverage and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored internal refactor is exempt from external-contributor runtime proof; the reported 672 module comparisons supplement the source review but were not independently executed here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored internal refactor is exempt from external-contributor runtime proof; the reported 672 module comparisons supplement the source review but were not independently executed here.
Evidence reviewed 8 items Pinned production diff preserves behavior: All eight drift branches retain their conditions, ordering, diagnostic strings, metadata fields, and first-drift calculation. The no-drift return remains separate and unchanged.
Complete metadata coverage: Read the complete test module. The nine-case table checks full results, nonzero token deltas, drift positions, and omitted no-drift fields; existing tests primarily check classification and comparison modes.
Current main still contains the repeated construction: Both affected files are unchanged between the pinned merge base and fetched main. The proposed consolidation is therefore still absent from the reviewed main revision.
Findings None None.
Security None None.

How this fits together

QA Lab compares captured harness results, including prompts, tool calls, transcripts, and token usage. Its comparison results feed QA diagnostics and confidence checks.

flowchart LR
  A[Captured harness results] --> B[Normalize comparison cells]
  B --> C[Compare prompts and behavior]
  C --> D{Drift detected}
  D -->|Yes| E[Shared drift result constructor]
  D -->|No| F[No-drift result]
  E --> G[QA diagnostics and confidence checks]
  F --> G
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -56, Tests +106. Total +50 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 24 80 -56
Tests 1 106 0 +106
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 130 80 +50

Review metrics

None.

Technical review

Best possible solution:

Keep drift metadata construction local to the existing comparator while preserving comparison precedence and the distinct no-drift result.

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

Not applicable: this PR claims behavior-preserving cleanup, and source comparison supports that claim; no runtime defect is reported.

Is this the best way to solve the issue?

Yes: one typed local constructor removes repeated metadata without changing the public surface, comparison policy, or caller contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a bounded internal cleanup that preserves existing behavior and introduces no user-facing capability.
  • 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 member-authored internal refactor is exempt from external-contributor runtime proof; the reported 672 module comparisons supplement the source review but were not independently executed here.

Evidence

What I checked:

  • Pinned production diff preserves behavior: All eight drift branches retain their conditions, ordering, diagnostic strings, metadata fields, and first-drift calculation. The no-drift return remains separate and unchanged. (extensions/qa-lab/src/harness-parity.ts:275, b9f2edcb0e54)
  • Complete metadata coverage: Read the complete test module. The nine-case table checks full results, nonzero token deltas, drift positions, and omitted no-drift fields; existing tests primarily check classification and comparison modes. (extensions/qa-lab/src/harness-parity.test.ts:270, b9f2edcb0e54)
  • Current main still contains the repeated construction: Both affected files are unchanged between the pinned merge base and fetched main. The proposed consolidation is therefore still absent from the reviewed main revision. (extensions/qa-lab/src/harness-parity.ts:249, f3bdcc10d628)
  • Latest release retains the original module: The supplied latest-release commit contains harness-parity.ts blob 2063800b49a88623c68ff533439039a3249da035, identical to fetched main and the pre-refactor module. (extensions/qa-lab/src/harness-parity.ts, 3a9d69db306c)
  • Local QA implementation boundary: The changed module uses local comparison helpers and OpenClaw-owned types. Its confidence-check caller constructs synthetic comparison cells; this extraction neither executes nor changes the Codex dependency contract, so sibling Codex inspection is not required. (extensions/qa-lab/src/confidence-report.ts:1033, b9f2edcb0e54)
  • Area-history routing: Current-main file history lists prior parity work by Vincent Koc and export-surface maintenance by Peter Steinberger. Deeper blame and parent-patch inspection encountered unavailable historical objects, so no source-line introduction attribution is asserted. (extensions/qa-lab/src/harness-parity.ts, f3bdcc10d628)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (1 earlier review cycle)
  • reviewed 2026-09-13T09:50:40.906Z sha b9f2edc :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 10:36
@vincentkoc
vincentkoc merged commit 9ca900f into main Sep 13, 2026
175 of 176 checks passed
@vincentkoc
vincentkoc deleted the refactor/qa-harness-drift-results-20260913 branch September 13, 2026 11:26
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit to zachisfine/openclaw that referenced this pull request Sep 13, 2026
* temp/pr-146799: (70 commits)
  test: reuse explicit fallback config fixtures (openclaw#146948)
  fix(computer): return fresh window observations after actions (openclaw#146822)
  refactor(feishu): remove unreachable requester topic selection (openclaw#146904)
  improve(gateway): reduce CPU spent listing agent-owned sessions (openclaw#137745)
  fix(ui): avoid recapturing chat drafts during UI updates (openclaw#146884)
  fix(ui): show system uptime in the debug overlay (openclaw#146960)
  fix(retry): honor waits beyond the native timer limit (openclaw#145718)
  fix(ui): keep chat history idle when run status changes (openclaw#146802)
  fix(ui): reuse persisted text during chat streaming (openclaw#146831)
  refactor(qa): share harness drift result construction (openclaw#146903)
  test(agents): coordinate settings lock contention (openclaw#146949)
  fix(worker): avoid repeatedly serializing screenshot history (openclaw#146907)
  fix(secrets): stop buffered upload writes after cancellation (openclaw#146840)
  perf(doctor): avoid unnecessary state runtime imports (openclaw#146926)
  improve: reduce compaction request estimation work (openclaw#146961)
  fix(ci): wait for forwarded avatar imports before assertions (openclaw#146729)
  perf(workers): skip configured Git author lookups (openclaw#146833)
  fix: admit borrowed memory writes through the agent database owner (openclaw#146760)
  fix(discord): prevent voice playback gaps and stale turn controls (openclaw#146798)
  improve: reduce worktree filesystem stalls and archive syncs (openclaw#146906)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* commit 'ccfd2377cd07d1ad3a583ba64d08e29a065f7061': (1587 commits)
  fix(ui): avoid recapturing chat drafts during UI updates (#146884)
  fix(ui): show system uptime in the debug overlay (#146960)
  fix(retry): honor waits beyond the native timer limit (#145718)
  fix(ui): keep chat history idle when run status changes (#146802)
  fix(ui): reuse persisted text during chat streaming (#146831)
  refactor(qa): share harness drift result construction (#146903)
  test(agents): coordinate settings lock contention (#146949)
  fix(worker): avoid repeatedly serializing screenshot history (#146907)
  fix(secrets): stop buffered upload writes after cancellation (#146840)
  perf(doctor): avoid unnecessary state runtime imports (#146926)
  improve: reduce compaction request estimation work (#146961)
  fix(ci): wait for forwarded avatar imports before assertions (#146729)
  perf(workers): skip configured Git author lookups (#146833)
  fix: admit borrowed memory writes through the agent database owner (#146760)
  fix(discord): prevent voice playback gaps and stale turn controls (#146798)
  improve: reduce worktree filesystem stalls and archive syncs (#146906)
  fix(ui): avoid extra chat rail work while replies stream (#146883)
  improve(ui): speed up populated Usage timelines (#146947)
  test(gateway): retain auth recovery failure diagnostics (#146925)
  fix(tests): create private temporary home directories (#146931)
  ...

# Conflicts:
#	test/tsconfig/tsconfig.core.test.agents-other.json
#	test/tsconfig/tsconfig.core.test.agents-root.json
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant