Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewComponent Size
Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included. Bundle Size SummaryGzip figures measure each package's entry file, not the code an import pulls in.
Accessibility AuditStatus: No accessibility violations detected. Visual Regression55 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 35 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
a021fd0 to
cdd4b51
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner deciding whether the seven Swift rule records in packages/native/specs/swift/ should land as authority: current: their sources on main say Status: draft, and no approval covers this head yet. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner; otherwise the records can land as authority: draft. Either way, these record fixes are needed:
theme-generator.spec.mdG3 still requiresswift-ios-1/core/Theme/Generated/paths, which contradicts AST-093 FR1 and the record's own Owning code (packages/native/apple/Sources/Astryx/).- The Current-state notes in
styles,theme-environment,component-apiandtheme-generatorsay the Swift views, theme and generator do not exist yet. accessibility.spec.mdcalls itself Draft in its Contract-at-a-glance table, andpackages/native/apple/README.mdstill links the deletedlibrary/theme-generator.md.
The test-node (1/4) failure is the watch-mode case in build-theme.icons-specifier.test.mjs, outside this change, and it passes when run on its own at this head.
[Automated review]
cdd4b51 to
6a7da52
Compare
6a7da52 to
e5f77a9
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner deciding whether the seven Swift rule records in packages/native/specs/swift/ land as authority: current: their sources on main say Status: draft, and no approval covers this head. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner; otherwise the records can land as authority: draft, and since the branch now conflicts with main in packages/native/apple/Sources/Astryx/Icon/Icon.spec.md, the decision belongs on the rebased head. Either way, these fixes are needed:
validatePlatformComponentRecordaccepts a Swift record saved in another component's folder (for exampleIcon/Banner.spec.md); require the folder to match the record's name, as Core and Lab records already must.- The Current-state notes in
styles.spec.md,theme-environment.spec.mdandslots.spec.mdsay the Swift views, theme and icon slot do not exist. accessibility.spec.mdstill calls itself Draft in its Contract-at-a-glance table, and the Swift README's "the record wins" sentence ranks these records below every other record.
[Automated review]
e5f77a9 to
011c380
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner deciding whether the seven Swift rule records in packages/native/specs/swift/ land as authority: current: their sources on main say Status: draft, and no approval covers this head. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so if they are an engineering owner; otherwise the records can land as authority: draft, and since a new commit makes an approval stale, the decision belongs on the head that carries the fixes below. These fixes are needed:
validatePlatformComponentRecordaccepts a Swift record saved in another component's folder (for exampleIcon/Banner.spec.md); require the folder to match the record's name, as Core and Lab records already must.- Before the records are current: the Current-state notes in
styles.spec.md,theme-environment.spec.mdandslots.spec.mdsay the Swift views, theme and icon slot do not exist,accessibility.spec.mdcalls itself Draft in its Contract-at-a-glance table, and the Swift README's "the record wins" sentence ranks these records below every other record.
[Automated review]
011c380 to
4d4837b
Compare
93c9740 to
fb53f32
Compare
There was a problem hiding this comment.
Approval waits on two engineering-owner decisions. The first is whether the seven Swift rule records in packages/native/specs/swift/ land as authority: current: their sources on main say Status: draft, and no approval covers this head or #8500's. The second is whether AST-093 FR1 is amended so a member component's Swift record sits in the folder where core keeps it, as this checker requires (#8593 proposes that amendment and is not yet approved). An engineering owner, the author included, records each decision by commenting /approve-spec <full head SHA> on the pull request that lands that spec text; otherwise the records land as authority: draft and the checker accepts each component's own folder.
- Whichever way those go, land #8500 first and rebase this branch without its commit: at 2,208 authored lines, this head is over the 2,000-line limit.
[Automated review]
humbertovirtudes
left a comment
There was a problem hiding this comment.
Requesting changes because most of this PR has landed on main by other routes, and the branch now conflicts with main in about 270 files.
- #9007 moved every component record to docs/specs/components//. None of the 147 paths in the schema-5 migration commit exist on main.
- #9279 checks, gates and routes platform records and accepts platform_of on schema 3, so docs/schemas/knowledge/v5.json and scripts/migrate-knowledge-v5.mjs are no longer needed.
- #9331 checks package architecture records under packages/*/specs/.
- #9341 set AST-093 FR1 to ..spec.md beside the core record, and #8593 was closed. The platform path rule here (knowledge-paths.cjs PLATFORM_COMPONENT_ROOTS, check-knowledge.mjs validatePlatformComponentRecord) is the opposite of main.
The one delta not on main is the general INV27 check (isKnowledgeRecordCandidatePath, discoverRecordCandidateProblems). If you want to keep it, please rebase down to that alone. On current main it would fail on docs/specs/AST-094-touch-presentations/motion-roles.md, packages/native/specs/TEMPLATE.md and the seven packages/native/specs/swift/library/*.md files, so it needs #8500 first and a decision on motion-roles.md. Otherwise I suggest closing this as landed elsewhere.
Minor, and moot if the script is dropped: migrateComponentRecord does not match CRLF frontmatter, so --check passes for such a record.
|
I'll run a full review to re-check this with your note. |
There was a problem hiding this comment.
Requesting changes: most of this pull request has since landed on main another way, and what remains contradicts main's current native-record rules.
- Regression: the Swift record location in
PLATFORM_COMPONENT_ROOTSandvalidatePlatformComponentRecord(and inspecs:for, the component template comment and both native READMEs) requirespackages/native/apple/Sources/Astryx/<Folder>/<Name>.spec.md, while AST-093 FR1 now requiresdocs/specs/components/<ComponentRoot>/<Name>.swift.spec.md, so these rules need to go. - Regression:
classifyPackageArchitecturePathand the platform-record validation and routing duplicate the checksmainalready has (classifyPackageArchitectureRecordPathandvalidatePlatformComponentRecords), so drop them in favour ofmain's. - Regression: the schema-5 migration rewrites 147 component records at paths that no longer exist on
main, which keepsplatform_ofon schema 3, sodocs/schemas/knowledge/v5.json, template v8,scripts/migrate-knowledge-v5.mjsand the migration commit should be dropped, which also removes most of the conflicts withmain. - The seven Swift rule records, the
TEMPLATE.mdremoval and the README and comment path updates are #8500's commit and should land through #8500, as the engineering owner's review asks.
The one part main still lacks is the general INV27 candidate check (isKnowledgeRecordCandidatePath and discoverRecordCandidateProblems). Either rebase down to that alone, after #8500 lands and once docs/specs/AST-094-touch-presentations/motion-roles.md has a decision, since on main the check would also fail that file, TEMPLATE.md and the seven swift/library/*.md files, or close this as landed elsewhere. A minor point that goes away with the script: migrateComponentRecord does not match CRLF frontmatter, so --check passes for such a record.
[Automated review]
| const PLATFORM_COMPONENT_ROOTS = Object.freeze([ | ||
| Object.freeze({ | ||
| language: 'swift', | ||
| pattern: /^(packages\/native\/apple\/Sources\/Astryx)\/([^/]+)\/([^/]+)$/, | ||
| }), | ||
| ]); |
There was a problem hiding this comment.
Regression: AST-093 FR1 on main now puts a Swift component's record at docs/specs/components/<ComponentRoot>/<Name>.swift.spec.md, beside the core record, and main's classifyPlatformComponentSpecPath already classifies that path. This pattern, and validatePlatformComponentRecord built on it, accepts a Swift record only under packages/native/apple/Sources/Astryx/, where main rejects it. Dropping it in favour of main's classifier conforms.
| * under `packages/<package>/specs/`. Its kind is `architecture` and its id is | ||
| * `architecture:<package>-<directories>-<slug>`, joined with hyphens. | ||
| */ | ||
| function classifyPackageArchitecturePath(filePath) { |
There was a problem hiding this comment.
Regression: main already has this as classifyPackageArchitectureRecordPath, with the same architecture:<package>-<dirs>-<slug> id, and change-scope already owner-gates it there. Two copies of one path contract drift apart, so this one can go on rebase.
| * component record or is already on schema 5. | ||
| */ | ||
| export function migrateComponentRecord(content) { | ||
| const match = /^---\n([\s\S]*?)\n---\n/.exec(content); |
There was a problem hiding this comment.
Miss (minor, moot if the script is dropped): this needs \n line endings, but parseKnowledgeDocument accepts \r?\n (scripts/check-knowledge.mjs:62). An untracked CRLF component record on schema 3 then fails check:knowledge with "Run node scripts/migrate-knowledge-v5.mjs", while this script skips it and --check reports every record migrated.
Maintainer impact
architecture:knowledge-contractsINV27 and DEC-13 say every specification is a knowledge record, butpnpm check:knowledgeonly reads records indocs/, themes, and the component packages'src/. The seven Swift specs underpackages/native/specs/swift/library/and the package's ownTEMPLATE.mdskip structure checks, the spec-owner gate, andpnpm specs:forrouting, and nothing stops the next package from inventing its own spec format.Intended invariant
architecture:knowledge-contractsINV27 and DEC-13, and AST-093 FR1:*.spec.md, or Markdown under aspecs/directory, apart fromREADME.md,plan.md, and the paths discovery ignores) is a valid record at its kind's location, orcheck:knowledgefails;packages/native/apple/Sources/Astryx/<Name>/<Name>.spec.md, idcomponent:swift/<Name>, and names its core component inplatform_of;packages/<package>/specs/**/<slug>.spec.md, with the id that path gives.Change
.github/scripts/knowledge-paths.cjs,scripts/check-knowledge.mjs):platform_ofmust namecomponent:<Name>. That resolves to a Core or Lab record. Until one exists,packages/core/src/<Name>/or a<Name>.doc.mjsunderpackages/core/src/stands in. The record sits where core keeps that component (AST-093 FR1, with spec(AST-093): a native component lives in the folder where core keeps it (FR1) #8593): its own folder when core uses one, or the folder core keeps it in, as core keeps AvatarStatusDot inAvatar/and ListItem inList/.platform_of: null.architectureand the id comes from the path.docs/schemas/knowledge/v5.json) addsplatform_ofto component records and lets component ids carry a language (component:swift/Button). The component template moves to v8.node scripts/migrate-knowledge-v5.mjsmoves every component record to schema 5 withplatform_of: nullafterid, and changes nothing else. It is deterministic and idempotent, and--checklists records that still need it. Its output is the separate final commit. Thecheck:knowledgemessage for an unmigrated component record names the command.pnpm specs:forsends a Swift file to its platform record and, throughplatform_of, to the core record.change-scopetreats platform records as spec records and package records like architecture records, so the owner gate covers both.Rebasing
Component records keep landing on
main. To rebase: drop the finalchore(knowledge): move component records to schema v5commit, rebase the other two, runnode scripts/migrate-knowledge-v5.mjs, and commit its output as the final commit again.Evidence
main,packages/native/specs/swift/library/*.mdhave no frontmatter, andcheck:knowledgepasses. On this branch, the same files at their old paths each fail with an INV27 message (covered incheck-knowledge.test.mjs).node scripts/check-knowledge.mjsand--base origin/mainprint "Knowledge templates and records are aligned."Scope
Writing rubric results
The converted native records keep the approved text; only section names, frontmatter, and cross-references changed. The rubric was run over the added sections and the AST-093 bullet:
Since the last review
scripts/migrate-knowledge-v5.mjslists records ascheck:knowledgediscovers them, tracked and untracked but not ignored, so a new record the check flags is migrated before it's staged. There's a test for it.validatePlatformComponentRecordrequires a platform record to sit where core keeps its component: the core record's folder, the core<Name>/directory, or the folder of<Name>.doc.mjs(AST-093 FR1 with spec(AST-093): a native component lives in the folder where core keeps it (FR1) #8593). Tests: Avatar/AvatarStatusDot and List/ListItem pass; ListItem/ListItem, Card/ListItem and Icon/Banner fail, each naming the right folder.pnpm specs:forroutes a platform member record (Swift AvatarStatusDot inAvatar/) only to its same-stem files, as core routes a member record. The folder's own component record still covers the whole folder.Avatar/AvatarStatusDot.spec.md), following spec(AST-093): a native component lives in the folder where core keeps it (FR1) #8593.migrate-knowledge-v5.mjsskips a tracked record that was moved or deleted but not staged, ascheck:knowledgedoes.Testing
pnpm vitest run --project node scripts/check-knowledge.test.mjs scripts/specs-for-file.test.mjs .github/scripts/knowledge-paths.test.mjs .github/scripts/change-scope.test.mjs .github/scripts/spec-owner-decision.test.mjs .github/scripts/spec-owner-reconcile.test.mjs .github/scripts/spec-owner-workflow.test.mjs: 8 files, 424 tests pass, includingscripts/migrate-knowledge-v5.test.mjs. New cases cover INV27 candidates, package-record ids, platform records (path id,platform_ofwith and without a core record, the anatomy map, a spec outside the Swift component tree),specs:forrouting throughplatform_of, and change-scope.node scripts/check-knowledge.mjsandnode scripts/check-knowledge.mjs --base origin/main: aligned.node scripts/migrate-knowledge-v5.mjs --check: every component record is on schema v5.