Repository navigation
Check node-types.md against the seeded core schemas in the merge gate (closes #3451) - #3494
Conversation
Pragmatic Code Review: PR #3494Review Type: Initial Review (no prior reviews or comments on the PR; whole diff SummaryThe checker itself is solid. The parser reads every table in the real What I ran:
Requirements Check
Code Review Findings🔴 CriticalNone. 🟡 Important1. The gate compares against the docs working tree on the lock-holder's machine, and a mismatch ejects the queued PRs
2. A skipped check shows as a green tick in the gate
🟢 Suggestions3.
4. A type with no schema in the dump is skipped whatever its sheet says, and a schema with no registry entry is never looked at
5. Nit: the dump carries data nothing reads
6. Nit: in
Things I checked that are fine
RecommendationCOMMENT
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: COMMENT. Full findings in the review comment above.
Address review (commit 228f132)Addressed (6 of 6 findings; one part of finding 1 not done)
Also: the gate now imports the checker, so Not done: finding 1, option (b) (exit as a machine fault when the stack touches no type). A stage failure always exits the gate with 1 today, so this needs a new path through the gate's Docs (nodespace-docs Tests: Re-Review DecisionDecision: RE-REVIEW NEEDED Rationale: The fix for finding 1 adds a second read path (fetch, read a ref) and changes how the gate and |
Pragmatic Code Review: PR #3494Review Type: Re-Review (commit Previous Review Summary
The response's claims hold in the code. What I ran:
Verified as fixed:
Requirements Check
Code Review Findings🔴 CriticalNone. 🟡 Important1. The declined part: the landing order as written does not cover the cases that eject a PR, and the check breaks the queue's bisection Verdict on declining option (b): acceptable, and (b) as I wrote it should not be built. An infra exit ends the round with nobody blamed ( What is not acceptable is leaving the remainder as "push the sheet just before
In each case the ejected PR's comment ends with "Fix whichever side is wrong". A session acting on that for a PR that changed no type has two moves, both harmful: edit the published sheet back (which then fails X) or change the code. No wrong code lands in any of these: the cost is ejections, wasted gate runs and a misleading instruction. That is why this is Important and not Critical. Recommendation, for this PR (no queue change):
For the maintainer to decide separately: making the verdict a function of the stack. One way that fits an existing pattern is to commit the dump as a generated file with a drift check, as Principle. A gate stage's result should be attributable to the stack under test; the queue's bisection assumes it. 2. A published sheet that cannot be read is reported as the PR's failure, and a degraded read passes silently
🟢 Suggestions3. An enum value named
4. Nothing pins which form each runner uses, or the skip line
RecommendationCOMMENT
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): COMMENT. Full findings in the review comment above.
Address re-review (commit 3439b3c)Addressed: all 4 findings
Left for the maintainer (the reviewer agreed it need not hold this PR): making the verdict a function of the stack, for example by committing the dump as a generated file with a drift check, so that a mismatch on a stack that changes no type is a warning. Tests: Re-Review DecisionDecision: RE-REVIEW NEEDED Rationale: The gate has a new preflight with a machine-fault exit, and the stage's read path changed from a ref to a commit passed in by the gate. Both are gate logic. |
Pragmatic Code Review: PR #3494Review Type: Re-Review (commit Previous Review Summary
The response's claims hold in the code. What I ran:
Verified as fixed:
Requirements Check
Code Review Findings🔴 CriticalNone. 🟡 Important1. The checker now decides a machine-fault exit, and the queue does not count it as a gate script
🟢 Suggestions2. The stage can still exit 0 without comparing, and nothing tests that
3. A failed fetch is not visible where a PR's ejection is explained
Notes, no action needed:
RecommendationCOMMENT
|
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review 2): COMMENT. Full findings in the review comment above.
Address re-review 2Addressed: all 3 findings and the nit
Skipped: nothing. The two surviving mutations the reviewer listed as untestable without a stalling remote (the fetch bound and the gate's fetch-failed warning) are left without a test, as the review recommends. Tests: Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: One regex alternative with its test, an argument parser with its tests, a label string and a sentence of prose. The reviewer stated that none of these needs another round. Merge statusNot mergeable yet. The check reports 7 differences between the published |
…closes #3451) bun run node-types:check compares the registry table and every type's field table in the docs repository's node-types.md with the CoreNodeType registry and get_core_schemas(), dumped as JSON by a nodespace-core example. It runs in the merge gate and in test:changed's Rust tier, finds the docs repository beside the primary checkout (or at NODESPACE_DOCS_DIR), and skips with a warning on a machine without one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p is printed by the gate - The merge gate compares with the docs remote's main (--published, fetched first), not the docs working tree, so its verdict doesn't depend on edits in progress or on how recently that checkout was pulled. test:changed and a plain run still read the working tree. - A machine with no docs checkout: the gate and test:changed print that the stage was skipped instead of showing a pass. A docs directory with no reference in it is an error. - Every enum row must say extensible or closed, so the comparison is no longer optional per row. - A field table on the sheet of a type with no seeded schema, and a seeded schema the registry doesn't list, are reported. - The dump carries only what is read (id and kind). - test:changed gives the stage the cold-build timeout. - The checker is imported by the gate, so it is listed as gate machinery. Not done: turning a mismatch on a stack that touches no type into a machine-fault exit. Between pushing a sheet and merging its PR, a merge round without that PR fails this check; the landing order is documented instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… never blame a PR for the docs checkout - The merge gate resolves the docs remote's main to a commit before it takes the machine slot and passes it to the stage (--at <commit>), so a sheet pushed while a round runs doesn't change what that round is judged against. - A docs checkout that can't give that commit (no origin/main, not a git root, no reference on main, a named directory that is missing) ends the gate with the machine-fault exit, which ejects nobody. The fetch is bounded and never prompts; a failed fetch is printed on the gate's output. - The failure text in the gate says what a PR that changes no type should do. - 'closed' and 'extensible' are read outside backticks, so an enum value with either name isn't taken for the row's word. - Tests pin which form each runner uses, the skip line, and the machine-fault exit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…script; --at must name a commit - changesGate matches the checker, which now decides a machine-fault exit, so a stack that breaks it is bisected out instead of stalling the queue. - --at without a commit is an error, and a commit is never skipped. - A failed docs fetch is named in the stage label, which an ejection comment quotes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4d1b5f5 to
8302fd8
Compare
Closes #3451
Do not merge yet
The check fails on current main, as the issue says it will until its dependencies land. Two are still open, and they account for every difference it reports today:
tool-native): the reference liststoolas abstract andtool-nativeas a core subtype withhandler; the code has a concretetoolwithhandlerandsource.skillschema still declaresnode_types, which the reference replaced with theapplies_torelationship.Because the check runs in the merge gate, this PR's own gate run fails until both have landed, and merging it earlier would fail every other PR's gate too.
What it does
packages/core/examples/dump_core_schemas.rsprints theCoreNodeTyperegistry (id and kind) andget_core_schemas()as JSON.scripts/check-node-types-doc.ts(bun run node-types:check) readsnode-types.mdfrom the docs repository and compares:<type>.<field>), type, array element type, enum values in order, andextensibleorclosed(every enum row says one).test:changed's Rust tier and a plain run read the docs working tree, so a type and its sheet are developed together. The merge gate fetches the docs remote, resolves itsmainto a commit before it takes the machine slot, and the stage compares with that commit (--at <commit>). Edits in progress in the docs checkout, an unpushed commit, a stale checkout or a sheet pushed mid-run don't change the verdict..claude/worktrees/_gate;NODESPACE_DOCS_DIRoverrides it.test:changedprint that the stage was skipped. A docs checkout that can't give the published sheet (noorigin/main, not a git root, no reference on main): the gate exits as a machine fault, which ejects nobody. A failed fetch is printed and named in the stage label.changesGatein the merge queue counts the checker as a gate script, since it decides that exit.Landing a type change
Push the sheet to the docs repository just before
bun run merge. Until the PR lands, a merge round without it fails the check (a bisection retest included); the failure text tells a PR that changes no type to change nothing and re-queue. This is written into the node type sequence and CLAUDE.md. Making the verdict depend only on the stack (so such rounds warn instead of failing) is a queue design question left open.Docs (on nodespace-docs main)
node-types.mdrows the check couldn't read are rewritten (projectpriorityvalues, one row per play suspension field, atool-nativefield table,closedon two enums), and the reference, the node type sequence and Creating Node Types describe the check and the landing order.Verification
bun run test:scripts: fixture tests for the comparison (field gained, lost, renamed; type, element type, enum values and order, extensible; storage key; unreadable rows; type list), and tests against real temporary repositories for the docs location (primary checkout and a gate worktree) and the published read (uncommitted edit, unpushed commit, checkout behind its remote, failed fetch, each unreadable case).toolandskill, it passes for all 24 types.bun run test:changed(every tier) passes withNODESPACE_DOCS_DIRpointed at that copy. Without the override it stops atnode-types:check, as expected.🤖 Generated with Claude Code