Repository navigation
Plan: the claim holds the seat, not just the fix - #235
Merged
Merged
Conversation
Hotfix mode mounts its claim at the git checkout, so the claim root is the checkout root and podbench writes two of its own artefacts inside somebody's source tree: `install_argv` names both `.venv` and `.uv-cache` under `/podbench/app`. That is already wrong, before anything new is added. Giving the claim a layout — `app/`, `venv/`, `uv-cache/`, `home/` — fixes that and creates the room to move the seat's home off ephemeral storage. The home is the reason the question came up, but the checkout-as-claim-root is the defect. Records three decisions the issues currently contradict, which is why they are in the plan rather than left to be rediscovered: - #70's declared sidecar is rejected. Attach mode's ladder is worth more, and #102 already removed a third of the sidecar's case by giving the seat a writable NSS source. - #69 item 1 is kept but not as written. Both issues propose swapping the `podbench-home` emptyDir for the scratch PVC; that adds a second claim to the application's pod spec and drags in RWO scheduling, a rolling-update stall, and a per-user-versus-per-workload scope mismatch. The hotfix claim is already in that pod spec and already mounted into the seat. - #42 is subsumed rather than a prerequisite. Redirecting the path sshd resolves reaches a root seat's home; libnss-extrausers floors at uid 500, so the #102 mechanism can never serve uid 0 at all. Plan only — no behaviour changes. Phases land one branch at a time. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The plan claimed "evidence discipline: measure the seat, do not restate the request" and then gave no phase in which to produce any evidence. Adds a per-phase Verify block and the bed each one runs against. Two findings shape it rather than a preference: - p47 never lands a root seat. Every attach recorded there is `rung degraded - uid 37887, CapEff 0`. #42 bites only on the full rung, so the defect Phase 3 subsumes cannot be reproduced on p47 at all and needs the k3s bench, which grants runAsUser 0. Two beds by necessity. - The existing harness cannot test Phase 3's proposition as written. Its claim is an `ephemeral: volumeClaimTemplate`, deleted with the pod, and Phase 3 is precisely "the home survives a pod replacement" - so it would read as the feature failing rather than the harness being wrong. These phases need a standalone PVC. `k8s/hotfix-harness/podbench-test-fastcs.yaml` already implements the duplicate approach, so the plan reuses it and records its five rules rather than re-deriving them - the PV-prefix rename in particular, because a second IOC answering a live prefix is a beamline problem rather than a test problem. Records that running the harness in `p47-beamline` deviates from CLAUDE.md's scratch-namespace rule, who decided it and why, and that the duplicate rules are the compensating control - so the deviation is not silently "corrected" later, and the rules are not dropped now the namespace is the real one. Co-Authored-By: Claude Opus 5 <[email protected]>
Chosen for availability - the bench stays up overnight where the pollux tunnel does not - but it turns out to be the better bed on the merits too. The previous revision needed two: p47 for the layout, the k3s bench for #42, because every attach recorded on p47 lands `rung degraded - uid 37887, CapEff 0` and #42 bites only on the full rung. The bench grants runAsUser 0 *and* runs the replica at uid 36096/37887, so one box shows both. Namespace `podbench-p47` already models the target, built 2026-08-24, and three of its properties are things a p47 duplicate would have needed work to match: - `bl47p-ea-fastcs-01-podbench-project` is a standalone 2Gi PVC, not the ephemeral volumeClaimTemplate the p47 harness uses - so "the home survives a pod replacement" is testable as it stands rather than after an adaptation. - The LimitRange is present and calibrated, so the resize decision takes the branch Diamond takes rather than looking fine on a different one. - No Argo CD, so nothing tracks or prunes the fixture. The independence a hand-applied duplicate had to engineer is free. This also removes the CLAUDE.md deviation the last revision had to record and defend: `podbench-p47` *is* a `podbench-*` namespace, so the scratch-namespace rule is satisfied rather than excepted, and no beamline is in reach. Records what the bench cannot show, to be reported as unproven rather than passed - chiefly fsGroup on netapp, since local-path is not NFS and a non-root seat writing its home depends on exactly that. Also: local-path is allowVolumeExpansion false, so Phase 1's 10Gi is only ever exercised on a fresh claim here; and WaitForFirstConsumer means `Bound` means something different than it does on netapp. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Plan only — no behaviour changes. Adds
.claude/plans/the-claim-holds-the-seat.md.Why
Hotfix mode mounts its claim at the git checkout, so the claim root is the checkout root.
install_argv(src/podbench/hotfix.py:1098) consequently writes two podbench artefacts inside the target's source tree:That is already wrong today, before anything new is added. The seat's home is what made the question visible, but the checkout-as-claim-root is the defect.
The plan gives the claim a layout —
app/,venv/,uv-cache/,home/— and uses the room to move the seat's home off ephemeral storage onto the claim.Decisions recorded
The plan records three decisions that the issues currently contradict, which is why they live in the plan rather than being left to be rediscovered by whoever reads #69 or #70 first:
ProxyCommand) dies with it — ephemeral containers do not come back after a reschedule, so there is no seat to resolve to.podbench-homeemptyDir for the scratch PVC. That adds a second claim to the application's pod spec, dragging in RWO scheduling constraints, a rolling-update stall, and a per-user-versus-per-workload scope mismatch. The hotfix claim is already in that pod spec, already mounted into the seat, and already advertised viaPODBENCH_CLAIM_PATH.libnss-extrausersfloors at uid/gid 500, so the a seat can only register its identity at GID 0, so a non-zero-gid target gets no ssh — move the record off /etc/passwd #102 mechanism can never serve uid 0 — redirecting the path is the only route to a root seat's home.Phases
SEAT_HOME_SIZE)No migration, at all — podbench is a prototype with no users, so existing claims are deleted rather than migrated. Any phase writing a compatibility path has misread the plan.
Phase 2 carries three failure modes that are silent if missed, all cited with anchors in the plan:
safe.directorymust name the checkout rather than the claim root (orapplydies mid-edit on dubious ownership), the supervisor's runtime switch must follow the venv (or the pod runs the image's code under a version string claiming the fix), andinstall_argv's doctests are executable spec under--doctest-modules.Verification: the k3s bench
Namespace
podbench-p47on the bench already carries a replica ofbl47p-ea-fastcs-01-0. Chosen for availability — it stays up overnight where the pollux tunnel does not — but it is the better bed on the merits too.It collapses two beds into one. An earlier revision needed p47 for the layout and the bench for #42, because every attach recorded on p47 lands
rung degraded — uid 37887, CapEff 0and #42 bites only on the full rung. The bench grantsrunAsUser: 0and runs the replica at uid 36096/37887, so one box shows both.Three properties are already true there that a p47 duplicate would have needed work to match:
bl47p-ea-fastcs-01-podbench-projectis a standalone 2Gi PVC, not theephemeral: volumeClaimTemplateink8s/hotfix-harness/podbench-test-fastcs.yaml— which is deleted with the pod and would have made Phase 3's proposition untestable by construction.LimitRangeis present and calibrated, so the resize decision takes the branch Diamond takes.It also removes a CLAUDE.md deviation an earlier revision had to record and defend:
podbench-p47is apodbench-*namespace, so the scratch-namespace rule is satisfied rather than excepted, and no beamline is in reach.What the bench cannot show is recorded in the plan, to be reported as unproven rather than passed — chiefly fsGroup on netapp, since
local-pathis not NFS and a non-root seat writing its home depends on exactly that. AlsoallowVolumeExpansion: false(so 10Gi is only ever exercised on a fresh claim there) andWaitForFirstConsumer(soBoundmeans something different than on netapp).🤖 Generated with Claude Code