Proxy-mode capture: design of record for RFC 0231, plus the missing claude_proxy_capture acceptance procedure - #815
Proxy-mode capture: design of record for RFC 0231, plus the missing claude_proxy_capture acceptance procedure#815philcunliffe wants to merge 10 commits into
Conversation
Design of record for the proxy-mode capture stack (LLP 0231-0239): the CONNECT front door, routing-table intercept set and path-anchor recording aperture, the in-process name-constrained CA, macOS keychain trust and launchd env delivery, and the proxy-mode Claude attach. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Trivial editorial addition on an Accepted doc: add a Design: LLP 0245 line after Spawns: so the RFC points at its own technical design, matching the corpus convention of appending discoverable forward-refs. No body edits, no status change. LLP 0232, 0233 and 0235 already carry Extended-by/Superseded-by lines and need no equivalent edit. Task-Id: T2
Design LLP 0245 is realized on master, but the manual acceptance gate it cites (docs/ACCEPTANCE.md) never got a proxy-mode procedure. Add claude_proxy_capture in the same shape as codex_desktop_capture and openclaw_capture: real daemon install/start, attach writing exactly HTTPS_PROXY and NODE_EXTRA_CA_CERTS, the keychain trust dialog naming every INTERCEPT_PROVIDER_HOSTS entry, NODE_USE_SYSTEM_CA via launchctl getenv with the terminal-quit caveat, a live session landing rows while Remote Control inbound keeps working, hyp status reporting ProxyTrustReport, detach restoring env keys while the CA and trust survive, and purge/uninstall removing all of it. List it in AGENTS.md's (CLAUDE.md) Smoke Test Model written-procedures section. No code touched; the mechanisms are already built and tested per LLP 0248's audit. Task-Id: T1
…he proxy_mode_error read path - The CA on disk is `tls/ca-cert.pem`, not `tls/ca.crt`: LLP 0245 section 1 and the new claude_proxy_capture step 2 both named a path that does not exist, so the procedure's settings check could only fail. - LLP 0246 now names the Remote Control absolute-form issue on master; the proxy-mode-default design renumbered itself to LLP 0251. Both references updated. - proxy_mode_error is published in the gateway source's status details, which `hyp status --json`'s sources array does not carry; the failure step now reads it from `hyp daemon status --json`. - Note the absolute-form third front door (LLP 0246/0247, #797) in the design and in step 4's diagnosis, since it is what makes Remote Control pass. - Correct the launchd env status line and two test paths in the audit.
…oes not refuse Findings from the code-review pass, verified against the tree: - `hyp attach claude` with no CA on disk does not refuse; `index.js:200-207` omits `mode` and `attach()` writes a base-URL attach. The only `markActionRefused` is settings.js's `CA_MISSING`, which needs proxy mode already selected. LLP 0245 sections 4 and 6 and the procedure's first "If it fails" bullet all claimed a refusal that never fires; the silent base-URL fallback is the failure a release gate has to catch. - Section 6's dead-gateway claim narrowed to what is actually closed: the CA outlives the daemon and a configured `listen` resolves the endpoint from config, so a stopped daemon can still take a proxy attach. - `shouldRecordProxyExchange` uses `recordPrefix ?? prefix`, so an absent `record_prefix` records under the routing prefix rather than nothing. - `SourceSnapshot.state` is started|failed|stopped: `hyp status` prints `[started]`, never `[running]`. - Step 1 now proves the CA file exists before attaching, and says why the jq edit can silently not take.
Neutral review, round 1Verdict: approve after the ten corrections pushed as The "already implemented on
|
Heads up before merging: LLP 0245 is claimed twiceThis PR's Neither branch's CI can see this. Each is internally consistent, Claim order, measured from the commit that added each file
This PR claimed it first, by about 41 minutes. Neither number is on Why neutral has not fixed it
Nor has neutral renumbered its own document, for two reasons. It holds the earlier claim, so moving it would invert the rule. And it would cascade: What resolves it
Either way this is a maintainer's call between two people's work, which is why it is a note rather than a change. Reply here and neutral will act on its next tick. For reference, the full claimed range across every branch right now is 0245-0259, with 0245 the only duplicate. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… fields hyp status drops - The rollout is LLP 0242-0244 (04330ab, #794), on master; LLP 0251 is an unmerged number on a sibling branch, so three references dangled. - Section 5 listed proxy_mode, expiry, cert path and permitted/intercepted hosts as hyp status output; ProxyTrustReport carries three fields and hyp status --json drops the source details block those live in. - Section 3's / anchor rationale was inverted: the fail-closed guard is what stops record-everything, and the source.js merge is what stops the default install recording nothing. - 0231's forward-ref uses the corpus's Designed-by name. - Acceptance: purge deletes the CA while the running daemon keeps its own, so a purge-then-attach silently downgrades to base URL; the step-7 restore raced the CA mint the same way. Config backed up and restored, anchors folded into their links (#proxy-attach-preflight is LLP 0232's, not 0245's). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Neutral review, round 2Verdict: approve after the seven corrections pushed as Did the
|
|
Triage at head |
Closes the coverage gap on RFC LLP 0231 (proxy-mode capture for Claude Code) and writes the acceptance procedure that its design cites but that never existed.
The headline: this change set adds no code
The design audit found LLP 0231 is already implemented on
master, by human PRs #782 (transport, aperture, CA, attach), #792 (status and trust reporting) and #794 (the LLP 0242-0244 rollout). Verified symbol by symbol before planning: every export insrc/core/tls/x509.js,ca.js,darwin_trust.jsandsrc/core/daemon/launchd_env.jsexists as designed; the gateway front door (connect.js,proxy.js,source.js,config.js) is complete including therecord_prefixmerge; Claude attach, disk-driven detach undo,purgeProxyTrustResidueandProxyTrustReportare all present; sixteen source files already carry@ref LLP 0232-0239; all eight design-named test files exist and pass (120/120), and thegateway_claude_capturesmoke is green.So the plan deliberately schedules no rebuild of working code. It closes only the two gaps the design-versus-tree audit actually found, both documentation.
What is in the diff
design, covers RFC 0231) and LLP 0248 (plan) - the design of record for what shipped, plus the audit that establishes it shipped.docs/ACCEPTANCE.mdgains theclaude_proxy_capturemanual procedure. LLP 0245 section 7 cites this procedure; only the codex and openclaw ones had been written. It covers a realhyp daemon install/start, proxy-mode attach writing onlyHTTPS_PROXYandNODE_EXTRA_CA_CERTS, the keychain trust dialog naming everyINTERCEPT_PROVIDER_HOSTSentry,NODE_USE_SYSTEM_CAvisible vialaunchctl getenvwith the quit-and-reopen caveat (LLP 0239), a Claude Code session producingai_gateway_messagesrows attributable viaentrypointwhile Remote Control inbound still works,hyp statusreporting theProxyTrustReportfields, detach restoring env keys while CA and keychain trust survive (LLP 0238), andhyp detach claude --purgeplushyp daemon uninstallremoving CA, trust and launchd residue. Also listed inAGENTS.md's written-procedures list (CLAUDE.mdis a symlink to it).llp/0231-proxy-mode-capture.rfc.mdgains a**Design:** LLP 0245forward-ref. A trivial editorial forward-ref, which the repo's conventions permit on an Accepted doc; nothing it settled is touched.Why the acceptance procedure is the point
Proxy mode is the one part of this subsystem that hermetic smokes structurally cannot prove: it needs a real Mac, a real login keychain and its GUI trust dialog, a real launchd environment, and a real Claude Code session. The written procedure is what a human runs before a release that touched this adapter. Its absence meant the design's own gate was cited but unrunnable.
Review notes
Docs only, no behaviour change.
npm testis unaffected. Nothing here needs to be exercised on CI beyond the existing suite; the procedure it adds is by construction a manual gate.Change-Set: proxy-mode-capture