feat: Astryx through the json-render target — empty profile, contract n=2 (PR-20)#16
Merged
Conversation
… n=2 (PR-20) M3 plan Phase 3, PR-20: the second contract through the second emitter. The asymmetry finding's prediction held at n=2: astryxJsonRenderProfile is EMPTY — the catalog is generated from the contract, carrying Astryx's own props-based vocabulary 1:1 (goldens: astryx.catalog.ts/registry.tsx). The one lossy edge is the data-driven idiom: table.data/columns and dropdown-menu.items are array props the catalog prop typing does not carry — EXCLUDED with documented reasons in the model and the generated header, never silently dropped (pinned by test). The worked example (delete-project) emits and instance-validates against the generated model (offline J2/J3 equivalents). - input/astryx.dspack.json copy + drift manifest entry (in sync) - surface/delete-project.dsurface.json fixture (the contract's example) - honest scope: the pinned gates/json-render package (J1 tsc with real zod v4) remains shadcn-wired; extending it to a contract matrix is noted for PR-21 if wanted 55 tests + check:sync green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a second DSPack contract (Astryx) to the json-render emission pipeline and pins the “empty profile” asymmetry prediction with new goldens and offline validation tests, plus sync tooling for the new upstream contract copy.
Changes:
- Introduce the Astryx DSPack contract input and a worked surface fixture for
json-renderemission/validation. - Add an (intentionally empty) Astryx
json-renderprofile plus new tests asserting golden outputs and “loud” exclusions for array-typed props. - Extend the contract copy drift-check script to include Astryx as a synced upstream artifact.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| surface/delete-project.dsurface.json | Adds an Astryx “delete project” surface fixture used for emission + offline instance validation. |
| src/targets/json-render/profile.ts | Adds astryxJsonRenderProfile (empty profile) with rationale in comments. |
| src/json-render-emit.test.ts | Adds Astryx-focused tests for goldens, exclusions, and offline validation; supports UPDATE_GOLDEN. |
| scripts/check-sync.mjs | Adds Astryx contract to the sync manifest to prevent drift from upstream. |
| input/astryx.dspack.json | Adds the pinned Astryx contract copy used as transformer/codegen input. |
| golden/json-render/astryx.registry.tsx.golden | Adds the reviewed golden for the generated Astryx json-render registry stub. |
| golden/json-render/astryx.catalog.ts.golden | Adds the reviewed golden for the generated Astryx json-render catalog. |
| .vscode/mcp.json | Adds a VS Code MCP server configuration file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Second time git add -A swept this machine-local file into a PR (Copilot caught it both times) — the durable fix is the ignore entry. The file stays untracked on disk; no history rewrite needed (paths only, no secrets). Co-Authored-By: Claude Fable 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.
What
M3 plan Phase 3, PR-20: the second contract through the second emitter.
The prediction held
The M2 emitter-asymmetry finding said json-render's contract-generated catalog needs no projection table —
astryxJsonRenderProfileis empty, and the generated catalog carries Astryx's props-based vocabulary 1:1 (goldens are the review artifact:astryx.catalog.ts.golden/astryx.registry.tsx.golden).The one lossy edge, made loud
Astryx's data-driven idiom (
table.data/columns,dropdown-menu.items— array props) is the thing a declarative prop catalog can't carry. The codegen excludes them with documented reasons in the model and the generated header — never silently — pinned by test. This refines the asymmetry finding: losslessness is a property of the idiom pairing, and even the good pairing has documented casualties when the contract is data-driven.Acceptance
npx vitest run— 55/55 (4 new: two goldens, exclusion pinning, worked-example emission + offline instance validation)node scripts/check-sync.mjs— both contract copies in syncgates/json-renderpackage (J1 tsc with real zod v4) remains shadcn-wired; a contract-matrix gate is noted for PR-21 if wanted.Per the merge delegation: self-merging after CI + Copilot are dispositioned.
🤖 Generated with Claude Code