Skip to content

feat(output): four-label cache states + docs (patterns, benchmarks, monorepo eval)#101

Merged
Exelord merged 1 commit into
mainfrom
claude/evaluate-monorepo-structure-lLWPE
May 17, 2026
Merged

feat(output): four-label cache states + docs (patterns, benchmarks, monorepo eval)#101
Exelord merged 1 commit into
mainfrom
claude/evaluate-monorepo-structure-lLWPE

Conversation

@Exelord
Copy link
Copy Markdown
Member

@Exelord Exelord commented May 17, 2026

Reopens the work from closed PR #100, plus the cache-state label fix the user requested in follow-up.

Commits

# Commit What
1 186cb92 docs: evaluate monorepo structure — recommend staying single-package
2 595fbc8 docs: shared-patterns map + benchmark numbers vs Turbo/Nx
3 e89efc4 chore: run oxfmt on docs (CI format-check was failing)
4 69bc69e feat(output): four-label cache states + tighter header

The cache-state change (69bc69e)

Before: a cache hit always said from local cache — the user couldn't tell whether files were actually rewritten or whether the on-disk tree was already current and skipRestore fired. Reported as "I don't know if it was restored or not".

After, four distinct labels in the framed-block header + footer:

┌─ @vzn/vx#lint > local-cache • abcdef01     ┌─ @vzn/vx#lint > up-to-date • abcdef01
└─ @vzn/vx#lint ── (12ms) local-cache        └─ @vzn/vx#lint ── (3ms) up-to-date

┌─ @vzn/vx#lint > remote-cache • abcdef01    ┌─ @vzn/vx#lint > cache-miss
└─ @vzn/vx#lint ── (156ms) remote-cache      └─ @vzn/vx#lint ── (486ms) cache-miss
Label When
local-cache outputs were restored from the local cache
remote-cache outputs were restored from the remote cache
up-to-date cache hit but disk already matched (no restore performed)
cache-miss task actually ran

Implementation: TaskOutcome gains restored?: boolean. execute-task.ts sets it on cache-hit outcomes from !skipRestore && outputs.length > 0. Tasks with no declared outputs (lint / test / format-check) report up-to-date on hit — vacuously true since nothing was materialized.

Header trim (same commit)

Dropped the Packages in scope: ... line (too noisy with 100 packages) and folded the total task count into the Running line:

   • Running build, test in 100 packages (200 tasks)
   • Remote caching disabled

Doc commits (1-3)

Same as closed PR #100docs/design/monorepo-structure.md, docs/patterns.md, docs/benchmarks.md, plus the oxfmt fix for the markdown tables in those new docs.

Test plan

  • 489/489 tests pass (4 new framed-output tests for the new labels)
  • Format + lint clean
  • Manually verified live: first run shows cache-miss, second run shows up-to-date • <hash>
  • No CACHE_VERSION / SCHEMA_VERSION change — pure display + analytics surface

https://claude.ai/code/session_016HXj6HW6bxSn8EYuKcxTD9


Generated by Claude Code

Footer + header now distinguish four cache states instead of three,
so a cache hit that didn't materialize anything is visible:

  local-cache   outputs were restored from the local cache
  remote-cache  outputs were restored from the remote cache
  up-to-date    cache hit but on-disk state already matched (no restore)
  cache-miss    task actually ran

Before: a cache hit always said "from local cache" — the user couldn't
tell whether files were actually rewritten or whether the on-disk tree
was already current and skipMaterialize fired. The user reported the
ambiguity ("I dont know if it was restored or not").

Implementation: TaskOutcome gains `restored?: boolean`. execute-task
sets it on cache-hit outcomes from `!skipRestore && outputs.length > 0`.
formatBlockHeader + formatStatusTag use the four-way label.

Tasks with no declared outputs (lint / test / format-check) report
"up-to-date" on hit — vacuously true since nothing was materialized.

Header trim: dropped the "Packages in scope: ..." line (too noisy with
100 packages) and folded the total task count into the Running line:

  • Running build, test in 100 packages (200 tasks)
@Exelord Exelord force-pushed the claude/evaluate-monorepo-structure-lLWPE branch from 69bc69e to 8f38c7a Compare May 17, 2026 08:48
@Exelord Exelord merged commit c22ffbc into main May 17, 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