Skip to content

Mount remote client methods, SDK remote parity, typed-terminal legs - #511

Open
ScriptedAlchemy wants to merge 18 commits into
codex/tracedecay-total-redesign-planfrom
cursor/remote-parity-typed-terminals-c299
Open

Mount remote client methods, SDK remote parity, typed-terminal legs#511
ScriptedAlchemy wants to merge 18 commits into
codex/tracedecay-total-redesign-planfrom
cursor/remote-parity-typed-terminals-c299

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • A11 remainder: EnrolledRemoteClient::{capture,query,transfer_frame} now have production callers — tracedecay remote capture|query|transfer-frame mount the daemon's already-served /remote/capture, /remote/query, and /remote/frames/transfer routes; remote query renders the composition's honest remote-shard coverage next to the caller's own pending local spool.
  • B16: one remote-protocol op set now targets either the enrolled remote HTTPS authority or the local daemon's own loopback application listener (which nests the same Remote Brain router at /remote). EnrolledRemoteClient::new_local_daemon admits plaintext HTTP for loopback hosts only; the CLI selects that target for http:// endpoints. No second kernel: same operations, envelopes, credential header, and response validation on both targets.
  • P1: real PartialEffect and ResetRequired now stay typed through HTTP, MCP, and the Rust SDK. A tools/call refused at project open with ResetRequired answers with the canonical problem envelope (kind: reset_required, legal_actions: ["reset"]) instead of a raw JSON-RPC -32603; the socket DaemonInvocationClient keeps reading an authoritative effect over DAEMON_TOOL_RESPONSE_GRACE instead of fabricating ResetRequired after the 2-second shutdown bound, and a post-cancel transport failure stays the typed indeterminate settlement (mirroring settle_in_process_invocation).

Motivation

codex/tracedecay-total-redesign-plan carried 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 in tests/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-refused tools/call for a mounted application operation answers as an MCP tool result carrying the canonical ApplicationProblemEnvelope under 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 waits DAEMON_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.rsremote capture|query|transfer-frame subcommands with the shared authority flags; query-specific human rendering of RemoteQueryCompositionV1 coverage, per-shard reason codes, and pending-local spool evidence.
  • crates/tracedecay-sdk/src/remote_client.rsnew_local_daemon loopback 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.rs proves application routes 404 there).

Test plan

  • typed_terminal_restart_acceptance::transport_boundaries — 2/2 post-merge (reset_required_... was a raw -32603 on the MCP leg; partial_effect_... settlement was replaced by a fabricated reset)
  • CLI legs of the same suite (--skip transport_boundaries) — 2/2
  • Focused unit suites: SDK remote_client 8/8, project_open_handshake 3/3, remote_command 8/8, remote CLI parse tests 8/8, controlled_invocation 11/11
  • cargo check --all-features clean on the merged tree
  • Full cargo nextest run --workspace --no-fail-fast deferred to CI (multi-hour on this 4-core VM; heavy suites need a tmpfs TMPDIR because overlayfs is a typed store-locality refusal)

Checklist

  • No CHANGELOG.md at branch tip; no version bump per task
  • No secrets, credentials, or .env files included
  • Breaking changes documented (none — new constructors and subcommands only)
Open in Web Open in Cursor 

cursoragent and others added 4 commits August 19, 2026 03:29
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>
@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8b3031c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ScriptedAlchemy and others added 4 commits August 18, 2026 20:38
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>
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review August 19, 2026 04:37

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread src/remote_command.rs Outdated
Comment on lines +88 to +90
emit_query_response(
&client.query(&request).map_err(map_remote_client_error)?,
args.json,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

cursoragent and others added 10 commits August 19, 2026 05:03
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>
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.

2 participants