Skip to content

feat(core): expose apply/status/rollback migration helpers from lib.rs#1131

Open
geoffjay wants to merge 2 commits intoissue-1123from
issue-1124
Open

feat(core): expose apply/status/rollback migration helpers from lib.rs#1131
geoffjay wants to merge 2 commits intoissue-1123from
issue-1124

Conversation

@geoffjay
Copy link
Copy Markdown
Owner

Adds apply_migrations_for_path, migration_status_for_path, and rollback_migrations_for_path to agentd_core lib.rs, following the pattern established by agentd-orchestrator. Required by the migrate CLI subcommand.

Closes #1124

@geoffjay geoffjay added the review-agent Used to invoke a review by an agent tracking this label label Apr 16, 2026
Adds apply_migrations_for_path, migration_status_for_path, and
rollback_migrations_for_path following the pattern from agentd-orchestrator.
Required by the migrate CLI subcommand (#1125).

Closes #1124
Copy link
Copy Markdown
Owner Author

@geoffjay geoffjay left a comment

Choose a reason for hiding this comment

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

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, and agentd-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::storage generic parameterised on migration::Migrator. No logic, no state — pure pass-through. ✓
  • Docs: each function has a doc comment; rollback_migrations_for_path documents the steps semantics explicitly. ✓
  • Scope: single file, 27 lines added, no production logic changed. ✓

@geoffjay geoffjay added merge-queue Approved by reviewer, queued for merge by conductor and removed review-agent Used to invoke a review by an agent tracking this label labels Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-queue Approved by reviewer, queued for merge by conductor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant