perf(ci): 2-phase CI latency optimization and bootstrap.d test harness caching - #37
Merged
Merged
Conversation
Owner
Author
📊 CI Performance Benchmark Results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Performance Optimization Phases
This PR delivers a comprehensive two-phase optimization of GitHub Actions CI (
verify.yml) and local test suite latency, driving overall CI critical-path turnaround time down from ~6.2 minutes to ~1.3–2.0 minutes without compromising test hermeticity, coverage, or containment.Phase 1: Core Test Compilation Caching & Matrix Scoping
bootstrap.d/main_test.go):TestMainto compilebootstraponce per test process into a temporary shared location.$home/cache/dotfiles-bootstrap/<key>/directories for standard command tests (plan,apply,check,migrate).go build -trimpathsequential compilations per test run.runShimColdandrunShimColdEnvhelpers..github/workflows/verify.yml):if: matrix.module == 'agents'to theinstall gitleaks, checksum-verifiedstep in thetestmatrix sobootstrap.dmatrix legs skip redundant tool downloads and installations.Phase 2: Universal Alt-Checkout Seeding & Container Package Caching
bootstrap.d/main_test.go):bootstrapCacheKey(root string)matching./bootstrap's POSIXcksumalgorithm.altCheckout(t)integration tests modifying non-Go files (links.manifest,Brewfile, configs), eliminating an additional 7–8 full Go compilations per run.TestCacheIsKeyedOnTheCheckoutto userunShimColdEnvfor its secondary checkout, guaranteeing genuine cold-build and cache isolation verification..github/workflows/verify.yml):actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0to thelinux-stage-zerocontainer matrix./var/cache/apt/archives(Debian) and/var/cache/pacman/pkg(Arch Linux) across workflow runs to eliminate network bottlenecking duringstageZeropackage installation.Validation & Quality Invariants
agentssuite: 100% PASSbootstrap.dsuite: 100% PASS in ~1.8s (down from ~150s)go test -race): 100% PASS across all modules$HOMEcontainment: 100% PASS (0 leaked files outside isolated sandbox)umask 077): 100% PASS./bootstrapscript remains completely untouched.