Skip to content

sync: shadcn v2.3.0 fixture + record-collection goldens (F8, F9)#45

Merged
ryandmonk merged 1 commit into
mainfrom
sync/shadcn-v2.3.0-goldens
Jul 22, 2026
Merged

sync: shadcn v2.3.0 fixture + record-collection goldens (F8, F9)#45
ryandmonk merged 1 commit into
mainfrom
sync/shadcn-v2.3.0-goldens

Conversation

@ryandmonk

Copy link
Copy Markdown
Contributor

Third link of P1.1's four-repo sequence (dspack #23dspack-studio #23 → here). check-sync went correctly red; fixture re-synced.

New fail-first goldens: F8-records-as-prose (require-table, 1 finding) and F9-table-headless-uncaptioned (structure + caption, 2 findings) — expected reports linter-generated and hand-verified; the nine-count assertion and both golden cases failed before the change.

Test corrections (single-intent-era assumptions): the compiler "all rules render" loop now mirrors intent filtering and asserts other intents' rules don't leak into the destructive context — whose golden is byte-stable, so ds-mcp's pinned context holds. Eval golden moved by exactly one line (contract sha256).

Live validation (gpt-oss, Spark): governance converges 5/5 — one S3-clean first pass; five genuine one-round repairs into fully compliant tables (caption + header + body, 12/12 populated cells on the rich runs). All runs then end failed-gate at emit: shadcnProfile has no table mapping (unknown component 'table-caption') — a pre-existing dspack-emit gap never exercised before (nobody had emitted a shadcn table; the studio's A3 gate emits only examples[0]). Reported as a follow-up candidate; deliberately not addressed here.

Suite: 110 passed.

🤖 Generated with Claude Code

dspack #23 added the record-collection intent (P1.1); check-sync went
correctly red on the fixture and it is re-synced here.

New violating goldens, fail-first (the nine-count assertion and both
expected files failed before this change): F8-records-as-prose (a card
of prose where records belong — rule.record-collection-requires-table)
and F9-table-headless-uncaptioned (a body-only table —
rule.table-carries-structure + rule.table-carries-caption). Expected
reports generated by the linter and hand-verified.

Two test corrections for assumptions the single-intent contract era
baked in: the compiler test's "all rules render into the system prompt"
loop now mirrors the compiler's intent filtering (and asserts other
intents' rules do NOT leak into the destructive context — the
destructive context GOLDEN is byte-stable, so downstream pins hold);
the eval golden moved by exactly one line, the contract sha256.

Live validation under the extended contract (gpt-oss via Spark):
governance converges 5/5 — one S3-clean first pass, five genuine
one-round repairs into fully compliant tables (caption + header + body,
12/12 cells populated in the rich runs). All runs then end failed-gate
at EMIT: dspack-emit's shadcnProfile has no table mapping ("unknown
component 'table-caption'"), a pre-existing profile gap never exercised
before — no one had ever emitted a shadcn table. Reported upstream as a
follow-up candidate; not addressed here.

Suite: 110 passed (was 108; +2 golden cases).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 15:22
@ryandmonk
ryandmonk merged commit 26e3dae into main Jul 22, 2026

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

Updates the shadcn/ui v0.4 contract fixture to v2.3.0 and extends the golden-based lint/eval coverage to include the new record-collection intent, ensuring sync and regression protection across the compiler + linter gates.

Changes:

  • Bump fixtures/shadcn.v0_4.dspack.json to shadcn/ui 2.3.0, adding the record-collection intent, its rules, and a worked example.
  • Add new “fail-first” violating goldens F8 and F9 (with expected lint reports) and update the violating-fixture count assertion.
  • Adjust compiler tests so rule rendering assertions are intent-aware; update eval golden contract sha256.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/core/lint/lint.test.ts Updates violating fixture count for the expanded golden set.
src/core/compiler.test.ts Makes rule-rendering assertions intent-scoped for multi-intent contracts.
fixtures/shadcn.v0_4.dspack.json Syncs fixture to shadcn/ui 2.3.0; adds record-collection intent, rules, and example.
fixtures/golden/violating/F8-records-as-prose.dsurface.json New violating surface for record-collection missing a table.
fixtures/golden/violating/F8-records-as-prose.expected.json Expected governance failures for F8.
fixtures/golden/violating/F9-table-headless-uncaptioned.dsurface.json New violating surface for record-collection with missing header/caption.
fixtures/golden/violating/F9-table-headless-uncaptioned.expected.json Expected governance failures for F9.
fixtures/golden/eval/results.fake.json Updates eval golden contract hash to match the synced fixture.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to 32
it("all nine violating fixtures are present", () => {
// F1-F7: destructive-action (v2.2.0). F8-F9: record-collection (v2.3.0).
expect(fixtures.length).toBe(9);
});
Comment thread src/core/compiler.test.ts
Comment on lines +44 to +46
} else {
expect(context.system).not.toContain(rule.id);
}
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