Skip to content

Feature cache-lifecycle: Maintenance engine + CLI + config (hy-xg0v8)#47

Closed
philcunliffe wants to merge 2 commits into
integration/cache-lifecyclefrom
polecat/hy-xg0v8
Closed

Feature cache-lifecycle: Maintenance engine + CLI + config (hy-xg0v8)#47
philcunliffe wants to merge 2 commits into
integration/cache-lifecyclefrom
polecat/hy-xg0v8

Conversation

@philcunliffe
Copy link
Copy Markdown
Contributor

Summary

  • Cache maintenance engine: snapshot expiration, compaction, epoch cleanup
  • CLI commands: hyp query maintain and hyp query status
  • Daemon integration with bounded maintenance ticks
  • Configuration surface under query.cache.maintenance
  • Resolves 7 typecheck errors from previous iteration

Bead

hy-xg0v8 — merge into integration/cache-lifecycle

Test plan

  • 486 unit tests pass
  • Typecheck errors resolved

philcunliffe and others added 2 commits May 26, 2026 15:09
…, daemon integration (hy-xg0v8)

Add maintainCache API with two maintenance operations:
- Snapshot expiration: keeps current + min 10 recent + all within 24h
- Compaction: streams rows into new epoch with row-id dedup when partition
  exceeds 32 data files, avg file size < 32 MiB, or metadata > 64 MiB

New CLI commands:
- hyp query maintain [dataset] [--dry-run] [--force] [--compact-only] [--expire-only]
- Enhanced hyp query status with partition-level stats (files, snapshots, metadata bytes)

Config surface at query.cache.maintenance with all tunable thresholds.
Daemon runs bounded maintenance on a configurable interval (default 60 min,
30s budget per tick). Retired epochs get a 24h grace period before cleanup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Narrow JSDoc union type after error guard in runQueryMaintain,
fix bigint/number array type in expireSnapshots, and use
ColumnSpec['type'] instead of missing ColumnType export.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@philcunliffe
Copy link
Copy Markdown
Contributor Author

Rejected by refinery: 3 branch-caused typecheck errors in core_commands.js (lines 812-815). compactOnly/expireOnly/force properties not narrowed past the error union branch. Routing back to polecat for fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant