Skip to content

Seed: skill name conflict on create is a skip, not fatal - #283

Merged
TheGreatAxios merged 4 commits into
mainfrom
cl-seed-idempotent
Aug 22, 2026
Merged

Seed: skill name conflict on create is a skip, not fatal#283
TheGreatAxios merged 4 commits into
mainfrom
cl-seed-idempotent

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

Fixes the seed-idempotency half of tonight's outage: a half-seeded
tenant re-running workbench seed hit 409 already exists on
default-skill creation and aborted the whole run, even though the
hub's own error advice was to re-run the same command. Every other
seed step (grants, workflow assets, deployments, catalog rows) already
treated a name-conflict 409 as "already done" — plantDefaultSkills
was the one holdout.

  • plantDefaultSkills (packages/hub-client/src/seed.ts) now skips on
    a 409 from the create call, matching the pattern every other step
    uses.
  • New test reproduces the exact error message from the live incident
    and fails against the pre-fix code.
  • Docs: docs/seed-reconciliation.md gains a section for default
    skills, plus a section explaining why publishCorbitsToolsRegistry
    can no longer strand a dangling package-registry asset going
    forward (the freshness check already runs before the asset is
    created), and why re-running workbench seed repairs a tenant whose
    asset survives from before that ordering shipped — a repo with no
    commits answers an empty tarball list, so a re-run republishes
    everything and writes the first commit.

Not in this PR

Filed as follow-ups on CL-6575:

  • Actually running workbench seed against the live broken tenant
    (tnt_4799af5615d7fa0eb995c224bc99253a) to confirm the repo
    directory gets created — I don't have admin credentials for the
    running dev stack.
  • Translating SessionLaunchError's raw message into something a
    person reads as true, rather than "Myra didn't reply" — needs its
    own investigation into where launch failures actually surface in
    the product.
  • A regression test locking in the freshness-check-before-asset-create
    ordering structurally (currently only confirmed by reading git
    history).

Test plan

  • bun test in packages/hub-client — 164 pass
  • tsc --noEmit in packages/hub-client — clean
  • eslint on touched files — clean
  • bun test in packages/tool-registry-publish — 61 pass (unchanged)
  • bun test in packages/cli — 27 pass (unchanged)
  • New test fails against the pre-fix code with the exact production error message

CL-6575

Reproduces the live incident: a half-seeded tenant re-running
`workbench seed` hit "409 already exists" on skill creation and
aborted the whole run, even though the hub's own error advice was to
re-run the same command. A step that already succeeded must never
kill a re-run.
plantDefaultSkills checked for an existing skill by name before
creating one, but never handled a 409 from the create call itself —
so a row the lookup missed (an inherited/other-scope row, or a race
with a concurrent seed pass) turned "already exists" into a fatal
CliError instead of a skip. Every other seed step (grants, workflow
assets, catalog rows) already treats a name-conflict 409 as
already-done; skills now match.
Document the skill-conflict skip alongside the existing seed
reconciliation properties, and explain why a failed publish can no
longer strand a dangling package-registry asset, plus how re-seeding
repairs a tenant whose asset survives from before that ordering
shipped.
@TheGreatAxios
TheGreatAxios merged commit 9e2a716 into main Aug 22, 2026
5 checks passed
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