Skip to content

🤖 docs: contract for two backends sharing one Xum root - #4802

Merged
ThomasK33 merged 3 commits into
mainfrom
docs/concurrent-backends-contract
Sep 27, 2026
Merged

ThomasK33 merged 3 commits into
mainfrom
docs/concurrent-backends-contract

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Documents the cross-backend contract that the multi-backend fencing plan established, in one canonical code comment and one user-docs section. No product code changes.

Background

Last PR of the multi-backend fencing plan (#4727, #4754, #4762, #4772, #4783 merged). Two full backends can share one Xum root: the desktop app beside a xum server that started first (the desktop then skips only its API server), or any pair under XUM_ALLOW_MULTIPLE_INSTANCES=1. The earlier PRs made one rule hold; this PR writes it down where the next change will see it, and tells users what works when they run both apps.

Implementation

  • processLiveness.ts: a CONCURRENT BACKENDS block next to the existing DEPLOYMENT CONTRACT. It states the rule, what is serialized across backends (config CAS, the history write lock, the lock kits including the workspace-turn live-owner locks), what stays per process (streams, Stop, owned attempts, busy guards, delegated-turn reservations), the two guarantees under misuse, and which writes the attempt fences cover (and that an already-running execution's own effects are not fenced), and what is not guaranteed (startup recovery of a live backend's active tasks, UIs not observing the other backend's writes, mixed versions 🤖 tests: finish cross-process lock hardening (holder in fileLock errors, macOS/Windows qualification, mixed versions) #4480).
  • Pointers to it from the existing scope comments: WorkspaceService context-mutation admission guard, delegatedRootUnavailable (peer admission is a process-local courtesy, 🤖 fix: delegated-turn reservation is process-local, so unrelated admission can race across backend instances #4446), listInstanceWorkspaces (activity and delegated-turn state are this backend's), and the subagentAttemptSettlements.ts header.
  • docs/config/server-access.mdx: new section "Running the desktop app and xum server together": what is shared, what stays consistent, what does not work across the two (including that an open chat does not see the other app's writes until reload), "do not drive one workspace or task from both at once", and the startup recovery caveat. That claim was verified in code: recoverInterruptedTasks re-queues starting tasks and re-drives running/awaiting_report tasks, guarded only by process-local isStreaming/isBusyForMessage.

Remaining gaps and the upgrade path (per-attempt live-owner lock, which would also complete #4545) are tracked in #4801, together with the two deferrals from #4772 and the init-status side finding from #4783's dogfood.

Validation

  • make static-check-full passes, including mintlify broken-links.
  • Rendered with the Mintlify dev preview (desktop and 390 px); screenshots below.

Docs section at desktop width

Docs section at 390 px

Risks

None at runtime (comments and docs only).

Refs #4446, #4311, #4545, #4801


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $54.64

@mintlify

mintlify Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Mux 🟢 Ready View Preview Sep 27, 2026, 1:36 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 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 ✅ Completed 2026-09-27T01:38:45.362118Z 90b5479 New commits
🔒 Security Review ✅ Completed 2026-09-27T01:39:20.051436Z 90b5479 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6d31f130e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/config/server-access.mdx Outdated
Comment thread docs/config/server-access.mdx
Comment thread src/node/utils/concurrency/processLiveness.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc4a749a45

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/agentSkills/builtInSkillContent.generated.ts Outdated
@ThomasK33

Copy link
Copy Markdown
Member Author

Readiness record for 90b5479:


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

This branch was successfully deployed

1 active deployment
staging - docs — 90b54794 Deployed Sep 27, 2026 by mintlify[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