Skip to content

base red: the apps sidebar's start-up receipts take no resource revision (from #33016) - #35842

Merged
cmux-bot[bot] merged 2 commits into
feat-cmux-nextfrom
fix/apps-sidebar-receipts-take-no-revision
Nov 4, 2026
Merged

cmux-bot[bot] merged 2 commits into
feat-cmux-nextfrom
fix/apps-sidebar-receipts-take-no-revision

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Base red on feat-cmux-next: cmux-tui::terminal_host_recovery interrupted_public_creation_publishes_once_and_replays_stable_ids_after_two_restarts fails at terminal_host_recovery.rs:3637 (revision "2" where "1" is expected) in every run since e17575a (#33016). Bisected on the fleet (the test alone, Linux): green at 9168b56, red at e17575a.

Cause (product): #33016 seeds sidebar placement receipts at every daemon start, "On upgrade, receipt existing installs without changing the layout" ("Only metadata is written"). It wrote them with commit_sidebar_ops, a resource commit, so each fresh daemon spent resource revision 1 (and a journal record and a resource event) on a mutation that changes no resource, and the first real change became revision 2. The test counts creation commits only.

Fix: the receipts and the apps.sidebar.initialized marker are written as registry metadata in one transaction (Mux::write_registry_meta, WorkspaceRegistry::write_meta), with the same is_migrated gate (no document, no marker, so the next start initializes again) and the same double check of the marker. No resource revision, no journal record, no event. I asked Leo on #33016 at 16:56Z which side he wanted; no answer by 19:00Z, so per the PL's rule I took the side that matches #33016's stated intent (metadata only, layout unchanged).

Testing

  • Red at the base of this branch (feat 5c62c06, job d0fc910521dca784b7e0c684): the test fails, revision "2".
  • Green at the head d1bed90: the test alone on Linux (job 53433bcaae55b933cb629370) and macOS (job e9aba00e986e6ce1f5b79e9e, at 0087b3c, same code before a clippy-only follow-up); full Linux run (job b2587e94642cd3bf7875cec7): it passes; Linux all with filter sidebar (job da24016ac3d4a37c35a684b7): 280 of 280 pass (the apps sidebar migration and retry tests included), clippy pass, fmt red only on files this PR does not touch (base).
  • python3 scripts/cmux-next/prepush-gate.py: no new violations.

Observed / Not run

  • Observed: the results above.
  • Not run: an app launch that reads cursor.revision at start.

Changelog

none


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes interrupted_public_creation_publishes_once_and_replays_stable_ids_after_two_restarts by stopping the apps sidebar's start-up receipts from consuming a resource revision.

Seeding the receipts via commit_sidebar_ops made a fresh daemon spend revision 1 on metadata-only writes, so the first real change became revision 2. The receipts and the apps.sidebar.initialized marker are now written as registry metadata in a single transaction through the new write_registry_meta path, which takes no resource revision, writes no journal record, and publishes nothing. The same migration gate applies: if the sidebar document migration did not complete, initialization is skipped and retried on the next start.

Written for commit d1bed90. Summary will update on new commits.

View guided diff Turn on auto-fix

…urce revision

#33016 seeds sidebar placement receipts at every daemon start "without changing the layout"
("Only metadata is written"). It wrote them through commit_sidebar_ops, a resource commit, so
each fresh daemon spent resource revision 1 on a mutation that changes no resource and
publishes nothing, and the first real change became revision 2.
terminal_host_recovery's interrupted_public_creation_publishes_once_and_replays_stable_ids_after_two_restarts
(red on feat since e17575a: revision "2" for "1") counts creation commits only. The
receipts and the initialized marker are now written as registry metadata in one transaction,
under the same migration check (no document, no marker, so the next start initializes again).
@lawrencecchen lawrencecchen added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@cursor

cursor Bot commented Nov 4, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review d1bed90: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr35842 -f ref=fix/apps-sidebar-receipts-take-no-revision -f platform=macos -f backend_mode=local

Shipped in:

@lawrencecchen

Copy link
Copy Markdown
Contributor Author

Review (independent review subagent, Claude): SHIP at d1bed90

Same receipts, same is_migrated gate (rollback leaves no marker, so the next start retries) and the same double check of the marker. What commit_sidebar_ops added (revision, idempotency row, empty journal record, resource event) existed only for the bump; sync_from_legacy is not needed because initialize never reads the document. write_meta takes the registry lock then the connection, as read_state does; its callers hold no mux or registry lock. No test or caller expects initialize to take a revision. Read only; no build or test by the reviewer.

@lawrencecchen lawrencecchen added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Nov 4, 2026
@cmux-bot
cmux-bot Bot merged commit a0cbb04 into feat-cmux-next Nov 4, 2026
231 of 246 checks passed
@cmux-bot
cmux-bot Bot deleted the fix/apps-sidebar-receipts-take-no-revision branch November 4, 2026 20:00

This branch was previously deployed

1 inactive deployment
ci-routing-agent — d1bed903 Deployed Nov 4, 2026 by lawrencecchen via cmux-tui tree preflight #112801
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant