Skip to content

feat(post): record skipped save layers so the post-step table shows them - #287

Merged
zackees merged 1 commit into
mainfrom
feat/post-record-all-saves
May 31, 2026
Merged

zackees merged 1 commit into
mainfrom
feat/post-record-all-saves

Conversation

@zackees

@zackees zackees commented May 31, 2026

Copy link
Copy Markdown
Collaborator

v0.9.26's save table only shows SAVED layers — skipped ones were stranded in a one-line log. This makes every save attempt (saved or skipped) record into the StatsCollector with its actual status, so the table renders all of them.

The skip-decision time IS interesting budget signal:

  • 'cook-cache skipped-race-precheck in 0.1s' → Fix A doing its job
  • 'build-cache skipped tiny-delta in 0.3s' → save gate working
  • 'build-cache skipped oversize' → cap might need raising

4 call sites patched. 14 post tests pass. dist rebuilt via Linux/node:24.

Refs: #269, #283, #285.

)

The v0.9.26 save table from #285 only shows saved layers because
`postCollector.record()` was gated on `saveResult.status === "saved"`.
Skipped layers (race-precheck, tiny-delta, oversize-skip,
missing-target, exact-hit-skip) just emitted a single-line log.

Operators reading the table saw only what got uploaded — they
couldn't see WHAT was considered and skipped, or how long the
skip-decision took. Both signals matter for tuning:

  - "build-cache skipped tiny-delta in 0.3s" → save gate working
  - "cook-cache skipped-race-precheck in 0.1s" → Fix A doing its job
  - "build-cache skipped oversize" → cap might need raising (#279)

Now every save attempt — saved or skipped — records into the
StatsCollector with the actual status. The table renders all of
them. archiveBytes/inflatedBytes/fileCount stay null for non-saved
ops so the totals row only counts what actually uploaded.

Four call sites patched: solo-toolchain-cache, cook-cache-${layer}
(layered), cook-cache (legacy), soldr-mini-cache. Behavior change:
none beyond the new rows in the table; the existing log lines
remain for backward compat.

Tests: all 14 post tests still pass.

Refs: #269 (closed in spirit by #285; this finishes the visibility
loop), #283 (one-liner companion), #285 (table view).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@zackees
zackees merged commit 524c080 into main May 31, 2026
5 of 6 checks passed
@zackees
zackees deleted the feat/post-record-all-saves branch May 31, 2026 03:35
zackees added a commit that referenced this pull request May 31, 2026
Picks up #287 — record skipped save layers so the post-step table
shows them. Closes the visibility loop opened by #283 / #285.

Co-authored-by: Claude Opus 4.7 <[email protected]>
zackees added a commit to forge-ci/zccache that referenced this pull request May 31, 2026
setup-soldr v0.9.27 lands forge-ci/setup-soldr#287 — the post-step
save table now includes skipped layers too. Operators see
race-precheck/tiny-delta/oversize/exact-hit as their own rows
instead of having to scroll for the one-line skip log.

19 pins bumped across 9 files.

Co-authored-by: Claude Opus 4.7 <[email protected]>
zackees added a commit that referenced this pull request May 31, 2026
…mpanion) (#289)

Mirrors the post-step `cache save totals:` line from
`StatsCollector.saveSummaryOneLine()` for the pre-build side. Reads
the SETUP_SOLDR_PHASE_*_START_MS env vars (already recorded by
`markPhase`) and computes durations as deltas between adjacent phase
start times in declared serial order:

  setup phase totals: resolve=8.5s parallel-restore=8.9s
    target-tree=0.0s toolchain=8.9s install=2.2s zccache-seed=0.1s
    verify=0.1s cross-bootstrap=0.0s cook=152.4s total=181.0s

Without this, operators looking for "where did the pre-build time go"
have to scrape raw SETUP_SOLDR_PHASE_*_START_MS env vars from the
runner log and do the subtraction by hand. The aggregate makes
phase-level regression visible on the first read — same idea as
#283/#285/#287 for the post-step.

Wired at the end of `run()` in main.ts, just before `finishPhase
("action")`. Phases whose env var isn't set (passthrough mode, test
harness) are silently skipped — empty string returned when none are
present, no log line emitted.

3 new unit tests cover the happy path, the no-env-vars-set case, and
the partial-phase-set case. 8/8 phase-timing tests pass.

dist/main.js rebuilt via Linux/node:24.

Refs: this tick's observation that zccache Integration's pre-build
budget was 28.6s and the only way to see the breakdown was raw env
var inspection.

Co-authored-by: Claude Opus 4.7 <[email protected]>
zackees added a commit that referenced this pull request May 31, 2026
…287 follow-up) (#291)

#287 patched 4 save sites (solo-toolchain, cook-cache layered/legacy,
soldr-mini) to record into the post-step save table regardless of
outcome. But build-cache and cargo-registry use DIFFERENT code paths
that were missed — they only recorded "saved" / "oversize-skip",
filtering out "tiny-delta-skip" / "exact-hit-skip" / etc.

Observed on the v0.9.28 cascade run: build-cache exact-restore +
tiny-delta-skip → invisible in table. cargo-registry restore-key
hit + fallback save → also invisible. Final table showed only
cook-cache-delta even though build + registry layers also ran.

Both sites patched to record-always. archive/inflated/file fields
stay null for non-saved statuses so totals only count actual
uploads. Status string carries the disposition.

Now operators see:
  build-cache           saved                   1.03GB  1319  19.7s
  build-cache           tiny-delta-skip            -      -   0.1s
  build-cache           exact-hit-skip             -      -   0.0s
  cargo-registry        saved                   56.1MB 14339   5.4s
  cargo-registry        missing-dir-skip           -      -   0.0s
  ...

— in addition to the cook-cache-* rows already covered.

Tests: all 14 post tests still pass; pure-formatting reshape.

dist/post.js rebuilt via Linux/node:24.

Refs: #283 (one-liner), #285 (table view), #287 (skipped-row
records for solo/cook/mini), this PR closes the gap for build +
registry.

Co-authored-by: Claude Opus 4.7 <[email protected]>
zackees added a commit that referenced this pull request May 31, 2026
Picks up #291 — post-step save table includes build-cache +
cargo-registry rows in ALL outcomes (not just saved/oversize-skip).
Closes the gap #287 left.

Co-authored-by: Claude Opus 4.7 <[email protected]>
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