Skip to content

Compare native JSON Schema files and collections across all five commands - #292

Draft
daveshanley wants to merge 24 commits into
mainfrom
codex/native-json-schema
Draft

daveshanley wants to merge 24 commits into
mainfrom
codex/native-json-schema

Conversation

@daveshanley

@daveshanley daveshanley commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Behaviour changes

Use a supported $schema declaration or pass --schema for unmarked objects, booleans, and pairs of local directories. The console, terminal summary, JSON, Markdown, and HTML reports all use one native comparison result. OpenAPI and AsyncAPI keep their established input and reporting contracts. The JSON report includes the defining schema ID, resource-local path, authored coordinates and source for either side.

This branch includes the implementation plan, plan-crush findings, and runnable examples under sample-specs/json-schema.

Verification

Ran all five real commands on Customer before implementing collections. The collection fixture produces one breaking Money edit at $.properties.currency.minLength, line 9 of money.json. Verified the console in a PTY and opened the original and modified source from both Invoice and Order in Chromium using both embedded bundles. The Go suites, Action subprocess, targeted race tests, report typecheck and 60 UI tests pass. The target Petstore baseline is 45 changes and 19 breaking.

Integration

libopenapi #732, Doctor #129, Cowboy Components #111, and public guide #10. The Go dependencies resolve from public feature commits. The current frontend development pin requires access to the private Cowboy source repository. Public Linux npm ci is blocked until the package can be installed from the public npm registry.

@blacksmith-sh

This comment has been minimized.

@daveshanley daveshanley left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built the branch and drove the real binary.

Customer and the Money collection both do what the description says through summary, report and html-report. One breaking change each, and the Money edit lands on line 9 of money.json on both sides. I didn't drive console or markdown-report this time round.

Inline notes below. The two I'd sort before this leaves draft: what the directory walk swallows, and the error an OpenAPI user now gets for a file with no version field.

Comment thread go.mod Outdated
github.com/mattn/go-runewidth v0.0.31
github.com/pb33f/doctor v0.0.88
github.com/pb33f/go-yaml v0.1.1
github.com/pb33f/doctor v0.0.90-0.20261125173329-f6a00cb7bd20

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev pins on doctor and libopenapi feature commits. Known, and called out in the description.

Writing the order down so I don't have to think about it later: libopenapi tag, doctor tag, cowboy publish, then this PR swaps all three pins and rebuilds both bundles.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still dev pins. 3a1d731 moves them to libopenapi 18eb8107 and doctor 3c7eb54. Leaving this open until both have tags.

Comment thread html-report/ui/package.json Outdated
},
"dependencies": {
"@pb33f/cowboy-components": "0.16.0",
"@pb33f/cowboy-components": "git+https://github.com/pb33f/cowboy-components.git#d1324cd0466dfc5c3428558ae5a9b7d7c11622c4",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A git SHA against a private repo, so nobody but me can npm ci this. Also known.

The part worth flagging: both committed bundles were built from that SHA. When the pin moves to the published version, rebuild them from the lockfile. Don't assume they come out identical.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a git SHA, now cowboy 0552da3. Both bundles were rebuilt from the lockfile at that commit in 3a1d731. Leaving this open until cowboy is on npm.

Comment thread cmd/left_right_sources.go Resolved
Comment thread model/specification.go Resolved
Comment thread cmd/markdown_report.go Resolved
Comment thread html-report/generator.go Resolved
Comment thread html-report/generator.go Resolved
Comment thread cmd/console.go Resolved
Comment thread cmd/common.go Resolved
@@ -0,0 +1,52 @@
<!--

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New top-level plans/ directory.

The durable parts of these two files already went into .ai-docs/ and AGENTS.md in this PR. Do the plan and the crush notes need to live in the tree after merge? They go stale the moment the pins change (the plan quotes dependency versions and a Petstore count).

I'd link them from the PR description and keep the tree clean. Open to being talked out of it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left alone. Still my call to make, so this stays open.

…arisons

A schema directory skips node_modules and dot-directories, and a member that is not a schema is named. Unmarked inputs get one error covering every format looked for, and two directories without --schema suggest the flag. Reports highlight every schema source and read typed reference edges. Pins the matching libopenapi, Doctor and Cowboy Components commits and rebuilds both bundles.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant