Skip to content

feat(build): make the hermetic mock lane the default - #264

Merged
hanthor merged 1 commit into
mainfrom
feat/hermetic-default
Sep 25, 2026
Merged

hanthor merged 1 commit into
mainfrom
feat/hermetic-default

Conversation

@hanthor

@hanthor hanthor commented Sep 25, 2026

Copy link
Copy Markdown
Member

Item 4, second step. Follows #260 (the lane behind a switch). The subset proof is below, and this PR changes the default.

Subset proof

Canary set: three passes through the hermetic lane, with the stage handoff going through the lock (#260).

Wider subset: 24 packages dispatched against the published factory (36182167832, then 36189553483 for the four that failed):

packages
built offline, first run pango, rust-just, python-pydantic-core (Rust+Python, %generate_buildrequires), python-typing-inspection, python-psutil, libadwaita, sassc, mesa-libGLU, distrobox, wl-clipboard, gnome-shell-extension-gsconnect, ibus, libei, libinput, libcupsfilters, gdm, libsndfile, gnome-tweaks, pipewire, xdg-desktop-portal
built offline after the unprivileged-user fix (#260) flac, fish, libratbag
fixed here, to be confirmed by dispatch git: a new network namespace starts with loopback down, so its HTTP tests on 127.0.0.1 (t0410, t0611) failed. The offline build now brings lo up inside its namespace; verified locally that loopback serves and 1.1.1.1 is unreachable.

What changes

  • backend defaults to hermetic in build-stage.yml, in rebuild-rpms.yml (workflow_call, dispatch, all 14 waves), and in the dispatch UI.
  • Per-package escape hatch: "build_lane": "container" plus a required "build_lane_reason" in config/upstream-sources.json, validated by tools/package_inventory.py. prepare passes the list to the waves and build-stage.yml picks the lane per package (Choose the build lane); every step follows the chosen lane. No package needs it yet.
  • Canary: passes 1–5 now run hermetic. verify-hermetic reads pass1's locks. pass6 keeps the container lane proven for the escape hatch, and a dispatch can point it at any subset and lane (lane_packages, lane_backend).
  • The canary's flaky-%check injection works on the hermetic lane through a define that only the retry passes. Each attempt gets a fresh mock root, so a marker file cannot carry state.
  • Docs: AGENTS.md conventions, architecture (Build engine row and the lane description), triage skill (hermetic-only failures, root, loopback).

Rollout

The state label does not include the lane, so this changes no package's input digest. Packages move to the hermetic lane as they change; the weekly full rebuild moves the rest (cold once, since the hermetic cache namespace is separate). A package that fails hermetically keeps its previously published build (incremental publish) and is named in the tracking issue. Then it gets a fix or a build_lane exception with its reason.

🤖 Generated with Claude Code

Proven on a subset first, as agreed: the canary set (three passes, with
stage handoff through the lock) and a 24-package dispatch against the
published factory -- Rust and Python with %generate_buildrequires
(rust-just, python-pydantic-core), meson and cmake C, pango, libadwaita,
pipewire, gdm, ibus, xdg-desktop-portal, and the %check-heavy git, fish,
flac and libratbag. All 24 build on the hermetic lane after two fixes this
subset found:

- mock must not run as root (merged in #260): flac and git refused a root
  %check.
- a new network namespace starts with loopback down, so git's HTTP tests
  (t0410, t0611 serve on 127.0.0.1) failed. The offline build now brings
  lo up inside its namespace; nothing outside is reachable.

Now:
- backend defaults to hermetic in build-stage.yml, rebuild-rpms.yml
  (workflow_call, dispatch, and every wave).
- A package can stay on the container lane with "build_lane": "container"
  and a required "build_lane_reason" in config/upstream-sources.json
  (validated by tools/package_inventory.py); prepare hands the list to the
  waves and build-stage.yml chooses the lane per package. None is needed
  yet.
- The canary's passes 1-5 build hermetically; verify-hermetic reads pass1's
  locks; pass6 keeps the container lane proven, and a dispatch can point it
  at any subset and lane (lane_packages, lane_backend).
- The hermetic lane gets the canary's flaky-%check injection through a
  define only the retry passes: each attempt has a fresh mock root, so a
  marker file cannot carry state.

The state label does not include the lane, so this changes no package's
input digest: packages move to the hermetic lane as they change, and the
weekly full rebuild moves the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QMTLsnqW2jtz5QsNC3W3qv
@hanthor
hanthor force-pushed the feat/hermetic-default branch from 3ff7563 to b70bea6 Compare September 25, 2026 21:58
@hanthor

hanthor commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

Proof:

  • PR canary 36194406790 is green with hermetic as the default for pass1–5: publish, cache (pass2 zero compiles, pass3 only the perturbed package), incremental publish plus the flaky-%check retry through the define (pass4), incremental selection in solved waves (pass5), verify-hermetic on pass1's locks, and pass6 on the container lane.
  • git on the hermetic lane with the loopback fix, dispatch 36194270807: built in 20 min (22:00 → 22:20).

That makes all 24/24 subset packages green on the hermetic lane. No build_lane exception is needed.

@hanthor
hanthor marked this pull request as ready for review September 25, 2026 22:25
@hanthor
hanthor merged commit cbfa446 into main Sep 25, 2026
130 of 131 checks passed
hanthor added a commit that referenced this pull request Nov 18, 2026
- Disposition precedence starts with any reviewer override; structural
  issues are projectbluefin/utah's.
- Drop counts that move with every import; keep one dated snapshot line.
  The import queue is 36 RPMs, not 2.
- Planning, triggers (push paths, daily, weekly full), the build root
  pin, the unused container lane and the cache key, as the workflows do
  them.
- Early publications push only when their own consumer transaction
  passes; only the final one fails the run.
- Fedora lookaside sources still exist (the ratchet list).
- Known problems: problem plus tracking issue only.
- architecture.md: replace the stale container table (#43, #264).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>
Karibhou pushed a commit to Karibhou/utah-packages that referenced this pull request Nov 19, 2026
* docs: describe the path from a Dakota .bst element to a Utah RPM

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>

* docs(bst-to-rpm): builds run in the pinned utah-buildroot image (projectbluefin#43)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>

* docs(bst-to-rpm): link the tracking issue for each known problem

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>

* docs(bst-to-rpm): verify every claim against the code and runs

- Disposition precedence starts with any reviewer override; structural
  issues are projectbluefin/utah's.
- Drop counts that move with every import; keep one dated snapshot line.
  The import queue is 36 RPMs, not 2.
- Planning, triggers (push paths, daily, weekly full), the build root
  pin, the unused container lane and the cache key, as the workflows do
  them.
- Early publications push only when their own consumer transaction
  passes; only the final one fails the run.
- Fedora lookaside sources still exist (the ratchet list).
- Known problems: problem plus tracking issue only.
- architecture.md: replace the stale container table (projectbluefin#43, projectbluefin#264).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>

* docs(bst-to-rpm): up to four early publications; link issue references

architecture.md's diagram no longer says rpmbuild or waves 0-4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>

* docs(bst-to-rpm): correct disttag rationale; index the guide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: James Reilly <jreilly1821@gmail.com>

---------

Signed-off-by: James Reilly <jreilly1821@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant