Repository navigation
backfill missing compat manifest on open - #952
Open
chm-diederichs wants to merge 1 commit into
Open
chm-diederichs wants to merge 1 commit into
chm-diederichs wants to merge 1 commit into
Conversation
Cores migrated from hypercore 10 storage can have blocks but no stored manifest. On open, if the stored tree signature verifies against the default signer manifest for the key, persist that manifest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The change affects writable Hypercore opens that have a missing manifest. The PR appears safe to merge, with a non-blocking gap in the persistence test.
|
Comment on lines
+1822
to
+1824
| const again = await open(key) | ||
| await again.ready() | ||
| t.ok(again.core.header.manifest, 'manifest persisted') |
There was a problem hiding this comment.
The “manifest persisted” check can pass even if nothing was saved. again.ready() runs recovery again when storage still has no manifest, so removing the recovery write would leave this assertion green. Check the stored getAuth() result after the first recovery, or reopen with read-only storage so recovery cannot hide a missing write.
Prompt To Fix With AI
This is a comment left during a code review.
Path: test/manifest.js
Line: 1822-1824
Comment:
**Test misses unsaved manifests**
The “manifest persisted” check can pass even if nothing was saved. `again.ready()` runs recovery again when storage still has no manifest, so removing the recovery write would leave this assertion green. Check the stored `getAuth()` result after the first recovery, or reopen with read-only storage so recovery cannot hide a missing write.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.This branch has not been deployed
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.
Cores migrated from hypercore 10 storage can have blocks but no stored manifest. On open, if the stored tree signature verifies against the default signer manifest for the key, persist that manifest.