Skip to content

fix(mcp): preserve invoking turn identity - #360

Open
wibus-wee wants to merge 4 commits into
mainfrom
fix/mcp-turn-principal
Open

fix(mcp): preserve invoking turn identity#360
wibus-wee wants to merge 4 commits into
mainfrom
fix/mcp-turn-principal

Conversation

@wibus-wee

Copy link
Copy Markdown
Member

Summary

  • derive delegated identity from the exact persisted Turn while keeping the daemon owner as the execution host
  • route Session ownership, member-scoped Machine/GitHub access, and downstream Turn attribution through that principal
  • freeze principal provenance across Operation retries, recovery, and completion continuations; reject cross-Turn operation id reuse

Validation

  • pnpm --filter lody typecheck
  • pnpm --filter lody exec vitest run src/mcp/lody-mcp-server.test.ts src/orchestration/operation-store.test.ts src/orchestration/operation-coordinator.test.ts (100 tests)
  • pnpm --filter lody exec vitest run src/commands/session.test.ts -t "delegated principal"
  • scoped Prettier check
  • pnpm check:public-boundary
  • scoped type-aware Oxlint (0 errors)

Full session.test.ts was also attempted. Three existing Git fixture tests fail before assertions because this machine enables global GPG signing without the corresponding private key; all identity-related tests pass.

Route delegated session creation and chat through the exact persisted Turn principal while keeping machine credentials scoped to the executor. Freeze that provenance for retries, recovery, and continuation delivery.

Model: gpt-5
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-09-03T17:02:21.500507Z 40b4a4d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@wibus-wee
wibus-wee force-pushed the fix/mcp-turn-principal branch from 5aab8dc to 40b4a4d Compare September 4, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant