Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
✅ Deterministic PR hygiene checks passed. |
|
Thanks @luvs01 — this branch doesn't allow maintainer edits, so I carried it as #7129 with your commit cherry-picked unchanged and a One follow-up there: the writer still reread the profile for the backup and reread the |
|
Superseded by #7129 (your commit cherry-picked unchanged, Co-authored-by). Thank you! |
…7084) (#7129) * fix(claude): verify Desktop backup and optional metadata reads * fix(claude): back up and roll back Desktop profiles from one verified read The gateway writer read the profile for foreign-key preservation, reread it for the backup, and reread the backup for rollback. A .bak swapped between replacement and rollback made rollback refuse, leaving the new profile beside the old metadata. One verified snapshot now feeds all three, rollback restores those bytes, and a profile created by the failed apply is removed so retries cannot accumulate unreferenced profiles. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> * fix(claude): refuse stale Desktop snapshots and retain rollback errors Revalidate verified profile bytes before backup and in the no-follow publication hook, refusing drift without retries. Keep metadata publication errors primary when profile restoration or cleanup also fails, and report both failures. Cover concurrent edits and rollback failures with regression tests. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> * fix(claude): roll back a Desktop profile only while it still holds our bytes When metadata publication fails, restore or cleanup now re-reads the profile through the verified reader and acts only if it still equals the bytes this apply published, using the same compare-and-swap helper that guards publication (also enforced before the restore rename). A profile another writer changed is preserved and the metadata error is reported with the rollback skipped. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> * docs(claude): describe ownership-aware Desktop profile rollback Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> --------- Co-authored-by: Epinephrine <27862058+luvs01@users.noreply.github.com> Co-authored-by: GOAT <goat@localhost>
Summary
Verification
Head
cbd07c11c0b56830bc9ef178150cf02c78e69c25, based on dev9b31677c4704215e8f3db1c321a38b36b40062a9. One commit, seven files (+218/-12).Runtime Bun 1.4.2; repository test runner Bun 1.4.3. Tests use the normal preload/home protections and real fixture SQLite lifecycle locks.
bun run typecheck,bun run structure:check,bun run privacy:scan, andgit diff --check: passed. Privacy scope is the materialized sparse checkout, including every changed file.scripts/test-temp-lock.ts:78(SyncSubprocess.signalis absent from the Bun type). The repositorytypecheckabove coverssrc/; no new-test-file diagnostic was reported. Typechecking the unchangedtests/helpers/remove-tree.tsalone produces the same single error.bun run build:gui: passed. Docs frozen-lockfile install andASTRO_TELEMETRY_DISABLED=1 bun run build: passed, 577 pages and 81,200 internal links checked.bun scripts/test.ts --parallel=1 --timeout 60000 tests/clients/desktop-3p-write-files.test.ts: 9 new cases passed, including real writer backup and rollback FIFO swaps in bounded child processes, repeated dangling-metadata refusal, exact backup bytes, stale backup handling, read errors, and normal publication/rollback controls. With only the two runtime files restored to base9b31677c4704215e8f3db1c321a38b36b40062a9, these tests produced 3 passes / 6 failures; both FIFO cases reached the child timeout.bun scripts/test.ts --changed=9b31677c4704215e8f3db1c321a38b36b40062a9 --parallel=2 --bail=1 --timeout 60000: selected 1,321 of 2,319 test files; stopped after 106 files with 2,190 passes / 13 failures in the existing GitHub Copilot bearer/origin snapshot suite (67.2 seconds). This broader run is not green.Related regression command
The initial invocation also included a nonexistent refresh-only filename, which selected no tests and is not claimed as coverage. The expanded test typecheck used
bun x tsc --ignoreConfig --noEmit --target ESNext --module ESNext --moduleResolution bundler --resolveJsonModule --types bun-types --strict --esModuleInterop --skipLibCheck, targeting either the new regression file ortests/helpers/remove-tree.ts.The missing-inventory check was rerun with
--test-name-pattern='fixture histogram' tests/test-layout-tooling.test.ts: 1 pass, 0 fail, 24 filtered out. The 120/4 count combines these results without recounting passed cases.The full suite and native macOS/Windows validation were not run in this shared Linux sandbox. Full-suite execution is disproportionate to this scoped Draft with existing environment failures; the focused regressions are the local behavior evidence. Four existing picker-profile failures also reproduce on the unchanged base (4 passes / 4 failures); they remain failures, not passing coverage. No guard was disabled to reach the writer. Independent security review remains outstanding; author validation is not independent approval. The PR remains Draft pending independent review.
Exact-head hosted verification (snapshot at 2026-10-13 22:33:20 UTC, before verification-only description edits): head
cbd07c11c0b56830bc9ef178150cf02c78e69c25has 21 successful check runs, 8 conditionally skipped, and no failed or pending checks. Cross-platform CI and its aggregatecijob completed successfully on attempt 1; all four Linux test shards passed. Catalog async contracts, React Doctor, and the PR policy workflows also succeeded. Skipped native jobs are not validation evidence. No rerun or manual dispatch was requested. These results do not erase the local failures or establish independent security approval; this PR remains Draft.Checklist
Summary by CodeRabbit