test(infra): add unit tests for SQLite number normalization - #98009
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 2:20 AM ET / 06:20 UTC. Summary PR surface: Tests +41. Total +41 across 1 file. Reproducibility: not applicable. this is a test coverage PR rather than a bug report. Source inspection verifies the helper contract and caller inputs, while targeted test/CI output is the relevant validation path. 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 colocated tests after remaining exact-head CI is green, keeping Do we have a high-confidence way to reproduce the issue? Not applicable; this is a test coverage PR rather than a bug report. Source inspection verifies the helper contract and caller inputs, while targeted test/CI output is the relevant validation path. Is this the best way to solve the issue? Yes. Colocating narrow helper-boundary tests is the maintainable fix shape here; widening the helper signature or adding caller-level tests is not needed for the current contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 56c2d637d940. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +41. Total +41 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
|
63e2858 to
94c7829
Compare
* 'main' of https://github.com/openclaw/openclaw: (29 commits) refactor(gateway): trim attach grant implementation feat(gateway): scoped attach grants for external MCP loopback clients fix(gateway): iOS Talk treats SecretRef-backed API keys as missing (#98210) test(infra): add unit tests for SQLite number normalization (#98009) test(config): add unit tests for resolveExecCommandHighlighting (#98087) test(utils): add unit tests for chunkItems (#98219) fix(core): propagate caller env PATHEXT through isExecutableFile on Windows (#98093) fix(matrix): guard JSON.parse against malformed homeserver response bodies (#97973) fix(sms): guard Twilio JSON.parse against malformed API response bodies (#97999) Add Swedish mobile app localization (#98043) fix(anthropic): surface Discord pre-tool commentary fix(tui): correct disconnect copy for device scope upgrades (#98144) chore(ui): refresh fa control ui locale chore(ui): refresh nl control ui locale chore(ui): refresh vi control ui locale chore(ui): refresh th control ui locale chore(ui): refresh pl control ui locale chore(ui): refresh uk control ui locale chore(ui): refresh id control ui locale chore(ui): refresh tr control ui locale ...
…#98009) * test(infra): add unit tests for SQLite number normalization * fix: remove undefined param test, not in function signature
* 'main' of https://github.com/openclaw/openclaw: (29 commits) refactor(gateway): trim attach grant implementation feat(gateway): scoped attach grants for external MCP loopback clients fix(gateway): iOS Talk treats SecretRef-backed API keys as missing (openclaw#98210) test(infra): add unit tests for SQLite number normalization (openclaw#98009) test(config): add unit tests for resolveExecCommandHighlighting (openclaw#98087) test(utils): add unit tests for chunkItems (openclaw#98219) fix(core): propagate caller env PATHEXT through isExecutableFile on Windows (openclaw#98093) fix(matrix): guard JSON.parse against malformed homeserver response bodies (openclaw#97973) fix(sms): guard Twilio JSON.parse against malformed API response bodies (openclaw#97999) Add Swedish mobile app localization (openclaw#98043) fix(anthropic): surface Discord pre-tool commentary fix(tui): correct disconnect copy for device scope upgrades (openclaw#98144) chore(ui): refresh fa control ui locale chore(ui): refresh nl control ui locale chore(ui): refresh vi control ui locale chore(ui): refresh th control ui locale chore(ui): refresh pl control ui locale chore(ui): refresh uk control ui locale chore(ui): refresh id control ui locale chore(ui): refresh tr control ui locale ...
…#98009) * test(infra): add unit tests for SQLite number normalization * fix: remove undefined param test, not in function signature
What Problem This Solves
The
normalizeSqliteNumberfunction handles SQLite's type system boundary where numeric columns may returnnumber,bigint, ornull. Without tests, the type conversion logic could silently break when the function is modified.Why This Change Was Made
Add unit tests for
normalizeSqliteNumbercovering the full type boundary: number passthrough, bigint-to-number conversion, null/undefined handling, zero/negative values, NaN preservation, and safe integer range conversion.User Impact
SQLite number normalization now has comprehensive test coverage at the type boundary, reducing regression risk.
Evidence
Direct behavior probe:
Targeted test:
Formatting:
Whitespace:
AI-assisted
Prepared with Codex. I reviewed the change and kept the PR focused on type boundary coverage.