Skip to content

spec(AST-082): a boolean combined with a closed string set is portable - #8093

Merged
cixzhang merged 1 commit into
mainfrom
spec/ast-082-fr4-boolean-states
Oct 24, 2026
Merged

cixzhang merged 1 commit into
mainfrom
spec/ast-082-fr4-boolean-states

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

The portable form of a prop that is a boolean combined with named states, such as CheckboxInput value: boolean | 'indeterminate', which today has no Swift or Kotlin form and stays web-only.

Existing authority searched

  • spec:AST-082 (current) FR4 lists booleans and closed string sets separately; a union of the two has no portable form, so the generator leaves such props on the web.
  • Props in core docs with this shape: CheckboxInput.value, CheckboxListItem.isChecked, useTableTreeData.isAllExpanded (boolean | 'indeterminate'); HoverCard.hasHoverIndication, Tooltip.hasHoverIndication ('auto' | boolean); Heading.hasTruncateTooltip, Text.hasTruncateTooltip (boolean | 'above' | 'below' | 'start' | 'end'). string | boolean with an open string is not this shape and stays web-only.
  • No open PR covers this form.

Decision

  • FR4: a boolean combined with a closed string set keeps true, false, and every named state as distinct values on every platform, and its wire value is the same as the web value.
  • FR4 verification adds the state and the failure "a named state collapses into true or false".
  • DEC-13 (cixzhang, 2026-10-23).

Rejected alternatives

  • A native name per component for the same values (for example checked | unchecked | indeterminate): one value would have two names.
  • Changing core to a closed string set: it breaks web callers outside a planned minor release.

Claim scope and non-goals

Covers this one form. Not covered: open strings combined with booleans, and which native contracts adopt it first. No web type or output changes (FR14).

Evidence and implementation relationship

No implementation in this PR. The generator change and the CheckboxInput contract follow once this is approved.

Writing rubric results

  • R1 narration: none; FR4 and DEC-13 are present tense.
  • R2 research in the record: none; the prop survey stays in this PR.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: two one-line Rejected: sentences inside DEC-13.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none.

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.
  • 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; any ownership collision is resolved or called out for human decision.
  • 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 (it rewraps the verification table)
  • git diff --check: clean

@vercel

vercel Bot commented Oct 24, 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 Oct 24, 2026 7:56am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 24, 2026, 8:16 AM UTC

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

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current change has no visual or preview-producing scope. Visual checks are not applicable; preview links are not shown.

The exact-head preview is not available yet.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval of this amendment waits on one engineering-owner decision: the new spec:AST-082 FR4 rule that a boolean combined with a closed string set keeps true, false and every named state distinct on every platform, with the web value on the wire, together with its verification row and DEC-13, is new normative text in a current record and has no exact-head approval yet. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), and any later commit, including a rebase after #8070 lands, needs it again. Optionally, the FR4 verification row could name a set with several named states and the failure "collapses into true, false, or another named state", so two named states folding together is caught too.

[Automated review]

| Contract | Verification | Representative states | Mutation or failure expectation |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FR1, FR3 | Component documentation metadata check, plus type and build tests importing a platform-specific component | a shared component; a web-only component; a component on some native platforms; an unsupported platform | A component declares no platforms, claims an unsupported native platform, or an unsupported import type-checks, builds, or renders a substitute |
| FR4 | Contract generation to TypeScript, Swift, and Kotlin, compiled in each language | every core prop kind; a boolean combined with a closed string set; an open string set with a built-in name, a theme-declared name, and a name the platform has no rule for; a projected prop at each portable value and at a web-only value; a text, icon, and content slot, and a web call site passing a wider form; a free-form content or render-function prop in the core | A core prop has no Swift or Kotlin form, a non-portable prop enters the core, a named state collapses into `true` or `false`, a theme-declared name is rejected by a platform type, an unknown open-set name fails instead of drawing the base look, a wire value differs from the web value, a projected value maps to a different web value or a web-only value reaches a native type, or a slot accepts a wider form on a platform that cannot render it |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Optional: the new state "a boolean combined with a closed string set" is met by boolean | 'indeterminate' alone, and the new failure only catches a named state collapsing into true or false. Naming a set with several named states (Heading and Text hasTruncateTooltip: 'above' | 'below' | 'start' | 'end') and the failure "a named state collapses into true, false, or another named state" would cover every value the FR4 rule keeps distinct.

@cixzhang
cixzhang force-pushed the spec/ast-082-fr4-open-sets-projections branch from 88ebb37 to 8a88a99 Compare October 24, 2026 05:46
@cixzhang
cixzhang force-pushed the spec/ast-082-fr4-boolean-states branch from f5d7c9a to 895e2b3 Compare October 24, 2026 05:48

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval of this amendment waits on one engineering-owner decision: the new spec:AST-082 FR4 rule that a boolean combined with a closed string set keeps true, false and every named state distinct on every platform, with the web value on the wire, together with its verification row and DEC-13, is new normative text in a current record and has no approval on this head. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), and any later commit, including a rebase onto main after #8070 lands, needs it again. Nothing else needs to change; the optional verification wording suggested on the FR4 row still applies.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval of this amendment waits on one engineering-owner decision: the new spec:AST-082 FR4 rule that a boolean combined with a closed string set keeps true, false and every named state distinct on every platform, with the web value on the wire, together with its verification row and DEC-13, is new normative text in a current record and has no approval on this head. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), and any later commit, including a rebase onto main after #8070 lands, needs it again. Nothing else needs to change; the optional verification wording suggested on the FR4 row still applies.

[Automated review]

@cixzhang
cixzhang force-pushed the spec/ast-082-fr4-boolean-states branch from 949d56b to f8b553c Compare October 24, 2026 07:49
@cixzhang
cixzhang changed the base branch from spec/ast-082-fr4-open-sets-projections to main October 24, 2026 07:49
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 24, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec f8b553c

@github-actions github-actions Bot added spec-auto-merge Auto-merge was enabled by the spec owner gate and removed needs:spec-owner-review Current knowledge records await owner approval labels Oct 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This spec amendment is ready to merge: an engineering owner approved the new spec:AST-082 FR4 rule for a boolean combined with a closed string set, its verification row and DEC-13 on this exact head, and the record passes the knowledge check without contradicting the rest of the spec. Nothing else needs to change, but any further commit needs a fresh /approve-spec <full head SHA> from an engineering owner. Optionally, the FR4 verification row could also name the failure where one named state collapses into another, such as Heading's 'below' into 'above'.

[Automated review]

@cixzhang
cixzhang merged commit 07605c2 into main Oct 24, 2026
53 checks passed
@github-actions
github-actions Bot deleted the spec/ast-082-fr4-boolean-states branch October 25, 2026 06:20

This branch was successfully deployed

1 active deployment
Preview — f8b553c4 Deployed Oct 24, 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. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant