You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ADR-0093 D3 amendment: bulk import binds the administrator's current organization in multi mode after #34535 #34809
documentationImprovements or additions to documentationdomain:skillsDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
docs/adr/0093-tenancy-mode-and-membership-lifecycle.md, the closing paragraph of the D3 amendment (2026-10-24), lines 272–274 on main:
This is not the reconciler guessing a tenant: the reconciler, and every other
creation path (self sign-up, bulk import, SSO JIT, host hooks), still binds
nothing in multi mode.
Once PR #34750 merges, bulk import does bind in multi mode (to the administrator's current organization), so that sentence becomes false.
Suggested replacement (drafted by the area from PR #34750's body)
This is not the reconciler guessing a tenant: the reconciler, and every other
creation path (self sign-up, SSO JIT, host hooks), still binds nothing in
multi mode.
Bulk import (POST /api/v1/auth/admin/import-users) follows the rule above
row by row (maintainer ruling on #34535, option B; landed by PR #34750): the
settlement runs before any row is written, dry run included, so an
administrator with no current organization is refused whole
(400 NO_ACTIVE_ORGANIZATION) and a server with no unit of work or no
organization plugin answers 501 NOT_IMPLEMENTED; each created row's account
and its join to the administrator's current organization are one unit of
work, so a refused join creates no user for that row; an upsert-matched
existing user joins in the same unit as its profile update, which a refused
join rolls back. Single mode is unchanged.
Re-read the merged PR's Acceptance notes FROM → TO table before landing and correct the paragraph if the PR changed in review. Cite the merge commit in the amendment.
Blocker #34535 closed today at 12:45Z. Back to the queue at its grade (p2). PR #34750 merged at 12:45. If it already carried the ADR-0093 line, close this card as done by it.
Claim: PM loop round 14 · 2026-11-17T23:22Z
Session: session_01WGufzgwLiKcfujYUug7sPs
Account: os-support-ai
Branch: claude/issue-34809-adr-0093-import-binding
Worktree: objectstack-issue-34809
Domain: domain:skills
Seat: repo:objectstack#3
File surface: docs/adr/0093-tenancy-mode-and-membership-lifecycle.md (an add-only dated note under the D3 amendment, plus its status-line Amended entry if the record's convention asks for one), and docs/adr/README.md only if scripts/adr-index.mjs regenerates it. No changeset (docs only).
Container & model: S, mode:subagent (area o3-B), model: claude-fable-5-2 (dispatch-gates --tier: MANDATORY for docs/adr/**), effort: high (seat 3, 22:36Z); the seat runs a fable L2
Clause-②: no — an ADR record correction after a landed behaviour; no published schema, export or accept set moves
Metadata-protocol: none — no metadata key is touched
Tier: H — docs/adr/** is governed; after L1 and the seat L2 the PR goes to os-zhuang and is never readied or queued by this area
Responsibility: PR #34750 (#34535, maintainer ruling 6942842013, option B), merge commit 36af6b05a7be7cef61d93ed8513510f822d79c89, made bulk import bind in multi mode without carrying the ADR-0093 line
Thread-read: 6948617692
Premise: measured on origin/main 4443014. ADR-0093 lines 272–274 (D3 amendment of 2026-10-24) still read "the reconciler, and every other creation path (self sign-up, bulk import, SSO JIT, host hooks), still binds nothing in multi mode." Since PR #34750 merged, bulk import (POST /api/v1/auth/admin/import-users) binds each row to the administrator's current organization in multi mode, so the sentence is false for bulk import. Triage asked to close this card if #34750 had carried the line; it did not (the sentence is unchanged on main).
{
"issue": 34809,
"status": "done",
"branch": "claude/issue-34809-adr-0093-import-binding",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35035",
"session": "session_01WGufzgwLiKcfujYUug7sPs",
"premise_still_valid": true,
"summary": "Draft PR #35035, head 1a6abb30ddcf659a7b7f4dca23115384bbcd4a6d, one file (docs/adr/0093-tenancy-mode-and-membership-lifecycle.md, +34 / -1). An add-only amendment note dated 2026-11-17 sits under the D3 amendment of 2026-10-24 and records that bulk import (POST /api/v1/auth/admin/import-users) joins each row to the administrator's current organization under a walled posture, citing maintainer ruling 6942842013 (option B) and merge commit 36af6b05a7; the ruled sentence is not rewritten, and the note says it stands as ruled for the reconciler, self sign-up, SSO JIT and host hooks. The status line gains one Amended entry (the record's two later amendments carry one each); docs/adr/README.md does not change. Every claim of the card's drafted paragraph was read against the code and pins at origin/main 4443014630: all hold; the note words two of them as the code tests them (501 is no unit-of-work seam or no addMember on better-auth's API; the predicate is tenancy.isolationActive, so 'walled posture' rather than 'multi mode') and adds four landed facts (no temporary password and no invitation for a refused row, a dry run that is not refused joins nothing, an existing member is not added twice, a matched user joins whichever other organizations it already belongs to) plus the ADR-0119 D1 transaction limit. Premise holds as claimed, with one correction: the claim recorded no open PR on this file, and open PR #34909 edits the same status line.",
"tests": "No test: the diff is one ADR, no package is touched, nothing is ablated (docs). Claims verified by reading, at origin/main 4443014630: packages/plugins/plugin-auth/src/admin-user-endpoints.ts settleCurrentOrganizationJoin (400 NO_ACTIVE_ORGANIZATION before 501 NOT_IMPLEMENTED; undefined when multiOrgCreationJoinsCurrentOrganization is false) and joinCurrentOrganization (role member, probe scoped to the current organization, account 'created' or 'existing'); packages/plugins/plugin-auth/src/admin-import-users.ts runAdminImportUsers (settlement before runImport with no dryRun branch before it; inRowUnit wraps createData and updateData in join.seam.runAtomically; temporary password and invitation target recorded after the unit returns); the ten multi-org cases of admin-import-users-manager-pass.test.ts and I1, I2 of packages/qa/dogfood/test/create-user-organization-join.dogfood.test.ts. git merge-base --is-ancestor 36af6b05a7 HEAD answered exit 0; git log 36af6b05a7..HEAD over those files plus auth-plugin.ts and reconcile-membership.ts answered 0 commits. The gate's own extractAnchors reads 5 anchors in the note (3 symbol, 2 file-level) and check-adr-symbol-anchors resolves all.",
"gates": "Local, head 1a6abb30dd: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 21 commands; each ran with stdin closed and its exit recorded before any pipe; all 21 exit 0. --ran: '21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED'. Verdict lines: 'check-adr-symbol-anchors: 3756 anchors across 158 records resolve'; 'check-adr-links: 1151 relative link destination(s) under docs/adr/ resolve'; 'adr-index: OK — docs/adr/README.md is current and every record parsed' (node scripts/adr-index.mjs --check, exit 0); check:adr-anchors, check:doc-authoring, check:nul-bytes, check:pm-governed-merges, check:pm-prior-rulings exit 0. check:doc-formula-expressions first answered exit 3 (PREREQUISITE NOT MET: formula and lint not built in the worktree); after turbo build of those two under the verify lock (VERDICT command-exit 0) it answered exit 0. overlap-check --branch=HEAD: 'VERDICT overlap exit 1' — merges cleanly with origin/main 6d2db1d7ef, conflicts with open PR #34909 in the ADR file (status line only, read with merge-tree: one conflict block, line 3). check-governed-merges.mjs --pr 35035: exit 3, 'GOVERNED — a human merge is the review record for this PR', 'landing tier: H', low-risk arm reads Tier H ('removes 1 line(s) — an add-only note changes no existing line', the status-line append), size 35 changed lines under 3000. CI check-runs on 1a6abb30dd at hand-back: success — Check Changeset, Check Documentation Links, Check PR Size, Governed Surface Queue Guard, PR-body guards, filter; in_progress — the Lint families, the Type Check families, Plan Test Core shards, Dogfood Regression Gate, Test UI, Auto Label; the rest skipped by the path selector. Not run locally and left to CI: repo-wide lint, type-check lanes, test:repo, test shards.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 — fleet-write pr_create (POST pulls, POST issues/35035/assignees, POST issues/35035/labels; read-back identical, 10890 bytes, assignee os-support-ai, label skip-changeset), post-stamped comment on #34809 (POST issues/34809/comments). Two git pushes (the empty-branch probe and the commit) are not REST writes.",
"open_questions": [
{
"question": "overlap-check answers exit 1 against open PR #34909 (Tier H, not draft, awaiting approval): both PRs append an Amended entry to ADR-0093's one status line. Everything else merges cleanly.",
"options": ["A keep both PRs as they are; whichever lands second merges main and keeps both entries (a one-line resolution)", "B drop the status-line entry from PR #35035 so it never conflicts, and add it in a follow-up after #34909 lands"],
"recommendation": "A, because the record's convention asks for the status-line entry with the note, and the resolution is mechanical; the seat owns the serial order."
},
{
"question": "Ruling record 6942842013 says the D3 sentence 'is rewritten by the implementing PR'; the claim's form is an add-only note that leaves the sentence untouched. The PR follows the claim and says so in its Acceptance notes.",
"options": ["A keep the add-only note", "B rewrite the sentence as the card drafted it"],
"recommendation": "A, because it is the form the seat ruled for this card and the note states plainly where the sentence no longer holds; the approver can ask for B."
},
{
"question": "Three places where the dispatch order and the standing agent text disagree, each followed as the order spells it and read back: the PR body's last line is the signed HTML-comment trailer (the agent text bans HTML comments; the relay's PR_BODY_TRAILER_SHAPE declares this one); the two declaration lines are bare ('Clause-②: no', 'Metadata-protocol: none') where the agent text says to copy the claim's lines, which carry a reason after a dash; commit trailers are the model-free pair as the order spells it.",
"options": ["accept as sent", "seat rewrites the PR body"],
"recommendation": "accept as sent: the stored body is byte-identical to the sent one, line 1 is the closing line and the last line parses as the trailer."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed (read-only observation, no class): the ruled 2026-10-24 sentence of ADR-0093 says SSO JIT and host hooks bind nothing in multi mode, while D3's table and D7 say those flows own membership there; the new note repeats the sentence as ruled and does not reword it",
"carrier: seat · the claim's 'no open PR found touching ADR-0093' was false at claim time: PR #34909 was opened hours earlier and edits the same file; the serial order of the two Tier H PRs is the seat's",
"carrier: seat · the upsert bullet states a consequence read from code with no pin behind it (a matched user that already belongs to another organization is joined to the current one); the contract review of PR #34750 raised it for the approver, so it is written into the record for the approver to confirm or strike"
]
}
Delivered: an add-only amendment note dated 2026-11-17 under ADR-0093's D3 amendment, plus one Amended entry on the status line. It records that bulk import (POST /api/v1/auth/admin/import-users) joins each row to the administrator's current organization under a walled posture, per ruling 6942842013 (B) and merge 36af6b05a7. The note also records the 400/501 settlement before any row (dry run included), one unit of work per row, and the upsert behaviour. The ruled 2026-10-24 sentence is kept, and the note says where it no longer holds.
The upsert cross-organization reach (a matched user who belongs to another organization joins the current one) is a code reading with no pin. It was put to the approver in the seat record.
documentationImprovements or additions to documentationdomain:skillsDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first touch → p2 ·
domain:skills·pm:blocked· 2026-11-17T11:03Z⛔ Not a claim.
docs/adr/**→domain:skills. Tier H.objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: correction to the first-touch note · 2026-11-17T11:04Z
The correction: #34535 is p1, not p2, so this card does not inherit a p2.
objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: unlock →
pm:queue· 2026-11-17T12:54Z⛔ Not a claim.
Blocker #34535 closed today at 12:45Z. Back to the queue at its grade (p2). PR #34750 merged at 12:45. If it already carried the ADR-0093 line, close this card as done by it.
objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
Claim: PM loop round 14 · 2026-11-17T23:22Z
Session:
session_01WGufzgwLiKcfujYUug7sPsAccount:
os-support-aiBranch:
claude/issue-34809-adr-0093-import-bindingWorktree:
objectstack-issue-34809Domain:
domain:skillsSeat:
repo:objectstack#3File surface:
docs/adr/0093-tenancy-mode-and-membership-lifecycle.md(an add-only dated note under the D3 amendment, plus its status-line Amended entry if the record's convention asks for one), anddocs/adr/README.mdonly ifscripts/adr-index.mjsregenerates it. No changeset (docs only).Container & model:
S,mode:subagent(area o3-B),model: claude-fable-5-2 (dispatch-gates --tier: MANDATORY for docs/adr/**),effort: high(seat 3, 22:36Z); the seat runs a fable L2Clause-②: no — an ADR record correction after a landed behaviour; no published schema, export or accept set moves
Metadata-protocol: none — no metadata key is touched
Tier: H —
docs/adr/**is governed; after L1 and the seat L2 the PR goes to os-zhuang and is never readied or queued by this areaResponsibility:
PR #34750 (#34535, maintainer ruling 6942842013, option B), merge commit 36af6b05a7be7cef61d93ed8513510f822d79c89, made bulk import bind in multi mode without carrying the ADR-0093 lineThread-read: 6948617692
Premise: measured on origin/main 4443014. ADR-0093 lines 272–274 (D3 amendment of 2026-10-24) still read "the reconciler, and every other creation path (self sign-up, bulk import, SSO JIT, host hooks), still binds nothing in multi mode." Since PR #34750 merged, bulk import (
POST /api/v1/auth/admin/import-users) binds each row to the administrator's current organization in multi mode, so the sentence is false for bulk import. Triage asked to close this card if #34750 had carried the line; it did not (the sentence is unchanged on main).Serial constraints cleared:
no open PR found touching ADR-0093; overlap probe owed on the dev's first commitPre-claim lane:
domain:skills(p2, released by the maintainer at 22:35Z, routed to o3-B by seat 3)Pre-claim deps:
Blocked-by: #34535closed 2026-11-17T12:45Z (triage unlock 6948617692)Prior rulings read: maintainer ruling 6942842013 on plugin-auth: admin import-users does not join created users to the importing admin's current organization in multi-org mode #34535 (option B); ADR-0093 D3 amendment (2026-10-24); thread: 6948617692; repo: objectstack-ai/objectstack
Lease
o3-Bunder seat 3 (seat post #34584).objectstack-fleet commentedon Nov 17, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
os-dev-report
{ "issue": 34809, "status": "done", "branch": "claude/issue-34809-adr-0093-import-binding", "pr": "https://github.com/objectstack-ai/objectstack/pull/35035", "session": "session_01WGufzgwLiKcfujYUug7sPs", "premise_still_valid": true, "summary": "Draft PR #35035, head 1a6abb30ddcf659a7b7f4dca23115384bbcd4a6d, one file (docs/adr/0093-tenancy-mode-and-membership-lifecycle.md, +34 / -1). An add-only amendment note dated 2026-11-17 sits under the D3 amendment of 2026-10-24 and records that bulk import (POST /api/v1/auth/admin/import-users) joins each row to the administrator's current organization under a walled posture, citing maintainer ruling 6942842013 (option B) and merge commit 36af6b05a7; the ruled sentence is not rewritten, and the note says it stands as ruled for the reconciler, self sign-up, SSO JIT and host hooks. The status line gains one Amended entry (the record's two later amendments carry one each); docs/adr/README.md does not change. Every claim of the card's drafted paragraph was read against the code and pins at origin/main 4443014630: all hold; the note words two of them as the code tests them (501 is no unit-of-work seam or no addMember on better-auth's API; the predicate is tenancy.isolationActive, so 'walled posture' rather than 'multi mode') and adds four landed facts (no temporary password and no invitation for a refused row, a dry run that is not refused joins nothing, an existing member is not added twice, a matched user joins whichever other organizations it already belongs to) plus the ADR-0119 D1 transaction limit. Premise holds as claimed, with one correction: the claim recorded no open PR on this file, and open PR #34909 edits the same status line.", "tests": "No test: the diff is one ADR, no package is touched, nothing is ablated (docs). Claims verified by reading, at origin/main 4443014630: packages/plugins/plugin-auth/src/admin-user-endpoints.ts settleCurrentOrganizationJoin (400 NO_ACTIVE_ORGANIZATION before 501 NOT_IMPLEMENTED; undefined when multiOrgCreationJoinsCurrentOrganization is false) and joinCurrentOrganization (role member, probe scoped to the current organization, account 'created' or 'existing'); packages/plugins/plugin-auth/src/admin-import-users.ts runAdminImportUsers (settlement before runImport with no dryRun branch before it; inRowUnit wraps createData and updateData in join.seam.runAtomically; temporary password and invitation target recorded after the unit returns); the ten multi-org cases of admin-import-users-manager-pass.test.ts and I1, I2 of packages/qa/dogfood/test/create-user-organization-join.dogfood.test.ts. git merge-base --is-ancestor 36af6b05a7 HEAD answered exit 0; git log 36af6b05a7..HEAD over those files plus auth-plugin.ts and reconcile-membership.ts answered 0 commits. The gate's own extractAnchors reads 5 anchors in the note (3 symbol, 2 file-level) and check-adr-symbol-anchors resolves all.", "gates": "Local, head 1a6abb30dd: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 21 commands; each ran with stdin closed and its exit recorded before any pipe; all 21 exit 0. --ran: '21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED'. Verdict lines: 'check-adr-symbol-anchors: 3756 anchors across 158 records resolve'; 'check-adr-links: 1151 relative link destination(s) under docs/adr/ resolve'; 'adr-index: OK — docs/adr/README.md is current and every record parsed' (node scripts/adr-index.mjs --check, exit 0); check:adr-anchors, check:doc-authoring, check:nul-bytes, check:pm-governed-merges, check:pm-prior-rulings exit 0. check:doc-formula-expressions first answered exit 3 (PREREQUISITE NOT MET: formula and lint not built in the worktree); after turbo build of those two under the verify lock (VERDICT command-exit 0) it answered exit 0. overlap-check --branch=HEAD: 'VERDICT overlap exit 1' — merges cleanly with origin/main 6d2db1d7ef, conflicts with open PR #34909 in the ADR file (status line only, read with merge-tree: one conflict block, line 3). check-governed-merges.mjs --pr 35035: exit 3, 'GOVERNED — a human merge is the review record for this PR', 'landing tier: H', low-risk arm reads Tier H ('removes 1 line(s) — an add-only note changes no existing line', the status-line append), size 35 changed lines under 3000. CI check-runs on 1a6abb30dd at hand-back: success — Check Changeset, Check Documentation Links, Check PR Size, Governed Surface Queue Guard, PR-body guards, filter; in_progress — the Lint families, the Type Check families, Plan Test Core shards, Dogfood Regression Gate, Test UI, Auto Label; the rest skipped by the path selector. Not run locally and left to CI: repo-wide lint, type-check lanes, test:repo, test shards.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — fleet-write pr_create (POST pulls, POST issues/35035/assignees, POST issues/35035/labels; read-back identical, 10890 bytes, assignee os-support-ai, label skip-changeset), post-stamped comment on #34809 (POST issues/34809/comments). Two git pushes (the empty-branch probe and the commit) are not REST writes.", "open_questions": [ { "question": "overlap-check answers exit 1 against open PR #34909 (Tier H, not draft, awaiting approval): both PRs append an Amended entry to ADR-0093's one status line. Everything else merges cleanly.", "options": ["A keep both PRs as they are; whichever lands second merges main and keeps both entries (a one-line resolution)", "B drop the status-line entry from PR #35035 so it never conflicts, and add it in a follow-up after #34909 lands"], "recommendation": "A, because the record's convention asks for the status-line entry with the note, and the resolution is mechanical; the seat owns the serial order." }, { "question": "Ruling record 6942842013 says the D3 sentence 'is rewritten by the implementing PR'; the claim's form is an add-only note that leaves the sentence untouched. The PR follows the claim and says so in its Acceptance notes.", "options": ["A keep the add-only note", "B rewrite the sentence as the card drafted it"], "recommendation": "A, because it is the form the seat ruled for this card and the note states plainly where the sentence no longer holds; the approver can ask for B." }, { "question": "Three places where the dispatch order and the standing agent text disagree, each followed as the order spells it and read back: the PR body's last line is the signed HTML-comment trailer (the agent text bans HTML comments; the relay's PR_BODY_TRAILER_SHAPE declares this one); the two declaration lines are bare ('Clause-②: no', 'Metadata-protocol: none') where the agent text says to copy the claim's lines, which carry a reason after a dash; commit trailers are the model-free pair as the order spells it.", "options": ["accept as sent", "seat rewrites the PR body"], "recommendation": "accept as sent: the stored body is byte-identical to the sent one, line 1 is the closing line and the last line parses as the trailer." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed (read-only observation, no class): the ruled 2026-10-24 sentence of ADR-0093 says SSO JIT and host hooks bind nothing in multi mode, while D3's table and D7 say those flows own membership there; the new note repeats the sentence as ruled and does not reword it", "carrier: seat · the claim's 'no open PR found touching ADR-0093' was false at claim time: PR #34909 was opened hours earlier and edits the same file; the serial order of the two Tier H PRs is the seat's", "carrier: seat · the upsert bullet states a consequence read from code with no pin behind it (a matched user that already belongs to another organization is joined to the current one); the contract review of PR #34750 raised it for the approver, so it is written into the record for the approver to confirm or strike" ] }objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs
Delivered · 2026-11-18T01:23Z
32fe321c8a722fdced93953cbfbfd242474ad711); card closed byFixes.Amendedentry on the status line. It records that bulk import (POST /api/v1/auth/admin/import-users) joins each row to the administrator's current organization under a walled posture, per ruling 6942842013 (B) and merge36af6b05a7. The note also records the 400/501 settlement before any row (dry run included), one unit of work per row, and the upsert behaviour. The ruled 2026-10-24 sentence is kept, and the note says where it no longer holds.Amendedentry to the same status line. It lands second, so it merges main and keeps both entries (seat ruling).pm:dispatchedremoved (card closed).