Mount remote client methods, SDK remote parity, typed-terminal legs - #511
Mount remote client methods, SDK remote parity, typed-terminal legs#511ScriptedAlchemy wants to merge 18 commits into
Conversation
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
…e-parity-typed-terminals-c299
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
…ithub.com/ScriptedAlchemy/tracedecay into cursor/remote-parity-typed-terminals-c299 Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3df1e1639f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if endpoint.scheme() != "https" | ||
| let scheme_admitted = match endpoint.scheme() { | ||
| "https" => true, | ||
| "http" => allow_loopback_http && host_is_loopback(&endpoint), |
There was a problem hiding this comment.
Disable proxies for loopback HTTP clients
When HTTP_PROXY/ALL_PROXY is configured and the loopback host is not excluded by NO_PROXY, reqwest's default system-proxy behavior can route this newly admitted plaintext request through the proxy. Because execute_mounted attaches the enrollment credential as a Bearer header, the credential then leaves the machine unencrypted despite the hostname check; disable proxy use whenever constructing the loopback-HTTP client.
Useful? React with 👍 / 👎.
| emit_query_response( | ||
| &client.query(&request).map_err(map_remote_client_error)?, | ||
| args.json, |
There was a problem hiding this comment.
Hydrate the caller's pending spool before rendering coverage
This command only forwards the remote response to the renderer, so it never supplies evidence from the caller's local spool. The production query composition in src/daemon/remote_query.rs always sets pending_local to RequestingNodeSpoolNotSupplied, meaning users with unreplayed local captures invariably see “unavailable” rather than the pending count/gap/quarantine evidence promised by the new CLI journey; compose that evidence from the local spool authority before presenting the query result.
AGENTS.md reference: AGENTS.md:L75-L77
Useful? React with 👍 / 👎.
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
…plan' into cursor/remote-parity-typed-terminals-c299
…m:ScriptedAlchemy/tracedecay into cursor/remote-parity-typed-terminals-c299
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Summary
EnrolledRemoteClient::{capture,query,transfer_frame}now have production callers —tracedecay remote capture|query|transfer-framemount the daemon's already-served/remote/capture,/remote/query, and/remote/frames/transferroutes;remote queryrenders the composition's honest remote-shard coverage next to the caller's own pending local spool./remote).EnrolledRemoteClient::new_local_daemonadmits plaintext HTTP for loopback hosts only; the CLI selects that target forhttp://endpoints. No second kernel: same operations, envelopes, credential header, and response validation on both targets.tools/callrefused at project open withResetRequiredanswers with the canonical problem envelope (kind: reset_required,legal_actions: ["reset"]) instead of a raw JSON-RPC-32603; the socketDaemonInvocationClientkeeps reading an authoritative effect overDAEMON_TOOL_RESPONSE_GRACEinstead of fabricatingResetRequiredafter the 2-second shutdown bound, and a post-cancel transport failure stays the typed indeterminate settlement (mirroringsettle_in_process_invocation).Motivation
codex/tracedecay-total-redesign-plancarried three open ledger items: the remote-Brain client methods with zero production callers (A11), the local/remote client split with no unified target (B16), and the failing HTTP/MCP/SDK typed-terminal legs intests/typed_terminal_restart_acceptance/transport_boundaries.rs(P1 — NEXT.md recorded the MCP reset arriving as a raw-32603).Changes
src/daemon/project_open_handshake.rs,src/daemon/connection_serving.rs,src/application_surface.rs— a reset-refusedtools/callfor a mounted application operation answers as an MCP tool result carrying the canonicalApplicationProblemEnvelopeunder the operation's own MCP result contract (mcp_project_open_reset_refusal); every other refusal keeps its existing shape.src/daemon_client/controlled_invocation.rs— post-deadline authoritative-effect settlement waitsDAEMON_TOOL_RESPONSE_GRACE(30s) and types post-cancel transport failures as the indeterminate reset settlement; this is what lets the HTTP/SDK partial-effect legs report the committed receipt. The unsettled-server fixtures now tolerate the client's liveness-probe connections, as the real daemon accept loop does.src/cli.rs,src/remote_command.rs,src/cli/help.rs,src/cli/parse_tests.rs—remote capture|query|transfer-framesubcommands with the shared authority flags; query-specific human rendering ofRemoteQueryCompositionV1coverage, per-shard reason codes, and pending-local spool evidence.crates/tracedecay-sdk/src/remote_client.rs—new_local_daemonloopback target with fail-closed non-loopback plaintext refusal; the enrolled HTTPS constructors are unchanged and still refuse loopback HTTP.docs/plans/tracedecay-v2/NEXT.md— typed-terminal ledger entry updated to the green outcome.Not included, honestly scoped: a TypeScript remote-Brain client (the task allowed the smallest honest slice, Rust SDK first); generated application operations against the remote TLS listener (it deliberately serves only
/remote/*—crates/tracedecay-sdk/tests/production_daemon.rsproves application routes 404 there).Test plan
typed_terminal_restart_acceptance::transport_boundaries— 2/2 post-merge (reset_required_...was a raw-32603on the MCP leg;partial_effect_...settlement was replaced by a fabricated reset)--skip transport_boundaries) — 2/2remote_client8/8,project_open_handshake3/3,remote_command8/8, remote CLI parse tests 8/8,controlled_invocation11/11cargo check --all-featuresclean on the merged treecargo nextest run --workspace --no-fail-fastdeferred to CI (multi-hour on this 4-core VM; heavy suites need a tmpfsTMPDIRbecause overlayfs is a typed store-locality refusal)Checklist
CHANGELOG.mdat branch tip; no version bump per task.envfiles included