Repository navigation
fix(drafts): adopt legacy state atomically and preserve clear ownership - #26642
teamleaderleo wants to merge 21 commits into
Conversation
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Passes: CI passes on CI passes on Written by web and size checks: green Gallery before/after for
States
Pick other states with a |
2e39dc9 to
3ceb95c
Compare
52f425e to
600202e
Compare
|
Bead |
|
Found 5 test failures on Blacksmith runners: Failures
|
|
Review (codex gpt-6-astra high, next-review): BLOCK at 600202e
|
600202e to
b173c4c
Compare
Leo: drafts must survive an update and relaunch, including attachments. Agent-Session: unknown Agent-Session: nx-composer-draft-persistence
b173c4c to
0022f05
Compare
Preserve current per-tab and per-session values, import only missing legacy drafts, and keep draft text requests on the injected files lane. Complete migration before wake and service readers start. Agent-Session: https://cmux.com/deeplink/agent?id=aid-8284337bbcbcfb8957d8
|
Owned by an agent session · session |
Keep identity, atomic adoption, durable writer ownership and failure coverage in the foundation; restore the complete text route in the dependent PR. Agent-Session: https://cmux.com/deeplink/agent?id=aid-8284337bbcbcfb8957d8
Bugbot needs on-demand usage enabledBugbot 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. |
Source-only regression under native HOLD #26809/HQ4779. The finalization API is introduced by the following repair commit. Agent-Session: https://cmux.com/deeplink/agent?id=aid-8284337bbcbcfb8957d8
After all session-end and retry steps, fence unsent draft mutations on the main actor, then await the existing ordered files-lane flush. Cancelled quits never reach this committed boundary; the shared background owner remains open for the final Home flush. Agent-Session: https://cmux.com/deeplink/agent?id=aid-8284337bbcbcfb8957d8
Default changesThis pull request changes 1 default at
Needs a review. It passes with an independent review receipt on this commit: a comment or review whose first line is Regenerate the snapshot with |
|
Heads-up: #26963 touches the same draft persistence code ( |
|
Review (codex gpt-6-astra, router-review): BLOCK at 87d8459 GraphQL: API rate limit already exceeded for user ID 13091533. Visual verdict: no images supplied (range review); the visual verdict must come separately
Static review completed; native tests could not run here because this box has Linux and no Swift toolchain. exit=1 |
|
At current head |
1 similar comment
|
At current head |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Legacy draft adoption could leave partial attachments or resurrect an intentional clear after a copy or publication failure. Keep draft state under its stable logical-channel root, adopt only exact supported legacy identities, and preserve every current destination draft, including empty clear values.
Migration stages the current root and each artifact, retains per-artifact completion markers and current ownership, and publishes through one Darwin
renamex_npexchange/exclusive rename. Failed publication leaves canonical data intact. Attachment writers persist independent per-chat ownership before moving files, clearing, error cleanup or pruning; those markers survive outside deleted chat folders and prevent both preexisting and newly created chats from reappearing on a retry. Wake consumption/save records ownership before mutation. Unsent drafts retain empty-key and moved-from tombstones; ordered saves use the injected appBackgroundWork.filesowner with a shutdown hold, and seed/hasDraft ignore empty tombstones. Once quit is irrevocably committed and all session-end/retry steps finish, the unsent store fences new producers and awaits its ordered files lane before browser shutdown. Cancelled quits remain writable, and the shared background owner remains open for the final Home flush.The startup barrier completes adoption before draft readers or wake restoration. Regressions retain sibling/leaf copy failures, failed publication with missing/empty/current roots, current and late-created chat clears, ownership-write failure, unrelated malformed artifacts, consumed wake state, unsent clears/moves, shutdown/relaunch, a blocked files lane for Keep and End with text/empty clears, late callbacks during finalization, cancelled-quit writability, channel isolation and backward-compatible draft schemas. Native test sources are authored; runtime behavior remains unverified while native execution is on HOLD.
Exact head:
87d8459a652168f33482c2012f9203e20156df2a. Actualfeat-cmux-nextmerge base:9445568053d73aaed41afefe1e7afa0dd9246aee. Foundation diff: 14 files, 796 insertions and 35 deletions (831 total). This is slightly above the initial approximately 800-line budget because the quit durability repair retains 71 native regression-source lines for blocked-save, late-callback and cancelled-quit behavior. Those regressions are in distinct source commit30bd9c9ea1d; the quit wiring is commit87d8459a652. The off-main unsent owner remains isolated in commit6b3634097d3.Dependent text/hydration draft #26842 is frozen at
b37323992f8e3e5e21627e49408761b4ffca4e64, still based on the previous foundation head30d5897, pending one rebase onto this repaired head. Its relative diff is 335 lines. It contains daemon/native text recovery, provider wiring, and the first-session web handshake repair. NewTab/Quick stack on that text lane; queue uses this foundation'smarkCurrentAPI.Validation: exact-head prepush gate against the merge base reports no new violations; diff check is clean. The foundation has no web source diff; the unchanged web tree passed the full web check. The dependent text route passed its exact-head web-lint wrapper and 36 focused composer tests/67 assertions. Native compilation and tests remain UNEXECUTED/HOLD under #26809/HQ4779. Fresh whole-diff exact-head review and native verification remain required; the composer P0 root session owns the final primary review, required-check reconciliation and guarded landing.
Agent session: agent session