Skip to content

fix(mobile): keep retired sections manager out of successor cache - #7873

Merged
wpfleger96 merged 2 commits into
mainfrom
wpfleger/mobile-sections-followups
Sep 24, 2026
Merged

wpfleger96 merged 2 commits into
mainfrom
wpfleger/mobile-sections-followups

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #7806.

  • A retired sections manager never writes the shared prefs cache. _persist() now returns once the manager is disposed. That covers every path a torn-down manager could take after an account or relay switch, including a late OK restoring its submitted layout and the dispose() flush's read-before-write merging a head. Before this change, both could overwrite the successor's cache on the same pubkey key.
  • Coverage:
    • a retired late OK and a retired flush pre-read both leave the successor's cache untouched
    • an edit made while an OK is held still publishes after the OK is released (_lastPublishedStore is built from the submitted store)
    • a same-second losing head adopted after a local edit still converges UI, cache and relay once our OK wins. The adopted layout's pending debounce is deliberately left armed, because its republish is what re-converges this race.

Residual: an edit made just before our own echo arrives can be replaced by that echo. This is existing behaviour on main and on desktop.

A newer layout from another device replaced the sections store but left
the edit's debounce armed, so it republished the peer's layout as a
redundant event. Cancel the waiting timer like desktop's
cancelPendingPublish; a publish already running is untouched.

A retired manager's late OK could also restore its submitted layout into
the successor's shared prefs cache; fence the restore on !_disposed.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96
wpfleger96 requested a review from a team as a code owner September 24, 2026 17:11
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 797012ff01a6d499959b45ed2e56f7927c6a4d6b...9a75f5432f07a8ada0818245c84477242632c59f.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 9a75f5432f07a8ada0818245c84477242632c59f to authorize a new review.
Any previous review applies only to its recorded range.

Drop the debounce cancel on remote adoption: the surviving republish is
what re-converges an OK that wins the cursor after a same-second loser
replaced the store. Guard _persist on _disposed so no retired-manager
path (late-OK restore or the dispose flush pre-read) writes the prefs
key its successor owns.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96 wpfleger96 changed the title fix(mobile): cancel pending sections publish on newer remote head fix(mobile): keep retired sections manager out of successor cache Sep 24, 2026
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Sep 24, 2026

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Review clear

HEAD 9a75f5432f07a8ada0818245c84477242632c59f; BASE 797012ff01a6d499959b45ed2e56f7927c6a4d6b. No actionable blocker found in this two-file fix. This is a comment, not merge approval.

  • The central persistence guard prevents a retired manager from initiating preference writes after disposal, including late relay OK restoration and the dispose-flush history continuation. I traced provider replacement, startup/resume reads, live callbacks, local edits and publish completion through the shared pubkey-keyed storage boundary. Active-manager persistence and existing relay-flush behavior are preserved.
  • The two retirement regressions exercise the production manager, signing/session path and storage with held history/OK responses, then verify the successor’s cache survives. The additional edit-during-OK and same-second convergence tests cover adjacent behavior. The latter establishes convergence, not preservation of every intervening local edit; the documented own-echo residual is unchanged and outside this fix.
  • Existing CI passed: mobile analysis, 2444 Flutter tests (4 skipped), and 3 push-unconfigured tests. Evidence is for synthetic merge 6ff82c9a435cf32ed556d3400efb3cc43fba4f8d of this exact head/base. Codex Security Review was cancelled, leaving the commit rollup red; resolve or explicitly disposition that separate gate before merge. No cancellation cause inferred.

Source-only review on pinned Blox2933794; no checkout, local tests, runtime probe or CI rerun. This guard does not add a durability/completion fence for preference writes initiated before disposal, or cancel inherited relay-side flushes.

@wpfleger96
wpfleger96 enabled auto-merge (squash) September 24, 2026 21:05
@wpfleger96
wpfleger96 merged commit 28a8b90 into main Sep 24, 2026
41 of 42 checks passed
@wpfleger96
wpfleger96 deleted the wpfleger/mobile-sections-followups branch September 24, 2026 21:12
wpfleger96 pushed a commit that referenced this pull request Sep 24, 2026
…c-agent-commit-identity

