Skip to content

bug(artifacts): avoid workspace artifact-version collisions across runs #168

Description

@akoita

Problem

A workspace can persist multiple runs, but each new run currently creates its first artifact at version 1 while storage enforces UNIQUE (workspace_id, version). Resuming or executing a second fixture run after another run has already persisted artifact version 1 fails with a storage uniqueness conflict.

Discovered while strengthening #160; it is not required to prove CKB selection migration semantics and is intentionally outside that sprint.

Expected behavior

Starting or resuming multiple runs in the same workspace must allocate durable artifact history without version collisions while preserving each run's lineage and export references.

Acceptance criteria

  • Two independent runs in one workspace can each reach their first persisted artifact without a uniqueness failure.
  • The versioning rule is explicit: either versions are workspace-global and allocated monotonically, or uniqueness is scoped to a run with a reviewed schema migration.
  • Parent-version lineage cannot cross runs accidentally.
  • Restart, revision, approval, and export continue to resolve the correct artifact for each run.
  • A regression test covers two runs in one workspace.
  • pnpm validate passes.

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions