Skip to content

Plan: podbench vscode is slick - #220

Merged
gilesknap merged 1 commit into
mainfrom
plan/vscode-attach-is-slick
Aug 24, 2026
Merged

gilesknap merged 1 commit into
mainfrom
plan/vscode-attach-is-slick

Conversation

@gilesknap

@gilesknap gilesknap commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

Successor to #214, which ended by proving that a breakpoint in a beamline
application binds and is hit from a window podbench opened. It works. This is
about what a user still has to notice, tolerate or repair on the way there.

Definition of slick, from the ask: one command, a window, F5. Nothing along
the way makes the user stop, re-run, read 300 words, hand-fix a file, or wonder
whether something went wrong.

The plan is .claude/plans/vscode-attach-is-slick.md. This PR is the plan
only
— no code yet. It exists so the work has somewhere to land and so the
five decisions below can be settled before anyone starts.

The shape

There is a spine, and it is not #214's:

Every rough edge is podbench measuring something and then not using the
measurement
. In two cases the fact is printed one line earlier than the
code that ignores it.

# podbench knows and then
1 it just resized the pod, and the 409 it lost is its own resize's writeback reports a bare Kubernetes conflict, retries nothing, never mentions the mutation
2 the DAP handshake refused, and the live adapter is a child of the target authors a launch.json naming a port nothing serves
3 the target's interpreter — it prints it while emitting the debugpy config writes no python.defaultInterpreterPath, so the window pops "no Python found"
4 the claim is a git checkout at a uid the seat does not own leaves the user's first git status fatal
5 this seat does not authorise the key being offered — it reads the file and says so prints a full successful-looking report, then fails at ssh

These are not causally chained, and the plan deliberately draws no cascade
diagram.
#214 earned one because slice 2 made slice 3 reachable and slice 3
made slice 5 reachable. Nothing of the sort is true here: each is independently
reachable on a run where the other four are fine. What they share is a
discipline, not a dependency — which is why they can land together, and why the
ordering is chronological in the user's run rather than causal in the code.

Slices

  1. The first run must not need a second — A successful resize can lose the seat: 409 on ephemeralcontainers, reported as only a conflict #136/hotfix/attach: a benign resourceVersion conflict fails the whole run, and the message does not say it is transient #210. A bounded 409 retry
    inside add_ephemeral_container, not in the ladder (which burns a container
    name per attempt), and try_resize's outcome printed on the path that made
    the mutation. This is the defect that made podbench vscode actually debugs #214's live run need a second
    invocation, and podbench vscode actually debugs #214's flat 6Gi makes it more reachable.
  2. Never author a port nothing answers — re-provisioning a pid that already serves debugpy writes a dead port into launch.json #218. Find the adapter as a child
    of the target rather than by port, and gate the config write on the DAP
    handshake _inject already computes and discards. 2b: podbench's own
    adapter stops being offered as a debug candidate.
  3. Tell the Python extension what podbench already measured — podbench vscode leaves the Python extension with no interpreter, so the window pops up 'no Python found' #219.
  4. git works in the tree vscode opens — git in a seat refuses the claim: 'dubious ownership in repository at /podbench/app' #217, with hotfix.git_argv as
    the in-repo precedent. 4b: a provisioned debugpy on the claim shows up as untracked in the user's own checkout #216.
  5. Do not open a window that cannot connect — the reconnect ssh-key warning is a guess podbench could measure, and vscode runs on anyway #204's remaining half; the
    measurement landed, the control flow did not.
  6. Prove it on the live target — with a deleted and recreated pod, not a
    warm one: vscode-in-a-seat says a warm seat proves nothing about the
    install path, and recreation restores the 256Mi that is the only state
    slice 1 is reproducible in.

Decisions taken (Giles, 2026-08-24)

All five are settled and folded into the plan, with their reasoning and their
cost kept. Two of them moved the plan's shape.

decision
D1 python.defaultInterpreterPath → the seat's machine settings
D1b and podbench stops writing settings.json and extensions.json to the claim at all wider than D1 was
D2+D3 one /etc/gitconfig carrying safe.directory and core.excludesFile #217 and #216 collapse into one mechanism
D4 refuse, naming --new
D5 move try_resize's outcome to the point of mutation

D1b's motivation is first-hand: driving hotfix mode on 2026-08-24 dirtied
the application's own .vscode folder with podbench's writes. The claim is a
committed checkout on an NFS PVC, so a folder write is a permanent line in the
user's git diff rather than a scratch file. extensions.json is recommendations
only and podbench installs and verifies the extensions itself, so dropping it
costs nothing. launch.json stays on the claim: VS Code does support a
global launch object in settings.json, but whether it is honoured at
machine scope on a remote is unverified, and F5 is the deliverable — so
it is neither asserted nor guessed at. Measuring it is listed as a future slice.

