feat: ADR-M3-1 amendment — textScope subtree, ∃-within, fixture rework, findings correction#25
Merged
Merged
Conversation
…k, findings correction The dspack-gen leg of the amendment (dspack#13): - evaluator: requiredText honors textScope self|subtree; within scoping is ∃-quantified (one satisfying descendant clears the scope; a finding at the scope only when all matching descendants violate). Steering updated. - contract copy staged at 2.2.0 (bytes == dspack#13 head; check:sync goes green when it merges). - fixtures: the nested-label shape (old F6a) MOVED to the clean goldens — under the amended rule it lints clean (its emission-with-lift is covered in dspack-emit#14); F6b (no text anywhere) stays violating, finding now at the trigger with the subtree message; repair golden retargeted to F6b; ∃-within unit test (mixed siblings clear; all-violate fires at scope; existence clause unchanged). - findings CORRECTION note: the merged decomposition counted trigger-own- text as projectable-today; the pre-amendment projection does not consume it. Corrected: 67 projectable / 20 liftable / 117 unmappable — v2 script + output committed beside the original; conclusions unchanged in direction. 83 tests + build green. check:sync pends dspack#13's merge (noted in PR). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…by a stale edit) The prior commit message claimed the correction note; the edit had failed silently against a stale read and only the evidence-dir v2 script/output landed. This adds the note itself: corrected decomposition 67/20/117 with links to the corrected script and output; conclusions unchanged in direction. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates dspack-gen’s v0.4 governance evaluation and associated fixtures to match the ADR-M3-1 amendment: required-props now supports textScope: self|subtree and changes within evaluation to existential (“∃-within”), plus regenerates/retells goldens and adds corrected findings-evidence artifacts.
Changes:
- Update
required-propsevaluation semantics:requiredTextcan scan self vs subtree, andwithinscopes now pass if at least one matching descendant satisfies. - Refresh fixtures/goldens and tests to reflect the amended trigger-label rule and the clean/violating fixture reshuffle.
- Add corrected decomposition evidence artifacts (script + output) for the findings addendum.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/repair/render.test.ts | Updates repair-message golden selection/assertions to use the amended F6b case and subtree wording. |
| src/core/lint/rules.ts | Implements textScope and ∃-within behavior in evaluateRequiredProps. |
| src/core/lint/lint.test.ts | Updates golden counts and adds unit coverage pinning ∃-within semantics; moves old F6a shape to clean. |
| src/core/contract.ts | Extends RequiredPropsRule with textScope?: "self" | "subtree". |
| src/core/compiler.ts | Updates steering phrasing for required-props, including subtree wording and ∃-within framing. |
| fixtures/shadcn.v0_4.dspack.json | Bumps contract version and amends rule.trigger-carries-label to target alert-dialog-trigger with textScope: subtree. |
| fixtures/golden/violating/F6b-trigger-label-missing.expected.json | Updates expected finding message/location/rationale to match the amended rule. |
| fixtures/golden/violating/F6a-trigger-label-nested.expected.json | Removes the formerly-violating expected report (fixture now treated as clean under amendment). |
| fixtures/golden/repair/F6b.repair.txt | Updates repair golden to point at the trigger node and use subtree wording. |
| fixtures/golden/eval/results.fake.json | Updates embedded contract sha256 to match the amended contract artifact. |
| fixtures/golden/context/shadcn.destructive-action.json | Updates embedded governance rule text to match amended trigger-label requirement. |
| fixtures/golden/clean/nested-trigger-label.dsurface.json | Adds clean golden representing the nested-label shape that now passes. |
| docs/evidence/2026-07-04-v04-effect/decomposition-corrected.txt | Adds corrected bucket counts for the findings correction record. |
| docs/evidence/2026-07-04-v04-effect/decompose-trigger-label-v2.py | Adds v2 decomposition script supporting the corrected evidence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…pilot) The v2 script was derived from v1 by patching the bucketing logic; the module docstring still described v1's two buckets and named v1's filename in the reproduce command. Now documents the three corrected buckets and the right filename. Script output byte-unchanged. 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
The dspack-gen leg of the ADR-M3-1 amendment (dspack#13; emitter leg dspack-emit#14).
Changes
rules.ts):requiredTexthonorstextScope: self|subtree;withinis ∃-quantified — one satisfying descendant clears the scope, a finding lands at the scope node only when every matching descendant violates; the existence clause is unchanged. Compiler steering phrased accordingly ("At least one … inside each …").projectable-but-stricter: 73counted trigger-own-text as projectable-today; the pre-amendment projection does not consume it. Corrected 67 / 20 / 117 — v2 script + output committed beside the originals; correction note added to the findings addendum; conclusions unchanged in direction.Merge order
dspack#13 first — until then this PR's
check:syncstep is red by design (the copy is ahead of dspack main). Not a stack; just sequencing, same as the Phase 1 pattern.Acceptance
npx vitest run— 83/83 (goldens regenerated: context steering, fake-eval contract sha, F6b expected + repair)check:sync— green after dspack#13 merges🤖 Generated with Claude Code