Repository navigation
test(shared): add unit tests for human-readable list formatting - #98605
Conversation
95201dd to
82e2e95
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 1, 2026, 9:12 AM ET / 13:12 UTC. Summary PR surface: Tests +25. Total +25 across 1 file. Reproducibility: not applicable. This PR adds regression coverage for an existing helper rather than reporting broken runtime behavior. The current behavior is source-checkable in Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused helper test once required CI is green or the unrelated broad shard is cleared by maintainers. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR adds regression coverage for an existing helper rather than reporting broken runtime behavior. The current behavior is source-checkable in Is this the best way to solve the issue? Yes; colocated Vitest assertions are the narrowest maintainable way to cover the helper's branches while leaving runtime behavior unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e7c689f41048. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +25. Total +25 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
Squashed from PR openclaw#98605 after updating branch with current main and passing CI.
What Problem This Solves
The
formatHumanListfunction formats arrays into human-readable disjunctions ("a, b, or c"). Without tests, the multi-branch formatting logic could silently regress.Why This Change Was Made
Add unit tests covering empty, single, two-element, three-element, and four-element arrays.
User Impact
Human-readable list formatting now has comprehensive test coverage.
Evidence
Direct behavior probe with real function calls:
Targeted test:
Formatting:
Whitespace: