Skip to content

feat(desktop): approve guest Turn requests - #4198

Merged
M4n5ter merged 1 commit into
feat/session-turn-access-requestsfrom
feat/desktop-turn-approval
Aug 30, 2026
Merged

feat(desktop): approve guest Turn requests#4198
M4n5ter merged 1 commit into
feat/session-turn-access-requestsfrom
feat/desktop-turn-approval

Conversation

@M4n5ter

@M4n5terM4n5ter commented Aug 29, 2026

Copy link
Copy Markdown
Member
English

Summary

Complete the Desktop collaboration loop: a Guest with request authority can submit one exact Turn request and follow its durable result, while the Owner can approve or reject pending requests. Retries preserve one stable Turn identity, terminal results remain until the Guest dismisses them, and both Owner and Guest projections recover without overlapping polls. An unavailable collaboration authority is shown honestly without replacing known durable access with an empty state.

Refs #3843

Verification

  • npm run build:test
  • node --test packages/runtime-host/dist/__tests__/session-collaboration-authority.test.js packages/runtime-host/dist/__tests__/authenticated-websocket.test.js apps/desktop/dist/main/__tests__/runtime-host-collaboration-ipc-main.test.js apps/desktop/dist/main/__tests__/runtime-host-profile-service.test.js (56 passed)
  • npm run lint
  • npm run format:check
  • npm run check:asf-headers
  • git diff --check
  • Manually verified with two independent Desktop profiles: Owner shares a Session, Guest joins and requests an exact Turn, Owner approves it, and Guest observes the canonical result

Screenshots

Owner approval:

Guest result:

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex implemented and verified the change under the maintainer's direction and review.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
中文

摘要

完成 Desktop 协作闭环:拥有请求 authority 的 Guest 可提交一个精确的 Turn 请求并查看其持久结果,Owner 可批准或拒绝待处理请求。重试会保持同一个稳定 Turn identity;终态结果会保留到 Guest 明确关闭为止;Owner 与 Guest 的 projection 均不会产生重叠轮询。collaboration authority 暂时不可用时,界面会如实呈现,同时保留已知的持久授权,而不是伪装成空状态。

关联 #3843

验证

  • npm run build:test
  • node --test packages/runtime-host/dist/__tests__/session-collaboration-authority.test.js packages/runtime-host/dist/__tests__/authenticated-websocket.test.js apps/desktop/dist/main/__tests__/runtime-host-collaboration-ipc-main.test.js apps/desktop/dist/main/__tests__/runtime-host-profile-service.test.js(56 项通过)
  • npm run lint
  • npm run format:check
  • npm run check:asf-headers
  • git diff --check
  • 使用两个独立 Desktop profile 完成人工验证:Owner 分享 Session,Guest 加入并请求一个精确 Turn,Owner 批准,Guest 随后观察到 canonical 结果

截图

Owner 审批:

Guest 结果:

AI 使用

OpenAI Codex 在维护者的指导和审核下参与了实现与验证。

@M4n5ter
M4n5terforce-pushed the feat/desktop-turn-approval branch 2 times, most recently from d39669b to 7da5407CompareAugust 29, 2026 18:04
@M4n5ter
M4n5terforce-pushed the feat/desktop-turn-approval branch from 7da5407 to 7043846CompareAugust 29, 2026 21:51
@M4n5ter
M4n5terforce-pushed the feat/desktop-turn-approval branch 2 times, most recently from a56b34c to c2c27edCompareAugust 29, 2026 23:07
@M4n5ter
M4n5ter marked this pull request as ready for review August 29, 2026 23:34
@github-actionsgithub-actionsBot added the effort/L Under 1000 readable lines label Aug 29, 2026

@jackwenerjackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed exact head c2c27ed775276b3cef653115ece1c31430812532 and found no blocking issue. The Guest composer preserves one Turn identity across uncertain outcomes, serializes polling, retains terminal results until acknowledgement, and fails read-only when authority cannot be confirmed. The Owner surface reads access and pending requests together, and only offers decisions for pending requests. Desktop/renderer typechecks, the complete Desktop main suite, and the stacked Runtime Host suite pass.

Non-blocking follow-up: this commit advances RUNTIME_HOST_COMPATIBILITY_EPOCH from 71 to 72 because canRequestTurns becomes required on the query result, but the adjacent epoch ledger has no 72: entry. Please add the compatibility reason so future rebases do not lose that boundary.


Automated review notice: This comment was posted by an automated review agent operated by WAWQAQ. It is not an independent human review and does not replace one.

Complete the Desktop collaboration loop with Guest Turn requests, durable Owner decisions, and fail-closed read-only behavior when authority is absent.
Generated-by: OpenAI Codex
@M4n5ter
M4n5terforce-pushed the feat/desktop-turn-approval branch from c2c27ed to c02465fCompareAugust 30, 2026 00:14
@M4n5ter
M4n5ter merged commit 847e3c9 into mainAug 30, 2026
2 of 4 checks passed
@M4n5ter
M4n5ter deleted the feat/desktop-turn-approval branch August 30, 2026 00:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/LUnder 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@M4n5ter@jackwener