Skip to content

fix(cli): shorten remote-control URLs on a character boundary - #293

Merged
BunsDev merged 1 commit into
mainfrom
d/surface/remote-url-utf8
Oct 15, 2026
Merged

BunsDev merged 1 commit into
mainfrom
d/surface/remote-url-utf8

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Member

Summary

Remote-control session URLs containing multi-byte characters no longer crash the CLI. Both the /remote-control command output and the "Remote control active" notification cut the URL at byte 60 with a plain slice, which panics inside a multi-byte character.

Context

  • Related request: code-surface audit, logical unit 102 ("Unit102 accepted" in the surface inventory ledger; manifest entry 100). Source surface-remote-url-utf8 (fix/remote-url-utf8).
  • Scope:
    • the remote branch of the command in crates/commands/src/lib.rs, plus the new crates/commands/tests/remote_url.rs;
    • in crates/cli/src/main.rs, a private remote_connection_notification helper wired into the bridge-connected handler, plus its tests.
  • Non-goals: no event-loop or terminal acceptance run; the notification is tested through the helper.

Changes

  • In both places, step back to the nearest character boundary before slicing at 60 bytes. The budget and the … suffix are unchanged.
  • The CLI's inline expression becomes the private remote_connection_notification, used at the same call site.
  • Port note: on main the CLI already has fix(cli): queue remote prompts instead of dropping or overlapping turns #226's take_remote_prompt and its queue tests at the same place in the file. The helper is added after take_remote_prompt and the four tests at the top of the test module. All existing tests are kept, and the file is rustfmt-clean.

Validation

  • RED (accepted source baseline): the command panicked at byte 60 inside é (bytes 59..61). The extracted CLI helper reproduced the same failure before the fix.
  • On this branch:
    • cargo test --locked -p claurst --bin coven-code remote_notification: 4 passed (2-, 3- and 4-byte boundaries, plus ASCII, exact and short controls).
    • cargo test --locked -p claurst-commands --test remote_url: passed (six cases, the full context URL left unchanged).
  • cargo fmt --all -- --check, cargo check --workspace --locked, cargo clippy --workspace --all-targets --locked -- -D warnings: pass.
  • git diff --check: clean.
  • Accepted source: independent extraction, fixture and composition reviews accepted, and full integration gates passed.
  • cargo test --workspace on this branch: hosted CI.

PR Readiness

  • Diff is limited to the unit's files.
  • Generated files were not edited by hand.
  • User-facing docs: not needed.
  • No secrets, credentials, local paths, or unrelated logs are included. No network or bridge calls.
  • Remaining risks: the notification is checked through its helper, not by driving a live bridge connection.

Both the /remote-control command output and the "Remote control
active" notification cut the session URL at byte 60 with a plain
slice, which panics when a multi-byte character straddles that byte.
Step back to the nearest character boundary in both places; the CLI
notification text moves into a private helper so it can be tested. The
60-byte budget and the ellipsis are unchanged.

Surface unit 102 (manifest entry 100).

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 15, 2026 1:04pm UTC

Request Review

@BunsDev
BunsDev merged commit 3c7e50c into main Oct 15, 2026
6 checks passed
@BunsDev
BunsDev deleted the d/surface/remote-url-utf8 branch October 18, 2026 07:52

This branch was successfully deployed

1 active deployment
Preview — c4b4c76f Deployed Oct 15, 2026 by vercel[bot]
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.

1 participant