D2+D3 is the nicest outcome of the discussion. Nothing whatever is written
into the user's repository — no .gitignore, no .git/info/exclude, no
metadata of any kind — which is better than either option #216 was filed with.
The core.excludesFile idea was Giles'.

Two claims that did not survive contact with the code

Both corrections are in the plan rather than left to be discovered live:

  • A degraded seat cannot write /etc at all — a non-root uid with an empty
    effective set against a root-owned directory, which is the same failure as
    the /opt provisioning defect podbench vscode actually debugs #214 just fixed. So /etc/gitconfig is baked
    into the image with core.excludesFile plus an include.path under /tmp,
    and the agent writes only the include. The claim's mountPath is the
    application's choice and discovered at runtime, which is exactly what makes
    core.excludesFile bakeable and safe.directory not.
  • Nothing on the vscode path writes the machine settings today —
    merge_machine_settings has one caller, the agent at seat start-up. So "a
    re-run restores them" was false as the code stands, and slice 3 has to build a
    launcher-side writer before the mitigation that makes machine-only acceptable
    is real.

One consequence worth having in writing

podbench.jsonc from #214 is not retired. launch.json still goes to the
claim, so merge_launch_configs stays on the critical path — nobody should
delete the JSONC handling as dead code.

Deliberately not in scope

#203 (half already landed; a prose pass, not a wiring pass), #204's colour tier
(blocked on #203), #127 (measurement-absent rather than
measurement-ignored, so it does not belong to this spine), #124 (reserves memory
on a beamline node — not an agent's call), #142 (a chart change, no runtime
fix), #161 (every verb, not this path), #155/#160/#202/#69/#70/#212 (features),
and the bridge's dap.* blind spot (tooling — it changes slice 6's checklist
rather than any code).

🤖 Generated with Claude Code

https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS

@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: 419cbe72-2938-4b21-9ec9-63a364845414

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
gilesknap force-pushed the plan/vscode-attach-is-slick branch from d5ace39 to 448cef3 Compare August 24, 2026 11:11
`vscode-actually-debugs.md` ended by proving a breakpoint binds and is
hit in a beamline application from a window podbench opened. It works.
What is left is what a user still has to notice, tolerate or repair on
the way there.

There is a spine, and it is not the last plan's: every one of the five is
podbench measuring something and then not using the measurement - in two
cases the fact is printed one line earlier than the code that ignores it.
But they are not causally chained, so this plan deliberately draws no
cascade diagram. Each is independently reachable on a run where the other
four are fine, and fixing one makes none of the others easier. What they
share is a discipline, not a dependency, which is why they can land
together and why the ordering is chronological in the user's run rather
than causal in the code.

Two of the five were found by the live run that closed the last plan and
filed the same day (#218, #219); one is the defect that made that run
need a second invocation (#136); one is what breaks the first thing a
user does in the tree the verb opens (#217); one is a measurement that
landed without the control flow that would use it (#204).

Five decisions were taken rather than left open, each recorded with its
reasoning and its cost, because each writes outside podbench's own
scratch space or changes what an existing verb prints. Two of them moved
the plan's shape:

- Config moves to the seat's machine settings, and podbench stops writing
  settings.json and extensions.json into the claim at all. The motivation
  is first-hand - driving hotfix mode dirtied the application's own
  .vscode folder with podbench's writes, and the claim is a committed
  checkout on an NFS PVC. launch.json stays, because a global `launch`
  object at machine scope on a remote is unverified and F5 is the
  deliverable; measuring it is left as a future slice.
- #217 and #216 collapse into one mechanism: an /etc/gitconfig carrying
  safe.directory for the claim and core.excludesFile for the provision
  directory. Nothing whatever is written into the user's repository - no
  .gitignore, no .git/info/exclude, no metadata - which is better than
  either option #216 was filed with.

Checking those against the code corrected two claims that were made in
taking them, and the corrections are in the plan rather than left to be
discovered: a degraded seat cannot write /etc at all, which is the same
failure as the /opt provisioning this project just fixed, so the file is
baked with an include.path the agent can write; and nothing on the vscode
path writes the machine settings today, so the mitigation that made
machine-only acceptable has to be built by the slice that relies on it.

#127 is out of scope for a stated reason: it is measurement-absent rather
than measurement-ignored, so it does not belong to this spine.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
@gilesknap
gilesknap force-pushed the plan/vscode-attach-is-slick branch from 448cef3 to 4005bad Compare August 24, 2026 11:13
@gilesknap
gilesknap merged commit 4005bad into main Aug 24, 2026
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.

1 participant