Repository navigation
fix(config): accept any 1.x .wind schemaVersion, validate major in code - #203
Merged
Merged
Conversation
4 tasks done
CameronBrooks11
force-pushed
the
fix/schema-version-minors-140
branch
from
June 26, 2026 03:59
79d7b35 to
2cb65d7
Compare
Make schemaVersion a native field on WindDefinition with a default of
"1.0" and pattern ^1\.\d+$, so:
- an absent value is treated as the legacy 1.0,
- any 1.x minor is accepted (additive evolution),
- an incompatible major (2.0+) is rejected at load.
The model is now the single source of truth: the schema generator no
longer injects a const "1.0", and the GUI's .wind validator is relaxed
from z.literal("1.0") to the same 1.x pattern.
The generated wind-schema.json artifact is intentionally NOT regenerated
here: it is independently stale (no schemaVersion property, a manually
maintained old-org $id, no regen CI gate), so faithfully regenerating it
— including the canonical $id decision — belongs with the open-format
groundwork in #141.
Closes #140.
CameronBrooks11
force-pushed
the
fix/schema-version-minors-140
branch
from
June 26, 2026 04:05
2cb65d7 to
ff61393
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.
Closes #140.
The
.windschemaVersionwas pinned toconst "1.0", which would reject every future minor — the opposite of additive evolution.What
schemaVersionis now a native field onWindDefinition(fiberpath/config/schemas.py) withdefault="1.0"andpattern=r"^1\.\d+$". So at load: absent → treated as legacy 1.0, any 1.x minor accepted, incompatible major (2.0+) rejected. The model is the single source of truth — runtime validation lives here and applies wherever aWindDefinitionis parsed (CLI load and API bodies alike).scripts/generate_schema.pyno longer injects a manualconst "1.0"(the model providesschemaVersionnatively); its summary line now reports the model-driven default..windvalidator (fiberpath_gui/src/lib/schemas.ts) is relaxed fromz.literal("1.0")to the same^1\.\d+$pattern.The "required from 1.1+" sub-task is intentionally not implemented: no 1.1 exists yet, and requiring the field now would reject every current (absent-field) file, contradicting the back-compat default.
Deliberately out of scope (handed to #141)
The committed
fiberpath_gui/schemas/wind-schema.jsonis not regenerated here. It is independently stale — it has noschemaVersionproperty and a hand-set old-org$id, and (as the review surfaced) it is actually the output of an orphanedscripts/export_schema.py, not thegenerate_schema.pythatnpm run schema:generatewires up. Reconciling those two generators and choosing the canonical$idbelongs to the open-format groundwork in #141. Leaving the artifact untouched is non-regressive: the GUI's ajv loads it withstrict:falseand noadditionalProperties, so it does not currently constrainschemaVersionat all.Review gate
Reviewed by an independent adversarial review subagent (verdict: SHIP-WITH-NITS, no blocking). Pattern edge-cases probed (
1.0/1.10accept;1.0.0/10.0/1./1reject), absent→default confirmed, ajv non-regression confirmed, no pre-commit/CI schema-gen trap. Both nits addressed (stale print fixed; the two-generators finding handed to #141).Verification
ruffclean ·mypyclean · full Python suite 132 passed · all 7 example.windfiles load.tsc --noEmitclean · vitestschemas/validation62 passed.