Skip to content

tooling(knowledge): records route the claims of shared concerns a change touches - #9145

Merged
cixzhang merged 13 commits into
mainfrom
tooling/knowledge-concerns
Nov 1, 2026
Merged

cixzhang merged 13 commits into
mainfrom
tooling/knowledge-concerns

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

A contributor or reviewer who changes how a component handles a shared concern, such as an effect, a modality listener, focus return or an announcement, is shown the rules that govern it only when someone names the right trigger. pnpm specs:for routes global claims from the component record's review_triggers, and review-global-baselines.mjs from the caller's --triggers. Dialog.spec.md doesn't list react-runtime, so pnpm specs:for Dialog.tsx returned none of the React runtime rules for a Dialog effect change. The default output is also about 166 lines for Dialog.tsx, so few people read it.

Intended invariant

architecture:knowledge-contracts INV20 (amended here): global review routing stays explicit and claim-scoped. A record that owns a shared concern now declares it beside its triggers, so a change that touches the concern routes those claims from the change itself.

Change

  • Concerns live in the owning record. A record's existing review-applicability:v1 block can carry a concerns map. Each concern lists the shared utility's names, the patterns that re-implement it, and the claims it routes. There's no central catalog: a claim is routed from the one record that owns it.
  • scripts/check-knowledge.mjs validates the map: identifiers, patterns that compile, claims the record defines, and no unknown keys. triggers becomes optional when concerns is present. It also collects concern matches. Its duplicate-key check now works per JSON object, so two concerns can both list names.
  • scripts/lib/review-diff.mjs reads a diff's changed files and its added shipped-source lines. Tests, stories and fixtures are skipped.
  • pnpm specs:for --diff <base> reads from the merge base to the working tree (untracked new files included), and --diff <base>..<head> reads between two commits. It lists the change's files when none are named (repository-relative, so it works from any directory) and prints the concern-routed claims first, each with the line that matched. An empty diff says there are no changes.
  • The default view is short: claims first, then the linked records, cited claims and deciding specs by id (INV26 still holds). --records shows how each one links. Dialog.tsx goes from 166 lines to 18.
  • scripts/review-global-baselines.mjs adds concernMatches for the head's added lines (authority..head). Each match carries its provenance and the matching lines.
  • Seeded concerns:
    • effects, listeners and observers → architecture:react-component-runtime INV2, INV3, INV5, INV6
    • slot presence (isRenderable, or a != null && typeof … !== 'boolean' check) → architecture:react-component-runtime INV16
    • modality tracking re-implemented beside its hook → architecture:react-component-runtime INV16
    • modality tracking (useInteractionModalityTracking, trackInteractionModalityIn, getInteractionModality, or a pointerdown/keydown listener) → architecture:interaction-modality INV1–INV3
    • press tracking (createActionGroupTracker, useMenuPress) → architecture:interaction-modality INV13
    • focus return (focusForLastInput, isFocusDetached, useFocusReturnVisibility) → architecture:interaction-modality INV1 and family:overlay-dismissal FR9
    • announcements → spec:AST-086 FR1–FR3, FR12
  • AGENTS.md: run pnpm specs:for <path> before editing a path. After editing, before commit or push, run pnpm specs:for --diff origin/main and follow every concern-routed claim.

