Skip to content

Package Deltas: apply and replay spell claims after base import #309

Closed

Description

@Mathih13

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Apply validated spell Package Deltas as the final stage of their base import.

Current behavior:
The Spell importer reloads base rows without a Package stage. Existing import metadata stores one current row per Import Family and cannot record Package provenance.

Desired behavior:
After a successful spell base import, apply every enabled spell Package Delta in one validated plan. Record Package, Import Family, artifact hash, source revision, and row counts without overloading the existing base-import stamp. A Package apply is atomic within one Shard and Import Family.

Disabling or removing a Package replays the affected base import and then applies the remaining Package Deltas. It does not restore pre-images. A read-only check prints the exact plan and conflicts without writing.

Key interfaces:

  • Spell base-import completion hook
  • Package Delta validation and apply plan
  • Package import provenance
  • Disable and uninstall replay entry point

Acceptance criteria:

  • A successful spell import reapplies all enabled spell Package Deltas.
  • An invalid or conflicting plan writes no Package rows or provenance.
  • One Package apply is atomic within its Shard and Import Family.
  • Disabling one Package restores base spell rows and reapplies the remaining Packages.
  • Provenance identifies the Package artifact and base-import generation.
  • Check mode reports the same plan without changing the Shard.

Out of scope:

  • Realm-wide orchestration
  • Other Import Families
  • Row deletion

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2normalenhancementNew feature or requestready-for-agentComplete enough to build from the issue alone, by a person or their agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions