sync: shadcn v2.3.0 fixture + record-collection goldens (F8, F9)#45
Merged
Conversation
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>
There was a problem hiding this comment.
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.jsonto shadcn/ui 2.3.0, adding therecord-collectionintent, 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 on lines
+44
to
+46
| } else { | ||
| expect(context.system).not.toContain(rule.id); | ||
| } |
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.
Third link of P1.1's four-repo sequence (dspack #23 → dspack-studio #23 → here). check-sync went correctly red; fixture re-synced.
New fail-first goldens:
F8-records-as-prose(require-table, 1 finding) andF9-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-gateat emit:shadcnProfilehas 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 onlyexamples[0]). Reported as a follow-up candidate; deliberately not addressed here.Suite: 110 passed.
🤖 Generated with Claude Code