Verification spike: issue #29 durable atomic skill-tree swap - #69
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verdict on #29 today
Mostly done for the safety invariant; still needed for consolidation and durable naming.
Post-#68 / closed-#26, the original silent
TempDirdrop on refresh replace is fixed. Tree replace paths (publish_staged_treeand its six callers) implement stage → live→backup → publish → restore-or-keep. Manifest pair writes and binary update follow the same “orphans are explicit” rule via independentkeep()paths.What remains open for #29:
publish_staged_tree,manifest::write_atomic,update::replace_binary).tink-update-*,.skills-manifest-backup-*,.tink-backup-*)library::deposit_atdivergent repair —clear_paththeninstall_localwith no backup (residual data-loss class gap)Full analysis:
docs/issue-29-verification-spike.mdCall-site matrix
publish_staged_tree+ 6 callers (refresh,rollback,manage_tink,library::promote,skillsets×2)keep()install_local(Ready)library::deposit_at(Divergent)manifest::write_atomickeep()update::replace_binarykeep()Detailed inventory with file:line references is in the spike doc.
Residual risks
.tink-orphan-*stable namesdeposit_atdivergent path deletes the library tree before reinstall with no recovery backupRecommended next implement slice (one PR)
publish_staged_treeonly (~1 module):<dest-root>/.tink-orphan-<name>-<suffix>and name it in the errorDefer manifest/binary unification and
deposit_atdivergent repair to follow-up issues.Changes in this PR
docs/issue-29-verification-spike.md— full inventory, refreshed Refactor: durable atomic skill-tree swap (shared helper) #29 checklist (skill refresh can drop skill tree if post-swap restore fails #26 item marked done), gap matrix, test evidencemanifest::tests::write_atomic_restores_manifest_when_lock_publish_failsupdate::tests::replace_binary_retains_recovery_backup_when_rollback_failsdocs/TESTING.mdTests run
All passed on Linux x86_64.
Relates to #29