feat(migration): Spar_Migration property set + helpers (Track E commit 1/8)#156
Merged
feat(migration): Spar_Migration property set + helpers (Track E commit 1/8)#156
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…lpers (Track E commit 1/8) Foundation for v0.8.0 Track E (frozen-platform / mobile-application split + hypothetical-rebinding oracle, #150). Spar_Migration::{Frozen, Mobile, Allowed_Targets, Pinned_Reason} provide the AADL vocabulary for declaring which items are platform (immutable for hypothetical rebinding) vs. which are application (eligible for movement). Per the research in PR #153 §6.1. Helper functions is_frozen() / is_mobile() expose the boolean state to downstream analyses without requiring a salsa query yet — the per-instance cache lands when the hypothetical-binding overlay needs it (Track E commit 2). Per §6.2's tradeoff analysis: minimal surface now, expand on demand. No CLI surface, no MCP, no solver extension in this commit — those are Track E commits 3-5. New requirements: REQ-MIGRATION-{001,002,003}. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
a22cd24 to
2f10141
Compare
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.
Summary
Foundation for v0.8.0 Track E (frozen-platform / mobile-application split + hypothetical-rebinding oracle, #150). First commit of 8 in the Track E roadmap; per the research in #153.
This PR is strictly the property-set surface + minimal helpers. No CLI, no MCP, no solver extension, no
spar-movescrate yet — those land in commits 3-5 of the track.What's in
Spar_Migrationregistered alongsideSpar_Timing/Spar_Trace:Frozen(aadlboolean) — marks an item as platform; immutable for hypothetical rebinding.Mobile(aadlboolean) — marks an item as application; eligible for rebinding.Allowed_Targets(list of reference (thread)) — restricts hypothetical rebinding destinations. Registered againstthreadfor now; broaden to genericcomponentonce the AADL type table supports it (TODO doc-comment in source).Pinned_Reason(aadlstring) — audit trail for why an item is platform.crates/spar-hir-def/src/migration.rs— new tiny module exposing:is_frozen(&PropertyMap) -> boolis_mobile(&PropertyMap) -> bool(defensive: Frozen wins when both are set; per §6.1)PropertyExpr::Booleanfirst, falls back to raw "true"/"false" strings.REQ-MIGRATION-{001,002,003}andTEST-SPAR-MIGRATION-{PROPS,HELPERS}rivet artifacts (append-only).spar-hir-def. Totalspar-hir-deftest count: 435 passing.What's out (deliberately deferred per the research roadmap §7)
spar moves verify / enumerate / optimize— Track E commit 5.spar.verify_move,spar.enumerate_moves) — Track E commits 9-10 (v0.9.0).spar-movescrate — Track E commit 4.ComponentInstance— Track E commit 2 (per §6.2 option B; today is option A — read on demand).Migration_Costproperty — documented in §6.1 but only used byoptimizemode (commit 12).COMPLIANCE.mdclose-out narrative — Track E commit 8.Design references
docs/designs/track-e-migration-research.md§6.1 (property-set design) and §6.2 (HIR-cache tradeoff)Test plan
cargo build --workspace— cleancargo test -p spar-hir-def— 435 passed (11 new)cargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleanrivet validate— PASS (91 pre-existing schema-info warnings, none from new artifacts)🤖 Generated with Claude Code