Skip to content

docs(spec): ChatSystemMessage records its shipped contract as current - #9318

Merged
cixzhang merged 5 commits into
mainfrom
spec-backfill/ChatSystemMessage
Nov 1, 2026
Merged

cixzhang merged 5 commits into
mainfrom
spec-backfill/ChatSystemMessage

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

Promote component:ChatSystemMessage from draft to current. No behavior, prop, default, target, or export changes.

Existing authority searched

Decision

component:ChatSystemMessage, authority: current, approved by cixzhang. Draft and audit wording is removed, basis cells read from current source and tests, and the verification map credits tests for what they catch, with a "Read from source, with no focused test yet" list for the rest. The draft predated main's removal of the row's live role (spec:AST-086 FR4); the record now states that the root carries no live role and that a caller role reaches it. No implementation gap. OQ1 (what icon does with variant="divider") stays open.

Rejected alternatives

None.

Claim scope and non-goals

Claims are scoped to what main's source and tests show.

Evidence and implementation relationship

The component's colocated tests, as listed in the verification map.

Writing rubric results

  • R1 narration: none.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none; open questions are unruled.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract: none.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; no ownership collision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge: aligned
  • Prettier: clean
  • git diff --check: clean

@vercel

vercel Bot commented Nov 1, 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 1:02pm UTC

Request Review

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

astracat-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 1, 2026, 1:18 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 1, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 1, 2026 12:07

@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.

This record promotion is on hold for an owner decision, and two verification rows need correcting first. An engineering owner needs to approve or reject making component:ChatSystemMessage current as written: in particular, FR2 keeps icon unrendered with variant="divider" as a current rule while OQ1 stays open, and FR3 forbids a live role on the row even outside a chat log. The owner records the decision by commenting /approve-spec <full head SHA> (the author can do this as an engineering owner) once the rows below are fixed, since changing the record's text resets approval.

  • The FR1 row says the "no-divider" test fails when a rule is drawn, but that test counts [aria-hidden] elements and Divider renders none, so a Divider drawn in the default row keeps every test passing.
  • The FR5 row says a missing target fails, but no credited test checks the astryx-chat-system-message class; move both clauses to "Read from source, with no focused test yet" and narrow the description's "credits only tests that fail when a claim breaks".

[Automated review]

| Documentation and surface | Consumer docs, published declarations, block metadata, explicit story ownership, exports, and `check:knowledge` | Props, `./Chat` subpath, four blocks, draft record | Missing or stale public docs, export, owner route, target map, or knowledge shape fails validation or review. | `audit:ChatSystemMessage/docs` |
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
| -------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------- | -------------------------------------------------------- | --------------------------------------- |
| FR1 | `ChatSystemMessage.test.tsx` children, no-divider, and icon tests | default; default with icon | Missing content or icon, or a drawn rule, fails. | `audit:ChatSystemMessage/behavior` |

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 "no-divider" test (ChatSystemMessage.test.tsx:30–34) counts [aria-hidden] elements, and Divider renders none, so drawing a <Divider /> in the default row leaves every test passing. Move "no divider rule is drawn" to the "Read from source" list, or credit a test that checks there is no separator.

| FR2, AR2 | `ChatSystemMessage.test.tsx` divider, separator-name, divider-icon, and numeric-zero label tests | divider; divider with icon | A missing separator, wrong name, or rendered icon fails. | `audit:ChatSystemMessage/accessibility` |
| FR3, AR1 | `ChatSystemMessage.test.tsx` no-live-role tests | both variants | A live role on the root fails. | `audit:ChatSystemMessage/accessibility` |
| FR4 | `ChatSystemMessage.test.tsx` "preserves the complete root passthrough seam" for each variant | ref, data, ARIA, role, class, style, xstyle | A dropped input fails. | `audit:ChatSystemMessage/public-api` |
| FR5 | `ChatSystemMessage.test.tsx` variant test; `themingTargets.test.ts` | both variants | A missing target or reflected variant fails. | `audit:ChatSystemMessage/theming` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No credited test fails when the astryx-chat-system-message class is dropped: the variant tests assert only data-variant, and themingTargets.test.ts only checks that rendered classes are documented. Drop "a missing target" from the failure expectation, or list the target under "Read from source".

@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.

This record promotion is waiting on an engineering owner's decision, and two verification-map entries need correcting first. An engineering owner needs to approve or reject making component:ChatSystemMessage current as written, in particular FR2 and the Stable Icon row, which keep icon unrendered with variant="divider" as a current rule while OQ1 stays open. The owner records that by commenting /approve-spec <full head SHA> (the author can do this as an engineering owner) after the fixes below, since changing the record's text resets approval.

  • The FR5 row credits themingTargets.test.ts and the divider-only variant test for "A missing reflected variant fails", but both still pass when the default branch stops reflecting variant; credit the root-passthrough tests, which assert data-variant for each variant, instead.
  • FR2's horizontal orientation has no credited test and is missing from the "Read from source" list; add it there, or credit the Chromium state matrix, which checks it.

[Automated review]

| FR2, AR2 | `ChatSystemMessage.test.tsx` divider, separator-name, divider-icon, and numeric-zero label tests | divider; divider with icon | A missing separator, wrong name, or rendered icon fails. | `audit:ChatSystemMessage/accessibility` |
| FR3, AR1 | `ChatSystemMessage.test.tsx` no-live-role tests | both variants | A live role on the root fails. | `audit:ChatSystemMessage/accessibility` |
| FR4 | `ChatSystemMessage.test.tsx` "preserves the complete root passthrough seam" for each variant | ref, data, ARIA, role, class, style, xstyle | A dropped input fails. | `audit:ChatSystemMessage/public-api` |
| FR5 | `ChatSystemMessage.test.tsx` variant test; `themingTargets.test.ts` | both variants | A missing reflected variant fails. | `audit:ChatSystemMessage/theming` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

themingTargets.test.ts only checks that rendered classes and themeProps keys are documented, and the variant test asserts only the divider: with {variant} dropped from the default branch, both still pass. Credit the root-passthrough tests (they assert data-variant for each variant) here instead.

| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
| -------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------- | -------------------------------------------------------- | --------------------------------------- |
| FR1 | `ChatSystemMessage.test.tsx` children and icon tests | default; default with icon | Missing content or icon fails. | `audit:ChatSystemMessage/behavior` |
| FR2, AR2 | `ChatSystemMessage.test.tsx` divider, separator-name, divider-icon, and numeric-zero label tests | divider; divider with icon | A missing separator, wrong name, or rendered icon fails. | `audit:ChatSystemMessage/accessibility` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No credited test checks FR2's horizontal orientation (a vertical Divider passes all 23 tests). List it under "Read from source", or credit the Chromium state matrix, which expects separatorOrientation: 'horizontal'.

@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.

This record promotion is ready for an engineering owner's decision: the verification-map fixes from the last round are in, and no defects remain. Approving it makes component:ChatSystemMessage current as written, including FR2 and the Stable Icon row, which keep icon unrendered with variant="divider" as a current rule while OQ1 stays open. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author can do so as an engineering owner; any later change to the record's text resets approval.

[Automated review]

@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 93a00be

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 1, 2026
@cixzhang
cixzhang merged commit be0b0d2 into main Nov 1, 2026
53 checks passed
@cixzhang
cixzhang deleted the spec-backfill/ChatSystemMessage branch November 1, 2026 17:33

This branch was successfully deployed

1 active deployment
Preview — 93a00be9 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