Skip to content

fix(ci): forward AppImage compiler cache identity into its build container #1832

Closed

Description

@zackees

Context

Concrete AppImage compiler-cache writer defect found while auditing #1801 / #1667. This is distinct from the fixed #1173 Docker build-context omission and from the native Windows/macOS work in #782. No competing AppImage PR or specific issue was found in the current search.

Existing successful release run 39845783549, source9f37f663bce528eeaf10314d7323b16675adf61c, AppImage build 120058695191:

  • Restore of zccache-appimage-* missed at20:05:55Z.
  • Compiler status at20:16:06Z: 314 total (0 cached, 314 cold, 0 non-cacheable).
  • Saving .zccache at20:16:07Z failed: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved. The build and full workflow still succeeded; this warning is not compilation failure.
  • The independent cargo archive restored31,088,475inner archive bytes and saved31,091,655Actions bytes. A cargo archive hit does not demonstrate native compiler reuse.
  • AppImage's three container runtime variants (Arch Linux, AlmaLinux8, Ubuntu22.04) and NixOS test succeeded. They establish packaged behavior for that source, not a compiler-cache fix or warm consumer.

Current source confirms a specific path mismatch:

  • .github/workflows/appimage.yaml sets job ZCCACHE_CACHE_DIR: ${{ github.workspace }}/.zccache; Actions restore/save use .zccache.
  • build-aux/appimage/manylinux/run.sh mounts workspace/temp/registry and forwards names matching GITHUB_*, RUNNER_*, CCACHE_*, and several build inputs, but does not forward ZCCACHE_*. Docker does not inherit arbitrary host environment variables by itself.
  • The ubuntu-ci CMake preset uses zccache; build.py calls zccache status and stop before publication, so those operations also need the same persistent store identity.

This explains why the configured workspace directory is not delivered by this launcher. It does not prove every missing historical compiler archive has this cause or establish a warm speedup. Absence of the family in a cache snapshot alone would not establish the defect; the failed actual writer and source path provide stronger evidence.

Proposal

Fix the bounded launcher/environment contract so configure/build/status/stop use the same explicitly mounted workspace compiler store as Actions restore/save. Keep Rust compiler-cache safeguards, correct source invalidation, public APIs, build inputs and existing runtime checks. Do not satisfy the writer by saving an empty directory or a different unused cache.

Add a cheap behavioral regression in an existing Python CI-test module using a fake Docker executable that captures argv/environment: the actual launcher must explicitly forward the configured ZCCACHE_CACHE_DIR, preserve argument/value boundaries and existing forwarded inputs, and retain workspace mounting. No new persistent test executable, workflow or expensive native lane is needed for this environment regression.

Before declaring a performance/capacity improvement, observe a real trusted publisher and later compatible consumer in the existing AppImage workflow, including compiler hits and a source edit that recompiles the changed input. Use normal traffic when possible; any necessary experiment must state cost and preserve other active runs. Keep all runtime/failure/cancellation outcomes.

Acceptance criteria

  • Local RED evidence using the real launcher/fake-Docker fixture reproduces missing ZCCACHE_CACHE_DIR; separate GREEN commit fixes it. Existing forwarded variables, quoting and bind mounts remain correct.
  • Verify configured directory, daemon/status/stop and save action target the same store; retain current Rust stale-output/cache safeguards. Do not add broad environment inheritance or unmeasured cache content.
  • Existing trusted AppImage run publishes a nonempty compiler archive without path-validation warnings, followed by real compiler reuse from a later eligible run. Report source/runner/tool identities, archive bytes, restore/save/build costs and hit/miss/bypass counts; a directory or archive hit alone is insufficient.
  • Source-edit correctness and existing packaged saved-profile/runtime tests remain intact; do not skip required checks or change C tests/public headers to pass.
  • Reconcile actual archive growth and overlap with fix(ci): reconcile global cache capacity and retain measured warm seeds #1801's existing10GiB allocation before asserting durable retention. Do not increase budget/paid capacity or assume zero demand from an empty snapshot.
  • No new workflow or extra full native jobs merely to validate environment selection; measure and justify any necessary hosted experiment before launching it.

Decisions

  • Treat this as a focused producer-path repair with measured follow-up, not permission to remove the compiler family or claim its reservation is unused.
  • Keep current packaging content and required runtime coverage; new tests belong in the existing cheap CI Python discovery.
  • Do not attribute all314cold calls solely to this defect: the restore also missed, and other compatibility changes may affect reuse.
  • Retain source freshness safeguards and require actual warm/source-edit evidence before claiming a successful cache rollout.

Related issues

#1801 (allocation/retention owner), #1286 (compiler reuse/correctness); #1173 is a resolved different Docker-context problem.

