Skip to content

fix(ssh): preserve per-host outcomes after malformed send responses - #95

Merged
abruption merged 2 commits into
abruption:mainfrom
rupayon123:fix/93-preserve-per-host-outcomes
Oct 4, 2026
Merged

abruption merged 2 commits into
abruption:mainfrom
rupayon123:fix/93-preserve-per-host-outcomes

Conversation

@rupayon123

@rupayon123 rupayon123 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #93.

A malformed successful send response could throw during text rendering, causing the command-wide catch to report every destination as Nothing submitted after requests had already been dispatched. This validates command-specific send targets, classifies an unverifiable post-dispatch result as unknown for that host, and hardens text rendering so other hosts' verified outcomes remain visible. The validation accepts both the TypeScript target shape and the pinned Python Claude shape that omits target.agent.

The reported behavior was reproduced with the repository's isolated fake-SSH fixture.

Type

  • fix
  • feat
  • docs
  • chore / refactor / test / perf

Validation

  • npm ci --ignore-scripts and npm run build
  • SESSION_PEER_PYTHON_ROOT=<pinned v1.0.2 reference> npm test (120 passed, 5 platform-specific skips)
  • npm run test:package and npm audit (0 vulnerabilities)
  • Latest CI release gate passes with an up-to-date base
  • Behavior changes include relevant tests; refused/unknown/queued/ACK remain distinct
  • README changes are synchronized in EN/KO/JA/zh-CN (no README content changes; the command/output contract is updated in PARITY.md)
  • No credentials, real messages, session IDs, agent homes or local evidence in the diff

Tested environments / limitations

Darwin arm64, Node 22.23.1. The regression uses isolated fake SSH responses and local fixtures only; no live host, real inbox, or Windows-native behavior was exercised. Exact-head CI is pending.

Release impact

No package version, publication, deployment, native dependency, or protocol schema change.

Copy link
Copy Markdown
Owner

Please preserve the nullable Claude target.name contract in the new remote-response validation.

Source review of c9519276b542349a40304281b658116e17a5c6ca (not runtime-reproduced):

Consequently, a valid remote --to <PID> result for an unnamed Claude session is rejected: a successful send is reported as outcome_unknown (submitted: null), and a successful dry-run as remote_response_unverified.

Please accept the producer's nullable name while keeping PID and agent validation strict. Add regression coverage for an unnamed Claude session selected by PID: dry-run and send, JSON and text output, and a mixed-host case that preserves both successful outcomes. The send case should assert one request/submission per destination, with no retry.

@rupayon123

Copy link
Copy Markdown
Contributor Author

Fixed on the existing branch in 78563ec8a153c67177905935e9a7e695e5f689eb. The remote response validator now accepts target.name: null for an unnamed Claude process selected by PID, while still requiring a positive safe PID and preserving the existing agent/Codex UUID checks.

The new regressions cover dry-run and send in JSON and text across two hosts. They assert both hosts retain successful results and that each destination receives exactly one request per invocation. The tests failed before the fix and pass now.

Validation on Node 22.23.1: full npm test passed (122 passed, 5 platform skips), package smoke passed, npm audit --omit=dev found 0 vulnerabilities, and the focused SSH-host suite passed (14 passed, 1 platform skip). The new exact-head Actions run is 37200734142 and is action_required pending maintainer approval; GitGuardian is still running. These tests use the repository's fake-SSH/local-socket harness; I did not test a live remote host or native Windows behavior.

@abruption
abruption force-pushed the fix/93-preserve-per-host-outcomes branch 2 times, most recently from cd22976 to e3e275d Compare October 4, 2026 13:49
@abruption
abruption force-pushed the fix/93-preserve-per-host-outcomes branch from e3e275d to ccf2950 Compare October 4, 2026 13:54
@abruption
abruption merged commit 38532f1 into abruption:main Oct 4, 2026
9 checks passed
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.

fix(output): preserve per-host send outcomes when remote text rendering fails

2 participants