atlas-iac/docs/LESAVKA_BUILD_BENCHMARK_2026-12-05.md

8.2 KiB

Lesavka native build review for 1.4.19

The release branch was at d84a04ad8b47b8c61a9507ac8575576e1697d85f when the review branch was cut. All compiler runs in this investigation used Jenkins Kubernetes agents on Atlas.

Baseline

Successful Jenkins builds #101 (amd64) and #102 (arm64) built the same source, 77531b799dd2e34b084beb5745441ecdcdac9a0c. Jenkins started the amd64 build first on December 4. The job serialized the architectures. Each agent received a new 80Gi workspace and Cargo target directory. None of the 14 retained compile runs had a second successful run of the same architecture and revision. A historical warm compiler-cache comparison is unavailable because the old pipeline discarded its compiler outputs with the workspace.

Jenkins stage or Cargo phase amd64 #101 arm64 #102
Validate identities <1s <1s
Native compilation wrapper / provisioning 51s 39s
Checkout 35s 44s
Format, strict lint and build stage 18m 01s 47m 40s
Strict shipping Clippy, inside that stage 2m 38s 9m 54s
Shipping Cargo build 7m 11s 14m 12s
Cargo preparing the release-mode CLI process tests 3m 50s 23m 07s
Full Jenkins run 19m 40s 49m 11s

On December 5, original release builds #104 (arm64) and #105 (amd64) both succeeded on d84a04ad8b47b8c61a9507ac8575576e1697d85f. ARM took 52m 02s and AMD took 17m 08s. It took 72m 50s from the first build start until both artifacts were ready, including the interval between jobs. The preceding December 4 pair took 71m 22s by the same measure.

The original Jenkins stage did not separately time rustfmt, packaging, and upload. Do not sum the inner Cargo rows and their enclosing Jenkins stage. The five native ARM process tests took 0.22s after their harness was ready. ARM #103 took 51m 31s, including 25m 02s to prepare the same five tests.

Software-tests #178 took 2h 27m 08s on titan-22. Jenkins reported the following elapsed seconds/minutes including its enclosing stage entry.

Stage Elapsed
Validate source identity 1s
Ordinary software gates wrapper 28s
Checkout and prove isolation prerequisites 34s
Hygiene 28m 34s
Ordinary tests 51m 29s
MPN microphone feedback 8m 28s
Production security contracts 40m 29s
MPN feature tests 4m 03s
Security setup UI 6s
Network chip UI 1m 47s
Companion launcher 11m 02s

Review design

The paired coordinator starts two independently numbered Jenkins runs with one exact revision, both independently pinned worker digests, and the original optional arm64 plugin hashes. Each job checks its clean checkout, CPU architecture and worker identity. The worker selector uses Linux architecture, Longhorn host and worker labels and prefers Pi 5 hardware for ARM. ARM keeps 350m CPU and 1,664Mi in aggregate requests, with two Rust build jobs and a two-core build-container limit. AMD uses four Rust jobs and a four-core build-container limit. A separate two-slot Jenkins cloud isolates the compiler queue. Each lane enforces a 120-second online deadline from the coordinator start, including downstream setup. Controller availability and time in Jenkins before the coordinator begins are separate from that timer.

Both lanes retain the original rustfmt command, strict release Clippy with all targets, release profiles, package selections and ELF validation. The server retains phone-companion-experiment (which enables phone-dev-s6-compat), s7-core-bridge and hdmi-av-experiment. AMD also retains the ordinary client, MPN path pump and TPM credential bundle gates. The process-only runner compiles the original server_cli_contract.rs with release assertions and its locked tempfile dependency. It runs every test natively against the SHA-256-recorded lesavka-server that is then archived. The old Cargo invocation built a second dev-dependency graph to prepare that test. Software tests and release qualification remain separate.

Each architecture has a dedicated 12Gi RWO cache on ci-scratch, with a non-blocking writer lock, two retained cache namespaces and a 3Gi object budget per namespace. The cache key includes the full worker digest, rustc, Cargo, architecture, release features, native bindings, Rust flags and Cargo.lock hash. Only registry Rust compilations use the pinned sccache wrapper. Checkout, target directory, local crates, release binaries, tests and packaging start from a clean workspace. Cache-off trials omit the cache mount. The existing worker image digests and archive names/layout are preserved. The review agents use a pod-owned Kubernetes generic ephemeral 80Gi RWO workspace. The ci-workspace storage class uses the same Longhorn replica count, astreae disk selector and filesystem as ci-scratch, with WaitForFirstConsumer binding. The existing ci-scratch class still serves release/1.4.18 and the compiler caches.

The first independent ARM cache-off trial reached its 120-second deadline. Its Jenkins-created immediate-binding claim had already become Bound, while the scheduler continued to report an unbound immediate claim. The job failed with an agent-capacity diagnostic in 2m 01s including Jenkins finalization. The K3s journal on the scheduler leader contained concurrent-update conflicts on Longhorn records during provisioning. That observation does not establish the cause of the stale scheduling status. The review branch changed workspace provisioning after this trial.

Independent cache-off checks

The AMD review run #2 completed in 9m 08s. Shell timings were 7s for rustfmt, 1m 52s for strict shipping Clippy, 3m 37s for the shipping build, 1s for the shipping CLI contract, 29s for credential Clippy and 1m 51s for the credential build. The three AMD archives were read back from Jenkins and all 11 native executable hashes matched the archived manifest.

The ARM review run #3 completed in 18m 39s on titan-07. It spent 17s on rustfmt, 7m 15s on strict Clippy, 9m 24s on the shipping build and 22s building and running the test harness. All five native tests passed and the hash of the tested server matched its archived executable. Kubernetes reported the agent Ready approximately 32s after submission. Both cache-off agents ran without a compiler-cache volume. These runs were submitted independently, on the two review commits immediately before and after the workspace binding change.

The initial cold-cache pilot started both architectures with release #104 still running. AMD completed in 12m 52s on titan-22. ARM obtained a slot on titan-15, where strict Clippy alone took 28m 30s. The shipping build was still in progress at 40 minutes on that spillover worker. This fallback workload gives the cluster an alternative to titan-07, with a material performance cost when the Pi 5 is occupied.

Adoption and reversal

Review jobs are isolated from the two live release jobs. For adoption after review, register docker/Jenkinsfile.compile-pair as the canonical paired coordinator, use the existing lesavka-compile as both downstream runs, and remove its seed-level disableConcurrentBuilds property in Atlas JCasC. Add the SUBMITTED_MS and COMPILER_CACHE parameters from the reviewed pipeline to the seed. The parent records one compiler run number per architecture, preserving release consumers that fetch from lesavka-compile by specific build number. Continue requiring a successful software-tests run at the same revision for release. The review jobs do not publish or promote a release.

To undo the branch changes, keep the existing release ref or restore docker/Jenkinsfile.compile, scripts/ci/native_compile.sh and its test from the base and remove the new paired pipeline, cache scripts and shipping harness. Review infrastructure can be retired independently. Let active compilers finish, disable the three lesavka-compile-review jobs, and remove the additive lesavka-review JCasC fragment from the services/jenkins kustomization. Remove the lesavka-compiler cloud on the next idle controller configuration reload. The old builds and their artifacts can remain for audit. To retire the caches, remove only lesavka-compiler-cache.yaml from reconciliation. The PVCs carry the Flux prune-disabled annotation to retain their contents. Keep the separate build-node reservation in place unless also reverting the capacity work documented in CI_CAPACITY_2026-12-05.md.