Skip to content

Commit faba556

Browse files
committed
docs(adr): ADR-0123 — layered master data, template/override linkage and the resolution organization (#4585)
Discharges the ADR-0105 D10 reservation ("mechanics to be detailed in a follow-up ADR"). Status: Proposed — decision-ready material, no code. The draft is built on three measurements taken against main, none of which existed when D10 was reserved: - Layer 0 under `group` is `{ organization_id: { $in: accessible_org_ids } }` (tenant-layer.ts:139-143), which lowers to SQL `IN (...)` and is NULL-false, while the SQL driver's own tenant chokepoint carries the opposite NULL carve-out (sql-driver.ts:6369, :6382). An org-less "read-shared template" row is therefore actively excluded today, and W1/W2 mean no Layer 1 mechanism can restore it. - D2 demoted the active organization out of the read path, so "org override wins" has no organization to win for. Resolution needs a resolution organization, and the union wall removed the obvious one. - D6 red line 1 is an error-severity lint (validate-org-axis-red-lines.ts): an authored policy or sharing rule reading `parent_organization_id` fails at authoring time, so resolution must be engine machinery, not metadata. Decisions: D1 object-level `layered` that refuses outside the `group` posture; D2 natural-key linkage over a row-id lookup, riding ADR-0120's `unique: 'organization'`; D3 org-less template plus one narrow, declared, read-only opening in Layer 0 (with the flat-vs-rooted fork left to the maintainer); D4 no implicit collapse on read, resolution explicit and per-organization for a union reader; D5 集团统管/分级/自由 declared per object and enforced on write, not resolved away on read; D6 reuse of D9's `$root`/`$parent` and "shares a root"; D7 the open/commercial line stated per cloud ADR-0016 and D12's code-vs-activation amendment, including the boot refusal; D8 named non-goals. Appendix A records the cloud-side inputs (cloud#874, #2937, #881/#884) that were unreadable from the drafting session as inputs-to-verify rather than as facts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018YpzLzyoGkM4rspmBeGYMW
1 parent f123670 commit faba556

1 file changed

Lines changed: 595 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)