Skip to content

feat: add doctor and structured reply routes - #71

Merged
abruption merged 1 commit into
feat/29-json-response-contractfrom
feat/45-diagnostics-reply-contract
Sep 16, 2026
Merged

abruption merged 1 commit into
feat/29-json-response-contractfrom
feat/45-diagnostics-reply-contract

Conversation

@abruption

@abruption abruption commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

A successful inbox write or Codex queue submission does not explain missing prerequisites, prove that an advertised SSH route works in reverse, or provide a safe machine-readable reply address. Waiting was also underspecified: transcript matching can report stale or echoed text as a reply.

Result

  • adds read-only session-peer doctor diagnostics locally and over SSH for Claude session homes/inboxes, Codex executables and bounded home/state DB candidates, permission failures, unsupported schemas, and unknown states
  • adds opt-in --check-return-route with a fixed non-interactive SSH probe; forward SSH is never treated as reverse-route proof, and same-user self routes normalize to local delivery
  • adds versioned session-peer://v1/reply addresses for Claude/Codex and local/SSH targets, including an optional Codex home; send --to URI validates every field and never evaluates message content as shell syntax
  • keeps the existing Reply: command for compatibility and exposes replyRoute / addressResolution in the common JSON envelope
  • records the No way to wait for a reply #31 decision to defer a general --wait: Claude's supported idle notice is local/main-session-only and Codex has no matching acknowledgement observer, so transcript polling would create false positives
  • documents JSON statuses, limits, safe completion handoff, and skill behavior

This PR is stacked on #70 because doctor uses the common JSON envelope introduced there. After #70 merges, its base can move to main without changing this commit.

Closes #45
Closes #31

Validation

  • python3 -m compileall -q cc_peer.py session_peer.py tests
  • python3 -m unittest discover -s tests -q — 239 tests passed
  • uvx --from build pyproject-build — wheel and sdist built
  • CI run 35058820151 — Ubuntu Python 3.9/3.13, macOS Python 3.9/3.13, Windows Python 3.13, package build, install smoke, shellcheck, and GitGuardian passed
  • real SSH: doctor --host macbook-pro-m4-pro --json reported three available Claude inboxes and all bounded Codex homes
  • real reverse route: the same host with --check-return-route reported authentication_failed, proving it did not infer reverse access from the successful forward connection
  • local self route: doctor --check-return-route returned verified, transport: local, reason: self_route_normalized without SSH

@abruption
abruption changed the base branch from feat/29-json-response-contract to main September 16, 2026 05:13
@abruption
abruption force-pushed the feat/45-diagnostics-reply-contract branch from 985cda3 to 8f1cfae Compare September 16, 2026 05:13
@abruption
abruption force-pushed the feat/45-diagnostics-reply-contract branch from 8f1cfae to 382d8ba Compare September 16, 2026 05:15
@abruption
abruption changed the base branch from main to feat/29-json-response-contract September 16, 2026 05:16
@abruption
abruption merged commit 04547ad into feat/29-json-response-contract Sep 16, 2026
9 checks passed
@abruption
abruption deleted the feat/45-diagnostics-reply-contract branch September 18, 2026 07:58
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.

feat: v0.7 roadmap — doctor, reply waiting, reply URIs, and SSH return-route diagnostics No way to wait for a reply

1 participant