Skip to content

docs(adr): ADR-0131 dated notes for the 18.x line — release scope, D1 as ruled, the D9 lean-embedding exception and its boundaries (Tier H) - #25149

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-24897-adr-0131-dated-notes
Oct 22, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-24897-adr-0131-dated-notes

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #24897

Clause-②: no
Metadata-protocol: none

ADR text only. It records shipped behaviour and the rulings of record; no code moves. One file: docs/adr/0131-total-organization-ownership-no-null-organization-id.md. Tier H (docs/adr/**): the maintainer approves. This PR stays a draft, and is not enqueued, until #25133's fix and #25134's os migrate plan advisory have merged. Their notes then cite the merge commits.

What the ADR now records

# Where What Source
1 D14, release-scope note Replaced. 18.0.0 (06cab4849a) carries steps 1–6, including the walled lift (#24667) and the open ceremony (#24681), plus step 7 parts 7a-1, 7a-3, 7b-3 and 7c. 7a-2, 7b-0, 7b-1+7b-2 and 7z landed after the GA. 18.0.0-born stores are birth-marked at generation 1. One line tells the reader how to take the 2026-10-19 scope note's items 1–3 now. 6291577585 on #15194; 6323222024 on #24583 (its table)
2 D9, dated note The lean-embedding exception (no-organization-object stores NULL; the counter keys __global__) and its three boundaries: 7b-0's NOT NULL at CREATE TABLE; every production os serve/os start that composes no organization object is refused, whether or not --server (#25133, in flight); so only programmatic embedding and --dev keep it. 6284717698, 6288405082 on #24583; ruling 6328987873 on #25133 (A); #24940 5e9b100743; #24845 df8bb40a03
3 D1 Amended text: the paragraph under 「A 让 D1 变成的样子」, with the 2026-09-04 text quoted in an Amended note that also records the ruling's three bindings. One of them is that os migrate plan lists the still-nullable tenant columns as an advisory (#25134's execution, in flight). A dated note records the tenant column NOT NULL at CREATE TABLE from 7b-0 on. ruling 6328195425 on #25134 (A); measurement 6323585273 on #24919; 6285122667; #24940
4 D2, dated note Declared sharing rules are deployment-wide through the typed deploymentWide marker. 6285122667 item 2; #24828 7cacad5348; #25140
5 D8, dated note The gate is implemented: check-tenant-chokepoint refuses an IS NULL arm, and #25140 aligned it for where(col, 'is not', null). #24880 0091d845e2; #25140 60b42cd0b7; review 6287357347 R1
6 D7, dated note sys_audit_log.tenant_id keeps its NULL arm in the retention pass, by design. #24825 contract review 6287357347, judgment 3
7 D5, dated note The last-admin guard counts only the Default Organization's admin_full_access grant. The organization-less anchor, the guard's only fail-open, is retired. #25141 abc25a3536 (#24883, seat decision 6324268472)
8 D8, dated note Residue on an uncertified database: organizationOutOfWriteReach answers "in reach" for an organization-less row that D8 makes unreachable. seat ACCEPT 6325596117 on #25140, Q1 A
9 D1, dated note The organization delete under ruling B is refused while the organization owns records, and the engine never sets a tenant column to NULL. ruling 6303358360 on #24948; #25016 688052e147

The status line gains one Amended (2026-10-22) entry naming the D1 change and the notes.

Verification

  • dispatch-gates --commands, then each command run with its exit code captured before any pipe. --ran reconciled 20 derived, 20 run, 0 NOT-MEASURED. The first run found one real finding: check-adr-symbol-anchors refused a storage-routes.ts:761 line anchor, and it now cites symbols. check:doc-formula-expressions first exited 3 because @objectstack/formula was not built; it passed after the build.
  • node scripts/pm/check-governed-merges.mjs --branch origin/claude/issue-24897-adr-0131-dated-notes: GOVERNED, Tier H, docs/adr/** ×1, 202 changed lines.
  • Each note was checked against origin/main 459afea1f6: every PR it cites is merged with the stated merge commit. The code facts were read in the tree: the gate's spellings, deploymentWide, ATTRIBUTION_PARTITION_COLUMNS, the driver's NOT NULL, and organizationOutOfWriteReach. The four D7-note objects (sys_identity_email, sys_platform_setting_audit, sys_secret, sys_flow_credential) declare tenant: false at 06cab4849a.

Acceptance notes


Generated by Claude Code

… as ruled, the D9 lean-embedding exception and its boundaries

D1 takes the wording ruled on #25134 (6328195425, letter A), with the
accepted text quoted in its Amended note. Dated notes record the 18.0.0
release scope (6291577585, 6323222024), D1 at CREATE TABLE (#24940),
the organization delete under ruling B (#25016), D2's deploymentWide
marker (#24828), D5's last-admin guard (#25141), D7's attribution NULL
arm (#24825), D8's implemented gate (#24880, #25140) and its one
uncertified residue (6325596117), and D9's lean-embedding exception
under ruling A on #25133 (6328987873). #25133's fix and #25134's
advisory are in flight and cited by card.

Refs #24897

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQCyrGmMy6kwav9XCzAuQ9
…number

check-adr-symbol-anchors refuses a line-number anchor.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UQCyrGmMy6kwav9XCzAuQ9
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 22, 2026
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation labels Oct 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review October 22, 2026 00:31
@os-zhuang
os-zhuang enabled auto-merge October 22, 2026 00:31
@os-zhuang
os-zhuang added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 37ccd5f Oct 22, 2026
45 of 46 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-24897-adr-0131-dated-notes branch October 22, 2026 00:43
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 9b6e4da77eda73a8ad2b784c4a01522c49574e34
Local-runs: none
Scope: docs/adr/0131-total-organization-ownership-no-null-organization-id.md, plus files read to judge it

Read-only. Fetched origin/claude/issue-24897-adr-0131-dated-notes (head 9b6e4da77e, merge-base = origin/main 459afea1f6) and its diff against main (one file, +176/-26, two commits 9b2ae461e8 and 9b6e4da77e). Read the ADR whole on both sides. Read every cited record from the GitHub API: the two in-flight rulings 6328195425 (#25134) and 6328987873 (#25133), the #25134 card body, the #24583 close record 6323222024, execution record 6285122667, reports 6284717698 and 6288405082, the 7b-3 claim amendment 6284744613, the publish record 6291577585 (#15194), the #24948 ruling 6303358360, the #24883 seat decision 6324268472, the #25140 seat ACCEPT 6325596117, the #24825 contract review 6287357347, the #24919 measurement 6323585273, the step-4 ruling 6278609968, the #24378 ruling 6258883445, the 7a-2 landing record 6294524149, the #24897 card, claim 6329368843 and dev report 6329720915, the live PR body, and the PR records for #24524, #24667, #24681, #24825, #24828, #24836, #24845, #24872, #24880, #24893, #24911, #24940, #25016, #25140, #25141, #24428, #24599. Checked every cited merge commit for existence on origin/main and for ancestry against the 18.0.0 version commit 06cab4849a. Read the code the notes name on origin/main with git show and git grep (core, objectql, driver-sql, driver-turso, driver-memory, plugin-sharing, plugin-auth, plugin-audit, service-storage, cli serve, the chokepoint gate, the ceremony's not-null step, the spec contract and migration constants), and the four D7-note objects at 06cab4849a. Ran the governed-merge check and three node-builtin ADR gates in a detached scratchpad worktree of the head (removed afterwards). Built nothing, posted nothing.

① Derived judgments

Item 1, the nine notes, each sentence against origin/main and its record:

Item 2, amended D1: MATCHES. The paragraph under 「A 让 D1 变成的样子」 in #25134's card is a byte-exact prefix of the new D1; the only addition is the original's middle sentence ("An object whose rows belong to no organization declares … and has no column."), kept verbatim. Ruling 6328195425 item 3 adopts that paragraph for #24897. The Amended note quotes the 2026-09-04 text's head and tail exactly as origin/main holds them, eliding precisely the sentence that was kept; the decision is stated unchanged. Its bindings 1, 2 and 3 are ruling items 1, 2 and 5 without change of meaning (item 4, the shard sentences, is code and rightly omitted); item 2 is marked "#25134's execution, in flight", as the ruling dispatches it after #25133.

Item 3, D6 regime C: STALE on origin/main, in text this PR does not edit (non-blocking, see B1). The sentence "This is a ruled decision that #24421 builds; it has not shipped." is false now: PR #24428 964a23700f (merged 2026-10-19T05:27Z, an ancestor of 06cab4849a, so in 18.0.0) landed sharing_rule under regime C, with SHARING_RULE_ACTIVATION_TYPE = 'sharing_rule' (sharing-rule-service.ts:67), same-name shadowing retired (:242, :977), and the ceremony migrating a same-name copy to a clone (packages/cli/src/utils/organization-ownership-apply.ts:119); #24599 1e8b6284c0 (also in 18.0.0) closed the /meta authoring door. Card #24421 is still open, which is why the note still names it: it was filed for the superseded B′ shape. The true sentence: "This decision shipped in 18.0.0: #24428 (964a23700f) added the sharing_rule activation type and the same-name refusal, #24599 (1e8b6284c0) closed the /meta door, and the D10 ceremony's clone migration is in organization-ownership-apply.ts."

Item 4, consistency: NO CONTRADICTION introduced. "NULL on single-tenant", "later release" and "18.1" occur nowhere in the branch file. "nullable tenant column" occurs only in the new text and in the unchanged D5 amendment ("a reserved nullable tenant column is the shape D1 forbids"), which still agrees with the amended D1 (NULL is not a state). "it has not shipped" survives in the D6 regime C note (item 3) and in the four D7 notes, and release-scope item 3 now says in so many words that those four describe stages 18.0.0 carries. The 2026-10-19 scope note's items 1 to 3 are explicitly re-read by the new release-scope note. D9's main text and the new exception note, and D8's main text and the residue note, are framed as rule plus recorded exception, which is what rulings 6328987873 (B not taken) and 6325596117 (Q1 A) decided.

② Semver level

No package changes; docs-only ADR text. No changeset is owed and the PR carries skip-changeset; Clause-②: no, Metadata-protocol: none are correct for a record of shipped behaviour. The gate expectation is Tier H landing by the maintainer, not a version bump.

③ Boundary flags

Implemented-by: claude/issue-24897-adr-0131-dated-notes
Reviewed-by: session_01Y5583bs2RDd53MH6kM1ca3

VERDICT: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants