Skip to content

fix(cache): count nested-cargo compiles; key:auto saves per source on local runners (#573, #552) - #574

Merged
zackees merged 1 commit into
mainfrom
fix/573-nested-cargo-compiles
Oct 10, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/573-nested-cargo-compiles

Conversation

@zackees

@zackees zackees commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes #573. Part of #552 (local-runner slice of CACHE-024, forge-ci/ci.yml#185). Measured need: forge-ci/bosn#503.

#573: computeJobNewCompiles summed only <build-cache>/logs/archive, which holds the daemon sessions the action shuts down. A cargo nested in another tool (bosn's ./install: uv -> PEP 517 backend -> soldr cargo build) was missing, so post reported 0 new compiles and skipped the save. Every soldr front door also files its stats under <build-cache>/history/<id>/last-session-stats.json (soldr 0.9.27 and later). main now records a baseline after the build-cache restore; post reads history written after it (restored history keeps old mtimes and is excluded) and takes max(archive, history), since the two overlap.

#552, local runner: the Phase 1 pilot needs a token and a reviewed writer, so under act it always fell back to the legacy key. That key exact-hits, and an exact hit is never re-saved, so workspace units never accumulated. Under ACT=true, key: auto now writes the source's own ancestor key (sha + run + attempt) and restores the newest same-identity entry by prefix, then the legacy keys. The local cache server holds only this machine's saves, so the reviewed-writer gate does not apply. zccache entries are content-addressed, so the restore choice affects speed only. GitHub-hosted behaviour is unchanged.

Tests: new #573 regression in post.test.ts, a local-plan test in ancestor-cache.test.ts. Locally, npm test gives 917 pass, 0 fail. The pretest two-phase-actions-cache case fails on this host on unmodified main too. dist rebuilt.

…rce on local runners (#573, #552)

The build-cache save gate summed only logs/archive sessions, so a cargo
run nested in uv's PEP 517 backend was invisible and post skipped the
save. Post now also reads front-door history written after the restore.

Under ACT=true, key: auto writes the source's own ancestor key and
restores the newest same-identity entry, so a stale exact-hit legacy key
no longer blocks saving new workspace units.

Fixes #573
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.

build-cache save gate sees 0 new compiles when cargo runs through a uv build backend, so workspace units are never saved

1 participant