Commit 1480d45
chore(rules): correct three stale architecture invariants CodeRabbit reads on every PR
`.coderabbit.yaml`'s `**/*` block is applied to every file in every PR, and it
is live — PRs #197/#199/#200 all report `Configuration used: Path:
.coderabbit.yaml`. Three of its seven architecture invariants were wrong:
- "Schema lives in server/db.ts only" — db.ts has held no table since
c1780d8 (2026-05-24). It is 23 lines: pool, drizzle instance, re-export.
Tables live in server/schema/*.ts via the vtTable alias. The instruction was
not merely stale, it pointed the reviewer at the wrong file for three months
and survived an edit to this same file two months into that window.
- "Medication volume must stay strictly below 100 ml" — enforced nowhere.
- "Billing ledger inserts require deterministic idempotency keys" — the ledger
was removed (shadow-inventory.service.ts:2).
The realtime invariant was correct but had no carve-out for the sanctioned
/collab-ws channel, so a correct change under server/lib/realtime-collab/ would
have read as a violation. Added.
.cursorrules said the right thing on lines 30 and 110 and the wrong thing on
line 15 and in the heading at 151. A reader going top-down met the wrong one
first. Aligned.
No drift gate added: the obvious one (assert named paths exist) would not have
caught this, since server/db.ts exists and merely stopped holding what was
claimed. Reasoning recorded in the audit log.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent f6ab6bc commit 1480d45
3 files changed
Lines changed: 60 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8600 | 8600 | | |
8601 | 8601 | | |
8602 | 8602 | | |
| 8603 | + | |
| 8604 | + | |
| 8605 | + | |
| 8606 | + | |
| 8607 | + | |
| 8608 | + | |
| 8609 | + | |
| 8610 | + | |
| 8611 | + | |
| 8612 | + | |
| 8613 | + | |
| 8614 | + | |
| 8615 | + | |
| 8616 | + | |
| 8617 | + | |
| 8618 | + | |
| 8619 | + | |
| 8620 | + | |
| 8621 | + | |
| 8622 | + | |
| 8623 | + | |
| 8624 | + | |
| 8625 | + | |
| 8626 | + | |
| 8627 | + | |
| 8628 | + | |
| 8629 | + | |
| 8630 | + | |
| 8631 | + | |
| 8632 | + | |
| 8633 | + | |
| 8634 | + | |
| 8635 | + | |
| 8636 | + | |
| 8637 | + | |
| 8638 | + | |
| 8639 | + | |
| 8640 | + | |
| 8641 | + | |
| 8642 | + | |
| 8643 | + | |
| 8644 | + | |
| 8645 | + | |
| 8646 | + | |
| 8647 | + | |
| 8648 | + | |
| 8649 | + | |
| 8650 | + | |
| 8651 | + | |
| 8652 | + | |
| 8653 | + | |
| 8654 | + | |
| 8655 | + | |
| 8656 | + | |
| 8657 | + | |
0 commit comments