Repository navigation
fix(schemas): follow-ups to the JSON Schemas (#522) - #523
Merged
Merged
Conversation
validate panicked on an unsupported keyword only when a test document reached that subschema, so a constraint such as uniqueItems on an unused property passed unnoticed. Validate and CompareStruct now walk the whole schema once (properties, items, anyOf, $defs) and panic on any keyword that is neither supported nor an annotation, and on a schema-valued additionalProperties, which was silently ignored. Refs: #268 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
builtSite made a docs-site-* directory with os.MkdirTemp and never removed it, so every go test run without -docs-site left a built site in the temporary directory. A TestMain now removes it after the run; a site given with -docs-site is not touched. Refs: #268 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The schema flagged configurations that the loader takes: soft_percent 0 and warn_percent 0 (0 means the default), a preview range of 0 and 0 (previews off), and public_url or board.public_url with an uppercase scheme such as HTTPS:// (url.Parse lowercases it). The percent minimums are now 0, a preview port is 0 or 1024 to 65535, and the scheme pattern is case-insensitive in an ECMA-compatible form. Tests run each example through the schema and the loader, and out-of-range values still fail. This edits config.v0-provisional.schema.json in place. The never-edit rule applies to published stable names; v0-provisional is provisional and nothing relies on it yet. The manual page says so. Refs: #268 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
Opus review CLEAR on 2f7b677. Full go test ./... and make check-ci exit 0 (author and reviewer). Mutation checks: TestUnsupportedKeywordInUnreachedSubschemaPanics and TestSchemaAcceptsWhatTheLoaderAccepts fail without the fixes. Known Low (batched on #399): schema still accepts first_port 0 with non-zero last_port and first > last. Unverified: patterns in a real editor. |
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.
Fixes the three Lows from the #522 review:
-docs-sitedirectory is left alone).v0-provisionalis edited because it is provisional;json-schemas.mdnow says so.Refs: #268
Review: Opus CLEAR on 2f7b677; full go test ./... and make check-ci exit 0. Known Low (batched on #399): the schema still accepts first_port 0 with a non-zero last_port and first > last, which the loader rejects. Unverified: the patterns in a real editor.
🤖 Generated with Claude Code