* origin/main:
  fix(mobile): keep retired sections manager out of successor cache (#7873)
  Select one feature flag provider at compile time (#7677)
  chore(release): release Buzz Desktop version 0.5.25 (#7867)
  fix(ci): consume the published MinIO image (#7870)
  fix(mobile): converge sidebar managers on relay head with resume re-read (#7806)
  fix(ci): bootstrap the reusable MinIO image in GHCR (#7869)
  Discover alternate Buzz ACP commands (#6948)
  fix(hooks): surface nextest failures and stale pnpm deps in pre-push (#7850)
  feat(acp): run one prepared task from a file or stdin (#7851)
  Fix mobile heart and warning emoji with native font fallback (#7842)
  chore(mesh): upgrade MeshLLM to 0.76.2 (#7559)
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>

# Conflicts:
#	Cargo.lock
TheSentinel454 added a commit that referenced this pull request Sep 24, 2026
…undation-local

* origin/main: (50 commits)
  feat(desktop): relay admin console for the /api/admin/v1 operator surface (#4768)
  fix(mobile): keep retired sections manager out of successor cache (#7873)
  Select one feature flag provider at compile time (#7677)
  chore(release): release Buzz Desktop version 0.5.25 (#7867)
  fix(ci): consume the published MinIO image (#7870)
  fix(mobile): converge sidebar managers on relay head with resume re-read (#7806)
  fix(ci): bootstrap the reusable MinIO image in GHCR (#7869)
  Discover alternate Buzz ACP commands (#6948)
  fix(hooks): surface nextest failures and stale pnpm deps in pre-push (#7850)
  feat(acp): run one prepared task from a file or stdin (#7851)
  Fix mobile heart and warning emoji with native font fallback (#7842)
  chore(mesh): upgrade MeshLLM to 0.76.2 (#7559)
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)
  fix: route databricks claude fqns to anthropic messages (#7829)
  feat(relay): add opt-in newest-first thread windows (#7823)
  refactor: move agent Git bootstrap into ACP harness (#7819)
  Use worker snapshots for relay storage metrics (#7845)
  fix(hooks): strip repo-local git env from pre-push test lanes (#7841)
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  ...
Signed-off-by: tornquist <tornquist@squareup.com>
TheSentinel454 added a commit that referenced this pull request Sep 24, 2026
…t/osc-event-write-chokepoint

* commit 'a6a3032e446e6e66e8e41a229ef655ea79f36202': (50 commits)
  feat(desktop): relay admin console for the /api/admin/v1 operator surface (#4768)
  fix(mobile): keep retired sections manager out of successor cache (#7873)
  Select one feature flag provider at compile time (#7677)
  chore(release): release Buzz Desktop version 0.5.25 (#7867)
  fix(ci): consume the published MinIO image (#7870)
  fix(mobile): converge sidebar managers on relay head with resume re-read (#7806)
  fix(ci): bootstrap the reusable MinIO image in GHCR (#7869)
  Discover alternate Buzz ACP commands (#6948)
  fix(hooks): surface nextest failures and stale pnpm deps in pre-push (#7850)
  feat(acp): run one prepared task from a file or stdin (#7851)
  Fix mobile heart and warning emoji with native font fallback (#7842)
  chore(mesh): upgrade MeshLLM to 0.76.2 (#7559)
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)
  fix: route databricks claude fqns to anthropic messages (#7829)
  feat(relay): add opt-in newest-first thread windows (#7823)
  refactor: move agent Git bootstrap into ACP harness (#7819)
  Use worker snapshots for relay storage metrics (#7845)
  fix(hooks): strip repo-local git env from pre-push test lanes (#7841)
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  ...

Signed-off-by: tornquist <tornquist@squareup.com>

# Conflicts:
#	crates/buzz-db/src/store/event.rs
brow added a commit that referenced this pull request Sep 25, 2026
…ction

* origin/main: (21 commits)
  docs(vision): add /buzz/v1 read endpoints to the protocol contract (#7879)
  🤖 fix(justfile): point just staging at the current staging relay (#7881)
  fix(relay-admin): make thread deletions atomic and fence expired action leases under row lock (#7853)
  feat(desktop): relay admin console for the /api/admin/v1 operator surface (#4768)
  fix(mobile): keep retired sections manager out of successor cache (#7873)
  Select one feature flag provider at compile time (#7677)
  chore(release): release Buzz Desktop version 0.5.25 (#7867)
  fix(ci): consume the published MinIO image (#7870)
  fix(mobile): converge sidebar managers on relay head with resume re-read (#7806)
  fix(ci): bootstrap the reusable MinIO image in GHCR (#7869)
  Discover alternate Buzz ACP commands (#6948)
  fix(hooks): surface nextest failures and stale pnpm deps in pre-push (#7850)
  feat(acp): run one prepared task from a file or stdin (#7851)
  Fix mobile heart and warning emoji with native font fallback (#7842)
  chore(mesh): upgrade MeshLLM to 0.76.2 (#7559)
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)
  fix: route databricks claude fqns to anthropic messages (#7829)
  feat(relay): add opt-in newest-first thread windows (#7823)
  refactor: move agent Git bootstrap into ACP harness (#7819)
  Use worker snapshots for relay storage metrics (#7845)
  ...

Signed-off-by: Tom Brow <tomb@block.xyz>
wpfleger96 pushed a commit that referenced this pull request Sep 25, 2026
…rcement

* origin/main:
  docs: specify durable data backfills (#7326)
  docs(vision): add /buzz/v1 read endpoints to the protocol contract (#7879)
  🤖 fix(justfile): point just staging at the current staging relay (#7881)
  fix(relay-admin): make thread deletions atomic and fence expired action leases under row lock (#7853)
  feat(desktop): relay admin console for the /api/admin/v1 operator surface (#4768)
  fix(mobile): keep retired sections manager out of successor cache (#7873)
  Select one feature flag provider at compile time (#7677)
  chore(release): release Buzz Desktop version 0.5.25 (#7867)

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
brow added a commit that referenced this pull request Sep 25, 2026
…ivery

* origin/main:
  feat(relay): enforce NIP-FI assertion+NIP-98 pairing on HTTP ingress (#7264)
  fix(ci): run the admin disabled-mode DB test in the PostgreSQL lane (#7900)
  🤖 docs: add pre-PR checklist and review guidance to AGENTS.md (#7897)
  docs: specify durable data backfills (#7326)
  docs(vision): add /buzz/v1 read endpoints to the protocol contract (#7879)
  🤖 fix(justfile): point just staging at the current staging relay (#7881)
  fix(relay-admin): make thread deletions atomic and fence expired action leases under row lock (#7853)
  feat(desktop): relay admin console for the /api/admin/v1 operator surface (#4768)
  fix(mobile): keep retired sections manager out of successor cache (#7873)

Signed-off-by: Tom Brow <tomb@block.xyz>

This branch was successfully deployed

No deployments
codex-review — 9a75f543 Deployed Sep 24, 2026 by wpfleger96 via Run Codex Security Review #5532
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.

2 participants