feat(core): expose apply/status/rollback migration helpers from lib.rs#1131
Open
geoffjay wants to merge 2 commits intoissue-1123from
Open
feat(core): expose apply/status/rollback migration helpers from lib.rs#1131geoffjay wants to merge 2 commits intoissue-1123from
geoffjay wants to merge 2 commits intoissue-1123from
Conversation
Owner
Author
|
This change is part of the following stack:
Change managed by git-spice. |
This was referenced Apr 16, 2026
This was referenced Apr 16, 2026
Open
geoffjay
commented
Apr 17, 2026
Owner
Author
geoffjay
left a comment
There was a problem hiding this comment.
Review: feat(core): expose apply/status/rollback migration helpers from lib.rs
LGTM — cannot self-approve, posting as comment.
Stack note
This branch (issue-1124) is stacked on PR #1130 (issue-1123), which adds rollback_migrations to agentd_common::storage. That parent must merge before this one. This PR is itself the parent of #1132 (migrate CLI) and #1134 (xtask registration) — both of which depend on these three function signatures being exactly as defined here.
What was verified
- Pattern match: all three helpers follow the identical shape used by
agentd-orchestrator,agentd-memory, andagentd-communicate(confirmed in earlier stack reviews). ✓ - Signatures:
apply_migrations_for_path(&Path) -> anyhow::Result<()>✓migration_status_for_path(&Path) -> anyhow::Result<Vec<(String, bool)>>✓rollback_migrations_for_path(&Path, Option<u32>) -> anyhow::Result<()>—None= all,Some(n)= latest n ✓
- Delegation: each function delegates to the corresponding
agentd_common::storagegeneric parameterised onmigration::Migrator. No logic, no state — pure pass-through. ✓ - Docs: each function has a doc comment;
rollback_migrations_for_pathdocuments thestepssemantics explicitly. ✓ - Scope: single file, 27 lines added, no production logic changed. ✓
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.
Adds
apply_migrations_for_path,migration_status_for_path, androllback_migrations_for_pathtoagentd_corelib.rs, following the pattern established by agentd-orchestrator. Required by the migrate CLI subcommand.Closes #1124