Repository navigation
fix(audit): audit filters select wrong intervals when dates are invalid - #103433
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 10, 2026, 8:49 AM ET / 12:49 UTC. Summary PR surface: Source +1, Tests +7. Total +8 across 2 files. Reproducibility: yes. Current main accepts and forwards JavaScript’s normalized timestamp for an impossible calendar date, and the exact-head CLI proof demonstrates the corrected rejection 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 narrow shared-validator gate without adding another date parser or configuration surface, preserving the audit command’s existing numeric and timezone-less timestamp semantics. Do we have a high-confidence way to reproduce the issue? Yes. Current main accepts and forwards JavaScript’s normalized timestamp for an impossible calendar date, and the exact-head CLI proof demonstrates the corrected rejection path. Is this the best way to solve the issue? Yes. Reusing the established strict calendar validator as an acceptance gate is the narrowest maintainable fix and deliberately preserves the existing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ea6aa1dc7591. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1, Tests +7. Total +8 across 2 files. 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
Review history (1 earlier review cycle)
|
|
@clawsweeper re-review Real behavior proof for head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: qingminlong <[email protected]>
099fbaa to
c2fc5e0
Compare
|
Land-ready verification for exact head
Known proof gaps: none. |
|
Merged via squash.
|
…id (openclaw#103433) * fix(audit): reject invalid ISO timestamps in filters * test(audit): cover strict date filter semantics Co-authored-by: qingminlong <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where operators querying
openclaw auditcould receive records outside the intended time window when--afteror--beforecontained an impossible ISO calendar date, such as February 30.Why This Change Was Made
Audit filters now use the existing strict absolute-time parser to validate ISO calendar dates before accepting the parsed timestamp. The command retains the existing local-time interpretation for ISO date-times without an explicit zone.
User Impact
Operators receive an immediate validation error for impossible audit filter dates instead of silently querying a shifted interval. Valid leap-day and timezone-less timestamps keep their existing behavior.
Evidence
audit.listwith the established local-time timestamp semantics.099fbaa9c006a7347063e1bbc9c5cbc75286be77: ran the source-checkout CLI entry with isolatedOPENCLAW_HOME,OPENCLAW_STATE_DIR, and a local loopback Gateway WebSocket responder.099fbaa9c006a7347063e1bbc9c5cbc75286be77:node scripts/run-vitest.mjs src/commands/audit.test.tspassed (4 tests).git diff --check HEAD~1..HEADpassed.python .agents\\skills\\autoreview\\scripts\\autoreview --mode localpassed with no accepted/actionable findings.