feat: audited trigger-label lift in the a2ui surface emitter (ADR-M3-1 amendment)#14
Merged
Conversation
…1 amendment) When no label-bearing component inside a subButtonText sub carries direct text, lift the FIRST direct text under that sub (document order, the sub's own text included) into the mapped prop — recorded as a 'surface-label-lifted' warning like every other documented casualty. Lift, never synthesis: relocation of existing text only. A trigger with no text anywhere still emits without triggerLabel and gate A3 refuses it, byte-for-byte as before — the 117 no-text-anywhere runs from the PR-15 decomposition remain governance's job, now matched exactly by the amended rule (textScope: subtree, dspack#13). Existing precedence unchanged: a labeled label-bearing component always wins; the incidental-text test still passes untouched. 51 tests green (49 + 2: lift-with-audit + relocation-never-synthesis). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Local editor config swept in by git add -A; not part of the change. The file remains untracked on disk. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the A2UI surface emitter’s compound flattening rules for subButtonText so that, when no label-bearing component provides the label, the emitter lifts the first available direct text within the relevant sub-tree into the expected label prop and audits that lift via a dedicated warning. It also adds tests to ensure the lift is relocation-only (never synthesis) and that instance validation behavior (A3) remains consistent.
Changes:
- Extend
applySubContentto lift the first direct text under eachsubButtonTextsub-component when the target label prop is otherwise missing, and emit asurface-label-liftedwarning. - Update emitter documentation comment to describe the audited lift rule and its “never synthesis” constraint.
- Add vitest coverage for the new lift-with-audit behavior and for the “no text anywhere still fails A3” invariant.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/targets/a2ui/surface.ts | Implements audited label lifting for missing subButtonText labels and documents the amended behavior. |
| src/surface-emit.test.ts | Adds tests covering lift-with-audit success and “relocation, never synthesis” failure behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Jul 4, 2026
Merged
ryandmonk
added a commit
that referenced
this pull request
Jul 4, 2026
The 2.2.0 sync commit (1c8df39) was pushed to feat/audited-label-lift after PR #14 had already merged — it never reached main and was orphaned when the branch was deleted per the hygiene rule. Re-landed here on the release branch, where the current copies belong. Process note: verify a PR is still OPEN before pushing follow-up commits to its branch. json-render goldens regenerated (no diff — governance-side change). 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-emit leg of the ADR-M3-1 amendment (dspack#13): the a2ui target's documented projection now lifts a
subButtonTextlabel from the first direct text under the sub when no label-bearing component carries it — the 20 'liftable' runs from PR-15's corrected decomposition (trigger > button > badge{text}, the original 2026-07-03 signature shape).The honesty line, drawn precisely
surface-label-liftedwarning naming the source component, exactly like the flattening/synthesis casualties. Audit reports can count lifts.triggerLabeland A3 refuses it byte-for-byte as before — locked by a dedicated test. The 117 no-text runs stay governance's job, matched exactly by the amended rule (textScope: subtree).Acceptance
npx vitest run— 51/51 (2 new: lift-with-audit passes A1–A3 on both catalog versions; relocation-never-synthesis keeps A3 red)check:syncnote: theinput/contract copy moves to 2.2.0 when dspack#13 merges — I'll push that sync commit onto this branch after the merge so both land together (same PR, not a stack).🤖 Generated with Claude Code