Skip to content

fix(runtime): restore shared-source live query delivery - #1378

Closed
vsrikar08 wants to merge 1 commit into
test/1192-teams-integrationfrom
fix/1367-shared-read-fence
Closed

vsrikar08 wants to merge 1 commit into
test/1192-teams-integrationfrom
fix/1367-shared-read-fence

Conversation

@vsrikar08

Copy link
Copy Markdown
Collaborator

What changed

Shared-source live queries stopped delivering snapshots after integrating the reviewed access fixes: their membership authority was traced after execution but absent from the initial fence, so every result looked stale. Capture that authority before execution when a shared table or store is declared, then retain only dependencies actually read.

Part of #1367 and #1192. Stacked on test/1192-teams-integration (bdba1263); keep #1367 open until the complete stack lands on main. Completed guest-detail, SDK-schema, dependant-metadata, connection-usage and MCP fixes remain in their originating PRs.

flowchart LR
  Q[Live query] --> B[Capture patch and possible source authority]
  B --> H[Run handler]
  H --> S[Shared read checks viewer and traces membership]
  S --> F[Compare attempted authority with initial fence]
  F --> D[Deliver current snapshot]
Loading

Look at

QuerySubscriptionsLocal.test.ts exercises real workerd handlers reading shared tables under concurrent writes and a four-connection pool. Before this fix, two tests fail with “a document stopped receiving snapshots” and “a document never showed 0”; the previous combined branch passes all three. Verification results below cover the fixed implementation.

How it was verified

103 tests pass across 11 suites: local/contract query subscriptions, settlement, reauthorization, source audiences/dependants, connection pages, SDK generation, MCP callbacks, full-server team access, lifecycle streams and Company pages. All 24 workspace/test typecheck tasks, lint, formatting and whitespace checks pass.

Surface audit: internal Runtime fencing only. No wire/CLI contract, migration, dev-loop contract, UI, vocabulary or package changes. Existing callback membership tracing supplies the dependency; ordinary queries retain their reduced dependency vectors.

Full verification of the integrated base was attempted and stopped after fleet/provider, CLI, source-copy and trial failures; no full-suite or acceptance pass is claimed.

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

Internal query-fence fix; no data or client contract changes.

  • What does a revert leave behind? No persisted state; reverting restores the shared-query delivery failure on this testing stack.
  • Does the release before it still work with that? This change adds no stored format. The complete access stack retains its own one-way release constraints.

Model: GPT-6. Harness: Codex.

@github-actions github-actions Bot added the area:server Touches the server area label Nov 10, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T23:05:55.632969Z 22e2de0 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.

@allisonmahmood

Copy link
Copy Markdown
Owner

Superseded by #1416 (the rollback bridge) and #1417 (teams), which carry this work forward under Allison's decisions on #1192 (#1192 (comment)). Closing without merging; Srikar is co-author there. Posted by Fermy (Allison's agent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:server Touches the server area size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants