Skip to content

Package Deltas: orchestrate replay across every targeted Shard #310

Closed

Description

@Mathih13

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Apply and replay Package Deltas across a Realm without hiding partial completion.

Current behavior:
The importer accepts one destination at a time. There is no Package inventory-driven plan or Realm-wide recovery record.

Desired behavior:
The Operator command resolves the enabled Package inventory and every targeted Shard. It preflights the complete Realm plan before writing, then applies Shards sequentially through the idempotent single-Shard contract. A failure stops further work and reports completed, failed, and untouched Shards plus an exact resume command. A retry verifies already-complete provenance and continues safely.

Non-spatial catalogues reach every World Shard and Instance Pool that owns a copy. Spatial claims follow World Import Scope and Import Family ownership.

Key interfaces:

  • Realm Package Delta plan
  • Shard target resolver
  • Persisted per-Shard Package provenance
  • Resume and status output

Acceptance criteria:

  • Preflight validates every target and artifact before the first write.
  • A mid-run failure never reports Realm-wide success.
  • Output identifies completed, failed, and untouched Shards.
  • Retrying is idempotent and resumes without duplicating rows.
  • Removing one Package replays every affected target with the remaining Package set.
  • Integration coverage includes a forced failure between two Shards.

Out of scope:

  • Distributed atomic transactions across Shards
  • Automatic rollback of already-complete Shards

Activity

  1. added
    enhancementNew feature or request
    P2normal
    ready-for-agentComplete enough to build from the issue alone, by a person or their agent
    on Aug 24, 2026
  2. Mathih13 commented on Aug 27, 2026

    @Mathih13
    ContributorAuthor

    This was generated by AI during triage.

    Closing as implemented; the maintainer opted to fold live verification into a single test pass rather than hold this open.

    Shipped as lyracore-cli #44 (merged): lyracore packages replay [DATABASE ...] [--check] [--yes] [--force-all] [--client-data PATH]. All six acceptance criteria have test coverage (33 new tests), including the forced failure between two Shards: the FakeStack suite scripts Shard 2 to fail and asserts Shard 1 completed, Shard 2 errored, Shard 3 was never touched, and the report names all three states plus the literal resume command. Retry is resume-by-default: a Shard is skipped only when every enabled Package's recorded game_package_import digest matches the local artifact's BLAKE3, no disabled Package has a leftover row, and base_source_sha matches the Shard's current spell stamp.

    What the eventual live pass should exercise (deferred, not forgotten):

    1. Publish the merged module (new game_package_import table + apply_package_deltas reducer) to the target Shards first — the verb's preflight names this if missing.
    2. A two-Shard replay with a forced failure on the second, then a re-run confirming the completed Shard is skipped and the run finishes.
    3. One disable-and-replay cycle confirming the disabled Package's inserted spells leave every Shard.

    The single at-risk assumption only a live run settles: the CLI's restated canonical digest matching the module's. Drift fails safe (needless reapply, never a false skip).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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