test: centralize stream and extension lifecycle fixtures - #412
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 11:43 PM ET / September 5, 2026, 03:43 UTC. ClawSweeper reviewWhat this changesConsolidates CLI and daemon test output streams and browser-extension setup and cleanup into shared helpers, adds three helper tests, and records the cleanup in the changelog. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: the fixture cleanup remains unlanded, and repository policy protects owner-authored work. No actionable correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherThese helpers support Summarize’s regression tests: CLI tests capture command output, while extension tests exercise browser scenarios in isolated profiles. Their results feed assertions and runtime-error checks. flowchart TD
A[Regression tests] --> B[Shared stream helpers]
B --> C[CLI output assertions]
A --> D[Per-test browser fixture]
D --> E{Browser enabled?}
E -->|Yes| F[Fresh profile and scenario]
F --> G[Runtime checks and cleanup]
E -->|No| H[Explicit skip]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep test lifecycle ownership centralized while preserving isolated profiles, output captures, runtime checks, and explicit specialized launchers. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates existing test infrastructure rather than reporting a product bug; its behavior-preservation claims were checked in source. Is this the best way to solve the issue? Yes: extracting the identical streams and ordinary browser lifecycle is a focused approach that preserves assertions and leaves specialized resource handling explicit. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6e20e4493ffa. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
42c84fa to
36181b3
Compare
|
Landed through #415 in 8308778. The resulting main tree was verified byte-for-byte against the complete reviewed stack (33b957d), with green combined review, Node 24, Chromium E2E, Firefox smoke, and security checks. Closing this constituent PR as superseded; its changes and review history are preserved by the integration. |
What changed
Replace 65 copied Writable stream factories across 60 CLI/daemon test files with two shared helpers. Move the ordinary browser-extension harness lifetime into a lazy, test-scoped Playwright fixture for 84 tests; each requesting test still gets a fresh profile, runtime-error checks, and guaranteed cleanup.
Live prerequisites, custom/native launchers, and multi-resource cleanup remain explicit. No production code or behavioral assertions were removed. An AST check confirms all 87 scenario names and direct expectation counts in the 14 migrated browser files are unchanged. Three focused tests cover stream capture, isolation, and discard behavior.
Net reduction: 1,450 lines. Most of the displayed browser diff is indentation from removing repeated try/finally blocks.
Proof
This is test infrastructure only; the packaged UI is unchanged. Stacked on #411; land only after its parent and this PR's hosted CI are green.