Skip to content

Propagate community leave across windows - #1866

Draft
dr0uleau wants to merge 3 commits into
drouleau/durable-artifact-storefrom
nexus/fix-community-leave-across-buzz-windows-e029f742
Draft

dr0uleau wants to merge 3 commits into
drouleau/durable-artifact-storefrom
nexus/fix-community-leave-across-buzz-windows-e029f742

Conversation

@dr0uleau

@dr0uleau dr0uleau commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

When one window leaves a community, another window can retain its membership and recreate the purged artifact data. This closes the deferred leave defect.

What

Propagate saved membership and selection changes across windows. Close stale artifact handles and reject stale opens and queued work. Permit new handles after explicit rejoin.

How

Read changed device records before snapshots and commands. Defer notifications from those reads to prevent a second account-sync drain. Give each new local membership a generation, including memberships added by account sync. Bind artifact handles and transactions to that generation.

Leave takes the artifact partition lock before membership removal and holds it through purge. New collections wait for that purge before they initialize. The operator approves edits to the FOUNDATION community service and its tests for this scope.

Risk

This changes the shared membership owner and artifact initialization. Existing records remain readable. The database schema stays the same. Artifact initialization needs Web Locks. Full native-app and human acceptance remain unverified.

Testing

Seven browser cases are added; none are removed. Real storage events, IndexedDB, and Web Locks need separate windows. The cases cover leave with and without purge, delayed events, explicit and synced rejoin, rejoin during a held purge, and an import queued behind leave. The original code fails in both engines. The review regressions also fail before their fixes. Removing transaction scope guards lets the queued import succeed in both engines.

At b0becc964, all 42 checks in the affected browser files pass in Chromium and WebKit. All 347 related service checks pass on the same production code. TypeScript passes. The agent review runs once; its three findings have fixes and regression checks.

The full browser CI discovery file passes four checks, including discovery of every selected case in both engines. Its unchanged setup probe fails locally with exit code 11. The isolated probe passes; the full-file failure remains open. A separate WKWebView probe on this Mac reports a secure context and Web Locks at tauri://localhost. This is host capability evidence, not native Buzz acceptance. Native-app and human tests remain pending.

Hosted CI passes at b0becc964. Native-app and human acceptance remain pending.

Bigger picture

Stack Info: Based on PR #1501. PR #1507 consumes the existing collection abort signal for sync cancellation. This task does not change either branch. PR #1815 has no community service diff.

Generated with Codex

dr0uleau and others added 3 commits October 28, 2026 15:30
Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
Co-authored-by: Codex <noreply@openai.com>

* origin/drouleau/durable-artifact-store:
  Align CI discovery with local scale checks
  Keep artifact scale checks local

Signed-off-by: Daniel Rouleau <drouleau@squareup.com>
@dr0uleau
dr0uleau requested a review from gilgtm October 28, 2026 23:29
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