Skip to content

cache: unify per-entry layout (v13); drop redundant run-logs dump - #65

Merged
Exelord merged 1 commit into
mainfrom
claude/unify-cache-storage
May 13, 2026
Merged

cache: unify per-entry layout (v13); drop redundant run-logs dump#65
Exelord merged 1 commit into
mainfrom
claude/unify-cache-storage

Conversation

@Exelord

@Exelord Exelord commented May 13, 2026

Copy link
Copy Markdown
Member

Summary

  • Unified per-entry on-disk layout (CACHE_VERSION → vx-cache-v13). Outputs moved from <cacheDir>/<hash>/<rel> to <cacheDir>/<hash>/outputs/<rel>; captured stdout/stderr moved from the sibling <cacheDir>/logs/<hash>.{stdout,stderr} into <cacheDir>/<hash>/stdout and <cacheDir>/<hash>/stderr. One entry = one directory; eviction collapses to a single rm -rf <hash>/.
  • Dropped the run-time logs dump. Deleted src/orchestrator/task-logs.ts and the persistTaskLogs() invocation in src/orchestrator.ts. The <cacheDir>/logs/<run_id>/<project>__<task>.{stdout,stderr} files were pure redundancy: successes already store stdout/stderr in the cache entry; failures are streamed live AND surfaced on TaskOutcome.stderr; CI captures the parent stdout natively; structured per-task metadata lives in the runs SQLite table.
  • Cache, orchestrator, and storage-layout tests updated. Docs reflect the new layout (docs/caching.md, docs/modules/cache.md, docs/execution.md, docs/cli.md).

Test plan

  • bun test — 331 pass, 0 fail
  • bun src/bin.ts run lint — clean
  • bun src/bin.ts run format-check — clean
  • CI green

Generated by Claude Code

Move outputs from <cacheDir>/<hash>/<rel> to <cacheDir>/<hash>/outputs/<rel>
and pull captured stdout/stderr from the sibling logs/<hash>.{stdout,stderr}
into <hash>/stdout + <hash>/stderr. One entry = one directory; eviction is
a single rm -rf <hash>/.

Also delete src/orchestrator/task-logs.ts and the corresponding
persistTaskLogs() invocation from src/orchestrator.ts: the runtime
<cacheDir>/logs/<run_id>/<project>__<task>.{stdout,stderr} dump was
redundant with what the cache already captures per hash on success,
with the live stream for failures, with the structured runs-table
metadata, and with CI's own stdout capture.

CACHE_VERSION -> vx-cache-v13. Tests + docs updated.
@Exelord
Exelord merged commit 7883880 into main May 13, 2026
1 check passed
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.

2 participants