Skip to content

Package Deltas: define the artifact and spell conflict tracer #308

Closed

Description

@Mathih13

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Define and test the Package Delta artifact using spell headers and effects.

Current behavior:
Packages have no data artifact. Base imports replace whole data families, and package-specific row changes have no durable claims or conflict checks.

Desired behavior:
Define a versioned canonical JSON Package Delta. It records Package identity, source hash, table, typed primary key, operation, and claimed fields. Unsigned 64-bit values use decimal strings with an explicit type. A partial update names only changed fields. An insert contains a complete row. Row deletion is not supported.

The tracer supports spell headers and child effects. It derives packed child keys from the claimed spell identifier, enforces the client-safe synthetic spell range, and rejects fixture-reserved identifiers. Two Packages may claim different fields on one row. Claiming the same field fails and names both Packages. Primary-key collisions on inserted rows also fail.

Key interfaces:

  • Versioned Package Delta schema
  • Pure parser, canonical serializer, and merger
  • Spell and SpellEffect identifier policy
  • Read-only check output

Acceptance criteria:

  • Canonical serialization is byte-stable for equivalent input.
  • Unknown versions, tables, fields, types, and malformed keys fail before any write.
  • Same-row different-field claims merge.
  • Same-field and inserted-key conflicts name both Packages and the exact claim.
  • SpellEffect keys derive from the top-level spell identifier and effect index.
  • The tracer accepts partial updates and complete inserts but refuses deletes.
  • Tests cover fixture-reserved and non-client-safe spell identifiers.

Out of scope:

  • Database application or import replay
  • Tables outside spell headers and effects
  • Datascript execution

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