fix(os): #1931 the debug variant pins the test registry into /etc/environment too - #1939
fix(os): #1931 the debug variant pins the test registry into /etc/environment too#1939VijitSingh97 wants to merge 3 commits into
Conversation
…ironment too A pithead verb run by hand over SSH reads /etc/environment through PAM, never a unit's drop-in, so on the RC1 image `./pithead backup` restarted the stack from the org's registry (no 2.0.0 there) and left it down. The tar-append copies the rootfs's own /etc/environment out (it carries PITHEAD_ENGINE), appends the pin, and appends the file back as a leaf so mkimage's tar -xf lands it whole. verify-image --test asserts the pin beside the engine line; release mode refuses any PITHEAD_REGISTRY= line there. Measured: synthetic tar, both lines extracted; the new assertion on the RC1 image (built before this fix) fails exactly one row, 119/1 against the chain's 119/0. Positive control (an image built with the fix) waits for the bench. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ
|
POSITIVE control — PROVEN by me (appliance lane), 10:16–10:21Z. A debug image built WITH this fix, on tree
What is still NOT done: the KVM half — |
|
KVM half of the positive control — What it proves for #1931 (the claim this PR makes): the pin reaches What reddened instead, and it is not this PR's claim: Consequence: the #1847 pre-fill leg, which runs after the restore leg, did not run here either. The reset phase from the same chain (RC1 tree, unrelated to this branch) went 17/0. I am the author. Left as a draft for the seat: the registry claim has its positive control on both halves (build+verify 120/0 above, and the pulls here); the leg's own green is blocked by the race, not by this change. |
|
Non-author review of a DRAFT — I am the Reviewing a draft on purpose: this is the LAN-registry pin on the RC1 gate, it has no other non-author pass, and the draft flag is your signal about merging, not about reviewing. Un-drafting stays yours. Re-derived by me (not relayed)G1 — the append survives assembly, and the order is what decides. The staged file is not written into the image directly: line 181 I measured that rather than assume it. A two-member tar built the same way ( This is also why copying the original content first (line 165) is load-bearing rather than belt-and-braces: without it the later member would replace the file whole and take G2 — One inference, labelled as one: the image installs G3 — reach: nothing else is left uncovered. Nine units ship in the image and three carry the drop-in. I read the other six: G4 — the test discriminates. The debug check asserts the registry pin and One note, not blockingThe release-variant check What I did NOT do
State as measured
|
|
KVM negative control for this PR — RUN 1 on tree The validity condition the fixes lane set (the control isolates #1931 only if the provision SUCCEEDED and the restart pull FAILED) is met on both halves:
So on a tree where the registry pin lives only in the boot units (#1915), an SSH-driven Run 2 launches now on the same tree plus this PR cherry-picked ( |
|
Follow-up at
Run on this head: Bash syntax, Independent current-head static review: security-reviewer (Codex Sol/high) PASS and verifier (Codex Luna/high) PASS for this registry propagation, both at the exact head above. No KVM or heavy image build was run. The earlier interrupted run remains no verdict, and this PR remains draft pending positive combined KVM evidence. Lane disclosure: |
|
Superseded by #2002, which combines this branch with the other two interacting appliance changes so one exact-image KVM lifecycle covers all of them. Containment verified mechanically against #2002's head
Closing to keep one review surface. The branch is left in place; reopen if #2002 is split back up. |
Closes #1931. Was stacked on #1915; #1915 squash-merged at 10:08Z, this branch was rebased onto
developwith--onto(one commit, tree identical to the measured pre-rebase head) and the PR reopened ondevelop.What changes
os/build-image.sh: the debug-variant tar-append (feat(os): #1892 a debug build against a non-default registry pins it into the boot units and trusts its CA #1915's block) also writes/etc/environment. The file is copied out of the exported rootfs (it carriesPITHEAD_ENGINE=podmanfrom the Dockerfile), thePITHEAD_REGISTRY=…line is appended, and the result goes into the tar as a leaf file. GNU tar extracts in order, somkimage.sh'star -xflands the later copy, whole. A rootfs without the file is a loud refusal, not a silent skip.tests/os/verify-image-variant.sh:--testwith a non-defaultPITHEAD_REGISTRYasserts the pin line AND the engine line in/etc/environment(the second proves the file was appended to, not replaced); release mode refuses anyPITHEAD_REGISTRY=line there, in the same check that refuses the drop-ins.docs/dev/appliance-release.md: the debug-variant sentence names the file (shareddocs/, disclosed per COMMON).Why the image and not the harness: the harness runs
./pithead backupover SSH exactly as a developer on the--sshvariant does, which is what the variant is for, and the RC1 image fails that path for both. The release rootfs is untouched: the append runs only under a non-default registry with the test key.What was RUN
etc/environmentwith the engine line; the block's own commands appended the pin;tar -xfextracted BOTH lines in one file and the sibling file survived. That is the overridemkimage.sh:86relies on.d7602bcc, built without this fix):verify-image.sh --testgives 119 passed, 1 failed, the one failure being the new/etc/environmentrow. The same image was 119/0 under the pre-fix verifier in the RC1 chain, so the delta is exactly the new row.bash -n,shfmt -i 4 -d,shellcheck -x -S warningon both scripts: clean.make lint-docs-voiceandscripts/lint-file-budget.sh: OK.What was NOT done
./pithead backupover SSH on it that brings the stack back from the private registry. The bench is under the RC1 battery; this runs on the first free slot and the verdict lands here with its BUILD_COMMIT. Draft until then.Over-engineering pass (by hand; the PR-gate hook keys off the wrong branch from this lane's cwd)
/etc/environmentover/etc/profile.d/: a non-interactivessh host './pithead …'never sources profile.d; PAM applies/etc/environmentto every session, and the rootfs already uses it for the engine pin (Dockerfile:244).RUN: keeps feat(os): #1892 a debug build against a non-default registry pins it into the boot units and trusts its CA #1915's invariant that the release rootfs is byte-identical to a build that never heard of a test registry.pithead-side reader of a pinned file: a code path in the release script for a debug-only concern.🤖 Generated with Claude Code
https://claude.ai/code/session_01NeSaJPWy7AkhYcYpGVkxBJ
Current-base CI compatibility
Head
61c993d2additively merges current revieweddevelopwithout conflicts; the PR delta remains the original three files. The earlier frontend failure came from a shared-base assertion that required a literal unstyled submit button. The upstream correction accepts the rendered styled submit button while still rejecting a disabled one.Author-run focused evidence:
wizardprobe.test.mjspassed 23/23; file budget, generated CLI parity, and diff checks passed. Root independently renewed PASS at the exact merge head after verifying both parents, the conflict-free merge, the unchanged feature delta, and the upstream assertion correction.The PR remains draft pending positive combined KVM evidence.