Repository navigation
spec(AST-093): native component specs live in each component's folder - #8033
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 5cd639b |
PR Analysis Report
|
There was a problem hiding this comment.
Requesting changes: moving native component specs beside their implementation is approved direction, but FR1 and the spec-area docs need these fixes before this lands.
- FR1 keeps one spec per language but places it inside a versioned
swift-ios-<n>package, so please say which component folder holds the spec when two generations, or a macOS package, implement the same component. - FR1, both READMEs and the template point at a
swift-ios-1package (swift-ios-<n>in FR1) that is not onmainyet; land this after #7981 or record the dependency in Current-state impact. - The README's example of core keeping
Button.spec.mdnext toButton.tsxnames a file that does not exist;TabList.spec.mdnext toTabList.tsxwould work.
[Automated review]
| native component has its own folder in its language's implementation, named | ||
| as the core component, and its spec is `<Name>.spec.md` in that folder, as | ||
| core does (`packages/core/src/<Name>/<Name>.spec.md`). For Swift that is | ||
| `packages/native/swift-ios-<n>/core/<Name>/<Name>.spec.md`, beside the |
There was a problem hiding this comment.
FR1 still says one spec covers every implementation in the language (line 63), but this path sits inside one versioned swift-ios-<n> package. When swift-ios-2, or a macOS package, also implements the component, which folder holds the spec? Naming it here, for example the lowest-numbered live generation, keeps the FR1 verification row decidable.
| ├── specs/ | ||
| │ ├── TEMPLATE.md # copy this for a new component spec | ||
| │ └── swift/ # rules shared by every Swift component | ||
| └── swift-ios-1/core/ |
|
|
||
| One short spec per native component, per language. The rules live in | ||
| One short spec per native component, per language, kept in the component's own | ||
| folder beside its implementation, the way core keeps `Button.spec.md` next to |
There was a problem hiding this comment.
packages/core/src/Button/ has no Button.spec.md. A component with a record, such as TabList.spec.md next to TabList.tsx, would make the example accurate.
There was a problem hiding this comment.
This spec amendment now waits on an owner decision: the three fixes requested on the previous commit are in, and no other defect remains. It changes the current spec:AST-093 FR1, and the earlier /approve-spec named the previous commit, so an engineering owner records the decision by commenting /approve-spec 0e89a262e695dc7c64017140a2d4e19bb9130962 on this pull request; the author may do so if they are an engineering owner. Before approving, consider settling which folder holds a component's spec when a swift-ios-<n> package and a macOS-only package share the lowest number, and what makes a package live, since FR1 names that case without resolving it.
[Automated review]
| serves `ios` and `macos`). When more than one package in a language implements | ||
| a component, such as a later `swift-ios-<n>` generation or a macOS-only | ||
| package, the spec lives in that component's folder in the lowest-numbered | ||
| live package of the language. Rules that apply across a language's components |
There was a problem hiding this comment.
"Lowest-numbered live package" picks one folder across swift-ios-<n> generations, but not when a swift-ios-<n> package and the macOS-only package this sentence names share the lowest number, and "live" is not defined. Which folder holds the spec in that case, and does "live" mean present on main? Settling it keeps the FR1 verification row decidable.
|
/approve-spec 0e89a26 |
0e89a26 to
9027df1
Compare
|
/approve-spec 9027df1 |
There was a problem hiding this comment.
Recommending approval: an engineering owner approved the spec:AST-093 FR1 amendment for this exact head, and the record, the spec-area README, the template header and the Swift README agree on where a native component's spec lives. The fixes requested on the first commit are all in. When swift-ios-1 lands, note that FR1 gives every native component its own folder, so Heading needs a core/Heading/ folder before it can have a spec, and the AstryxCore target may need to exclude the colocated .spec.md files.
[Automated review]
FR1 places a native component's spec beside its implementation, in a folder per component named as core's, as <Name>.spec.md, matching core's packages/core/src/<Name>/<Name>.spec.md. When several packages in a language implement a component, the spec lives in the lowest-numbered live package. Language-wide rules stay under packages/native/specs/<language>/.
|
/approve-spec 18f2493 |
9027df1 to
18f2493
Compare
There was a problem hiding this comment.
Requesting changes for one line: the spec:AST-093 FR1 amendment is owner-approved for this revision, and the record, the spec-area README, the template header and the Swift README agree on where a native component's spec lives. packages/native/specs/swift/library/README.md, which reached main after the previous revision, still says a component spec is ../<Name>.md (that is, packages/native/specs/swift/<Name>.md), the folder the amended FR1 and its verification row now fail; please point that sentence at <Name>.spec.md in the component's folder. Because the fix is a new commit, it will need a fresh /approve-spec from an engineering owner.
[Automated review]
| ├── specs/ | ||
| │ ├── TEMPLATE.md # copy this for a new component spec | ||
| │ └── swift/ # rules shared by every Swift component | ||
| │ └── library/ # rules every Swift component or build step shares |
There was a problem hiding this comment.
library/README.md (not changed here) still says "A component spec (../<Name>.md, from ../../TEMPLATE.md)", that is packages/native/specs/swift/<Name>.md, which the amended FR1 and its verification row now fail. Pointing that sentence at <Name>.spec.md in the component's folder keeps the spec-area files in step.
|
/approve-spec a37b775 |
There was a problem hiding this comment.
Recommending approval: an engineering owner approved the spec:AST-093 FR1 amendment for this exact head, and the record, the spec-area README, the template header and both Swift READMEs now agree that a native component's spec is <Name>.spec.md in the component's own folder. The Swift library README line flagged on the previous commit is fixed. When swift-ios-1 lands, Heading needs a core/Heading/ folder of its own before it can have a spec, and colocated .spec.md files will sit among the AstryxCore target's sources.
[Automated review]
Exact decision needed
Where a native component's spec lives.
Existing authority searched
spec:AST-093(current) FR1 puts every native component spec in one central folder,packages/native/specs/<language>/<Name>.md, away from the component.packages/core/src/<Name>/<Name>.spec.md(118 such files on main). Native's Swift components already have one folder each, e.g.packages/native/swift-ios-1/core/Button/.Decision
<Name>.spec.mdin that component's own folder, beside its implementation, as core does. For Swift that'spackages/native/swift-ios-<n>/core/<Name>/<Name>.spec.md.packages/native/specs/<language>/, andpackages/native/specs/TEMPLATE.mdstays the template.Rejected alternatives
specs/<language>/<Name>.mdfile per component: it separates the spec from the code it describes and doesn't match core.Claim scope and non-goals
The template's sections, FR2–FR6 (including the review rule) and the native group are unchanged. No component specs exist yet, so nothing moves.
Evidence and implementation relationship
Record, README, template header, and Swift README only.
Writing rubric results
Scope
Validation
Prettier-formatted with the repository config; spec validation runs in CI.