Repository navigation
Description
The CI self-analysis restores a resource summary cache that is never saved again, so each run starts from summaries computed on 2026-09-21. Since #190 moved the cache to schema v5, no entry in it can be read, and every self-analysis computes all its resource summaries.
How the cache is set up
.github/workflows/ci.yml, step "Restore resource summary cache" (Linux only):
uses: actions/cache@v4
with:
path: .cache/resource-lifetime
key: resource-cache-${{ runner.os }}-${{ hashFiles('models/resource-lifetime/**') }}
restore-keys: |
resource-cache-${{ runner.os }}-- The key depends only on the resource models.
actions/cachesaves at the end of the job only when the primary key was missed. The models have not changed since the entry was created, so the key always hits and nothing is saved.
Observed
-
The only entry,
resource-cache-Linux-eb37cff8…, was created on 2026-09-21 at 23:27 UTC frommain(613 007 bytes). It has been restored by every run since, and never replaced. -
The CI log of perf(ownership): compute the ownership summaries with fewer solves and rounds #187 (head 4f5d3a8) says so:
Cache restored from key: resource-cache-Linux-eb37cff8c6c337bfe644b5df120c62cd701c436b700d659010cd3044aa15baa9 ... Cache hit occurred on the primary key resource-cache-Linux-eb37cff8c6c337bfe644b5df120c62cd701c436b700d659010cd3044aa15baa9, not saving cache. -
The analyzer keys each module's summaries by schema, model, external summaries, filters, compile arguments and the module's IR (
ResourceSummaryOperations::cacheKey,src/app/AnalyzerApp.cpp).- A file whose IR changed since 2026-09-21 cannot reuse its entry. Most files have changed since then.
- Since fix(analysis): resolve calls through constructor and destructor aliases #190, the schema is
resource-summary-cache-v5, and the entry holds v4 summaries, so no entry is reused at all.
The comment above the step says stale entries are harmless. That holds for the results: a stale entry is never read for a changed module. But the cache no longer saves any time.
Cost
Self-analysis step on CI, with #187:
| Head | Readable cache entries | Time |
|---|---|---|
| 8f74e11, before #190 | some, written under v4 | 1 min 20 s |
| 4f5d3a8, after #190 | none | 2 min 48 s |
With the previous summaries (#186 alone), the same step takes 8 min 31 s without a readable entry, against a 15-minute limit.
Expected
Each run saves the summaries it ends with, and the next run restores the most recent ones. The other caches of the same workflow do this already: their key ends with ${{ github.run_id }}, and restore-keys restores the latest entry with the same prefix (run-test-…, compile-ir-…).
For example:
key: resource-cache-${{ runner.os }}-${{ hashFiles('models/resource-lifetime/**') }}-${{ github.run_id }}
restore-keys: |
resource-cache-${{ runner.os }}-${{ hashFiles('models/resource-lifetime/**') }}-
resource-cache-${{ runner.os }}-To check:
- the step logs a save at the end of a run, and the next run of the same branch restores that entry;
- the self-analysis of an unchanged second run reports
0 module analysesfor the resource summaries, or close to it; - the directory stays small. Entries of changed modules are never removed, so it grows over time; pruning, or saving only from
main, may be needed.
Activity