Activity

  1. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Claiming: AppImage compiler-cache environment forwarding, as the next bounded unit under existing parent1801. 1) Add a behavioral regression to the existing AppImage Python module: run the actual launcher against a fake Docker executable and verify explicit cache-directory forwarding, argument boundaries, existing inputs and workspace mounts. 2) Commit local RED then narrowly forward ZCCACHE_CACHE_DIR, preserving unrelated environment filtering and build/runtime coverage. 3) Focused GREEN, full lint/review, PR this session; use normal existing AppImage traffic for later real publication/reuse/source-edit evidence before issue completion. No new workflow, native/compiler job or test binary merely for argument checks. Allocation report1830is already complete and queued, not being edited in parallel. Decisions: forward only the configured cache-directory name, not all ZCCACHE_* settings; preserve current cache format/keys/limits and Rust safeguards, and make no warm-performance or durable-capacity claim from this fixture.

  2. added
    claimed
    on Oct 22, 2026
  3. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Implementation PR #1833 is open: RED da8b8dc (two launcher cases, one intended missing-variable failure), GREEN8e8e1a801 (all10module tests pass,0.570s), full lint83.3s and sole primary review clean. It forwards only ZCCACHE_CACHE_DIR via existing quoted -e NAME; unrelated settings, mounts, arguments, compiler flags and cache identities stay unchanged. Eight-record evidence includes the full existing failed-writer log, terminal metadata and RED/GREEN/source snapshots.

    The new fixtures invoke neither Docker nor a compiler. PR CI remains the merge gate; no expensive AppImage/native job or additional workflow was enabled. Actual trusted nonempty publication, later compiler reuse/source-edit correctness, transfer/build cost and retention are still required before issue completion. Existing runtime successes remain pre-fix evidence. The PR deliberately has no closing reference.

  4. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Cost/validation boundary from the already retained terminal release39845783549 metadata: AppImage build job wall702s; named step intervals include image build260s, configure14s, OBS build335s, assemble39s, AppImage17s. Existing runtime job step sums: NixOS183s, Arch254s, AlmaLinux190s, Ubuntu1908s. These are individual wall/recorded-step observations, not billed runner time or controlled timing comparisons.

    The focused launcher fixture requires neither a compiler nor a container and full lint83.3s/review are already green. No full AppImage matrix is being added to PR CI or dispatched merely to test environment forwarding. Prefer normal existing release/AppImage traffic for post-fix nonempty publication, later actual compiler reuse and source-edit evidence. If an additional hosted experiment is necessary, specify its missing evidence, exact existing jobs and measured cost first; do not blindly repeat the whole workflow or cancel needed runs. Required runtime checks remain preserved. #1832 stays open pending that qualification.

  5. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Existing source-freshness qualification owner remains zccache#1935, currently OPEN. Its immutable native GCC evidence includes a normal immediate same-size edit with changed mtime returning stale native output on standalone1.15.5 (the AppImage pin);1.15.6also failed that recorded case. This is existing evidence, not a newly run AppImage experiment or proof that cross-run AppImage restores have the identical failure.

    Keep this limitation in the1832qualification: the launcher forwarding fixture and real later compiler hits cannot establish source freshness by themselves. Do not insert sleeps, relax the changed-input control, disable caching only for the negative case, or upgrade pins without qualification to make that evidence green. The environment-path repair in1833does not resolve this upstream native defect or complete1832/1801. Preserve current repository safeguards and distinguish within-session rapid-edit behavior from independently observed cross-run reuse. Link any measured rejection/blocker instead of claiming a fully qualified cache rollout.

  6. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    #1833 merged through the normal queue at212f8c0240de32c3afdec20c739ea5dc678ddd01,2026-10-22T21:53:39Z. PR39859568067and queue39860309609required gates passed. The producer environment contract is repaired: configured ZCCACHE_CACHE_DIR is now explicitly forwarded; no extra workflow/native lane or broad environment inheritance.

    The clean checkout is rebased onto origin/master212f8c024. Verified all eight evidence records against the merged companion and historical/current source before removing five redundant raw capture files with safe-rm. The full existing failed-writer log remains preserved in the merged portable evidence.

    #1832 remains OPEN for actual trusted nonempty publication, later compatible compiler hits, source-edit freshness, transfer/build cost and budget durability. Existing native rapid-edit limitation zccache#1935 remains explicitly linked. No expensive AppImage matrix was dispatched solely for the forwarding fixture, and no warm rollout/completion is claimed. Parent1801/global allocation also remains unfinished.

  7. zackees commented on Oct 22, 2026

    @zackees
    MemberAuthor

    Releasing AppImage cache qualification for maintainer-requested handoff; goal is paused. Producer repair1833is merged, but actual trusted publication/later reuse/source freshness/cost/durability remain incomplete, including linked upstream1935limitation. Primary handoff issue1801 and draft #1838 preserve the detailed state and captures. Do not mark1832complete from the environment fixture or a cache hit alone. No automatic native experiment is authorized by this handoff.

  8. removed
    claimed
    on Oct 22, 2026
  9. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Claiming: the save side. #1833 forwarded ZCCACHE_CACHE_DIR, but the cache is still never saved. Today's master release (run 40097160881, AppImage build) compiled 322/322 cold, and its Save zccache step warned EACCES: permission denied, scandir '.../.zccache' and saved nothing (actions/caches?key=zccache-appimage is empty). The build container writes .zccache as another user, so the runner user can't read it, and the warning doesn't fail the step. Plan: RED: a ci test that the save step is preceded by a step returning .zccache to the runner user; GREEN: sudo chown -R before the save (always(), master only, like the save). Then the next master release should save and the one after it restore.

  10. added
    claimed
    on Oct 24, 2026
  11. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    #2179 merged. First master AppImage run after it (40109086378): Return zccache to the runner user and Save zccache succeeded, and the cache zccache-appimage-40109086378 (436 MB) now exists, the first AppImage compiler cache ever saved. A second dispatch is running to show a build restoring it and compiling warm; I'll post its numbers and close this.

  12. zackees commented on Oct 24, 2026

    @zackees
    MemberAuthor

    Fixed by #1833 (forwarding) and #2179 (save). Proof on master:

    • run 40109086378 saved zccache-appimage-40109086378 (436 MB), the first AppImage compiler cache ever saved;
    • run 40110617992 restored it: 322 total (193 cached, 129 cold), Build step 221 s against 332 s cold.

    The 129 compilations still cold on an identical tree are followed up in #2182.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions