Repository navigation
build(deps): bump @antelopejs/tooling-configs to 0.5.1 - #156
Merged
Merged
Conversation
Seed inserts in the playground and the verify playground now upsert by their stable _id, which satisfies antelopejs/no-read-then-insert: two replicas that both find an empty table write the same rows instead of failing on the key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The goal is to put dms-database on
@antelopejs/tooling-configs0.5.1 and have it pass cleanly, not only carry the new version number (ANT-1850, parent ANT-1840).0.5.1 adds
antelopejs/no-read-then-insert(tooling-configs#287). It reported 6 seed functions that count a table and then insert into it if the table is empty. Two replicas that both start on an empty table both insert, and one of them fails on the duplicate_id. Every seeded row already has a stable_id, so each of those inserts now upserts with{ conflict: "update" }. The count guard stays, so a seed still writes once and rows edited during a verify run survive a restart. A racing replica writes the same rows.seedVaultalso writes 3 more tables after its guarded read, and those inserts upsert too, since they race the same way.0.5.1 also relaxes
no-inherited-key-lookup(#291). This repo has no directive or config entry for that rule, so there is no suppression to remove.Changes
package.jsonandpnpm-lock.yamlmove@antelopejs/tooling-configsto^0.5.1(resolved 0.5.1).pnpm run syncrewrote the guardrail table inAGENTS.md. It adds the new rule's row, and the threeskipLibCheckandtypecheckrows are now enforced byantelopejs-sync --check.playground/src/shop-schema.tsand in.agents/skills/verify-dms-database/playground/src/{shop-schema,browse-fixtures,metrics-schema,bridge-schema,vault-schema}.ts. Lint also reported the same files under.claude/skills/..., which is a symlink to.agents/skills/....No change touches
src/,frontend-vue/or the published files. Nothing touches auth, roles, tenancy, stored schema or the interface-dms contract.Proof
Before:
origin/mainwith only the version bumpedpnpm run sync:check:pnpm run checks(failing steps; Node's MODULE_TYPELESS warning lines removed):After: this branch
pnpm run sync:check:pnpm run checks:Playground (
pnpm --dir playground install --ignore-workspace --frozen-lockfile && pnpm --dir playground build): exits 0.Verify layer
dms-control plan --base origin/maingivesrun: ["smoke", "package"]. Both journeys PASS.dms-control verdict --pr 156at head5db7c30givesVerify: PASS+NOTES. The notes are the skill's standing "Not driven" list, plus the two-replica race, which needs a second backend the run does not start. The smoke journey's health response shows the upserting seeds wrote each row once:metrics.readings1250,shop.products6,vault.accounts2.dms-control doorsgivesOne-way-door: contract, publish, and both namepackage.json. Only a devDependency moved there. The package journey shows the tarball still holds every path the manifest names.flowchart LR A[backend start] --> B{"table.count() > 0"} B -- yes --> C[skip] B -- no --> D["insert(rows, { conflict: 'update' })"] D --> E[same rows whichever replica wins]