Repository navigation
Allow a one-keyframe BurnsPath on the wire (minItems 1) - #28
Merged
Merged
Conversation
…s languages (#19) Python, the TS BurnsPath class and evaluate() all accept one keyframe; only the generated JSON Schema said 2. Relax the zod source and regenerate the schema, add a single_keyframe golden vector, and add schema-conformance tests on both sides (every golden path validates; committed schema matches the zod source). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…f skipping (#19) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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 #19.
Decision: relax the schema to
minItems: 1; Python is right. Python'sBurnsPath, the TSBurnsPathclass andevaluate()on both sides already accept one keyframe (both clamp branches returnkfs[0]), andBurnsPath's docs call N keyframes the strict generalisation. Only the zodvalueSchema(and so the generated JSON Schema) said 2. Making Python require 2 would break any caller constructing a one-keyframe path directly; relaxing the schema breaks nobody.ts/src/component/schema.ts:.min(2)becomes.min(1);ts/schemas/burns-path.schema.jsonregenerated withpnpm schema(one-line diff).single_keyframepath (generatormisc/gen_golden_vectors.py; fixture diff is additive only). Both suites already evaluate every vector.tests/test_wire_schema.pyvalidates every golden path and a one-keyframe path against the committed JSON Schema (skipped withoutjsonschema);ts/test/wire-schema.test.tsvalidates every golden path through zod, pins 1-ok / 0-rejected, and fails ifts/schemas/*.jsondrifts from the zod source.moves.pyhold docstring,test_moves.py,path.py). Built-in moves still emit the canonical two keyframes.Version bump: none needed. The change only widens what the wire format accepts, so every existing document stays valid, and the schema's
versionconst stays 1. The package version is bumped by CI on merge.Found on the way, filed separately: zod also rejects out-of-image keyframe rects that Python accepts on purpose (
clamp_ride_the_wall), same shape as this issue: #27. The new TS test skips that one vector with a pointer.Tests: full Python suite 256 passed; TS 137 passed;
tsc --noEmitclean.Adversarial review (fresh Opus subagent): PASS. Confirmed relaxing is right (every old document stays valid), ran a one-keyframe path through Python evaluate/reversed/round-trip, both render backends and the TS class, and checked the new tests fail against main. One confirmed gap, fixed here:
jsonschemawas not installed in CI, sotest_wire_schema.pywas silently skipped. It is now in thedevextra and[tool.wads.ci.install] extras = "dev"installs it; the CI run shows the test collected and passing (297 collected, none skipped).🤖 Generated with Claude Code