Repository navigation
docs(review-checklist): two rules earned by #1734 — a fixture that skips the schema, and a guard set enumerated by its refusal code - #1735
Merged
Conversation
…ips the schema, and a guard set enumerated by its refusal code Rule 24 (Tests and assertions): a test whose fixture builds its own document proves the reader can read a field, never that the field can be there. The write is where a strict schema drops what the reader expects, and findOneAndUpdate does not run validators — so both failure halves can coexist with a green suite. Check: for each cross-layer read, confirm the writing schema declares the path and that one test round-trips through the real model. Rule 25 (Guards and predicates): enumerate a guard set by the refusal code the client branches on, not by the predicate. Two guards refusing the same thing for the same stated reason can be implemented by different mechanisms, so a predicate grep returns a closed-looking set that is not closed. Both earned by TASK-043 / PR #1734.
samxu01
pushed a commit
that referenced
this pull request
Sep 18, 2026
… and 7 My own #1735 (merged as a204e72) appended these two rules to the tail of the 'Tests and assertions' and 'Guards and predicates' lists. Markdown numbers ordered-list items by position, so rule 24 rendered as 5 and rule 25 as 7, and neither 24 nor 25 appeared anywhere in the rendered document — measured with marked@12: [1,2,3,4,24] renders 1..5 and [5,6,25] renders 5,6,7. Relocating both after rule 23 makes document order ascend 1..25, so every rule renders under its literal number. Text is byte-identical to what #1735 merged. This supersedes that PR's placement paragraph.
lilyshen0722
added a commit
that referenced
this pull request
Sep 18, 2026
…ric order so rendered numbers match their literals (#1736) * docs(review-checklist): keep one copy of rules 18 and 19, and move rule 23 last so rendered numbers match their literals Rules 18 and 19 had accumulated duplicate copies from successive appends. 18 (3 copies): the first is a strict prefix of the third; the second and third are word-identical. Keep one. 19 (4 copies): copies 1, 3 and 4 are strict subsets of copy 4 — every word of each still appears in order in copy 4 — so dropping them loses nothing. Copy 2 is the exception and is dropped deliberately: it carries the stale count claim ('the only reader in any route or controller ... an admin-only surface') that copy 4 corrects to three readers in the whole tree, one of them scripts/seat-output.ts. Copy 4 also records that earlier wording and why the count is load-bearing, so the correction survives the deletion. Rule 23 moves to the end (text byte-identical) because markdown numbers list items by position, not by their literal number. With 23 sitting between 17 and 18 in one list, the rendered document showed rule 23 as '18' and rule 18 as '19' (verified by rendering both revisions with marked@12). Document order 18..23 makes every one of the 23 rules render as its literal number. No rule is renumbered: numbers are cited externally (ADR-028 rule 23, ADR-019 rule 9, REVIEW.md §7). * docs(review-checklist): relocate rules 24 and 25 — they rendered as 5 and 7 My own #1735 (merged as a204e72) appended these two rules to the tail of the 'Tests and assertions' and 'Guards and predicates' lists. Markdown numbers ordered-list items by position, so rule 24 rendered as 5 and rule 25 as 7, and neither 24 nor 25 appeared anywhere in the rendered document — measured with marked@12: [1,2,3,4,24] renders 1..5 and [5,6,25] renders 5,6,7. Relocating both after rule 23 makes document order ascend 1..25, so every rule renders under its literal number. Text is byte-identical to what #1735 merged. This supersedes that PR's placement paragraph.
lilyshen0722
added a commit
that referenced
this pull request
Sep 18, 2026
…er (#1737) Adding a rule to the tail of its thematic section is the intuitive move, and it silently breaks the numbering: markdown numbers ordered-list items by position, so the new rule renders under the section's next number and its own number appears nowhere. #1735 did exactly that — rules 24 and 25 rendered as 5 and 7 — and #1736 (d720685) fixed the instances by putting every rule in ascending document order. Rule numbers are cited by number elsewhere (ADR-028 rule 23, ADR-019 rule 9, REVIEW.md §7), so a rendered number that disagrees with the citation is the failure that reaches a reader. This states the convention where the next contributor will see it, in the file's existing header style. Docs only, one line. Rendered numbers are unchanged at 1..25 (marked@12), and the note adds no list item.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two incident-derived rules for
docs/development/review-checklist.md, both earned by TASK-043 / #1734. Docs only.Rule 24 — Tests and assertions: a fixture that builds its own document proves the reader can read a field, never that the field can be there
A test that constructs its own object exercises the read and skips the write, and the write is where a strict schema drops what the reader expects. In #1734 the route derived a runtime type from
manifest.runtime.runtimeType,ManifestRuntimeSchemahad no such path and wasstrict, so the field was dropped on every write:The route's own suite stayed green because its fixture was a plain object; the seeder's enum-invalid
type:'native'persisted precisely becausefindOneAndUpdateskips validators; and the fallback had been dead on every row ever written. Check: for each cross-layer read, confirm the writing schema declares the path, and confirm one test round-trips a document through the real model. A path whose every test builds its own object is unproven, and mutating the schema will not redden it.Rule 25 — Guards and predicates: enumerate a guard set by its refusal code, not by its predicate
Guards refusing the same operation for the same stated reason can be implemented by different mechanisms, so a predicate grep returns a closed-looking set that is not closed. On #1734 I grepped
isCloudRuntime, found exactly two call sites, and told a reviewer "the gate lives only inroutes/registry/install.ts".cloud_agents_not_entitledhas three sites:registry/install.tsandregistry/provision.tsgate viaisCloudRuntime;personas.tsgates runtime-agnostically on role +entitlements.cloudAgentsbefore callinghirePersona. The hire path was gated all along, and the incomplete map had already been used to argue which paths a ruling had to cover. Check: grep the refusal code the client branches on, read every hit, then say whether a path reaches a gate.Placement
Each rule sits at the end of its thematic section rather than in numeric position, because the sections group by kind and the file already carries out-of-order numbers (
23sits after17). If you would rather have the numbers re-sorted, say so and I will do it separately.Evidence
git diff origin/main --stat→docs/development/review-checklist.md | 4 ++++18appears three times (one copy a strict prefix of the other) and19four times, the earlier copies carrying a count claim ("the only reader … admin-only surface") that the latest copy corrects. Removing the superseded copies is a judgement call about someone else's prose, so it is a separate row rather than a rider on this one.