Skip to content

spec(AST-082): open string sets, portable projections, and typed slot forms - #8070

Merged
cixzhang merged 3 commits into
mainfrom
spec/ast-082-fr4-open-sets-projections
Oct 24, 2026
Merged

cixzhang merged 3 commits into
mainfrom
spec/ast-082-fr4-open-sets-projections

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Exact decision needed

Three portable forms the core contract lacks, so native apps can use a theme's own variants, a full-width button, and icon and content slots: (1) open string sets, (2) a portable projection of a wider web type, and (3) the exact form of text, icon, and content slots, with a platform contract allowed to accept a wider form for the same slot.

Existing authority searched

  • spec:AST-082 (current) FR4 lists closed string sets only and names typed slots without their forms; FR17 defines shared icon names; FR14 keeps web output unchanged.
  • spec:AST-024 (current) and spec:AST-087 (current, FR3–FR4): web augmentable maps (Heading type, icon variants) and unlisted-name behavior on the web.
  • Core's augmentable maps: AppShell, AvatarStatusDot, Badge, Banner (status, container), Breadcrumbs, Button, Card, Dialog, Divider, FieldStatus, Heading type, Indicator (family, name), Pagination, ProgressBar, Section, StatusDot, Text color, Token color, TreeList.
  • Open PRs touching AST-082 (FR16 build-time read) and native library specs for slots and augmentable variants were checked; they depend on, and do not settle, these core claims. A separate FR4 clause for booleans with named states is not part of this PR.

Decision

  • Open string sets (FR4): built-in names a theme or app extends, as core's augmentable maps are. The wire value is the name, as on the web. Each native type is a string-backed value with built-in constants; the platform theme build adds the theme's names, as the web theme build writes the TypeScript augmentation. Any name decodes; a name with no rule draws the component's base look, as the web does. DEC-12.
  • Portable projection (FR4): a prop whose web type is wider may name a portable closed set every platform supports, each mapped to one web value, such as Button width: content (default) or fill (web '100%'). Other web values stay web-only. DEC-12.
  • Slot forms (FR4): a text slot is a string; an icon slot is a shared FR17 icon name, and an unknown name stops a development build with a message naming it and draws nothing in a release build; a content slot holds named Astryx components. A platform contract may accept a wider form for the same slot (a React node on the web) with one meaning; the core form is what every platform accepts.
  • Verification rows for FR4 and FR17 gain the states and failure signals for each.

Rejected alternatives

  • An enum of built-in names plus a case for any other string, for open sets: theme names stay plain strings and the theme build generates nothing.

Claim scope and non-goals

Covers the three forms above. Not covered: booleans with named states (a separate amendment), which props adopt each form beyond the examples, and native library APIs, which platform specs define. No web type or output changes (FR14).

Evidence and implementation relationship

No implementation in this PR. The web side already works this way: the theme build augments the maps, and an augmented name with no built-in style renders without variant styling. Native library specs for slots and augmentable variants build on these claims.

Writing rubric results

  • R1 narration: none; FR4 and DEC-12 describe the system in the present tense.
  • R2 research in the record: none; the list of augmentable maps stays in this PR.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: one Rejected: line inside DEC-12.
  • R5 pull request or issue references remaining: none (searched #+digits, /pull/, /issues/).
  • R6 ruled open questions still listing options: none added or left; both rulings are recorded in DEC-12.

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, so every row shows as changed; only the FR4 and FR17 rows change in content)
  • 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:22am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 24, 2026
@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, 7:46 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval 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

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 88ebb37

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

Changes requested: the new FR4 forms are owner-approved, but the unknown-icon sentence and “the core form is what every platform accepts” carry no platform qualifier, so they bind the web, which the record's own Non-goals and FR14 rule out (today Icon renders nothing for an unresolved name with no development stop, and Badge renders a string icon as text). Please scope the unknown-name sentence to native platforms, and add to FR14 that making an existing web prop an icon slot, where the web renders a string as text today, ships only in a planned minor under spec:AST-017.

[Automated review]

Comment on lines +111 to +114
slot is a string. An **icon** slot is a shared icon name (FR17), which each
platform resolves the way FR17 says; in a development build an unknown name
stops with a message that names the icon, and in a release build it draws
nothing. A **content** slot holds named Astryx components. A platform

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 sentence has no platform qualifier, and FR3 makes the core contract the same on every platform, so it binds the web too: today Icon renders nothing for an unresolved name with no development stop, and Badge renders a string icon as text. That is a web behavior change the Non-goals rule out. Suggest scoping it (“on a native platform, a development build stops …”) and adding to FR14 that making an existing web prop an icon slot ships only in a planned minor under spec:AST-017, as FR7 and FR8 removals do.

@cixzhang
cixzhang force-pushed the spec/ast-082-fr4-open-sets-projections branch from 88ebb37 to 8a88a99 Compare October 24, 2026 05:46
@github-actions github-actions Bot added needs:spec-owner-review Current knowledge records await owner approval and removed spec-auto-merge Auto-merge was enabled by the spec owner gate labels Oct 24, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 8a88a99

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

Requesting one change: the amended spec:AST-082 FR4, the new FR14 sentence and DEC-12 are owner-approved at this head, but the FR14 verification row does not test the new FR14 sentence. Its failure expectation still fires only when a web prop disappears outside a planned minor, so making an existing web prop that renders a string as text an icon slot in a patch would pass; please add that state and failure to the FR14 row. A new commit voids the current approval, so an engineering owner, the author included, then re-approves by commenting /approve-spec <full head SHA>.

[Automated review]

| FR11 | FR12 experience scores per scenario step, oldest and newest supported OS | navigation, sheet, menu, picker, switch, text entry, scrolling, keyboard shortcut, large text; a capability newer than the running OS | A step draws a custom control where the platform provides one, misses the touch-target minimum, ignores the text-size setting, or breaks on the oldest supported OS |
| FR12 | Scenario replay on candidates and reference, on real release builds and devices | each scenario on each candidate and the toolkit reference; oldest and newest supported OS; a lower-end device per platform | A candidate is scored without the reference, on a debug build, on emulation only, on one OS version, or on a different scenario set, or a visual score is given without device captures |
| FR13 | Dependency manifest audit of each native platform package | platform SDK; first-party project; a React Native out-of-tree desktop platform; third-party optional integration; third-party fork | A third-party library or fork is required to install, build, or render on the platform |
| FR14 | Compiler and render output comparison, core dependency graph check, and a web type surface diff | each maintained theme with and without the native package installed; runtime-mounted and built CSS; components; web types before and after | Any byte of CSS, mounted rules, or rendered web markup differs, core depends on native, or a web prop disappears outside a planned minor |

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 row still fails only when a web prop disappears outside a planned minor, so it does not test the new FR14 sentence (lines 279–281): converting, say, Badge icon into an icon slot in a patch keeps the prop and can keep its ReactNode type. Suggest adding the state "an existing web prop that renders a string as text, made an icon slot" and the failure "or such a prop becomes an icon slot outside a planned minor".

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

Copy link
Copy Markdown
Contributor Author

/approve-spec a95e13d

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

Recommending approval: the amended spec:AST-082 FR4 (open string sets, the Button width projection and typed slot forms), the new FR14 sentence and DEC-12 are approved by an engineering owner for this exact revision, and the FR14 verification row now fails an icon-slot conversion that ships outside a planned minor. Nothing else needs to change; a new commit would void the approval, so an engineering owner, the author included, would then re-approve by commenting /approve-spec <full head SHA>.

[Automated review]

@cixzhang
cixzhang merged commit 2a0aa4a into main Oct 24, 2026
53 checks passed
@github-actions
github-actions Bot deleted the spec/ast-082-fr4-open-sets-projections branch October 25, 2026 06:20

This branch was successfully deployed

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