Skip to content

feat(migration): Spar_Migration property set + helpers (Track E commit 1/8)#156

Merged
avrabe merged 1 commit intomainfrom
feat/v0.8.0-track-e-commit1
Apr 25, 2026
Merged

feat(migration): Spar_Migration property set + helpers (Track E commit 1/8)#156
avrabe merged 1 commit intomainfrom
feat/v0.8.0-track-e-commit1

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 25, 2026

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-moves crate yet — those land in commits 3-5 of the track.

What's in

  • New non-standard property set Spar_Migration registered alongside Spar_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 against thread for now; broaden to generic component once 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) -> bool
    • is_mobile(&PropertyMap) -> bool (defensive: Frozen wins when both are set; per §6.1)
    • Reads typed PropertyExpr::Boolean first, falls back to raw "true"/"false" strings.
  • REQ-MIGRATION-{001,002,003} and TEST-SPAR-MIGRATION-{PROPS,HELPERS} rivet artifacts (append-only).
  • Tests: 11 new unit tests in spar-hir-def. Total spar-hir-def test count: 435 passing.

What's out (deliberately deferred per the research roadmap §7)

  • CLI: spar moves verify / enumerate / optimize — Track E commit 5.
  • MCP server (spar.verify_move, spar.enumerate_moves) — Track E commits 9-10 (v0.9.0).
  • Solver extension (hypothetical-binding overlay) — Track E commit 6.
  • New spar-moves crate — Track E commit 4.
  • HIR-level mobility cache as a struct field on ComponentInstance — Track E commit 2 (per §6.2 option B; today is option A — read on demand).
  • Migration_Cost property — documented in §6.1 but only used by optimize mode (commit 12).
  • COMPLIANCE.md close-out narrative — Track E commit 8.

Design references

Test plan

  • cargo build --workspace — clean
  • cargo test -p spar-hir-def — 435 passed (11 new)
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • rivet validate — PASS (91 pre-existing schema-info warnings, none from new artifacts)

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 25, 2026

Codecov Report

❌ Patch coverage is 98.73418% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spar-hir-def/src/migration.rs 98.21% 2 Missing ⚠️

📢 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>
@avrabe avrabe force-pushed the feat/v0.8.0-track-e-commit1 branch from a22cd24 to 2f10141 Compare April 25, 2026 13:50
@avrabe avrabe merged commit b2ad567 into main Apr 25, 2026
14 checks passed
@avrabe avrabe deleted the feat/v0.8.0-track-e-commit1 branch April 25, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant