GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(id-store): migrate legacy metadata to signed snapshots by dezren39 · Pull Request #13320 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: f580291254
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| //! The crate-root export belongs to slice 9110-02; until that lands | ||
| //! the integration test includes this module (and | ||
| //! `sidecar_snapshot`) by path. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Declare the migration module in the crate root
The new implementation is not declared in id-store's module tree, so downstream consumers cannot call the migration API; the integration test only compiles a private copy via #[path]. Repository-wide search found no production declaration, and the repository's module-reach check reports sidecar_migration.rs as UNREACHED. Declare the module and its required snapshot dependency in the crate root in this change rather than deferring the wiring to another slice.
AGENTS.md reference: pkgs/id/AGENTS.md:L150-L150
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if current_snapshot.view()? == view { | ||
| return Ok(MigrationOutcome::AlreadyMigrated { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Validate the requested subject and scope before returning a no-op
When the supplied current snapshot has the same metadata values but belongs to a different subject, namespace, or tenant than params, this branch returns AlreadyMigrated for the unrelated chain. The subject and scope checks in head.advance() only run when the view changes, so identical metadata bypasses them entirely. Compare the current snapshot's subject and scope against the requested parameters before deciding that migration is already complete.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if let Some((head, current_snapshot)) = current { | ||
| current_snapshot.verify(&ProfileDispatch::default())?; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Verify the current head before returning it unchanged
For an unchanged source view, a head with a corrupted signature is accepted as long as its snapshot ID and generation match the valid snapshot. Only current_snapshot.verify() runs before this return; head verification occurs inside head.advance(), which the no-op branch skips. Consequently, migration reports success and returns an invalid signed head instead of rejecting the unverified current record. Call head.verify() before either outcome is selected.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| #[serde(tag = "type", content = "target")] | ||
| pub enum LegacyMetaLink { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reject unknown fields inside legacy link objects
When a legacy tag's link contains an additional field, such as {"type":"Name","target":"guide.md","namespace":"other"}, Serde silently ignores that field because LegacyMetaLink lacks deny_unknown_fields. The attributes on LegacyMetaDoc and LegacyMetaTag do not propagate into this nested enum, so the source passes validation and migration signs a converted view with the extra link information discarded. This defeats the bridge's explicit guarantee that fields outside its pinned schema reject rather than being silently dropped. Apply strict unknown-field handling to the link enum as well.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing as superseded. This PR implements the A9114-snapshot-migration scope for #10270 (the same two files: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Add legacy metadata read bridge and immutable snapshot migration
There was an error while loading. Please reload this page.