Repository navigation
test(text): consolidate literal sanitizer cases - #139579
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: needs maintainer review before merge. Reviewed September 5, 2026, 9:00 PM ET / September 6, 2026, 01:00 UTC. ClawSweeper reviewWhat this changesConsolidates 47 sanitizer test cases into two tables while preserving their names, inputs, expected outputs, and parser options. Merge readiness✅ Ready for maintainer review This remains a useful, scoped batch in the maintainer-requested test audit. The complete introduced diff preserves the literal cases and assertion behavior; no actionable defect was found, and the consolidation is absent from fetched main. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s shared text sanitizer removes internal tool and reasoning markers while preserving readable replies and literal examples. These tests protect that distinction for delivery and history consumers. flowchart LR
A[Assistant text] --> B[Shared text sanitizer]
B --> C[Recognize internal markers]
B --> D[Protect literal examples]
C --> E[Visible reply text]
D --> E
F[Named test cases] --> B
E --> G[Expected text assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -51. Total -51 across 1 file. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Retain independently named behavioral cases while sharing their identical assertion bodies, without claiming a full-suite performance gain. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR addresses repetitive test bodies rather than a reported runtime defect; the duplication is directly visible in the baseline diff. Is this the best way to solve the issue? Yes: two typed tables preserve individual registrations and the existing assertion helpers without introducing production seams or weakening expectations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0df5050a7649. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: (302 commits) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) test(text): consolidate literal sanitizer cases (#139579) test(gateway): observe native drain without a lint exception (#139576) test(memory): consolidate visibility fixtures without policy defaults (#139569) fix(ui): show shimmer skeletons while loading Control UI (#139525) test(qa): make cleanup child logging deterministic (#139566) test(cli): keep Unix socket fixtures within path limits (#139565) fix: avoid slow incognito key checks in large session stores (#139528) feat(macos): open Gateway windows from the Gateways menu (#139522) test(workshop): isolate marker casing fixture identities (#139554) fix(process): require cleanup evidence before releasing owned work (#139517) ... # Conflicts: # scripts/release-check.ts
* commit '047587a542ce205ee78354fbd88ba8ec05c07844': (45 commits) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) test(text): consolidate literal sanitizer cases (#139579) test(gateway): observe native drain without a lint exception (#139576) test(memory): consolidate visibility fixtures without policy defaults (#139569) fix(ui): show shimmer skeletons while loading Control UI (#139525) ...
Related: #139428
What Problem This Solves
The assistant-visible-text suite repeats identical assertion bodies for literal sanitizer inputs, adding test code without distinct execution mechanics.
Why This Change Was Made
Put 47 literal name/input/expected triples into two named tables using explicit it(name, ...) registration. Retain every input, expected string, parser option and assertion invocation; other test bodies remain unchanged. Production parser code is unchanged.
User Impact
No production behavior changes or scenarios removed. Long test names remain complete. Net 51 test lines removed.
Evidence
All 129 full test identities match baseline and pass. Structural checks preserve all 47 literal triples, one action/assertion per case and the untouched test program. Registration order changes only within the existing pure-test scopes; no ordering-sensitive state was found.
The full changed gate, formatting/diff checks, deslop and independent P2 review pass. Recorded wrapper timing was 1.41s before and 1.02s after; no meaningful runtime improvement is claimed.