Skip to content

Finish install 24's half restore of install 22's backup - #2780

Merged
trissim merged 4 commits into
mainfrom
fix/finish-interrupted-restore
Oct 23, 2026
Merged

trissim merged 4 commits into
mainfrom
fix/finish-interrupted-restore

Conversation

@trissim

@trissim trissim commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Cutover done. tools/cutover/finish_interrupted_restore.py ran once on the live root on 2026-10-23, 12:06:22–12:12:41, and exited 0. Publication took 6.1 s and ServingProbe 2.1 s. .root-runtime.json named core-f3f069fb8 and the restoring marker was gone. Install 26 from main 66e63fe then exited 0 in 186 s, and the live root is now on core-66e63fe8b. The tool is deleted in cd2c51c.

What lands

  • StoreBackup.restore recreates the missing parent directories of a saved file. Install 24 died at mkstemp(dir=target.parent). Test: test_store_backup_restores_a_file_whose_directory_a_carry_deleted.
  • tools/cutover/carry_selected_tool_slots.py, restored from a00663d^ with SavedSessionFile renamed to BusTranscriptFile.

The selected-tool carry is still owed on the live root. Read-only counts after install 26:

  • 60 selected-tool-ledger directories hold 118,271 files, 59,035 of them .done acknowledgements.
  • selected_tool_slot in coordination.sqlite3 has 0 rows.

Main's carry chain (install 26's step list: retired_stores … commander_project_carry, reconcile-stores) has no selected-tool step. So until the carry runs, src cannot see those slot identities. The live run of this tool is the commander's call, under the maintenance hold. It is not part of this PR's merge.

Not this PR, owner named: the live root holds 19,079 .<name>.lock files, 8,812 of them created on 2026-10-23 and none inside the ledger directories. PracticeCopy.include (practice.py:118) calls the base RootFile.copy_group. That takes a shared _store_lock (locked_store.py:118-122) on files no writer ever locks, so each one leaves a lock file behind. The fix belongs at locked_store.py:118-122: lock only the store-lock owners, the way SQLiteFile.copy_group already overrides it.

🤖 Generated with Claude Code

Citation fixture and others added 2 commits October 23, 2026 10:04
…deleted parents

Install 24 (before #2779) took install 22's completed backup for an interrupted
restore and copied it over the live root. It replaced .root-runtime.json,
.registry-owner-guard, bus.sqlite3 and coordination.sqlite3 with their pre-22
contents, then died at mkstemp(dir=target.parent): install 22's carry had deleted
imported_sessions/selected-tool-ledger. The live root is now owned by f3f069f
while current selects 7017468, so no client attaches (install 25's
ForeignRuntimeError).

- StoreBackup.restore recreates a saved file's missing parent directories, so a
  rollback after a carry that removed a directory restores it instead of dying.
- tools/cutover/finish_interrupted_restore.py finishes that restore once with the
  installer's own StoreBackup.restore under the maintenance hold, then selects
  the runtime the restored root names through Stack.publish. The backup is never
  retired. Delete it after its one live run.
- carry_selected_tool_slots comes back (deleted in a00663d): the restored root
  holds the ledger files again, so the next install carries them again.
  SavedSessionFile is BusTranscriptFile since 502f3d8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backup digests hash SQLite iterdump text; the runtime's SQLite 3.50.4 matches
files.json, a newer SQLite does not, and restore then refuses on bus.sqlite3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trissim and others added 2 commits October 23, 2026 12:16
finish_interrupted_restore.py ran once on the live root on 2026-10-23
12:06:22-12:12:41 with exit 0; install 26 from 66e63fe then exited 0.
The selected-tool carry stays: the live root still holds 118,271 legacy
ledger files and selected_tool_slot has 0 rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim marked this pull request as ready for review October 23, 2026 16:17
Copilot AI balanced review requested due to automatic review settings October 23, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@trissim
trissim merged commit 1a33211 into main Oct 23, 2026
14 checks passed
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