ui-sdk: the turnId doc comment tells client authors echoing is optional, which a rev 3 host refuses
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api, documentation
Research direction
Read the SessionScoped.turnId comment in packages/ui-sdk/src/protocol.ts alongside the rev 3 rule in docs/integration-contract/wire.md. Update the comment to name PROTOCOL_REV_CLIENT_ECHO and state the same echo requirements, then move the resolver comment in packages/ui-sdk/src/server/worker-launcher.ts directly above the /etc/resolv.conf bind. Done when both edits change comments only and the acceptance criteria are met.
Written by the indexing model from the issue text.
Description
Context
Two comments in packages/ui-sdk/src describe behaviour the code no longer has.
SessionScoped.turnId (packages/ui-sdk/src/protocol.ts:48-55). The doc comment says clients "MAY echo it on interactive replies" and that the field is "RESERVED for now: servers stamp it, but no shipped client echoes it back yet — hosts must not require it." Twenty lines further down, the same file states the opposite for protocol revision 3: "A client declaring 3 is REQUIRED to echo" (protocol.ts:62-70). The shipped client echoes it (withTurnId, packages/ui-sdk/src/client/ws-client.ts:385), and the host requires it from a rev 3 client (requireEcho, packages/ui-server/src/ws/dispatch.ts:42). docs/integration-contract/wire.md:290-291 records the rev 3 rule. The comment is on a published contract type, so it is what a third-party client author reads in their editor.
Resolver comment in maintenanceMounts (packages/ui-sdk/src/server/worker-launcher.ts:499-502). A four-line comment about keeping resolv.conf readable sits above the provider-relay block (:503-507). The code it describes is five lines further down (:508-512).
Scope
- Rewrite the
turnIddoc comment to state the current rule: hosts stamp it on every scoped frame; a client that declares protocol revision 3 or later echoes it on every interactive reply and a host may refuse a reply without it; a client that declares nothing is treated as revision 2 and is not required to echo. - Move the resolver comment down so it immediately precedes the
if (envelope.network)block it describes. Do not reword it.
Out of scope
- Any change to
PROTOCOL_REV, the echo rule,withTurnIdorrequireEcho. - Other comments in either file.
- Restructuring
worker-launcher.ts(STRUCT-12 and the later slices in the epic). docs/integration-contract/wire.md: it already states the rule. If the rewritten comment and the doc disagree on a detail, the doc is right.
Acceptance criteria
-
git grep -n "RESERVED for now" -- packages/ui-sdk/srcreturns nothing. - The
turnIdcomment anddocs/integration-contract/wire.md("rev 3") state the same echo rule, and the comment namesPROTOCOL_REV_CLIENT_ECHO. - In
worker-launcher.ts, the resolver comment is the comment directly above the/etc/resolv.confbind, and no comment sits between theenvelope.readPathsloop and the provider-relay block that does not describe that block. -
git diffshows comment lines only: no code token changes in either file. -
api-report/ui-sdk.txtis byte-identical (it does not record doc comments).
Verification
git grep -n "RESERVED for now" -- packages/ui-sdk/src
git diff --stat
bun run lint
NODE_OPTIONS=--max-old-space-size=6144 bun run typecheck
bun run api-report
bun run check:pr --base origin/main
Contract impact
- This touches the integration contract, so it needs the
contractlabel, aCONTRACT:commit prefix, and the doc updated in the same commit. - This changes a published package's behaviour, so it needs a changeset.
Comments only. The comment documents a contract type but changes neither the type nor the rule, which docs/integration-contract/wire.md already records.
Found by a repository audit on 2026-11-26 (main 87b96b10c); independently reviewed before filing.
- Dominant language
- TypeScript
- Stars
- 5
- Forks
- 0
- Avg merge
- 8h 3m
- Merged PRs (30d)
- 606
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from schlessera/brain-kit
-
agent-ready area: ui-server priority: p3 type: refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
schlessera/brain-kit#4833 ·
Maintainers usually reply within 1 day
-
agent-ready area: ui-react blocked priority: p3 type: refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
schlessera/brain-kit#4819 ·
Maintainers usually reply within 1 day
-
jobs: every command writes on open, so a read fails with "database is locked" during a long writeOpenagent-ready area: modules priority: p2 type: fix
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
schlessera/brain-kit#4809 ·
Maintainers usually reply within 1 day
-
agent-ready area: ui-server priority: p3 type: fix
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
schlessera/brain-kit#4807 ·
Maintainers usually reply within 1 day
-
agent-ready area: ui-server priority: p2 type: refactor
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
schlessera/brain-kit#4806 ·
Maintainers usually reply within 1 day
All issues in schlessera/brain-kit
Similar issues
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
backend enhancement priority:P3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
geolens-io/geolens#4161 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
xdelmo/Portfolio-minimal#667 ·
Maintainers usually reply within 1 day
-
external-issue to-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
supabase/supabase#54162 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CyberTimon/RapidRAW#2303 ·
Maintainers usually reply within 1 day