Skip to content

feat: Astryx through the json-render target — empty profile, contract n=2 (PR-20)#16

Merged
ryandmonk merged 2 commits into
mainfrom
feat/astryx-json-render
Jul 4, 2026
Merged

feat: Astryx through the json-render target — empty profile, contract n=2 (PR-20)#16
ryandmonk merged 2 commits into
mainfrom
feat/astryx-json-render

Conversation

@ryandmonk

Copy link
Copy Markdown
Contributor

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 — astryxJsonRenderProfile is 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 run55/55 (4 new: two goldens, exclusion pinning, worked-example emission + offline instance validation)
  • node scripts/check-sync.mjs — both contract copies in sync
  • Honest scope: the pinned gates/json-render package (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

… 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>
Copilot AI review requested due to automatic review settings July 4, 2026 20:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-render emission/validation.
  • Add an (intentionally empty) Astryx json-render profile 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.

Comment thread .vscode/mcp.json Outdated
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>
@ryandmonk ryandmonk merged commit 780c00f into main Jul 4, 2026
1 check passed
@ryandmonk ryandmonk deleted the feat/astryx-json-render branch July 4, 2026 21:02
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.

2 participants