Skip to content

docs: correct the persistent-terminal takeover rule and CreateClient's identity rule - #958

Merged
Blind-Striker merged 2 commits into
masterfrom
docs/949-950-rule-statements
Nov 17, 2026
Merged

Blind-Striker merged 2 commits into
masterfrom
docs/949-950-rule-statements

Conversation

@Blind-Striker

@Blind-Striker Blind-Striker commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

📝 Description

What does this PR do?

It corrects two rule statements that were wrong: in XML summaries that ship in the package, in two exception messages, and in the docs. No rule changes; only the text that describes the rules.

A persistent-terminal Controller attach without Takeover fails. It is not downgraded to an observer. At the pinned upstream:

  • the process daemon's Attach arm bails with "terminal already has controller" (packages/process-daemon/src/service.rs:1454-1455);
  • the core maps that to UnavailableError (packages/core/src/persistent-pty/index.ts, attach);
  • the server closes the socket with 4404 "terminal unavailable" (packages/server/src/handlers/persistent-pty.ts:185-191).

The SDK surfaces that from ConnectAsync as OpenCodeTransportException. Corrected in:

  • the PersistentPtyConnectOptions.Takeover summary;
  • the PersistentPtyClient.ConnectAsync summary, and the 4404 exception message and its policy's summary, which named only a missing terminal or an absent daemon;
  • client-runtime.md, where the persistent family's Close bullet now names the three causes 4404 carries (GLOSSARY.md already said it);
  • the persistent-terminal section of docs/guide/terminals.md.

CreateClient's identity rule is on final values. Endpoint and Password must stay null and Username must stay opencode. Setting Username = "opencode" is therefore accepted, and every other option, headers and the handler included, is carried into the client. Corrected in:

  • the OpenCodeServer.CreateClient and OpenCodeServerConnection.CreateClient summaries;
  • the refusal message, which said to leave the three members unset and to configure "behavior members such as Location only".

Related Issue(s):

Closes #949
Closes #950

🔄 Type of Change

  • 📚 Documentation update

🎯 Protocol & API Surface

  • No public API change (XML documentation and exception text only)
  • No generated output changed
  • The pinned snapshot (spec/) is untouched
  • Nothing under external/ was hand-edited

🧪 Testing

  • One existing pin updated to the new refusal text: OpenCodeServerConnectionTests.CreateClient_Should_Refuse_Identity_Members_In_Every_Mode. The persistent 4404 tests assert only that the message contains 4404, so they are unchanged.

✅ Completion Gate

  • The local check in quality-gates.md on this head (rebased onto master) did not finish green. Both local runs went red on tests this change does not touch:
  • The maintainers enqueued this change on its green CI on Linux, macOS and Windows, together with the first run's passing steps. It changes only documentation text and two exception messages.

📚 Documentation

  • XML documentation comments updated
  • The consumer guide (docs/guide/terminals.md) updated
  • CHANGELOG.md: no entry. Neither rule changes, only the wording that describes it.

✅ Code Quality Checklist

  • No new analyzer warnings, and no new suppressions
  • Branch is up to date with the target branch, no merge conflicts
  • Commit messages carry no AI-attribution trailers

🔍 Additional Notes

Breaking Changes: none. Dependencies: none.

… is not downgraded

- `packages/process-daemon/src/service.rs:1454-1455`: the Attach arm bails "terminal already has controller" for a Controller attach without takeover.
- `packages/core/src/persistent-pty/index.ts`, `attach`: the daemon failure maps to `UnavailableError`.
- `packages/server/src/handlers/persistent-pty.ts:185-191`: the server then closes the socket with 4404 "terminal unavailable".
@Blind-Striker Blind-Striker added this to the Next milestone Nov 17, 2026
@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 17, 2026
Merged via the queue into master with commit 51a4612 Nov 17, 2026
17 checks passed
@Blind-Striker
Blind-Striker deleted the docs/949-950-rule-statements branch November 17, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant