Repository navigation
docs(architecture): a record's approval lines are append-only - #10688
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
89402b0 to
3e85894
Compare
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new INV31 and DEC-18 in architecture:knowledge-contracts, and two gaps in the new check:knowledge --base warnings need fixing.
To settle the spec, an engineering owner reviews INV31, DEC-18 and the INV31 verification row, then comments /approve-spec <full head SHA> or says what should change. The author can do this as an engineering owner. The points to settle are whether a pull request from the cixzhang account should count as her approval with no explicit act, whether other deciders must approve the exact head while DEC-14 binds approval to content, and whether DEC-18 should record cixzhang, 2026-11-08 or keep the <pending> placeholder until the decision.
Required fixes:
- The placeholder test at
scripts/check-knowledge.mjs:944matches "pending" or<…>anywhere in a line, so a decided line such asChatComposerInputDEC-1 ("pending-search Enter") or a named`cixzhang`, `<pending>`decider can be rewritten or removed with no warning; test the decider token instead and add those cases. - Both record lists filter with
isKnowledgeRecordPath(:870,:961), which skips platform records, so changingapproved_byin the currentTextInput.swift.spec.mdprints no warning; read records withisValidatedRecordPath, or narrow the "lists each changed approval line" wording in the verification row and the enforcement gap.
[Automated review]
|
/approve-spec 3e85894 |
There was a problem hiding this comment.
Changes requested: the record change is approved for this head, and two gaps in the new check:knowledge --base warning need fixing so that it lists each changed approval line, as the INV31 verification row and the description say.
- The placeholder test at
scripts/check-knowledge.mjs:944matches "pending" anywhere in a Decider line, so rewriting or removing a decided line such asChatComposerInputDEC-1 ("…; pending-search Enter, …") prints no warning; look for a placeholder only in the original decision's decider and date fields, and add that case to the tests. - Both record lists filter with
isKnowledgeRecordPath(:870,:961), which skips platform records, so changingapproved_byindocs/specs/components/TextInput/TextInput.swift.spec.mdprints no warning; select records withisValidatedRecordPathon both sides and add a test, or narrow the verification row and the enforcement-gap wording to the records the check reads.
After the fix, an engineering owner comments /approve-spec <full head SHA> again for the new head.
[Automated review]
…e fields; platform records are read too
|
/approve-spec e7d5625 |
There was a problem hiding this comment.
Changes requested. INV31 and DEC-18 are approved for this head, and the earlier gaps for platform records and "pending" text in the check:knowledge --base warning are fixed; one gap remains.
- Miss:
deciderLines(scripts/check-knowledge.mjs:889-906) reads a Decider line only when**Decider:**starts the line under aDEC-nheading, so rewriting or removing any of 11 decided lines in six current records (spec:AST-009DEC-1 to DEC-5,spec:AST-008DEC-13's**Deciders:**, the list-item DEC-1 ofcomponent:ComplexSelectorandcomponent:MultiSelector, and the amendments inspec:AST-006andspec:AST-034) prints no warning, although the INV31 verification row (docs/architecture/knowledge-contracts.md:1378) says the check lists each changed approval line; widen the parsing with a test per shape, or narrow the row, the gap paragraph and the description to the shapes it reads.
If the fix changes the record's text, an engineering owner approves the new head again with /approve-spec <full head SHA>.
[Automated review]
|
/approve-spec 83e6e16 |
There was a problem hiding this comment.
Changes requested. INV31 and DEC-18 are approved for this head. Every decider-line shape named in the last review is now read, and the earlier gap is fixed. One gap remains in the check:knowledge --base warning.
- Miss:
check:knowledge --basenever readstheme:neutralDEC-1's two decider lines (**System-boundary decider:**and**Final Neutral adoption decider:**,packages/themes/neutral/neutral.spec.md:196-197), becauseDECIDER_LINEmatches only labels that start with**DecideranddeciderLineskeeps one line per decision (scripts/check-knowledge.mjs:896,:909), so the verification row's "lists each changed approval line" does not hold: read every bold label that ends indeciderordeciders(exceptProposed decider) as its own entry under the decision and add a test, or narrow the row and the gap paragraph to**Decider:**and**Deciders:**lines.
Narrowing the row changes approved spec text, so it would need a new /approve-spec for that head. Separately, CI runs the --base step only for pull requests that are not spec-only, so a record-only pull request shows the warning only when someone runs the check locally.
[Automated review]
Merges main: DEC-18 comes before main's DEC-19.
|
/approve-spec f59452d |
There was a problem hiding this comment.
Changes requested. INV31 and DEC-18 are approved for this head. Two gaps remain in the check:knowledge --base warning, which the approved verification row says lists each changed approval line with its original decider:
- Miss:
DECIDER_LINE(scripts/check-knowledge.mjs:899) reads only labels that end indeciderordeciders, so rewriting or removing any of the 20**Direction owner:**lines that record who decidedspec:AST-036DEC-1 to DEC-12,spec:AST-037DEC-1 to DEC-3 andmodule:Table/useTableRowStatusDEC-1 to DEC-5 prints no warning; read that label as a decider with a test, relabel those lines**Decider:**, or narrow INV31 under a new/approve-spec. - Miss:
hasPlaceholderDecider(scripts/check-knowledge.mjs:942-948) tests only the text before the first;, so when an owner decidesmodule:DropdownMenu/useMenuPressDEC-4, whose Decider isproposed by `vjeux`, `2026-09-27`; pending owner review, the check warns that the change needs "proposed by vjeux"'s approval, although INV31 says a filled placeholder is not a change; treat a decider field that starts withproposedas a placeholder and add that shape to the placeholder test.
[Automated review]
|
/approve-spec 2360b35 |
There was a problem hiding this comment.
Approved pending CI: some required checks have not finished on this head yet.
INV31 and DEC-18 are approved for this head, and the two gaps in the check:knowledge --base warning are fixed: **Direction owner:** lines now count as decider lines, and deciding a proposed by … decision no longer warns. A test covers each shape, and both fail against the previous revision's script.
[Automated review]
Summary
Who decided a record stays true. A pull request that changes or removes an existing decision's Decider line, or replaces a record's
approved_bywith a different account, needs that original decider's approval at its exact head;cixzhang's own pull request counts as hers. Adding a decision or an approver needs nothing extra.Record changes
All in
docs/architecture/knowledge-contracts.md:/approve-spec <full head SHA>from that account; any decider other thancixzhangapproves the exact head, also on their own pull request), and what counts as a change (a moved line, text added after an unchanged Decider line, and a filled placeholder decider are not changes).cixzhang, 2026-11-08) is a placeholder until the owner confirms the rule; this pull request stays a draft until then.approved_byline without the original decider's exact-head approval is held; one that only adds a decision or an approver is not.INV31joins thespecificationtrigger, so a review of any record change loads it.pnpm check:knowledge --basewarns and review and merge tooling outside the repository enforces the approval.Knowledge check
pnpm check:knowledge --base <base>(the mode CI already runs on pull requests, next to the append-only schema check) now lists each changed approval line with its original decider, for exampledocs/architecture/<record>.md: DEC-1 changes from "<old>" to "<new>"; it needs <login>'s approval at the exact head (INV31).id, decisions by DEC id, so a moved record or a moved line is not a change.scripts/check-knowledge.test.mjs"approval line history" was red first (3 failing) and is green now: a rewrittenapproved_byplus Decider is reported with the original decider; a removed decision is reported; a new decision, an added approver, an amendment appended to a Decider line, a filled<pending>placeholder, and a moved decision are silent. Run on the real rewrite that motivated the rule, the function reports both theapproved_byand the DEC-1 change.scripts/check-knowledge.mjs(including a small refactor that lets the existing authority reader and the new check share one read of the records at a revision) plus 77 lines of tests.Existing authority searched
architecture:knowledge-contracts(INV19, INV21, INV30, DEC-11, DEC-14, DEC-17, the review gate under Owning code, the schema append-only check),.github/REVIEW_GATE.md,.github/ENGOWNERS,.github/DESIGNOWNERS, and open pull requests touchingknowledge-contracts. DEC-14 says who may approve record content; no current claim protects the recorded decider of an existing decision, so the rule extends the canonical owner of approval policy instead of creating a new record.Claim scope and non-goals
The rule covers existing Decider lines and
approved_byonly. It does not change who may approve new record content (DEC-14), add a workflow, or make the knowledge check read approvals.Writing rubric results
#followed by digits,/pull/,/issues/).Validation
pnpm check:knowledgeandnode scripts/check-knowledge.mjs --base origin/main: aligned, no approval-line warnings for this pull request's own changes.vitest run scripts/check-knowledge.test.mjs: 147 passed.pnpm review:pre: 0 findings, 231 authored lines, merge intomainclean.pnpm specs:foron both changed paths; Prettier;git diff --check.No Changeset: records and repository tooling only.