Skip to content

create: keep ids server-owned - #70

Draft
aberoham wants to merge 1 commit into
NicTool:mainfrom
aberoham:reject-create-ids
Draft

create: keep ids server-owned#70
aberoham wants to merge 1 commit into
NicTool:mainfrom
aberoham:reject-create-ids

Conversation

@aberoham

@aberoham aberoham commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

With id forbidden on create (NicTool/validate#34), the file stores have to allocate their own. nextId() moves into lib/store/file.js. That also retires the two hand-rolled copies of the same reduce in the session and zone record stores. The mysql user store no longer looks up {id: undefined, gid} before every insert.

Route coverage per entity. A create carrying an id is refused. A create without one allocates and returns it. A PUT with a route id still works.

mysql  406 tests, 406 pass, 0 failed, 0 skipped
json   383 tests, 383 pass, 0 failed, 0 skipped
toml   383 tests, 383 pass, 0 failed, 0 skipped

Draft until validate#34 merges. CI installs that PR's head from source, per the pattern in 7a64bad. When it merges, NICTOOL_VALIDATE_SPEC moves to the merge commit. When it releases, the variable goes and the dependency bumps.

coverage.yml runs the shared NicTool/.github job and cannot take that variable, so coverage is red on the new tests until the release.

Ticks "verify the API won't permit setting auto-increment fields" in #6. The
other two boxes there are untouched.

@msimerson

Copy link
Copy Markdown
Contributor

I'm confined to a phone screen today, but if you checkout the subproject '.release" in the validate repo, and follow the README steps, it'll create a release PR which I can merge and will auto-release.

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.

2 participants