Skip to content

ci: save the resource summary cache after every self-analysis - #194

Merged
SizzleUnrlsd merged 1 commit into
mainfrom
193-ci-resource-cache
Oct 8, 2026
Merged

SizzleUnrlsd merged 1 commit into
mainfrom
193-ci-resource-cache

Conversation

@SizzleUnrlsd

@SizzleUnrlsd SizzleUnrlsd commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The CI self-analysis restored a resource summary cache that was never saved again (#193). Its key depended only on the resource models, and actions/cache saves only on a primary-key miss. The entry written on 2026-09-21 was therefore restored by every run and never replaced. Since #190 moved the cache to schema v5, none of its entries can be read, and every self-analysis computes all its resource summaries again.

Change

The test caches of the same workflow already work this way:

  • restore and save are separate steps (actions/cache/restore, actions/cache/save);
  • the key carries ${{ github.run_id }}, so every run saves what it ends with;
  • restore-keys restore the latest entry for the same models, then any entry;
  • the cache is saved even when the self-analysis fails.

The analyzer itself is unchanged. Its per-module keys (schema, model, external summaries, filters, compile arguments, IR) still decide which entries can be reused, so an entry left by another run is never read for a changed module.

Validation

CI of this PR, head 5bf5d5e, run 37725435310:

Attempt Restored Self-analysis Saved
1 resource-cache-Linux-eb37cff8…, the 2026-09-21 entry, through restore-keys 58 s resource-cache-Linux-eb37cff8…-37725435310 (643 080 bytes)
2 (rerun of the Ubuntu job) resource-cache-Linux-eb37cff8…-37725435310, the primary key 79 s not saved: the key exists ("Unable to reserve cache"), as for the test caches on a rerun

Known limit

Entries of modules that changed are never removed, so the saved directory grows over time, as the test caches do. Pruning can be added if it becomes large.

Closes #193

The resource summary cache was restored and saved by one actions/cache
step under a key that depends only on the resource models. actions/cache
saves only on a primary-key miss, so the entry written on 2026-09-21 was
restored by every run and never replaced: a module changed since then
cannot reuse it, and since the cache schema moved to v5 (#190) none can.
Every self-analysis computed all its resource summaries again.

As for the test caches, restore and save are now split, the key carries
the run id, and restore-keys restore the latest entry for the same
models, then any. The cache is saved even when the self-analysis fails.

Refs #193
@SizzleUnrlsd SizzleUnrlsd added the bug Something isn't working label Oct 8, 2026
@SizzleUnrlsd SizzleUnrlsd self-assigned this Oct 8, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit daaf4cd into main Oct 8, 2026
16 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the 193-ci-resource-cache branch October 8, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: the resource summary cache is never saved again, so every self-analysis runs cold

1 participant