Skip to content

test(qa): deduplicate WhatsApp live transport fixtures - #117700

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-qa-whatsapp-fixtures-wave7
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-qa-whatsapp-fixtures-wave7

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove 278 lines from the WhatsApp QA live-transport runtime suite by reusing fresh, typed observed-message, scenario, gateway, reaction, approval, and flow fixtures.
  • Preserve every existing test name and assertion, including archive extraction and copied-session cleanup, active-account allowlist replacement, group and direct-message quote metadata, ordered media timestamps, approval reaction participants, and fake-timer cleanup.
  • Keep production code and public contracts unchanged.

Architectural owner

The QA Lab WhatsApp live-transport test owns scenario orchestration fixtures. The duplicated observed-message envelopes, Gateway setup, direct/group reaction harnesses, approval harnesses, and mock flow environments were consolidated inside that same test file; no runtime fallback, compatibility layer, or shared mutable fixture was added.

Exact preservation proof

  • 54 ordered test names: byte-identical.
  • 210 ordered expect(...) expressions: byte-identical.
  • 427 complete expectation/matcher-chain AST expressions: identical.
  • Six fake-timer operation expressions and their ordering: identical.
  • Independent per-test symbolic inventory: 44 scenario buildRun calls, 46 scenario lookups, 26 mock-lane lookups, two fresh flow environments, 15 scenario contexts, and 34 driver-fixture constructions; every count matches the baseline.
  • Group approval reactions retain participant: "999@lid"; direct-message approvals retain explicit participant: undefined.
  • Direct [email protected] IMessageKey/participant/quote contracts inspected against the installed dependency.
  • Production LOC delta: 0. Test LOC delta: -278.

Validation

  • Trusted Blacksmith Testbox: 126 tests passed across the exact WhatsApp QA runtime suite, QA boundary suite, and adjacent WhatsApp driver, approval-reaction, quote, and account suites.
  • Full remote pnpm check:changed: passed.
  • Independent gpt-5.6-sol xhigh source/dependency/owner-boundary review: clean.
  • git diff --check: passed.
  • Synthetic merge against current origin/main: clean.

@steipete steipete self-assigned this Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 7:54 PM ET / 23:54 UTC.

ClawSweeper review

What this changes

The branch deduplicates WhatsApp QA live-transport test setup by consolidating fresh driver, gateway, observed-message, reaction, approval, and flow fixtures in the existing runtime test file.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this PR open for normal maintainer review. Its one-file QA refactor is not on current main, the maintainer label prevents automated cleanup, and the inspected fixture extraction preserves the test registrations and expectation count without introducing a concrete correctness or security finding.

Priority: P3
Reviewed head: da989b135e36a09372bd60c79b5eff463a78492c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test-only refactor with strong preservation evidence and no concrete review finding; merge remains subject to protected-label handling and completion of current checks.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body supplies after-fix remote Testbox evidence for 126 focused and adjacent QA tests plus a full changed-check run; terminal proof is appropriate for this test-only fixture refactor.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body supplies after-fix remote Testbox evidence for 126 focused and adjacent QA tests plus a full changed-check run; terminal proof is appropriate for this test-only fixture refactor.
Evidence reviewed 5 items Single test-only surface: The PR changes only the WhatsApp QA live-runtime test file; the parent-to-head diff is 436 additions and 714 deletions, with no production, dependency, workflow, or configuration files touched.
Fixture ownership and runtime contract: The branch keeps fixture orchestration inside the existing QA test while using the unchanged scenario-environment contract that builds a fresh scenario context with driver, Gateway, observed-message collection, and scenario metadata.
Preserved test signal: Both parent and PR head contain 54 registered tests and 210 direct expectation calls; the PR also passes a clean whitespace check.
Findings None None.
Security None None.

How this fits together

QA Lab runs WhatsApp scenarios against driver and Gateway test doubles, then checks observed messages, reactions, configuration patches, and flow behavior. This test module owns the orchestration fixtures that supply those scenario hooks and assertions.

flowchart LR
  A[WhatsApp scenario definitions] --> B[QA live runtime test]
  B --> C[Fresh driver and Gateway fixtures]
  C --> D[Scenario hooks]
  D --> E[Observed-message and configuration assertions]
  E --> F[QA regression coverage]
Loading

Decision needed

Question Recommendation
Should the maintainer accept this local WhatsApp QA fixture consolidation after the remaining checks complete on the current head? Accept the QA refactor: Merge after the remaining checks complete, retaining the local fresh-fixture pattern and unchanged production surface.

Why: The protected maintainer label requires explicit human handling even though the reviewed diff is test-only and no actionable patch defect was found.

Before merge

  • Resolve merge risk (P1) - The PR carries the protected maintainer label, so acceptance remains an explicit human decision; remaining in-progress checks should complete against the reviewed head before merge.
  • Complete next step (P2) - This is an open protected-label PR with no discrete mechanical repair to dispatch; it needs ordinary maintainer acceptance and check completion.
Agent review details

Security

None.

PR surface

Tests -278. Total -278 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 436 714 -278
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 436 714 -278

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the local fixture helpers in this QA test module and merge the refactor only after a responsible maintainer accepts the preserved-regression evidence and the remaining required checks complete.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the local fixture helpers in this QA test module and merge the refactor only after a responsible maintainer accepts the preserved-regression evidence and the remaining required checks complete.

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

Not applicable: this PR refactors existing QA fixtures rather than reporting a user-visible production failure. The relevant behavior is covered by the unchanged runtime test registrations and after-fix Testbox validation reported in the PR body.

Is this the best way to solve the issue?

Yes: keeping reusable fixtures local to the owning WhatsApp QA runtime test is the narrowest maintainable solution, and the helpers create fresh context and message state rather than adding a shared runtime abstraction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6c41f37417ba.

Labels

Label changes:

  • add P3: This is a test-only deduplication with no production or public-contract change and no concrete regression found in review.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix remote Testbox evidence for 126 focused and adjacent QA tests plus a full changed-check run; terminal proof is appropriate for this test-only fixture refactor.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.

Label justifications:

  • P3: This is a test-only deduplication with no production or public-contract change and no concrete regression found in review.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix remote Testbox evidence for 126 focused and adjacent QA tests plus a full changed-check run; terminal proof is appropriate for this test-only fixture refactor.

Evidence

What I checked:

Likely related people:

  • chenyangjun-xy: Commit b24881e introduced the current test-module fixture baseline, including the scenario-context helper this PR extends. (role: introduced current fixture baseline; confidence: high; commits: b24881eb04e0; files: extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.test.ts)
  • steipete: Feature history for this test file records multiple prior contributions from steipete in addition to the proposed refactor. (role: repeat area contributor; confidence: medium; commits: 3f9b24237b0c, da989b135e36; files: extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.runtime.test.ts)

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 merged commit ab8090e into main Aug 2, 2026
99 of 102 checks passed
@steipete
steipete deleted the codex/goal100k-qa-whatsapp-fixtures-wave7 branch August 2, 2026 00:21
@steipete

steipete commented Aug 2, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant