Repository navigation
Description
PR #1222's successful Agent CI run took 67m36s. The main costs were cold compilation and serial builds, rather than test execution. Improve cache reuse and scheduling while preserving every current platform, source, static-link, packaging and test gate.
Measured evidence
| Work in this run | Elapsed | Compiler/test evidence |
|---|---|---|
| Windows workspace build + test | 45m00s | 33m07s development build + 6m03s test compilation = 39m10s compiling; core tests 278.31s, app tests 63.31s. |
| Windows upstream provider step, immediately afterward | 18m16s | 18m00s compiling; provider unit tests 6.38s and doctests 4.43s. |
| Linux release build after its CI checks | 19m52s | Serial optimized build, while Desktop separately builds Dev/Prod AppImages. These outputs have not been established as interchangeable. |
Completed logs explicitly report No cache found for PR Windows/macOS/Linux Agent CI and sampled macOS/Linux Prod release builds. Nix installer cache hits are separate from Cargo target-cache hits.
Source findings
Source links below are pinned to merged commit f6c1d011d39713d35c11d3bd168821412efce55f; these files are unchanged from the measured PR head.
- The Agent CI cache disables automatic Rust-environment hashing and puts the full Cargo.lock/flake hash in its user key. Logs show that hash in both the exact key and restore prefix, so a version-only Cargo.lock change prevents fallback to the previous master's dependency cache. The Desktop release cache follows the same pattern.
- The provider helper verifies released rusqlite and the pinned provider, copies upstream into a temporary directory, resolves a separate test-only dependency graph, verifies it, and runs the full
bundled-sqlcipher,modern-fullsuite. Its target directory is temporary and outside the declared workspace cache. The production Cargo.lock alone does not describe this test-only graph. - The provider checks and Linux release build run after workspace checks, adding their compilation cost to the serial path.
Proposed implementation
- Repair compatible dependency-cache restore. Separate a stable compatibility prefix from the exact dependency fingerprint, so application-only/version changes can restore compatible trusted dependencies. Fingerprint the compiler actually selected inside the pinned build environment, platform/architecture, native ABI/toolchain, flags/features/profile and provider configuration. The host compiler observed by a cache action before entering Nix is insufficient. Preserve Cargo's freshness checks and appropriate invalidation.
- Cache the provider suite independently. Keep the temporary copied manifest and both provenance checks. Use a dedicated persistent target/cache namespace, isolated from shipping workspace artifacts. Include the verified resolved upstream test-only lockfile, upstream/provider revisions, helper/manifest transformation, features and actual compiler/native ABI in its fingerprint. Changed test-only resolutions must invalidate appropriately; do not reuse unchecked SQLCipher/OpenSSL binaries across configurations.
- Parallelize still-required work. Run all three platform provider checks and the extra Linux release build as independent required jobs with their own prerequisites/caches. Preserve fail-closed selection and every assertion. Do not remove a build as redundant without proving matching profile, features and output.
- Measure before further tuning. Separate Windows build/test timings, collect bounded Cargo timing/cache summaries, and compare cold/warm runs. Consider runner or target-scheduling experiments only after those measurements; this issue does not select or purchase a runner/provider.
Acceptance criteria
- Record cold and warm results on Windows, macOS and Linux, including a version-only application bump with unchanged external dependencies: restored keys, actual compiler identity, compile/test phase durations and cache size.
- Demonstrate expected cache invalidation when provider revision, resolved upstream test-only graph, helper, toolchain/native ABI or flags/features change.
- Preserve all existing platform tests, provider features, provenance/source verification, static-link checks and packaging/release validations. New parallel jobs remain required and retain selector coverage.
- Preserve trusted-master-only cache writes and read-only PR cache use; keep credentials and signing boundaries unchanged. No production behavior changes are in scope.
- Report measured wall-clock and compute/storage tradeoffs. Do not promise savings from the full compile durations or drop coverage to shorten the run.
These conclusions use one completed PR run and source/cache logs, not a controlled performance benchmark. They establish repeated cold compilation and serial costs; they do not identify CPU/memory/disk saturation or prove a particular speedup.
Activity
research: upgrade to Tauri 2.12 and carry the Android tao patch (#1264)