Not in this PR: a scroll-lock concern (it routes spec:AST-094 FR19 once #8098 lands).

Evidence

  • Failure before the change: pnpm specs:for packages/core/src/Dialog/Dialog.tsx routes accessibility, behavior and public-api claims only, with no React runtime rule, even for a diff that adds an effect.
  • Success after the change: pnpm specs:for --diff <base>..<#8381 head> on Dialog.tsx prints:
    Follow first (the change touches a shared concern):
      architecture:interaction-modality  INV1, INV2, INV3  ← modality-tracking (line 80: getInteractionModality; shared: useInteractionModalityTracking, getInteractionModality)
      architecture:react-component-runtime  INV2, INV3, INV5, INV6  ← effects-listeners-observers (line 548: useEffect)
      architecture:interaction-modality  INV1  ← focus-return (line 625: focusForLastInput; shared: focusForLastInput, isFocusDetached, useFocusReturnVisibility)
    
    It also routes architecture:react-component-runtime INV16 for the modality hook. fix(Badge): a badge grows with its text #8236's Badge diff prints architecture:react-component-runtime INV16 ← slot-presence (line 252: typeof label !== 'boolean'; shared: isRenderable). fix(DateInput, DateTimeInput): after a month arrow, Safari's calendar rests on the month the title names #8513's MonthScroller listeners route the runtime claims, and a CSS-only diff routes nothing.
  • Product/runtime behavior verified unchanged: no package source changes.

Scope

  • No intended public API, product behavior or visual direction change. Policy: this amends the review-routing record (INV20) and adds concern blocks to four records, for /approve-spec.
  • Product changes discovered during the work were removed or split. The slot-presence lint extension is a separate PR.
  • Public text and artifacts contain no internal Meta context.

Testing

Writing rubric results

Run over the records this PR edits (knowledge-contracts, react-component-runtime, interaction-modality, AST-086, overlay-dismissal):

  • R1 narration: none. INV20 and the format paragraph state what routing does.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none. "A claim is routed from one source" states the rule, not a rejected option.
  • R5 pull request or issue references remaining: none in the edited text.
  • R6 ruled open questions still listing options: none.

…nge touches

A record that owns a shared concern lists it in its review-applicability
block's new concerns map: the shared utility's names, the code patterns
that re-implement it, and the claims it routes. pnpm specs:for --diff and
scripts/review-global-baselines.mjs read a change's added shipped-source
lines and route every matching concern's claims, whatever the component
record's review_triggers list (knowledge-contracts INV20).

- check-knowledge validates concerns (identifiers, compilable patterns,
  existing claims; triggers optional when concerns are present) and its
  duplicate-key check now works per JSON object.
- specs:for --diff <base> (merge base to the working tree) or
  <base>..<head> lists the change's files when none are named and puts the
  concern claims first. Its default view is short: claims, then a count of
  linked records; --records lists them (Dialog.tsx: 166 lines -> 17).
- review-global-baselines lists concernMatches from authority..head.
- Seeded concerns: effects/listeners/observers -> react-component-runtime
  INV2, INV3, INV5, INV6; modality tracking -> interaction-modality INV1-3;
  press tracking -> interaction-modality INV13; focus return -> AST-085 FR4;
  announcements -> AST-086 FR1-3, FR12.
- AGENTS.md: run pnpm specs:for --diff origin/main before editing.
- Tests: validation cases; #8381's diff routes the runtime and modality
  claims, #8513's listeners the runtime claims; a CSS-only diff and a test
  file's listeners route nothing; the CLI's concernMatches in a scratch
  repository.
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 1, 2026 4:20am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 31, 2026
@astracat-bot

astracat-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 1, 2026, 4:54 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 7267e68

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and the four seeded concern blocks: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Separately from that decision, a few fixes are needed:

  • The new default of pnpm specs:for <path> only counts linked records, while INV26, DEC-12, the lookup sentence in knowledge-contracts, AGENTS.md and the usage text still say it lists them; keep listing by default or amend those texts here.
  • The new AGENTS.md step runs --diff origin/main before editing, where it prints usage and exits 2, and untracked new files or runs from a subdirectory route nothing.
  • The press-tracking concern routes INV13 from usePressFeedback and useLongPress instead of createActionGroupTracker, the owner INV13 names.

[Automated review]

Comment thread AGENTS.md Outdated
route exposes only the listed claim; it never makes the whole record govern
the component or change. Preserve each matched record, claim, trigger, and
match reason in the review receipt.
- Before editing, run `pnpm specs:for --diff origin/main` on your changed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Before any edit there is no diff, so pnpm specs:for --diff origin/main prints the usage text and exits 2; concern routing needs added lines. Suggest "After editing, before you commit or push, run …" (and pnpm specs:for <path> before editing). An unstaged new file is also left out of git diff <merge-base>.

}

