Repository navigation
fix(primitives): a table and a file store can no longer share a name across versions - #360
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. The two cross-kind membership checks reuse the existing cumulative inventory maps and SpecNo merge-blocking intent findings. Both table-to-store and store-to-table name reuse are refused before DDL, with the existing Verification: Summary: Standards 0 blockers; Spec 0 blockers. No merge-blocking issue on either axis. |
|
Reviewed SpecIssue 333 asked for one change. Before any DDL, That is what the diff does ( Nothing asked for is missing. The doc and skill edits state this rule. StandardsNo documented-standard violations. No baseline smells. Effect. Reusing Surfaces. The publish description in The two Method
Same-kind reintroduction still takes the On a hit the name is still appended to Rows that already have both kinds under one name are left as they are. Republishing the existing store takes the YAGNIThis is the small version. The fix is the two pushes onto Standards: 0 findings. Spec: 0 findings. No worst issue on either axis. |
|
Both reviews on One note, kept as is: grok's Method section points out that a patch that already has a table and a store under one name keeps both. Republishing the existing store skips the new check. Issue 333 only asks to refuse new collisions, not to clean up old ones, so this PR leaves them alone. Checks on |
60c539b to
0c56d74
Compare
…across versions Omitting a table keeps it in the cumulative inventory, but a later manifest could add a file store under its name (and the reverse), leaving one name with two kinds. Tables.diff now refuses an incoming store named after an inventory table, and an incoming table named after an inventory store, as not_additive with a fresh-name fix, before any DDL. Closes #333 Co-Authored-By: Claude Opus 5.5 <[email protected]>
3dc4b2a to
a1ded5e
Compare
Stacked on #360 (branch fix/333-name-collision). A retired or deleted-but-recoverable patch reserved only its current name. Another patch could take one of its former names, and restoring the original did not get that address back. Fixes #329. Publish preflight and the final name claim now share one availability rule (`nameAvailable` in `Patches.ts`): a name is free to a patch if the patch already holds it, or if it is a former name of a patch that is neither retired nor deleted. The claim still happens inside the existing publish transaction. A live patch's former names can still be reused, and reclamation still releases names by deleting their rows. The `name_taken` description in `packages/api` and `docs/API.md` now says this. Test evidence: a new test in `Patches.test.ts` reproduces the ticket for both retired and deleted patches. Preflight and commit both return `NameTaken`, restore gets the former name back, and the name becomes free once the patch is live again or reclaimed. It failed before the fix and passes now. `pnpm typecheck` and `pnpm lint` are clean. `pnpm test`: 948 of 949 passed. One unrelated Postgres integration test timed out under machine load and passed when re-run alone. Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).
Stacked on #359 (branch fix/320-runtime-success-encoding).
Omitting a table from a later manifest keeps it in the inventory, but that manifest could still add a file store with the same name (or add a table with an omitted store's name). The publish succeeded and left one name holding both a table and a store, which the product rule forbids. Closes #333.
Now, before running any DDL, the provisioner's diff refuses a new store whose name belongs to a table in the inventory, and a new table whose name belongs to a store. It reports this with the existing
not_additiveerror and tells the user to pick a different name. The check inside a single manifest is unchanged, and omitted resources are still kept. I also updated the publish route description,docs/API.md,docs/product.mdand thepatchy-tablesproject skill.Test evidence
crossKindNames, run on Postgres and PGlite. It failed on both before the fix, where version 2 provisioned the store and kept the table. After the fix it passes and shows no DDL and an unchanged inventory.Tables.test.ts18/18,pnpm typecheckandpnpm lintclean.pnpm test: 947 passed, 1 failed. The failure waspackages/integrations/src/postgres/Runtime.test.tshitting its 5s timeout under machine load, which is unrelated to this change. It passes when run alone.Implemented by Claude Opus 5.5 via Claude Code (foreman run orchestrated by Claude Fable 5.1).