Skip to content

docs(spec): ChatTokenizedText records its shipped contract as current - #9326

Merged
cixzhang merged 3 commits into
mainfrom
spec-backfill/ChatTokenizedText
Nov 1, 2026
Merged

cixzhang merged 3 commits into
mainfrom
spec-backfill/ChatTokenizedText

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

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

Existing authority searched

Decision

component:ChatTokenizedText, 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. No implementation gap. How overlapping or duplicate token values resolve is left to the owner as OQ1, with today's prefix splitting recorded under Current-state impact.

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 2:08pm 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, 2:22 PM UTC

@cixzhang
cixzhang marked this pull request as ready for review November 1, 2026 13:30
@github-actions github-actions Bot added 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.

Approval is on hold for an engineering owner's decision: promoting ChatTokenizedText to current makes the new FR1 overlap rule a requirement, including today's prefix shadowing (with tokens @u1 then @u12, the text @u12 renders the @u1 chip followed by a stray 2). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Two verification-map lines also need fixing, and because editing the record resets approval, fixing them first saves a second approval:

  • Credit ChatTokenizedText.a11y.chromium.spec.ts in the map for the FR4 target, since that spec already fails when the target is missing, and drop the target from the "Read from source" list.
  • Add ORD2 (values containing RegExp metacharacters matching literally) to the "Read from source" list, since the /search special-character test still passes with escaping removed.

[Automated review]

| Docs / surface | docs, declarations, exports, `check:knowledge`, docs typecheck | public props, Chat subpath, target, draft record | Missing or stale docs, export, target map, or knowledge shape fails validation or review. | `audit:ChatTokenizedText/docs` |
| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | ---------------------------------------------------------------- | ------------------------------------ |
| FR1–FR3, PR1 | `ChatTokenizedText.test.tsx` plain, single, multiple, repeated, special-character, surrounding-text, empty-value, and custom-match tests | plain, structured, custom, repeated, empty | Lost text, zero-width nontermination, or the wrong branch fails. | `audit:ChatTokenizedText/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.

ORD2's literal matching has no test that fails without escaping: the special-character test uses /search, which holds no RegExp metacharacter, so it still passes with escapeRegExp returning its input. Until a metacharacter case exists, ORD2 belongs on the read-from-source list below.

- FR1: the first-listed token winning an overlap, and the later definition
rendering for a shared value.
- FR3: `variant` and `icon` reaching the Badge.
- FR4: `className`, `style`, and `xstyle` composition, and the target.

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 target already has browser evidence: ChatTokenizedText.a11y.chromium.spec.ts (still in verified_by) waits for .astryx-chat-tokenized-text and fails when it is missing or not unique. A map row crediting that spec for FR4's target, and the rendered FR1-FR3 states it counts, keeps it traceable; className, style and xstyle composition can stay on this list.

@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 is on hold for one owner decision: promoting ChatTokenizedText to current makes FR1-FR5 its contract, with overlapping and duplicate token values left open as OQ1. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The two verification-map fixes from the previous review are in, and the record matches the shipped source and tests.

[Automated review]

@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

/approve-spec 62cc631

@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 940add5 into main Nov 1, 2026
53 checks passed
@cixzhang
cixzhang deleted the spec-backfill/ChatTokenizedText branch November 1, 2026 17:33

This branch was successfully deployed

1 active deployment
Preview — 62cc6310 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