function formatResult(result) {
export function formatResult(result, {records: listRecords = false} = {}) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With the short view as the default, pnpm specs:for <path> counts linked records instead of listing them. INV26 ("A matching path lists the record"), DEC-12, the lookup sentence in knowledge-contracts.md, AGENTS.md:35, docs/README.md:125 and the USAGE text still say it lists them. For Dialog.tsx the React runtime and interaction-modality records no longer appear by default.

Comment thread scripts/specs-for-file.mjs Outdated
}
const diff =
diffRange == null ? null : readDiff(diffText(DEFAULT_ROOT, diffRange));
if (files.length === 0 && diff != null) files.push(...diff.files);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

diff.files are repository-relative, but they are later resolved against INIT_CWD. Run from packages/core, a staged packages/core/src/X/X.tsx becomes packages/core/packages/core/src/X/X.tsx (not in the working tree) and no concern claim prints. Resolving these paths against the repository root fixes it.

"claims": ["INV1", "INV2", "INV3"]
},
"press-tracking": {
"names": ["usePressFeedback", "useMenuPress", "useLongPress"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

INV13 is about group press tracking, owned by the action-group tracker (createActionGroupTracker) and useMenuPress. usePressFeedback is the press-paint hook that every pressable surface calls, and useLongPress is a public gesture hook, so this routes INV13 for every Button-style press change and not for a change that calls or copies the tracker. Suggest ["createActionGroupTracker", "useMenuPress"].

…y directory, and the AGENTS step runs after editing

- The short view lists every linked record by id (INV26); --records shows
  how each links, with cited claims and deciding specs.
- --diff paths are repository-relative, so a run from packages/core routes
  its concerns; untracked new files count as added; an empty diff prints
  that there are no changes instead of the usage text.
- AGENTS.md: specs:for <path> before editing, specs:for --diff origin/main
  after editing, before commit or push.
- press-tracking names INV13's owners: createActionGroupTracker and
  useMenuPress.

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and its format paragraph, together with the four seeded concern blocks. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner. The follow-up commit fixes the earlier lookup and --diff issues, but these still need changes:

  • The focus-return concern in AST-085 routes FR4 from focusForLastInput, isFocusDetached and useFocusReturnVisibility, which focusReturn.ts and interaction-modality's applies_to tie to interaction-modality INV1, so route them from that record instead.
  • When no whole record links to a path, the default view says "it cites the claims above" but never prints the cited claims, and USAGE, AGENTS.md and the lookup sentence still describe the full view.
  • The description says specs:for Dialog.tsx returned none of the runtime rules, though it listed the runtime record and only routed none of its claims; also, --diff a...b runs a two-dot diff.

[Automated review]

Comment on lines +59 to +66
"focus-return": {
"names": [
"focusForLastInput",
"isFocusDetached",
"useFocusReturnVisibility"
],
"patterns": ["document\\.activeElement"],
"claims": ["FR4"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These utilities belong to interaction-modality: focusForLastInput says it implements architecture:interaction-modality INV1 (packages/core/src/utils/focusReturn.ts:42-43), useFocusReturnVisibility.ts is in that record's applies_to, and this record never mentions focus return. As seeded, a change that adds or copies a programmatic focus return is told to check FR4 ("Becoming disabled keeps focus") rather than INV1, and every one of the 83 shipped document.activeElement lines routes FR4. Suggest moving these names to interaction-modality's block, routing INV1, and keeping an FR4 concern only with a matcher for disabling or removing a focused control.

Comment thread scripts/specs-for-file.mjs Outdated
if (result.records.length === 0) {
lines.push(
result.decisions.length > 0
? ' No whole record links to this path; it cites the claims above.'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The short view never prints cited claims, so "the claims above" points at nothing: for .changeset/announce-has-replace.md the only governing claim, spec:AST-086/FR9, appears only with --records. Suggest printing cited-claim and deciding-spec ids on one line each (as Records: is), or pointing this message at --records. USAGE (:890-891), AGENTS.md:36-37 and the docstring at :826 also still describe the full view.

Comment thread scripts/specs-for-file.mjs Outdated
maxBuffer: 256 * 1024 * 1024,
});
if (range.includes('..')) {
const [base, head] = range.split(/\.\.\.?/);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This accepts a...b but runs git diff a b, not git's merge-base form, so --diff origin/main...HEAD counts lines main removed since the branch point as added. Suggest rejecting ... or diffing from git merge-base a b.

…ort view prints cited claims; --diff a...b diffs from the merge base

- The focus-return utilities cite interaction-modality INV1 and sit in its
  applies_to, so their concern moves into that record and routes INV1; the
  AST-085 block (FR4 is about a control becoming disabled) is withdrawn,
  and the 83-line document.activeElement pattern goes with it.
- The short view lists cited claims and deciding specs by id beside the
  records; --records shows how each one links.
- --diff <base>...<head> diffs from their merge base, as git does.
…ce and modality tracking

With #9139's INV16 on main, the runtime record owns two more concerns:
slot-presence (isRenderable, or a typeof ... !== 'boolean' check) and
modality-tracking (useInteractionModalityTracking, or a pointerdown or
keydown listener) both route INV16, beside interaction-modality's own
INV1-INV3 for modality.

Tests: #8236's Badge check routes INV16 naming isRenderable; #8381's diff
now also routes INV16.

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and its format paragraph, together with the seeded concern blocks in react-component-runtime, interaction-modality and AST-086; an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The latest commit fixes the focus-return routing, the short view and --diff a...b, but two items still need changes:

  • Add trackInteractionModalityIn to the modality-tracking concern's names: an Effect that calls it, as Dialog.tsx does, currently routes no interaction-modality claim.
  • The description says specs:for Dialog.tsx returned none of the React runtime rules, but it listed the runtime record and only routed none of its claims.

[Automated review]

},
"concerns": {
"modality-tracking": {
"names": ["useInteractionModalityTracking", "getInteractionModality"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trackInteractionModalityIn (packages/core/src/utils/interactionModality.ts:126) is the shared second-document tracker, and packages/core/src/Dialog/Dialog.tsx:548-554 calls it from its own Effect. It is not in these names, so a change whose only modality line is an Effect calling it routes the runtime claims but no interaction-modality claim. Suggest adding it here.

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and its format paragraph, together with every seeded concern block, including this push's slot-presence and modality-tracking routes to react-component-runtime INV16; an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The earlier note about the description's base gap is withdrawn, but these still need changes:

  • Add trackInteractionModalityIn to both modality-tracking blocks' names: an Effect that calls it, as Dialog.tsx does, routes neither INV16 nor interaction-modality INV1–INV3.
  • Narrow the slot-presence pattern: 8 of the 11 shipped lines it matches are data checks such as Markdown/remark.ts:1045, which are then told to follow INV16 with isRenderable; anchoring it as != null && typeof … keeps the three slot checks.
  • The amended INV20 still says every routed match records a trigger, but concernMatches rows carry a concern instead; say "trigger or concern".

[Automated review]

},
"slot-presence": {
"names": ["isRenderable"],
"patterns": ["typeof [\\w.?]+ !==? ['\"]boolean['\"]"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This matches 11 shipped lines today, but only three are slot checks (Badge.tsx:252, RichTextEditor.tsx:602, isRenderable.ts:32). The rest validate data, such as Markdown/remark.ts:1045 (typeof checked !== 'boolean'), and five are outside @astryxdesign/core, so a parser edit is told to follow INV16 with "shared: isRenderable". Anchoring it as != null && typeof [\w.?]+ !==? ['"]boolean['"] keeps the three slot checks (plus one docsite line) and still routes the #8236 fixture.

"claims": ["INV16"]
},
"modality-tracking": {
"names": ["useInteractionModalityTracking"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trackInteractionModalityIn is missing here too. Dialog.tsx:548-554 calls it from its own Effect, which is the gap INV16 names, but a change whose only modality line calls it routes no INV16 from this concern. Suggest adding it to names here and in interaction-modality's modality-tracking block.

the whole record, adjacent claims, drafts, or proposed-head authority govern.
Every routed match records the base authority commit, record digest, record id,
path, trigger, claim id, claim title, and deterministic match reason.
path, trigger, claim id, claim title, and deterministic match reason. A record

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This sentence still says every routed match records a trigger, but concernMatches rows carry concern and no trigger. Suggest "trigger or concern" so the provenance list covers both routes.

…ck; modality names trackInteractionModalityIn; INV20 provenance covers concerns

- slot-presence's pattern is anchored on != null && typeof ... !==
  'boolean', so data validation (typeof checked !== 'boolean') routes no
  INV16; #8236's Badge check still does.
- Both modality-tracking blocks name trackInteractionModalityIn, which
  Dialog calls from its own effect.
- INV20: every routed match records its trigger or concern.
With #9142's FR9 (focus returns in the opener's document) on main, the
overlay-dismissal family owns a focus-return concern too: the same
utilities route FR9 beside interaction-modality INV1.

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and its format paragraph, together with every seeded concern block, including this push's family:overlay-dismissal focus-return → FR9 route; an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The earlier modality, slot-presence and provenance notes are resolved at this head, but three things still need changes:

  • INV20's first sentence still says a block participates only when it maps a semantic trigger, which spec:AST-086's concerns-only block does not; say "a semantic trigger or a concern", drop "also" from "MAY also list", and use the seeded slot pattern in the format example.
  • specs:for --diff and review-global-baselines.mjs read no change when a contributor's git sets diff.noprefix or diff.mnemonicPrefix; pass --src-prefix=a/ --dst-prefix=b/ to each git diff.
  • Files such as internal/a11y-spec/src/patterns/*.fixtures.ts count as shipped source, so a fixture's keydown listener routes Core modality claims; skip *.fixtures.* and fixtures/, or narrow the "fixtures are skipped" wording.

The build-storybook failure comes from the branch predating main's .github/scripts/package-size.mjs, so merging main should clear it.

[Automated review]

path, trigger, claim id, claim title, and deterministic match reason.
path, trigger or concern, claim id, claim title, and deterministic match
reason. A record
that owns a shared concern MAY also list it in the same block's `concerns`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

INV20's first sentence (lines 247-249) still says a block participates only when it "maps a semantic trigger", and "MAY also list" here implies triggers stay required, but the format paragraph lets a block carry concerns instead of triggers, and spec:AST-086's block does. Suggest "maps a semantic trigger or a concern to exact claim ids" and dropping "also".

Comment thread scripts/specs-for-file.mjs Outdated
return git(['diff', '--no-color', '--no-ext-diff', base, head]);
}
const base = git(['merge-base', 'HEAD', range]).trim();
const tracked = git(['diff', '--no-color', '--no-ext-diff', base]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With diff.noprefix=true or diff.mnemonicPrefix=true in the user's git config, these headers lose their a/ and b/ prefixes, readDiff finds no file, and --diff prints No changes against … even for a change that routes claims. Passing --src-prefix=a/ --dst-prefix=b/ here, at lines 920 and 924, and in review-global-baselines.mjs:76 fixes it.

Comment thread scripts/lib/review-diff.mjs Outdated
* listener a test adds re-implements nothing.
*/
const NOT_SHIPPED =
/(?:^|\/)(?:__tests__|__fixtures__|__mocks__)\/|\.(?:test|spec|stories)\.[cm]?[jt]sx?$/;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This skips __fixtures__ directories but not *.fixtures.ts files or fixtures/ directories: 41 such files are read as shipped, and a keydown listener added to internal/a11y-spec/src/patterns/accordion.fixtures.ts (test data for its jsdom and chromium tests) routes interaction-modality INV1–INV3 and react-component-runtime INV16. Suggest adding \.fixtures?\.[cm]?[jt]sx?$ and (?:^|/)fixtures/, with a test.

…/ prefixes; fixture files are not shipped

- INV20: a block maps a trigger or a concern to exact claims, as
  AST-086's concerns-only block does.
- Every diff passes --src-prefix=a/ --dst-prefix=b/, so diff.noprefix or
  diff.mnemonicPrefix in a user's git config no longer hides the files.
- *.fixtures.ts files and fixtures/ directories are test data and route
  nothing.

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and its format paragraph, together with every seeded concern block; an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The earlier fixes (INV20's first sentence, the a//b/ diff prefixes and the fixture filter) are in at this head. One change is still needed: pnpm specs:for --diff … --records prints none of the concern-routed claims that the default view and --json carry, because the long view in formatResult never reads concernClaims, so print the same "Follow first" block there and cover it in the --records test.

[Automated review]


function formatResult(result) {
export function formatResult(result, {records: listRecords = false} = {}) {
if (!listRecords) return formatShortResult(result);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With --records, the long view below never prints result.concernClaims, so pnpm specs:for --diff HEAD --records shows none of the concern-routed claims the default view lists under "Follow first" (--json still carries them). Suggest moving the Follow-first block into a helper both formatters call, and asserting it in the --records test.

Both views now share one formatter for the Follow-first block, so
`--diff … --records` no longer drops the claims the default view lists.

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and its format paragraph, together with every seeded concern block; an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Separately, main now has useInteractionModalityTrackingFor (#9148): please merge main and add it to both modality-tracking names lists, since today #9148's own edits to useTouchTrigger and useMenuPress route no modality claim. The earlier --records issue is fixed.

[Automated review]

Comment on lines +44 to +47
"names": [
"useInteractionModalityTracking",
"trackInteractionModalityIn",
"getInteractionModality"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

main now exports useInteractionModalityTrackingFor (#9148), the modality hook useTouchTrigger and useMenuPress call, and the name matcher's (?![\w$]) keeps useInteractionModalityTracking from matching it. On this head merged with main, #9148's own edits to those two hooks route no claim, while the same lines calling useInteractionModalityTracking() route INV1–INV3 and INV16. Suggest merging main and adding useInteractionModalityTrackingFor here and in react-component-runtime's modality-tracking block.

"claims": ["INV16"]
},
"modality-tracking": {
"names": ["useInteractionModalityTracking", "trackInteractionModalityIn"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same gap as the interaction-modality block: add useInteractionModalityTrackingFor (on main since #9148) so a hook that switches to it routes INV16.

…dalityTrackingFor

#9148 added the document-scoped hook that useTouchTrigger and useMenuPress
call; a change to those calls now routes interaction-modality INV1-INV3
and react-component-runtime INV16 like the other modality names.

@astracat-bot astracat-bot Bot 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.

Approval waits on an engineering owner's decision on the amended architecture:knowledge-contracts INV20 and its format paragraph, together with every seeded concern block in react-component-runtime, interaction-modality, overlay-dismissal and AST-086. An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The earlier useInteractionModalityTrackingFor gap is fixed, and no other change is needed.

[Automated review]

@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 7267e68

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 1, 2026

@astracat-bot astracat-bot Bot 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.

An engineering owner has approved the amended architecture:knowledge-contracts INV20 and every seeded concern block at this head, and the review found no defects: concern routing, pnpm specs:for --diff and the baseline helper's concernMatches behave as described, including on #8381's real Dialog diff. Nothing else is needed from the contributor.

[Automated review]

@cixzhang
cixzhang merged commit dae84a7 into main Nov 1, 2026
54 checks passed
@github-actions
github-actions Bot deleted the tooling/knowledge-concerns branch November 1, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 7267e68b Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant