Skip to content

spec(AST-140): React Native platform code - #12594

Merged
imdreamrunner merged 19 commits into
mainfrom
spec/ast-140-react-native-platform-code
Nov 19, 2026
Merged

imdreamrunner merged 19 commits into
mainfrom
spec/ast-140-react-native-platform-code

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Not stacked. Merges right after #12563.

Exact decision needed

Which shared rules the native code of @astryxdesign/react-native's platform layer follows: how native modules and native views are registered and reached from JavaScript, the result vocabulary at the boundary, what values cross it, how native interfaces grow, threading, conformance tests, which parts depend on the binding, and how Astryx's native code coexists with other native libraries in an app.

Existing authority searched

  • spec:AST-112 (React Native foundation, as amended by spec(AST-112): React Native commands are one astryx rn group; package shape (Expo wrapper, default linking, named features) #12563; this record cites the amended claim ids) states the package shape in engine-neutral terms. It points its result vocabulary, additive-evolution, registration, exposure, native conformance, and engine-split claims at this record (FR4, FR5, FR6, FR8, FR15, DEC-10, FR22), and keeps DEC-14 (named features, with no revisions).
  • spec:AST-082 (cross-platform candidates and the canary channel): FR12 and FR15.
  • The platform group drafts listed in the record (spec:AST-123 to spec:AST-132, and spec:AST-135) each specify their own native pieces; none owns the rules they share. Linking per group stays in spec:AST-112/FR3 and FR7's group table.
  • No current record covers native-layer registration, threading, or coexistence. A new record is the owner because the rules depend on the binding and apply to every group, which the neutral foundation record does not contain.

Decision

  • FR1: one native module or view per contract, one name and kind on both platforms, Astryx prefix, registration through autolinking and React Native's code generation, app-facing types that are plain JavaScript and platform types.
  • FR2: a missing native piece answers not-linked, no-module, or an unavailable view; every entry imports cleanly.
  • FR3: results come back as values: ok, a typed failure, or cancelled; the common reasons; the binding's status object; one resolution per call; time bounds; a method that receives bytes takes one ArrayBuffer argument after its request object.
  • FR4: plain values cross; bytes JavaScript holds go to native as an ArrayBuffer, bytes native produces come back as a file: URI in the core's cache until the system reclaims it, at any size; opaque ids for native objects; events as one object with removable subscriptions.
  • FR5: contracts grow by named features from a baseline (the first release that carries the contract after the package leaves the canary channel, release candidates included; canaries may reshape a contract); one feature list per contract, reported by the binary and read through the public contractFeatures(contract) with a generated ContractFeature union, the package-wide read beside each capability's supports(feature), both over the same list; every spec change states its added features or kept behavior; shipped members keep their shape; an older binary works with newer JavaScript.
  • FR6: UI work and motion on the UI thread, long work on background threads, results delivered on the JavaScript thread.
  • FR7: one conformance suite per contract on iOS, Android, and the JavaScript double; the Debug frame recorder reached through ./testing (DEC-7, OQ3).
  • FR8: the contracts are engine-neutral and the binding is engine-specific, with an engine-neutral description each codegen spec matches and another host implements from.
  • FR9: Astryx's native code sits beside an app's native libraries through prefixed symbols and objects of its own, with public API and self-checked exceptions.
  • FR11 (native seam): Astryx's native views and modules are exposed through a seam generated from the contracts, and React Native's glue and other engines bind through it (<Name>Host, <Name>Events, <Name>Module, the type mapping, the optional-value rule, Seam names, iOS and Android forms, the adoption rule, a seam reject whose code is one of the method's reasons and reaches JavaScript as FR3's result object, public seam interfaces on iOS and Android, records that carry their spec's declared fields, the dynamic-color gap with OQ4, and the undeclared-fields gap). The seam is a published protocol for engine bindings (React Native's binding in the package and any other engine's binding compile against its exact members; apps use the JavaScript API), distinct from the foundation's host seam.
  • Decisions with their reasons: results are values at the binding (DEC-2), shipped members keep their shape (DEC-3), no swizzling, method replacement, or app-wide singletons (DEC-6), the frame recorder in Debug builds only (DEC-7), engines bind through the published seam, not internal class names or selectors (DEC-8).
  • While the package is on the canary channel these are the platform's conventions; the public promise is set when it leaves canary (DEC-5).

Rejected alternatives

None recorded. The record states each direction with its reason in the decision log.

Claim scope and non-goals

FR1 to FR9, FR11, and DEC-1 to DEC-8. Non-goals: the template's two standing bullets (equivalent implementations stay valid; internal mechanisms belong in architecture unless a dependent is named). A "Related records" section points each piece's methods to its group record, the app-facing API, linking, and packages outside the core to spec:AST-112 FR3, FR4, FR5, and FR7.

Evidence and implementation relationship

The rules follow the platform layer's current native code and its contract list (each contract's kind, platforms, and revision). The record states the target; FR5's gap line names the observable mismatch. No implementation in this PR.

Writing rubric results

  • R1 narration: none found; Intent and DEC-5 state the canary status as a property of the package, in the present tense.
  • R2 research in the record: none; the contract inventory stays outside the record.
  • R3 evidence naming a change: none; verification cells name checks, suites, and device runs.
  • R4 rejected alternatives over one line or outside a decision: none; deliberate stops are stated inside DEC-2, DEC-3, DEC-6, DEC-7, and DEC-8 with their reasons.
  • R5 pull request or issue references remaining: none in the record.
  • R6 ruled open questions still listing options: none; OQ1 (publishing the neutral descriptions), OQ2 (a common time-bound reason), OQ3 (Android frame recording), and OQ4 (dynamic colors on the native seam) are unanswered and keep their options.
  • R7 project status (build status or work order): the remaining mismatches are the FR5 gap line and two FR11 gap lines.

Scope

Components: none (system spec for the React Native platform layer)

  • 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: exit 0, records aligned, no warning naming this record
  • Prettier: ok
  • git diff --check: clean

@vercel

vercel Bot commented Nov 18, 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 18, 2026 9:07pm UTC

Request Review

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

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 19, 2026, 6:41 PM UTC

@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 spec waits on an engineering owner's decision, and two fixes are needed either way.

spec:AST-140 is a draft record whose FR1 to FR9 and DEC-1 to DEC-6 add normative rules for the React Native platform layer's native code that no current record states. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Fix before approval:

  • FR2's TurboModuleRegistry.get lookup, FR1's codegen header and one-wrapper rule, and FR5's recorded release interfaces and check prescribe internal mechanisms without naming a host that depends on them, which architecture:knowledge-contracts INV18 forbids in a system spec, so keep the observable outcomes here and move those mechanisms to an architecture record or name who depends on each and why an equivalent would not do.
  • spec:AST-112/FR12 (lines 86 and 240) dangles once the AST-112 amendment in #12563 lands, because that amendment moves Astryx Stage to spec:AST-139, and on main the cited spec:AST-112 FR18, DEC-14 and DEC-15 do not exist, so cite spec:AST-139 and stack this branch on #12563 (or wait for it) before rechecking every spec:AST-112 citation.

Two smaller points: FR3 should say what a cancelled or unmounted call resolves, and FR5 should say whether a canary counts as the first published release that fixes revision 1.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: the foundation record already points its result, evolution, registration, exposure, conformance and engine-split claims at this record and keeps the named-features decision: false on main, true only on the open amendment's branch (second finding).
  • Claim: the cross-platform record's candidate and canary-channel claims apply: verified.
  • Claim: the per-group records each specify their own native pieces: verified as open draft pull requests; none is on main.
  • Claim: no current record covers native-layer registration, threading or coexistence: verified; only draft records state such rules.
  • Claim: the decision list FR1 to FR9 and the canary-only conventions match the record: verified.
  • Claim: four rejected alternatives, one line each, inside DEC-1, DEC-2, DEC-3 and DEC-6: verified.
  • Claim: claim scope FR1 to FR9 and DEC-1 to DEC-6, no second engine named, no implementation: verified.
  • Claim: the rules follow the platform layer's current native code, and the FR5 gap line names the mismatch: not verifiable here, because that code is not in this repository.
  • Claim: writing rubric results R1 to R7: verified; no narration, research, change references or status beyond the FR5 gap line, and OQ1 and OQ2 are open.
  • Claim: every named internal mechanism is intentionally public and names its dependent caller: false (first finding).
  • Claim: the record keeps equivalent internal implementations valid: false for FR2 (first finding).
  • Claim: the knowledge check exits 0 with no warning for this record, Prettier passes and the whitespace check is clean: verified at this head.
  • Claim: public text carries no internal context: verified.
  • File: docs/specs/AST-140-react-native-platform-code/spec.md: the two findings above and the two smaller points.

Automated review (maintainer link)

@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 spec waits on an engineering owner's decision, and two fixes are needed either way. spec:AST-140 is a draft record whose FR1 to FR9 and DEC-1 to DEC-7 add rules for the React Native platform layer's native code that no current record states; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Fix before approval:

  • FR7's frame-recorder bullets (lines 253-296) prescribe the private native interface behind recordFrames (the AstryxFrameRecorder name, its getConstants, start and stop members, its reasons, the presentation-layer sampling and the stop result in the FR7 gap line), which architecture:knowledge-contracts INV18 and the record's own Non-goals keep out of this record, so keep the test-facing contract here and move those details to an architecture record or name the host that depends on them and why an equivalent would not do.
  • Miss: the group table's Links column (lines 59-71) restates linking that the Non-goals give to spec:AST-112/FR3, and its Photos row names photos and pdf capabilities that neither the foundation record on main nor its open amendment defines, so drop the column or point to the foundation's group table.

The earlier binding-mechanism, Astryx Stage citation, cancellation and revision-1 points are fixed. Two smaller points: FR3's definition of cancelled (lines 141-142) should also cover a caller that goes away, and this record should merge only after #12563, since several spec:AST-112 ids it cites exist only there.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: the amended foundation record points its result, evolution, registration, exposure, conformance and engine-split claims at this record and keeps the named-features decision: verified on #12563's head; not yet on main.
  • Claim: the platform group drafts each specify their own pieces and none owns the shared rules: verified against the record's table; those records are not on main yet.
  • Claim: no current record covers native-layer registration, threading or coexistence: verified; the foundation record is draft and the native-first-surfaces record settles only location, dependencies and the canary channel.
  • Claim: the FR1 to FR9 summary in the description matches the record: verified, lines 90-341.
  • Claim: FR7 takes in a Debug-only frame recorder reached through ./testing (DEC-7, OQ3): verified, lines 249-296, 454-464, 480-483.
  • Claim: each native piece's methods, props and reasons stay in its group record: false, FR7 states the frame recorder's methods and reasons (lines 253-259).
  • Claim: every named internal mechanism is public and names its dependent: verified for FR1, FR3, FR5 and FR8; false for the frame recorder (lines 253-296).
  • Claim: the record preserves equivalent internal implementations: false for the frame recorder.
  • Claim: five rejected alternatives, each one line inside DEC-1, DEC-2, DEC-3, DEC-6 and DEC-7: verified.
  • Claim: no pull request or issue references in the record: verified.
  • Claim: OQ1 to OQ3 are open and keep their options: verified, lines 466-483.
  • Claim: the remaining status mismatches are the FR5 and FR7 gap lines: verified, lines 209 and 295.
  • Claim: the knowledge check exits 0, Prettier passes and the whitespace check is clean: verified by rerunning each.
  • Claim: specification records only, no implementation: verified, one file changed.
  • Claim: not stacked, merges right after #12563: verified, no Stack line; nothing in the repository enforces the order.
  • Claim: public text carries no internal context: verified.
  • File docs/specs/AST-140-react-native-platform-code/spec.md: two blocking findings (FR7 frame recorder, group table Links column) and two non-blocking notes.

Automated review (maintainer link)

…e without linking; cancelled covers a caller that goes away

@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 spec waits on an engineering owner's decision; no fix is required. spec:AST-140 is a draft record whose FR1 to FR9 and DEC-1 to DEC-7 add rules for the React Native platform layer's native code that no current record states. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

The frame-recorder and group-table points from the last review are fixed, and cancelled now covers a caller that goes away. Two non-blocking notes:

  • Miss: FR3 (lines 132-133) and FR7 (lines 255-268) make recordFrames a public ./testing call that throws, while spec:AST-112 FR6 and DEC-4 say every asynchronous call never rejects and its FR5 describes ./testing as mocks, event emitters and a Jest setup; whichever record names the test step, the other should state the exception.
  • Several spec:AST-112 ids this record cites (FR18, FR22, DEC-14, DEC-15, FR7's group list) exist only in #12563, so this record should merge only after it.
Claims and files checked

Review mode: full; reason: spec-record

  • Claim: not stacked, merges right after #12563: verified, no Stack line; nothing in the repository enforces the order.
  • Claim: the amended foundation record points its result, evolution, registration, exposure, conformance and engine-split claims here and keeps the named-features decision: verified on #12563's head; not yet on main.
  • Claim: the native-first-surfaces record's FR12 and FR15 were searched: verified; FR15 (canary freedom) matches DEC-5, and FR12 (the approach scorecard) states no native-layer rule.
  • Claim: the platform group drafts each specify their own pieces, none owns the shared rules, and linking stays in the foundation's FR3 and FR7 table: verified against #12563's FR3 and FR7 table; the group records are not in this repository.
  • Claim: no current record covers native-layer registration, threading or coexistence: verified; the foundation record is draft and the native-first-surfaces record settles only location, dependencies and the canary channel.
  • Claim: the FR1 to FR9 summary in the description matches the record: verified, lines 91-332.
  • Claim: while canary-only these are conventions, and the public promise is set when the package leaves canary: verified, lines 40-43 and DEC-5.
  • Claim: five rejected alternatives, each one line inside DEC-1, DEC-2, DEC-3, DEC-6 and DEC-7: verified.
  • Claim: each native piece's methods, props and reasons stay in its group record, the app-facing API and linking stay in the foundation record, Astryx Stage's internals stay in its own record, and no second engine is named: verified; FR7's two ./testing test members are the open ownership question.
  • Claim: the rules follow the platform's current native code, FR5's gap line names the observable mismatch, and no implementation is included: verified for one changed file and the gap line's form; the platform code is not in this repository.
  • Claim: rubric results R1 to R7, with the FR5 gap line as the one remaining status mismatch: verified, line 211 is the only gap line.
  • Claim: specification records only, observable behavior with equivalent implementations preserved, named mechanisms naming their dependents, no internal context in public text: verified.
  • Claim: the knowledge check exits 0, Prettier passes and the whitespace check is clean: verified by rerunning each.
  • File docs/specs/AST-140-react-native-platform-code/spec.md: no blocking finding; two non-blocking notes.

Automated review (maintainer link)

@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 spec waits on an engineering owner's decision; no fix is required.

spec:AST-140 is a draft record whose FR1 to FR9 and DEC-1 to DEC-7 add rules for the React Native platform layer's native code that no current record states, so an engineering owner records the decision by commenting /approve-spec with the full head commit SHA on this pull request (the author may do so as an engineering owner). One point to settle with it: whether a reason a host adds under FR3, such as Preview's not-allowed, belongs in the package's typed reason unions. Merge it only after the spec:AST-112 amendment, whose claim ids it cites; its links to the system-modules, Stage and Preview drafts stay unresolved on main until those records land.

Claims and files checked

Review mode: full; reason: spec-record

  • File docs/specs/AST-140-react-native-platform-code/spec.md: clear apart from the non-blocking merge-order note above; both earlier fixes (host-added reasons in FR3, the DEC-14 wording) are in.
  • Claim that the amended foundation record points its result, evolution, registration, exposure, conformance and engine-split claims here and keeps named features with no revisions: verified against the amendment.
  • Claim that no current record covers native-layer registration, threading or coexistence: verified; only the draft foundation record states such rules today.
  • Claim that the decision bullets summarize FR1 to FR9 and DEC-5: verified against the record (the FR3 bullet does not mention host-added reasons, which is narrower, not false).
  • Claim that the rejected alternatives sit inside DEC-1, DEC-2, DEC-3, DEC-6 and DEC-7: verified.
  • Claim scope and non-goals (group pieces, linking, packages outside the core and host checks stay in other records; no second engine): verified against the Non-goals.
  • Claim that the rules follow the platform layer's current native code: not checkable here, as that code is not in this repository.
  • Writing rubric results (no narration, research, change references or status beyond the FR5 gap line; three open questions keep their options): verified.
  • Validation claims (knowledge check exit 0 with no warning naming the record, Prettier clean, whitespace check clean): verified.

Automated review (maintainer link)

… read; host-added reasons stay out of the typed unions

@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 spec waits on an engineering owner's decision, and four fixes are needed either way.

spec:AST-140 is a draft record whose FR1 to FR9, FR11 and DEC-1 to DEC-8 add rules no current record states; an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), in particular on whether FR11's seam is a public contract and whether contractFeatures(contract) belongs beside each capability's supports(feature).

Blocking:

  • FR3 (lines 129-136) no longer lets a host that runs other projects add reasons, so the Preview host's not-allowed, which draft spec:AST-141 FR4 attributes to this FR3, falls outside every closed set; restore the host-added-reasons bullet and the FR3 row's "and its host's added reasons", or list not-allowed with its meaning.
  • FR5 (lines 182-184) lets a contract's first release on the canary channel fix its baseline, while spec:AST-112 DEC-14, which DEC-3 cites, says a canary release is not a baseline; make the baseline the first release after the package leaves the canary channel and put "a canary build" back in the FR5 row.
  • FR11 (lines 330-404) specifies an internal seam in a system spec, with Kotlin interfaces internal to the platform module on Android (lines 396-398), which architecture:knowledge-contracts INV18 puts in an architecture record; keep the outcome and DEC-8 here and move the generated shape, or name the engine that depends on it and make the Android seam public.
  • FR11's module seam (lines 354-357 and the Promise<T> row) gives every asynchronous method a reject with a stable code, which FR3 and DEC-2 rule out; have it resolve FR3's result object only, with an optional method's Android default resolving error with reason unsupported.

The FR5 gap line (lines 216-218) no longer names anything FR5 forbids, since both "instead of named features" and the no-revision-number rule were dropped.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: the foundation amendment points its result, growth, registration, exposure, conformance and engine-split claims at this record: verified in that amendment's FR4, FR5, FR6, FR8, FR15, FR22 and DEC-10.
  • Claim: the foundation keeps its named-features decision: verified (its DEC-14), though FR5's baseline now disagrees with it (blocking).
  • Claim: no current record covers native registration, threading or coexistence: verified; the foundation record is draft.
  • Claim: the decision bullets for FR1 to FR9, FR11 and the decisions match the record: verified against the record text.
  • Claim: no rejected alternatives recorded, no non-goals, and related records delegate the app-facing API and linking to the foundation: verified, except FR5's public feature read, which the foundation does not list (owner question).
  • Claim: FR5's gap line names the observable mismatch: false at this head (note above).
  • Claim: writing rubric R1 to R7 results: verified.
  • Claim: the record keeps equivalent implementations valid and every named internal mechanism is intentionally public with its dependent: false for FR11 (blocking).
  • Claim: no internal context in public text: verified.
  • Claim: the knowledge check exits 0 with no warning naming this record, Prettier passes, and the whitespace check is clean: each verified at this head.
  • File: docs/specs/AST-140-react-native-platform-code/spec.md: four blocking findings, one owner question, two non-blocking notes.

Automated review (maintainer link)

Comment on lines +134 to +136
one of its options, or a value it was sent (FR5). A capability adds
reasons of its own where it needs them, such as `unsupported-option` where
a platform cannot honor an option.

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 head no longer lets a host that runs other projects add reasons to every capability's set. Draft spec:AST-141 FR4 still says the Preview host's not-allowed is "a reason the host adds to every capability's set (spec:AST-140/FR3)", spec:AST-112 FR6 on main lists not-allowed among the common reasons, and the foundation amendment hands the common reasons to this FR3. A Preview refusal then answers a reason outside every closed set, which the FR3 row (line 439) counts as a failure. Restore the host-added-reasons bullet and the row's "and its host's added reasons", or list not-allowed with its meaning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Kept as is in fd875fb: this record states the reasons the platform itself answers. A host that runs other projects owns the reasons it adds and their meaning in its own record, so this record does not list them.

…each JavaScript as results; seam dependents named; declared record fields

@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 spec waits on an engineering owner's decision, and one fix is needed either way.

spec:AST-140 is a draft record whose FR1 to FR9, FR11 and DEC-1 to DEC-8 add rules that no current record states. An engineering owner needs to approve them by commenting /approve-spec with the full head commit, or ask for changes first; the author may do so as an engineering owner. The canary-baseline and seam-reject points from the last review are fixed, and the host-reasons point is settled by the author's reply.

  • FR11 calls the native seam internal to the package's native layer (lines 349-351) yet fixes its generated members, type table, names and C entry points (lines 362-420), which architecture:knowledge-contracts INV18 places in an architecture record: keep the outcome in FR11 and move the generated shape there, or name the engine outside the package that binds the seam and drop "internal".
Claims and files checked

Review mode: full; reason: spec-record

  • Not stacked and lands after the foundation amendment: verified (no Stack line, and the foundation ids it cites exist only in that amendment).
  • The amended foundation points its result, growth, registration, exposure, conformance and engine-split claims here and keeps named features with no revisions: verified at the amendment's head.
  • No current record covers native-layer registration, threading or coexistence: verified for the current records read; the foundation record is draft.
  • The platform group drafts each specify only their own pieces: not checked, because those records are not on the main branch.
  • The decision bullets and the decisions with their reasons match the record: verified.
  • No rejected alternatives, the template's two standing Non-goals, and Related records pointing to the foundation: verified.
  • The rules follow the platform layer's current native code: not checkable here, because that code is not in this repository.
  • FR5's gap line names the observable mismatch: verified (lines 226-229).
  • Writing rubric R1 to R7: verified; the only remaining mismatches are the FR5 gap line and the two FR11 gap lines.
  • Checklist lines "records observable behavior and preserves equivalent implementations" and "any named internal mechanism is intentionally public and names its dependent": false for FR11, the blocking finding above.
  • The other checklist lines (records only, verification without CI topology, one decision, owners and overlaps named, no internal context): verified.
  • The knowledge check exits 0 with no warning naming this record, Prettier passes, and the whitespace check is clean: verified.
  • docs/specs/AST-140-react-native-platform-code/spec.md: one blocking finding (FR11 against INV18) and two non-blocking notes; owner approval pending.

Automated review (maintainer link)

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

FR11 at b877ff2: the native seam is a published protocol for engine bindings, which meets the exception in architecture:knowledge-contracts INV18. React Native's binding in the package and any other engine's binding call these exact members, and apps use the JavaScript API. An engine binding is compiled against the generated members and names, so an interface of a different shape breaks it. For that reason FR11 keeps the full shape: the type table, names, platform forms, and adoption rule.

@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 spec waits on an engineering owner's decision, and one fix is needed either way.

This draft record adds requirements FR1 to FR9 and FR11 and decisions DEC-1 to DEC-8 that no current record states. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. What must be settled: the requirements as written at this head, including whether FR11's native seam is an intentional public protocol and which engine outside the package depends on it.

Blocking:

  • FR11 calls the native seam a published protocol that any engine's binding compiles against (lines 349-355), but its Android half stays internal to the platform module and is adopted through an internal host object (lines 418-420), so no outside engine can bind it: make the Android interfaces public and drop the internal host object and the "until an engine outside it binds them" clause, or move the Android shape to an architecture record, as architecture:knowledge-contracts INV18 requires for an internal seam.
Claims and files checked

Review mode: full; reason: spec-record

  • File docs/specs/AST-140-react-native-platform-code/spec.md: one blocking finding (the Android seam) and two non-blocking notes (seam reject reasons; citations that exist only in the open foundation amendment and unmerged group drafts).
  • Claim: not stacked, merging after the foundation amendment: verified (no Stack line).
  • Claim: the foundation amendment points its result, growth, registration, exposure, native-conformance and engine-split rules here and keeps named features with no revisions: verified against the open amendment.
  • Claim: no current record covers native-layer registration, threading or coexistence: verified (only the draft foundation record mentions native modules).
  • Claim: the decision summaries for FR1 to FR9, FR11 and the listed decisions match the record: verified.
  • Claim: the seam is a published protocol that any engine's binding compiles against: false for Android (lines 418-420).
  • Claim: every named internal mechanism is intentionally public, names its dependent and explains why an equivalent would not do: false for FR11's Android seam.
  • Claim: the rules follow the platform layer's current native code: not checkable here (that code is not in this repository).
  • Claim: writing-rubric results: verified; the gap lines name FR5 and FR11 with their mismatches.
  • Claim: knowledge check, Prettier and whitespace check pass: verified at this head.
  • Claim: specification records only, with no internal context: verified.

Automated review (maintainer link)

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

FR11 at bb0acd5: on Android the seam is public Kotlin interfaces in one package, as the iOS seam headers are public headers, and an engine outside the platform module binds them. A class adopts its seam directly or through a host object it owns. A seam reject's code is one of the method's reasons, and the binding turns the reject into FR3's result object with that reason. The cited spec:AST-112 claims and group records resolve once the foundation amendment and the group drafts merge; this pull request merges after the amendment.

@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 spec waits on an engineering owner's decision; no blocking fix remains.

This draft record adds requirements FR1 to FR9 and FR11 and decisions DEC-1 to DEC-8 that no current record states. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. What must be settled: the requirements as written at this head, including FR11's native seam, now public on iOS and Android, and which of the package's entries lists contractFeatures(contract).

Optional wording fixes in FR11:

  • Say which status a converted seam reject gets (lines 374-377), for example cancelled when the code is cancelled and error otherwise.
  • Miss: the type table's callback row (line 397) maps a spec type that FR3 and FR4 keep out of the binding (lines 149-150, 169-171 and 467).
  • Miss: the FR11 verification row fails "a value box" across the seam (line 473), while the type table boxes array scalars and carries untyped objects as dictionaries or maps (lines 394-395).
Claims and files checked

Review mode: full; reason: spec-record

  • File docs/specs/AST-140-react-native-platform-code/spec.md: no blocking finding; three non-blocking FR11 wording notes, and one note on citations that exist only in the open foundation amendment and the unmerged group drafts.
  • Claim: not stacked, merging after the foundation amendment: verified (no Stack line; the amendment is open).
  • Claim: the amended foundation record points its result, growth, registration, exposure, native-conformance and engine-split rules here and keeps named features with no revisions: verified against the open amendment.
  • Claim: no current record covers native-layer registration, threading or coexistence: verified.
  • Claim: the decision summaries for FR1 to FR9, FR11 and the listed decisions match the record: verified, including public seam interfaces on both platforms and reject codes drawn from the method's reasons.
  • Claim: every named internal mechanism is intentionally public, names its dependent and says why an equivalent would not do: verified in form for FR11 (lines 349-355); whether it is intended is the owner's decision.
  • Claim: the rules follow the platform layer's current native code: not checkable here (that code is not in this repository).
  • Claim: writing-rubric results: verified; the gap lines name FR5 and FR11 with their mismatches, and the record cites no pull request or issue.
  • Claim: knowledge check, Prettier and whitespace check pass: verified at this head.
  • Claim: specification records only, with no internal context: verified.

Automated review (maintainer link)

Comment on lines +374 to +377
stable code and a message), and settles exactly once. A reject's code is
one of the method's reasons (FR3), and the binding turns the reject into
FR3's result object with that code as its reason, so JavaScript always
receives a result value (DEC-2). An optional

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.

