Repository navigation
podbench vscode is slick: five rough edges between working and slick - #222
Merged
Merged
Conversation
`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
The phase-8 run's third checkbox only half-passed, and the reason is now understood: it is a bridge limitation, not a podbench defect. extension.js registers its adapter tracker in the laptop's UI extension host, while a remote session's adapter descriptor is created in the seat's workspace host, and nothing proxies a tracker across the two. The failure mode is that this reads exactly like a dead session — the README's own "started: true is not success" advice points a reader at dap.terminated and dap.adapterError, which never arrive either. Say so where both halves are read, and name what does prove such a session. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
The first podbench vscode against bl47p-ea-fastcs-01-0 resized the pod from 256Mi to 6Gi and then lost a 409 on the ephemeralcontainers PUT — the kubelet's writeback of that same resize. It landed no seat, said nothing about the mutation it had just made to a production-shaped pod, and the whole run had to be repeated. Slice 1 of #214 makes this more reachable, not less: a flat 6Gi editor limit means the first run against any smaller pod resizes, so every first run passes through that window. Nothing on the path anticipated a 409. Retry it inside add_ephemeral_container, re-GETing for a fresh resourceVersion and reusing the same container name — the ladder burns a name per attempt, and a conflict burns none because the container was never created, so the same name is correct and the existing same-name filter makes the splice idempotent. Recognise the conflict as a property beside the other verdicts rather than by string at the call site, so an admission denial, an RBAC forbidden and a webhook timeout — all of which the ladder acts on — are not swept into it. The resize outcome moves to the point of mutation. terminal-reports says a caveat about a mutation belongs on the path that made it; carrying it in session.warnings meant a run that aborted between the resize and the seat reported neither, and it announced one event twice on the runs that worked. Fixes #136 Fixes #210 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
Two defects, and it turns out one mechanism closes both. In a seat on the live hotfixed pod, the first thing a user does in the folder podbench deliberately opens is the thing that fails: git status dies with "detected dubious ownership in repository at /podbench/app", because the checkout belongs to a uid the seat does not own. Podbench already solved this for its own git — hotfix.git_argv passes -c safe.directory on every invocation — and the user's git got nothing. Beside it, the ~15 MB of debugpy that slice 2 of the previous plan correctly moved onto the claim fills the SCM pane of a repository podbench was not asked to write into. An excludesFile pointing at a podbench-owned ignore file answers the second without putting anything inside the user's repository — no .gitignore, no .git/info/exclude, no metadata at all, which is better than either option that defect was filed with. The system config is the right home because it is the container's own: it dies with the container and touches no volume, so nothing podbench wrote can outlive the seat on a podbench-home PVC. The excludesFile names only fixed paths, so it is baked; a gitignore pattern matches at any depth, so the varying mountPath does not reach it. safe.directory cannot be baked, because the claim's mountPath is the application's choice and is discovered at runtime. That half would need the agent to write /etc, which a degraded seat — a non-root uid with an empty effective set — cannot do, so the baked file carries an include.path under /tmp and the agent writes only the include. Two behaviours this rests on were read from git's docs rather than measured, so both were measured on git 2.53: a missing include is silently ignored, and — the load-bearing one — a safe.directory reached through an include of the *system* config is still honoured, git attributing it to system scope. Had that not held the mechanism would have been inert without saying so. The seat's older git and a real cross-uid checkout are still unmeasured, and both docstrings say so. git_argv keeps its -c and is untouched: its docstring argues a HOME config is insufficient because a hotfix spans seats, which is an argument for -c and not against a config. The two are complementary and it now says so. Fixes #216 Fixes #217 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
The window pops "no Python interpreter found" on a pod where debug attach then works perfectly. Podbench knows the answer and prints it one line earlier: the target's interpreter is measured in the seat while the debugpy configuration is emitted, and then dropped. The seat's machine settings wrote the excludes and no defaultInterpreterPath. Write it, and only where the pod carries the hotfix layout — on a pod without it the seat's own interpreter is not the one being debugged and pointing the extension at it is worse than the popup. The test for "does the seat share this tree" is whether the measured interpreter lies inside the folder being opened, rather than a prefix match on the canonical app path: same question, but it follows an application that mounted its claim somewhere else, and it is correct for all three shapes seat_claim_path distinguishes. The key belongs in the seat's machine settings, which the agent already owns, and never in the claim's committed .vscode/settings.json. It is declared machine-overridable, so a machine value answers the popup while a folder value the user sets still wins. The interpreter travels on the seat's stderr narration, the wire the provision flag already uses, because --print-config's stdout must stay a pasteable launch document — a doctest now pins that it carries exactly the keys a launch document has. Podbench also stops writing settings.json and extensions.json into the claim at all. The claim is the user's committed checkout on an NFS PVC, so every file authored there is a permanent line in somebody's git diff — first-hand, this repo's own .vscode folder was dirtied by driving hotfix mode. extensions.json is recommendations only and podbench installs and verifies the extensions itself, so it costs nothing. launch.json stays, so the JSONC merge stays load-bearing. That leaves the folder-settings pair dead, and the cost of removing it is real rather than cosmetic: Kill VS Code Server on Host deletes ~/.vscode-server wholesale, and the excludes it takes with it are what stop the recursive walk that OOMs an unrestartable seat. The agent writes them at start-up and a re-run of the verb restores them, but a window kept open through a Kill Server and reconnected by VS Code rather than by podbench opens a folder with no excludes. Recorded where all three halves are read rather than left to be discovered. Fixes #219 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
The first half of #204 landed a measurement: podbench cats the seat's authorized_keys, says nothing when the key is there, and says unmeasured when the file could not be read. It then appended the answer to the report's warnings and carried on — so a reconnect whose key is measurably absent printed a full, successful-looking report, wired an ssh stanza, and only then failed at Permission denied (publickey). For attach that is right and stays: ssh is one feature among several there and the exec helpers still work. For vscode ssh is the deliverable, and a run podbench has already measured cannot succeed should not print a report that reads like one. So the refusal sits after the pod is read and before the report, the wiring and the window: on that path nothing is printed, no stanza or known_hosts entry is written, no window opens, and no seat is landed. attach_command is byte-identical in all three states. Absent and unmeasured stay apart at the type, which is the whole point of the slice. The measurement is carried as a tri-state on the session, and the guard is written against False rather than falsiness, because an unreadable authorized_keys is not evidence of a refusal and must keep today's warn-and-run. reconnect_key_note now takes that answer rather than re-reading the file, so the line printed cannot disagree with the decision taken. Nothing here touches ssh logic and nothing mutates authorized_keys: an ephemeral container's spec is immutable, and auto-landing a replacement silently replaces a seat a colleague may be using while spending a name from a finite per-pod supply. attach-endgame refused it for attach and the reasoning has not changed, so the remedy is named rather than taken. The cost is honest — one more command on a path where --new is the only thing that can work. Fixes #204 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
A plain reconnect replaced a working launch.json with one naming a closed port. The diff between the two files was three port numbers and nothing else, and podbench had said so correctly on the line above: injected in 1.8s, but nothing is listening, the injector returned 0 and left no server behind. The handshake was computed and then discarded — _inject returned the injector's exit code rather than its proof, and the author downstream consulted neither. It could not find the live server because a run with no --port probes the conventional 5678 and moves that probe only to a port it has itself injected on. Run 2's server was on an ephemeral port, so run 3 looked at 5678, found nothing, chose a fresh port, injected into a pid debugpy declines to serve twice, and emitted the new number. Find the adapter where it actually is: debugpy spawns it from the debuggee, so its ppid is the target and its argv carries the port podbench already prints. Parentage is the discriminator and not the port, because under hostNetwork a port proves nothing about which pod holds it. Nothing infers "already provisioned" from debugpy being mapped in the target's address space — ten such mappings outlived the adapter's death. Then gate every write on a handshake, including against an adapter found by parentage. Parentage proves the adapter belongs to this target; it does not prove it still answers, and a second run against a pod that already has one is now the common case rather than the edge. Both refusals are treated alike: withdraw the flavour, leave the existing entry exactly as it stands, say why. That is also the honest answer to a question nobody has measured — whether a third injection into a pid whose pydevd threads have exited would succeed — because the handshake decides and the question need not be answered. A withdrawal must not fall back to injecting: a live-but-unresponsive adapter is not licence to ptrace the workload for a second one, and debugpy serves a process once, so the remedy is to restart the app. --print-config makes this handshake too, deliberately — the verb authors through it, so exempting it would exempt the path the whole slice is about. It is a loopback initialize, not a touch of the workload. Podbench also stops reporting on the process it just started. The adapter was listed among the debuggable pids and spent three lines saying podbench could not read a process podbench created, which is exactly the "wonder whether something went wrong" this work exists to delete. It is one predicate in the enumeration that now already has the answer — and a fixture captured on p47 in August shows podbench had been offering a real one as a debug candidate all along. Fixes #218 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
|
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 |
p47 went down for an upgrade mid-session, so slice 6 ran against a reproduction on the k3s bed built from p47-services' helm values and a live capture taken before the API went away. Nine checkboxes, seven clean, two qualified, nothing repaired by hand. The finding worth keeping is why the first four runs did not resize at all. The sidecar declares no limits, and a pod's ceiling is the sum of its containers' limits, so the pod was genuinely uncapped and podbench was right to raise nothing. Diamond's namespace has a LimitRange that defaults a limit onto that sidecar; adding the equivalent made the resize fire, request and all, at the ratio the bed's own notes record from a Diamond pod. A bench without one silently exercises a different branch of the same decision. Two things did not get proved and are recorded as such rather than implied by a green run: the 409 retry, because a resourceVersion conflict is a race against the kubelet and does not reproduce on demand; and adapter discovery by parentage, because the adapter is gone before a second run can find it. The handshake gate that fix sits behind did fire, on the measured defect, and kept the working port. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WAGABUogwWJ68k1Dh28ZBS
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.
Fixes #136
Fixes #210
Fixes #216
Fixes #217
Fixes #219
Fixes #204
Fixes #218
The previous PR proved that a breakpoint in a beamline application binds and is
hit from a window
podbench vscodeopened. It works. This one is about what auser still had to notice, tolerate or repair on the way there.
Every one of these five is podbench measuring something and then not using the
measurement. In each case the fact already existed inside the process — in two
of them it was printed one line earlier — and the code one layer down
re-derived it, guessed it, or dropped it. They are not causally chained: 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 the ordering below is
chronological in the user's run rather than causal in the code.
launch.jsonnaming a port nothing servespython.defaultInterpreterPath, so the window popped "no Python found"git statusfatal, and their SCM pane fullcats the file and says soTwo slices delete a behaviour rather than wiring up a measurement, and both
come from the same realisation: the question stopped being what podbench fails
to write and became where podbench writes at all. The claim is the user's
committed checkout on an NFS PVC, so every file podbench authors there is a
permanent line in somebody's git diff — seen first-hand while driving hotfix
mode, when this repo's own
.vscodefolder was dirtied by podbench's writes.Fixes #136, #210 — the first run must not need a second
5ad6a1cThe first
podbench vscodeagainstbl47p-ea-fastcs-01-0resized the pod from256Mi to 6Gi and then lost a 409 on the
ephemeralcontainersPUT — thekubelet's writeback of that same resize. It landed no seat and said nothing
about the mutation. Slice 1 of #214 made this more reachable, not less: a flat
6Gi editor limit means the first run against any smaller pod resizes, so every
first run now passes through that window.
The retry lives inside
add_ephemeral_containerand reuses the same containername — the ladder burns a name per attempt, and a conflict burns none because
the container was never created. The conflict is recognised as a property beside
the other verdicts rather than by string at the call site, so an admission
denial, an RBAC forbidden and a webhook timeout are not swept into it.
Carries D5: the resize outcome moves to the point of mutation, which changes
the shape of every
attach --resizeandvscoderun and not only the failingone.
Fixes #216, #217 — git works in the tree
vscodeopensb54e554The first thing a user does in the folder podbench deliberately opens was the
thing that failed:
git statusdied withdubious ownership. Podbench hadalready solved this for its own git and the user's got nothing. Beside it, the
15 MB of debugpy filled the SCM pane of a repository podbench was not asked to
write into.
One
/etc/gitconfigcloses both, and puts nothing inside the user'srepository — no
.gitignore, no.git/info/exclude, no metadata. A degradedseat cannot write
/etcat all, so the excludes are baked and the per-seatsafe.directoryarrives through aninclude.pathunder/tmp.Two git behaviours the plan flagged as read from the docs, not measured were
measured on 2.53 before being relied on — including the load-bearing one, that a
safe.directoryreached through an include of the system config is stillhonoured. Had that not held, the mechanism would have been silently inert.
Fixes #219 — tell the Python extension what podbench measured
d15c364The window popped "no Python interpreter found" on a pod where debug attach then
worked perfectly, while podbench printed the answer one line earlier. The key
now goes into the seat's machine settings — never the claim's committed
.vscode/settings.json— and only where the pod carries the hotfix layout,because on a pod without it the seat's own interpreter is not the one being
debugged and pointing the extension at it is worse than the popup.
Carries D1b: podbench stops writing
settings.jsonandextensions.jsoninto the claim altogether.
launch.jsonstays, so the JSONC merge staysload-bearing. One cost is stated rather than left to be discovered: Kill VS Code
Server on Host deletes
~/.vscode-serverwholesale, and the excludes it takeswith it are what stop the recursive walk that OOMs an unrestartable seat.
Fixes #204 — do not open a window that cannot connect
e256077The measurement landed in the previous PR and was then appended to the report's
warnings, so a reconnect whose key was measurably absent printed a full,
successful-looking report, wired a stanza, and only then failed at
Permission denied (publickey).For
attachthat is right and stays — ssh is one feature among several there.For
vscodessh is the deliverable. Absent and unmeasured stay apart at thetype, which is the whole slice: the guard is written against
Falseratherthan falsiness, because an unreadable
authorized_keysis not evidence of arefusal.
Nothing here touches ssh logic and nothing mutates
authorized_keys—auto-landing a replacement silently replaces a seat a colleague may be using.
Cost, paid honestly: one more command to type on a path where
--newis theonly thing that can work, so this PR's own "one command" promise is not kept for
that user.
Fixes #218 — never author a port nothing answers
fdc3dfdA plain reconnect replaced a working
launch.jsonwith one naming a closedport; the diff was three port numbers and nothing else, and podbench had said so
correctly on the line above. The adapter is now found where it actually is — as
a child of the target, by parentage rather than port, because under
hostNetworka port proves nothing about which pod holds it.Every write is then gated on a handshake, including against an adapter found
by parentage. Parentage proves the adapter belongs to this target; it does not
prove it still answers, and a second run against a pod that already has one is
now the common case. Both refusals are treated alike: withdraw the flavour,
leave the existing entry exactly as it stands, say why — and never fall back to
ptracing the workload for a second adapter.
Also stops podbench reporting on the process it just started. A fixture captured
on p47 in August shows it had been offering a real adapter as a debug candidate
all along.
Documentation
7eb6ee6No
Fixesline — this is the dev-tool half of the previous PR's third checkbox,which only half-passed. The cause is now understood and is not a podbench
defect: the bridge registers its adapter tracker in the laptop's UI extension
host while a remote session's adapter descriptor is created in the seat's
workspace host. The trap is that it reads exactly like a dead session, so the
README now says what does prove one.
Slice 6 — proved on a p47 replica
p47 went down for an upgrade mid-session, so the live run went against a
reproduction on the k3s test bed, built from
p47-services' helm values anda capture of the StatefulSet taken before the API went away. Full write-up in
.claude/evidence/phase9-vscode-is-slick-on-a-p47-replica.md.fa6a7b4Nine checkboxes, seven clean, two qualified, nothing repaired by hand — which
was the slice's own falsification condition.
report — D5 as asked;
python.defaultInterpreterPathto the target's owninterpreter, so podbench vscode leaves the Python extension with no interpreter, so the window pops up 'no Python found' #219's popup is answered;
git statusin the seat answers where the released-image seat died withexit 128, and 18 MB of provisioned debugpy is invisible to it;.vscode/— the other three stillcarry the project's own October timestamps;
@scan(0.1)coroutine bound and was hit in the live IOC;restartCountstayed 0 throughout.The finding worth reading is why the first four runs did not resize at all.
The sidecar declares
resources: {}, and a pod's ceiling is the sum of itscontainers' limits — so the pod was genuinely uncapped and podbench was right to
raise nothing. Diamond's namespace carries a
LimitRangethat defaults a limitonto that sidecar; adding the equivalent made the resize fire, request and all,
at
6144/615 = 9.99against a cap of 10. A bench without a LimitRangesilently exercises a different branch of the resize decision, and looks fine
either way.
What stayed unproven, and is not implied by a green run
kubelet's writeback and does not reproduce on demand; it never fired. Covered
by the injected-runner unit tests only.
initializein 0.01 sand is gone before a later run can find it — two runs were staged specifically
to catch it and both missed. The handshake gate it sits behind did fire,
on the measured defect, and kept the working port.
ptrace_scope=1, Kyverno, Argo CD orSELinux. §7 of the evidence lists all of it.
Two things found that the plan did not reach
.podbench-hotfix.jsonis podbench-authored, untracked in the user'scheckout, and not in the baked ignore file. Written by
hotfix initratherthan by
vscode, so it is outside slice 4 — but slice 4's falsification isworded "anything podbench created other than the
launch.jsonchange".launch.jsonaccumulates dead configurations when the target's pids change,because entries are named after pids and nothing matches to be replaced.
Neither is fixed here; both are decisions rather than defects.
How to review
Commit by commit — each is green in isolation, and the five slices are
independent by construction, so a slice can be dropped without touching the
rest.
1867 passed, 40 skipped; pyright strict clean; docs build with
-EW.