Fix log decompression bounds and CCM time filters#141
Fix log decompression bounds and CCM time filters#141cursor[bot] wants to merge 2 commits intomainfrom
Conversation
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
|
|
Co-authored-by: Rohan Gupta <thisrohangupta@users.noreply.github.com>
There was a problem hiding this comment.
No findings.
Assumptions / Open Questions
I assumed THIS_YEAR and THIS_QUARTER are intended to be period-to-date filters, because the implementation and added regression note/test explicitly encode that behavior. If CCM expects full-period semantics analogous to the existing THIS_MONTH branch, that contract should be clarified separately.
Overall Assessment
This PR aligns with Sunil's architecture standards overall. The fixes stay narrowly scoped to the affected helpers in src/registry/toolsets/ccm.ts and src/utils/log-resolver.ts, keep the logic in the right layer, harden the log path to fail loudly on oversized decompression, and add focused regression coverage without broad churn. The tasks/todo.md update is appropriate for this repository's required task-tracking workflow and matches the change set.
Verification / Residual Risk
Verified locally with:
pnpm testpnpm typecheckpnpm build
Residual risk is low. The main remaining gap is that the CCM regression test proves THIS_YEAR, but the other newly added date branches (THIS_QUARTER, LAST_QUARTER, LAST_YEAR, LAST_3_MONTHS, LAST_6_MONTHS) still rely on untested date math. I did not find an active defect in those branches, but they are the remaining regression surface for this PR.
Sent by Cursor Automation: Sunil On Demand Architecture Review


Description
Fixes two critical correctness issues found in recent changes:
THIS_QUARTER,THIS_YEAR,LAST_QUARTER,LAST_YEAR,LAST_3_MONTHS,LAST_6_MONTHS) now map to explicit ranges instead of silently falling back to a last-30-days query.Type of Change
Checklist
Validation:
pnpm test tests/utils/log-resolver.test.ts tests/registry/registry.test.tspnpm testpnpm typecheckpnpm buildgit diff --check