Repository navigation
fix(knowledge): check and owner-gate package architecture records under packages/*/specs - #9331
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
…er packages/*/specs check:knowledge never read packages/native/specs/**/<slug>.spec.md, so a broken record there passed, and change-scope did not owner-gate an edit to one. - Discovery reads packages/<package>/specs/…/<slug>.spec.md, checks each as an architecture record, and checks its kind and the id its path gives. - change-scope owner-gates them like docs/architecture/ records (never spec-only). - A current record with an unknown kind no longer crashes the reference check. - knowledge-contracts: the enforcement-gap paragraph and INV27 verification row say what is now checked.
67ae31b to
afb84cd
Compare
|
/approve-spec afb84cd |
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Recommending approval. Records under packages/<package>/specs/…/<slug>.spec.md are now checked for kind and path-derived id and owner-gated, as the current architecture:knowledge-contracts placement rule and INV27 require, and the record edit has an engineering owner's approval for this exact commit. The before/after behaviour in the description reproduces, and the records in #8500 pass the new check unchanged. #8288 changes the same four files, so whichever lands second will need to reconcile them.
[Automated review]
Maintainer impact
Records under a package's
specs/directory, such aspackages/native/specs/swift/library/tooltip.spec.mdand the Swift architecture records an open pull request adds there, were invisible to the spec tooling. A broken record there (for examplekind: bogus) passespnpm check:knowledge, and an edit to a current one gets no spec-owner gate. Owners lose the gate on the Swift rules every native component follows, and nothing catches a malformed record.Intended invariant
architecture:knowledge-contractsOwning code: "A record governing one package's cross-component rules lives under that package'sspecs/directory as<slug>.spec.md, with kindarchitectureand an id ofarchitecture:followed by the package name, each directory betweenspecs/and the file, and the slug, joined by hyphens." INV27 says every spec is a checked record. No product code or record content changes.Change
packages/<package>/specs/…/<slug>.spec.md. Each one is checked as any architecture record is (schema rules, sections, applicability blocks, ids, authority and approval). Then it checks that the kind isarchitectureand that the id is the one its path gives.change-scope.cjs): these records are knowledge records, owner-gated likedocs/architecture/and never spec-only.architecture:knowledge-contractsenforcement-gap paragraph now says what is checked. The INV27 verification row names the change-scope test. Markdown underspecsthat is not a<slug>.spec.md(guidance files) stays a review-only gap.Evidence
kind:inpackages/native/specs/swift/library/tooltip.spec.mdtobogusprints "Knowledge templates and records are aligned.";classifyChangesreturnstouchesKnowledgeRecords: falsefor it.README.mdthere is not a candidate (spec-owner-reconcile.test.mjs,change-scope.test.mjs).pnpm check:knowledgepasses;specs:for --unreachedreturns 0.Scope
Testing
vitest --project nodeon knowledge-paths, change-scope, spec-owner-decision, spec-owner-reconcile, spec-owner-workflow, check-knowledge, and specs-for-file: 416 tests pass.pnpm check:knowledgeandspecs:for --unreachedon main, and on the open branch that adds the Swift architecture records.Writing rubric results
Posted by Cindy's agent on her behalf.