test(kinds): route kind-URI literals through the constants - #163
Merged
Conversation
akesling
force-pushed
the
akesling/kind-uri-constants
branch
from
August 6, 2026 18:24
f12dd2c to
d8c87ef
Compare
akesling
force-pushed
the
akesling/append-model-field
branch
from
August 6, 2026 18:24
2c3eaa4 to
b192823
Compare
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.
Stacked on #132 — review that first; this targets its branch and will retarget to
mainwhen it merges.Why
Minting a kind version restates its URI in a lot of places. Before this, a mint touched ~16 files and 43 lines spelling the version, most of them test literals and registration glue re-spelling a URI that
PATH_KIND_AGENT_CODING_SESSIONalready holds. That is the sort of duplication that lets a typo pass its own tests.What
Tests and registration glue now go through the constants (and
BUNDLED_KINDSfor "newest") instead of restating the version, acrosstoolpath::{types,jsonl},toolpath-convo::derive, andpath-cli::{kinds,cmd_kind,schema,query}plustests/query.rs. Tests that deliberately pin older versions keep using…_V1_1_0/…_V1_0_0, and stored fixture documents are left alone — a document's kind URI is data, not a shared string.Two tests remain deliberately literal, for opposite reasons:
toolpath::typesspells the current URI in full, so a typo in the constant cannot self-validate through every test that consumes the constant.path-cli::kindsbinds each bundled entry together: the schema's$idandmeta.kindconst match the entry's URI, the URI's name/version segments match the entry's fields, the compiled-in bytes match the on-diskkinds/<name>/<version>/schema.json, and the newest entry equals the constant. It was mutation-tested during review — pointing a bundled entry at the wrong version's schema fails it.path-cli'skindsmodule becomespubso the integration test can iterateBUNDLED_KINDS, matching the existing pub-for-tests precedent in that crate (harness,cmd_resume).Net effect: a future mint touches the constant, the schema file, its
BUNDLED_KINDSentry, the site page, and the changelog — the version literals that remain are all genuine mint touchpoints.Testing
Full workspace suite, clippy, rustdoc, and the examples gate green on the stack. No behavior change: production code paths already flowed through the constants; this is tests and registration glue only.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.