Commit Graph

7 Commits

Author SHA1 Message Date
wassname b825dbcf77 fix: gap calculation scoped to requested range, clearer error text 2026-04-16 13:14:49 +08:00
wassname 779e5cc240 fix: prefix overlap error with [compress] for tool identification 2026-04-16 13:10:33 +08:00
wassname 3281b2f9bd fix: match overlap error to actual tool parameter schema 2026-04-16 13:09:53 +08:00
wassname 49f62ac2d0 feat: clearer overlap error with compress() syntax for valid ranges 2026-04-16 13:09:01 +08:00
wassname 32e9d67fa9 feat: report valid compressible gap ranges on overlap error
When a compress call overlaps existing blocks, the error message now
includes the exact mNNN..mNNN ranges that are available for compression
(before, after, and between existing blocks). This lets the model
immediately retry with valid ranges instead of guessing.
2026-04-16 12:57:59 +08:00
wassname a0d9945830 fix: prevent Infinity anchorTimestamp ghost block spiral
The root cause of the compression spiral (101 failures, 2 hours):
resolveAnchorTimestamp returned Infinity when no message followed the
compression range. Infinity corrupted JSON serialization (became null),
and null timestamps in JS overlap checks coerced to 0, making every
range appear to overlap the ghost block b7.

Fixes:
- resolveAnchorTimestamp returns endTimestamp + 1 instead of Infinity
- Validate all timestamps are finite before creating a block (fail fast)
- Skip blocks with non-finite timestamps in overlap checks and compression
- Include existing block range in overlap error messages (diagnostic)
- Filter out corrupted blocks on session restore
- Guard synthetic message timestamp creation against non-finite values
- Add regression tests for Infinity anchor and null-timestamp blocks
2026-04-10 20:28:22 +00:00
Greg Harvell 60b4249501 Initial Commit 2026-03-27 17:47:33 -04:00