Non-blocking: this edit dropped the status a converted reject gets. FR3's binding object carries status ok, cancelled or error (lines 149-151), and cancelled is a common reason. Suggest: "the binding turns the reject into FR3's result object, cancelled when the code is cancelled and error otherwise, with that code as its reason".

| array | typed `NSArray`, scalars boxed | `List<T>` |
| untyped object | `NSDictionary<NSString*, id>` | `Map<String, Any?>` |
| `Promise<T>` | `resolve(T)` and `reject(code, message)` blocks | a promise object with `resolve(T)` and `reject(code, message)` |
| callback | block | function type |

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.

Non-blocking (Miss): FR3 lets a binding method take only one request object and one ArrayBuffer (lines 149-150), FR4 lists no callback among the values that cross (lines 169-171), and the FR4 row fails "a non-plain value in a spec" (line 467). This row maps a spec type those rules keep out of the binding. Drop it, or state where a callback may appear.

| FR7 | The conformance suites on iOS, Android, and the JavaScript double; the frame recorder's behavior cases on the Simulator and unit tests of `recordFrames` | each contract; a binary with and without each feature; a push; a large title's collapse; an off-screen `testID`; a second recording; a step that never settles; a Release binary; VoiceOver on during a recording | An implementation that fails its suite, a double that passes a case the device fails, a native behavior change without cases, a sample at a resting position during an animation, an off-screen `testID` that slows the recorded frames, two recordings at once, a recording past 60 seconds, a recorder in a Release binary, a `recordFrames` that passes without recording, or a recording that changes an element's label, value, or order |
| FR8 | Check of each codegen spec against its engine-neutral description; source check of contract names and types | each contract | A spec that differs from its description, a description without its owner, platforms, first version, stability, members, or named features, or a binding-layer name in a contract or an app-facing type |
| FR9 | Symbol and runtime checks of the built binaries; the compatibility apps of `spec:AST-112/FR2` on iOS and Android | a binary with each listed library beside Astryx; an exception's self-check that fails | An unprefixed symbol, a swizzled or exchanged method, a replaced delegate or appearance proxy, a conflict with a listed library, or a failed self-check without the public path |
| FR11 | The package's check of generated files; native builds on iOS and Android of every class against its seam; source check of each binding; unit tests of the generated type mapping; conformance suites run through the seam | each native view and module; a spec change; a prop batch; an event with and without a payload; an optional value without a default; a member whose name a platform class already has; a C caller on iOS; a seam reject; a record with every declared field | A stale seam, a class that does not adopt its seam, a binding that reaches a class other than through its seam, an engine type, value box, or name lookup across it, a prop set out of spec order or unchanged, a missing `didUpdateProps` call, an event without its typed arguments, an optional view scalar that reads null, a generated name without the `Seam` infix, a colliding member name without `Prop` or `Field`, a seam reject that reaches JavaScript as a rejection, a record field its spec does not declare, or a behavior change on adoption |

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.

Non-blocking (Miss): this row fails "an engine type, value box, or name lookup across it", while the type table boxes array scalars (line 394) and carries an untyped object as NSDictionary<NSString*, id> or Map<String, Any?> (line 395). Name the boxes the row means, so the table's own mappings do not fail its check.

@imdreamrunner imdreamrunner changed the title spec(AST-140): React Native platform code (draft) spec(AST-140): React Native platform code Nov 19, 2026
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec a6e970d

@imdreamrunner
imdreamrunner marked this pull request as ready for review November 19, 2026 18:28
@imdreamrunner
imdreamrunner enabled auto-merge (squash) November 19, 2026 18:29
@imdreamrunner
imdreamrunner merged commit eb5dc88 into main Nov 19, 2026
188 of 194 checks passed
@github-actions
github-actions Bot deleted the spec/ast-140-react-native-platform-code branch November 20, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — a6e970d9 Deployed Nov 18, 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