Skip to content

Plan: the claim holds the seat, not just the fix - #235

Merged
gilesknap merged 3 commits into
mainfrom
hotfix/claim-holds-the-seat
Aug 24, 2026
Merged

gilesknap merged 3 commits into
mainfrom
hotfix/claim-holds-the-seat

Conversation

@gilesknap

@gilesknap gilesknap commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

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:

>>> install_argv("/x/bin/python3", "/podbench/app")[:4]
['env', 'UV_CACHE_DIR=/podbench/app/.uv-cache', 'uv', 'sync']

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:

Phases

verified on
1 claim default 2Gi → 10Gi (one constant, six copies; not SEAT_HOME_SIZE) no cluster
2 claim gets a layout; checkout stops being its root bench
3 seat's home moves onto the claim bench, both rungs
4 resetting the fix must not delete the developer's home bench
5 re-scope #69, #70; close #42 no cluster

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.directory must name the checkout rather than the claim root (or apply dies 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), and install_argv's doctests are executable spec under --doctest-modules.

Verification: the k3s bench

Namespace podbench-p47 on the bench already carries a replica of bl47p-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 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.

Three properties are already true there that a p47 duplicate would have needed work to match:

  • bl47p-ea-fastcs-01-podbench-project is a standalone 2Gi PVC, not the ephemeral: volumeClaimTemplate in k8s/hotfix-harness/podbench-test-fastcs.yaml — which is deleted with the pod and would have made Phase 3's proposition untestable by construction.
  • The LimitRange is present and calibrated, so the resize decision takes the branch Diamond takes.
  • No Argo CD, so nothing tracks or prunes the fixture.

It also removes a CLAUDE.md deviation an earlier 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.

What the bench cannot show is recorded in the plan, 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 allowVolumeExpansion: false (so 10Gi is only ever exercised on a fresh claim there) and WaitForFirstConsumer (so Bound means something different than on netapp).

🤖 Generated with Claude Code

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]>
@coderabbitai

coderabbitai Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b8f821fe-8b46-46ab-8242-ec22e5ca61ad

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

gilesknap and others added 2 commits August 24, 2026 21:19
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]>
@gilesknap
gilesknap merged commit 4aff5d2 into main Aug 24, 2026
29 of 30 checks passed
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.

A root seat never uses the podbench-home volume: $HOME comes from the passwd record, which still says /root

1 participant