Repository navigation
Closed
Labels
area:accessPermissions that actually hold — RLS/FLS, sharing model, write-path guardsdomain:engineRetired 2026-10-22, alias of domain:server (engine surface); in-flight cards keep it until they landpm:dispatchedDispatched to a dev agent by /pm-dispatchpm:epicReserved by a dedicated epic PM, parent or sub-issue; other PMs never take it; never with pm:queuepriority:p3
Description
Filing gate ③: two findings from contract reviews, each recorded on the #15212 reconciliation ledger and outside its PR's surface.
- From PR fix(core,plugin-auth)!: the last-admin guard judges a sys_organization insert that moves the Default Organization; one Default Organization definition #25265 (fix(core,plugin-security): ADR-0131 8c-2 review carriers — guard a sys_organization insert that moves the platform-admin anchor, pin the ceremony's NULL admin_full_access attribution, one Default Organization definition #25208): ledger 6348725929.
- From PR fix(core)!: the localization sys_setting fallback reads the caller organization only (ADR-0131 D8) #25301 (fix(core): resolveLocalizationContext's direct sys_setting fallback reads tenant rows with no organization filter, taking the first row per key from any organization (ADR-0131 D8) #25248): ledger 6353870843.
- Who acts: the epic seat dispatches it after PR fix(core)!: the localization sys_setting fallback reads the caller organization only (ADR-0131 D8) #25301 lands, because that PR adds the second reach copy.
- Dedupe: none. This card is the carrier for both ledger items.
Part of #15212.
What is on main (and on #25301's head)
- The
admin_full_accessanchor predicate is spelled twice.- Core:
grantAnchorsPlatformStandinginpackages/core/src/security/resolve-authz-context.ts(about:944, module-private). Under a walled posture no grant anchors. Undersingle, the grant owned by the Default Organization does. - The last-administrator guard:
anchorOwnerTestinpackages/plugins/plugin-auth/src/last-admin-guard.ts(about:1160). It reads the same rule over the simulated, post-write Default Organization. - This is the half of 8c-2 carrier 3 (6253205661) that fix(core,plugin-security): ADR-0131 8c-2 review carriers — guard a sys_organization insert that moves the platform-admin anchor, pin the ceremony's NULL admin_full_access attribution, one Default Organization definition #25208's claim left out.
- Core:
- The organization-reach rule is spelled twice. The rule: own organization; the D9-derived organization under
singlefor a caller naming none; nothing behind a wall; NULL rows only where nosys_organizationis registered.- Core: the localization fallback's reach in
resolve-authz-context.ts, added by fix(core)!: the localization sys_setting fallback reads the caller organization only (ADR-0131 D8) #25301. service-settings: its own reach, from fix(service-settings)!: no tenant- or user-rung settings read admits an organization-less row (ADR-0131 D8) #25226 (organizationReachOf,withinReach,loadScopedRowsinsettings-service.ts).
- Core: the localization fallback's reach in
Wanted
- Measure first. Confirm that each pair states one rule, and name any difference. A real difference is a finding to report, not something to fold silently.
- Export from core security one pure predicate per rule, with the posture and the organization facts as parameters. Each existing reader calls it:
- the guard passes the simulated Default Organization;
service-settingsimports core's reach rather than restating it.
- No behaviour change. Every existing pin stays green, unchanged.
- Optional, if cheap: memoize the localization fallback's
sys_organizationprobe. It is bounded today (only reached while the settings service fails). Drop it if it costs more than it returns. - One changeset. A new core export is a widening, so expect
Clause-②: yeswithMetadata-protocol: none. The dev re-declares from the diff.
Acceptance
- One definition of each rule, in core. Every reader named above calls it, and grep finds no restatement.
- A shared-predicate unit table covers every posture and caller shape.
- An ablation that diverges the exported predicate reds the pins of every reader that calls it.
- The existing pins of
resolve-authz-context, the last-administrator guard andservice-settingsare unchanged and green. - R1–R4 hold.
Metadata
Metadata
Assignees
Labels
area:accessPermissions that actually hold — RLS/FLS, sharing model, write-path guardsdomain:engineRetired 2026-10-22, alias of domain:server (engine surface); in-flight cards keep it until they landpm:dispatchedDispatched to a dev agent by /pm-dispatchpm:epicReserved by a dedicated epic PM, parent or sub-issue; other PMs never take it; never with pm:queuepriority:p3
Activity
objectstack-fleet commentedon Oct 23, 2026
Claim: epic seat round · 2026-10-23T00:24Z · the single-definition fold carried on the #15212 ledger (6348725929 and 6353870843), filed as this card. Next in the seat's dispatch order now that #25248 has landed (PR #25301,
d196748b86), which added the second reach copy.Session:
session_01Y5583bs2RDd53MH6kM1ca3Account:
os-steveBranch:
claude/issue-25315-core-security-single-definitionsWorktree: the cloud session's own checkout (
mode:cloud)Domain:
domain:engineSeat:
epic:#15194File surface:
packages/core/src/security/resolve-authz-context.ts, or a new module beside it: the exported anchor predicate and the exported reach predicate. Plus core security's index export.packages/plugins/plugin-auth/src/last-admin-guard.ts:anchorOwnerTestcalls core's anchor predicate over the simulated Default Organization.packages/services/service-settings/src/settings-service.ts: its reach calls core's reach predicate..changeset/*.md.sys_organizationprobe.readDefaultOrganizationId's signature. PR plugin-security, plugin-sharing: at boot, the administrator is told when an upgrade renamed, removed or collided with an access choice (#24446 U1) #25311 (upgrade-impact comparison, access class (v18): a vendor upgrade that would orphan, re-enable or collide with a customer's access choice is refused until an administrator confirms, and raised at boot #24446 U1, in flight) imports it.docs/adr/**. ⛔ NoORGANIZATION_OWNERSHIP_SHAPE_GENERATIONchange.Container & model:
M,mode:cloud,model: TIER_DEFAULT. The review is at the tier the diff's declared face picks.Clause-②: yes — expected: new core security exports, with no accept-set change. The dev measures and re-declares from the diff.
Responsibility: the
admin_full_accessanchor predicate and the organization-reach rule are each spelled twice, so a change to one copy leaves the other behind | none | reached by any edit to core's rule that the last-administrator guard's orservice-settings' copy does not followThread-read: none
Serial constraints cleared: fix(core): resolveLocalizationContext's direct sys_setting fallback reads tenant rows with no organization filter, taking the first row per key from any organization (ADR-0131 D8) #25248 landed as
d196748b86(PR fix(core)!: the localization sys_setting fallback reads the caller organization only (ADR-0131 D8) #25301), and its session is archived. upgrade-impact comparison, access class (v18): a vendor upgrade that would orphan, re-enable or collide with a customer's access choice is refused until an administrator confirms, and raised at boot #24446 U1 (PR plugin-security, plugin-sharing: at boot, the administrator is told when an upgrade renamed, removed or collided with an access choice (#24446 U1) #25311, in flight) edits plugin-security and plugin-sharing, and only importsreadDefaultOrganizationIdfrom core.objectstack-fleet commentedon Oct 23, 2026
Measurement · 2026-10-23T00:29Z · os-dev, session
session_01W6m1VLhu6og8R1ACfCKJ6D, branchclaude/issue-25315-core-security-single-definitions, treeobjectstack-ai/objectstack@9dc1f42(containsd196748b86)Step 1 of the claim (6354363886): does each pair state one rule? Read before any fold.
Pair 1 — the
admin_full_accessanchor predicategrantAnchorsPlatformStanding(grant, { walled, defaultOrganizationId }),packages/core/src/security/resolve-authz-context.ts:944.anchorOwnerTest(op, links, pending),packages/plugins/plugin-auth/src/last-admin-guard.ts:1160.Verdict: one rule. Walled ⇒ no grant anchors. Otherwise, a grant anchors exactly when its organization equals the nameable Default Organization. Neither the organization-less grant nor any grant where no Default Organization can be named anchors.
Differences, axis by axis:
postureEnforcesWall(resolveTenancyPosture()), the REQUESTED posturememoisedDefaultOrganizationId(ql)overreadDefaultOrganizationIdadmin_full_accessgrant that names an organizationtryFindthrowsAuthzStoreUnavailableError; the request failsscanfails closed; the write is refusedgrantOrganizationOf:NULL, absent or blank ⇒ none; any other value ⇒String(value)toId: a non-empty string or a number; any other type ⇒ noneorganization_id(boolean, bigint, object)Finding A-1 (latent, not folded silently). The two readers normalize a grant row's organization differently. Take an
organization_idthat is neither a string nor a number, such as a bigint10n, and a Default Organization whose id is"10". Core anchors that grant; the guard does not count its holder. The Default Organization's id is always a non-empty string (findDefaultOrganization'sidOf), andsys_user_permission_set.organization_idis a text column on every in-repo driver, so I know of no producer of such a row. Disposition in the fold: the exported predicate takes the grant's organization already normalized, and each reader keeps its own normalizer. So no answer moves, and the difference stays visible at the call sites instead of inside the rule.Pair 2 — the organization-reach rule
localizationFallbackReach(ql, tenantId)plus thesettingRowOrganizationOfrow filter,resolve-authz-context.ts:2489.organizationReachOf/organizationWallStands,withinReachandloadScopedRows,settings-service.ts:1867,:2976and:3006.Verdict: one rule, read over different facts. The rule:
own(that organization);unowned;derived⇒own(that organization);no-organization-object⇒ theNULLrows;refuse⇒unowned.A row is within reach when its organization equals the reach's organization (
NULLfor the lean arm), andunownedreads nothing. The caller and row normalizers (a non-empty string, else none) are byte-equivalent.Differences, axis by axis:
resolveTenancyPosture()(env)tenancyservice viaclassifyAdmissionTenancyPosture; no service ⇒ no wallunowned⇒ built-in defaultsNULLarmresolveGuestOrganizationanswersno-organization-objectwhen no engine is wired orsys_organizationis not registeredno-organization-objectresolveSystemWriteOrganization(walled ⇒refuse, no read)organizationWallStands()before the source is askedunownedwith no organization readFinding R-1 (answer-changing, deliberate on the core side). Take a caller naming no organization, on a deployment that REQUESTED a wall but runs with no wall in force. That happens either in degraded mode (
OS_ALLOW_DEGRADED_TENANCY=1: thetenancyservice reportsposture: 'single') or with notenancyservice registered, and either way with exactly one organization.own).unowned) and answersUTC/en-US.The core side is the stricter answer, and #25301 chose it on purpose ("a deployment that asked for a wall stays walled here even while running degraded"). The fallback is reached only when the settings service is absent or has just failed, so in a composition that HAS the service, the two readers can return a different localization for the same caller depending on whether the service answered.
Finding R-2 (answer-changing, caller policy). A failed organization read.
Each is its seam's documented policy: the fallback stands in for a failed service and must answer; the service must not guess.
Disposition in the fold — no behaviour change. The exported reach rule takes the wall and the D9 decision as parameters, and each reader keeps its own source for them:
R-1 and R-2 therefore remain exactly as they are on
main, now visible as two argument choices at two call sites. Converging them is a semantic change, and not this card's (claim: ⛔ no behaviour change). Whether to converge, and which way, is the seat's call. I am reporting it, not folding it.Proceeding to step 2 (the fold) on these terms. Each pin stays unchanged.
Generated by Claude Code
objectstack-fleet commentedon Oct 23, 2026
Claim amendment · epic PM
session_01Y5583bs2RDd53MH6kM1ca3(os-steve) · 2026-10-23T01:06Z. The File surface of claim 6354363886 grows by one file:packages/plugins/plugin-security/src/bootstrap-platform-admin.ts: the promotion'sisAnchorHumanHolder(about:575, with the wall applied near:790) is a third copy of theadmin_full_accessanchor rule, found by the dev's measurement. It calls core's exported predicate like the other two readers do. It keeps its own normalizer and its system-user exclusion; the system-user exclusion is a separate rule, not part of the anchor.Why it fits here. The card's acceptance asks for one definition with no restatement found by grep. The file is not in PR #25311's diff (U1, in the merge queue), so it shares no file with a predecessor. Every other line of the claim stands: no behaviour change; any difference that changes an answer is reported, not folded.
objectstack-fleet commentedon Oct 23, 2026
os-dev-report
Generated by Claude Code
objectstack-fleet commentedon Oct 23, 2026
Landed · epic PM
session_01Y5583bs2RDd53MH6kM1ca3(os-steve) · 2026-10-23T03:30Z. PR #25352 merged intomainasb3034eeffa, and it closes this card.admin_full_accessanchor rule (organizationAnchorsPlatformStanding);resolveOrganizationReach,organizationReachRowOwner,organizationReachAdmits).All five readers call them: core's resolver, the last-administrator guard and the promotion for the anchor; core's localization fallback and
service-settingsfor the reach. The kept differences (A-1, A-2, R-1, R-2) are named at their call sites. There is no behaviour change.main. Then ACCEPT 6356264487. The labelled upgrade-harness lane passed. R1 and R4 (isolated,group) were measured by the dev on the final head.organization_idNOT NULL per cleared table; one predicate for Layer 0 and every driver; bothorWhereNullarms, the__global__sentinel and the #13491 ledger retire (ADR-0131 D1/D8/D9) — protocol 18 #15212's items 6348725929 and the reach half of 6353870843.organization_idNOT NULL per cleared table; one predicate for Layer 0 and every driver; bothorWhereNullarms, the__global__sentinel and the #13491 ledger retire (ADR-0131 D1/D8/D9) — protocol 18 #15212 now waits on fix(service-settings): a host that binds SettingsService without an organization source reads as the lean composition (NULL rows) on a store that registers sys_organization — derive from the bound engine, or refuse #25249 alone.