Skip to content

cloud: the O8 census of objectstack-ai/cloud for ADR-0155 step 6 (the 5,000-grant cap retirement) #36115

Closed

Description

@objectstack-fleet

repo:objectstack#7 · os-tesla · session_01L9qibyXo4gSy8DJPNz4ANz

Filing gate: ④ an execution reading an accepted ADR requires (ADR-0155 O8) · Source: fleet (the #33787 card thread). Routing: the maintainer, 2026-11-21 14:43 UTC, verbatim: 「需要 cloud 仓库的任务,分配到 area:cloud」. Part of #33787.

维护者速读

  • 问题:平台 ADR-0155 第 6 步(plugin-sharing: a member with more than 5000 share grants on one object silently loses access to the grants past 5000 (list misses rows, GET answers 404) #33787)把共享读取从「最多 5000 条的 id 名单」换成数据库子查询。ADR 要求在切换前普查所有可能受影响的读者和注册,其中 cloud 仓库这一半平台线程读不到。
  • 这一步做什么:有 cloud 仓库权限的人按下面三点读一遍 cloud,把结论(读了哪个提交、找到什么)记到这张卡上。
  • 不做会怎样:如果 cloud 里有下面第 2 类的注册,cloud 升级到含此切换的平台版本后会启动失败(这是 ADR 裁定的响亮拒绝)。第 1、3 类则可能在升级后读到与今天不同的行。
  • 要你做的:无(分配到 area:cloud)。

What to read in objectstack-ai/cloud (ADR-0155 O8, three kinds)

Name the commit you read, and give each site as path:line with a verdict.

  1. Readers of SharingService#buildReadFilter / #buildWriteFilter (@objectstack/plugin-sharing), and of the security service's read filter (getReadFilter and the delegated variant), outside plugin-sharing itself. For each one, name the context it reads under (system / user / delegated) and whether it inspects the filter's shape. After the switch, the share arm is { id: { $in: SharedRecordIds.read(object, user) } }, an engine-internal branded leaf, where it used to be a plain id list. A reader that serialises, walks or matches the filter in process would see a different shape.
  2. Registrations naming sys_record_share by name: an object-scoped middleware (registerMiddleware(fn, { object: 'sys_record_share' })), a beforeFind / afterFind hook on that object, or an opt-in of that table into plugin-audit's record-view auditing (readAudit.objects). Under ruling 6942854600 (② R1 at boot), from the switch on such a host refuses to boot with INTERNAL_ERROR/500, and the class is kept whole, with no exemption for a hook that skips system reads.
  3. Registrations naming no object (or '*') that change a system read of sys_record_share. Today the grant read runs through the engine and so runs them. From the switch on, the subquery does not. That is D4's boundary: the host is told, and nothing is refused, so a hit means same rows are no longer guaranteed (ADR-0155 D-0).

What the platform half found

The platform half was read on #33787 at objectstack 8c8ff0f25d and hotcrm e7fe77f0. The census is in #33787's body. No site changes a system read of sys_record_share.

What a hit means for cloud

cloud pins objectstack by version, so nothing changes in cloud until it bumps to a platform release that contains the switch. A hit of kind 2 must be removed in the bump PR (or before it), or the host will not boot. A hit of kind 1 or 3 is reported back on #33787's thread for the seat: it is a D-0 question.

Links: #33787 (the switch card), ADR-0155 (docs/adr/0155-sharing-scope-share-grants-lower-to-an-engine-internal-semi-join-leaf.md, O8 and D4). The switch PR will be linked here when it opens.

Activity

  1. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibyXo4gSy8DJPNz4ANz

    The switch PR is #36116 (draft, head 53f788e776). It has not merged yet. cloud stays unaffected until it bumps to a platform release that contains it.

  2. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:cloud · pm:queue; rationale: area:cloud · Task · the ADR-0155 O8 census of objectstack-ai/cloud before the step-6 switch (#33787): read cloud for the three reader and registration kinds and record the commit and findings here; a kind-2 registration would make cloud fail to boot after it pins the switch; routed to area:cloud by the maintainer (「需要 cloud 仓库的任务,分配到 area:cloud」) → p2 (the grade of #33787; it gates the switch landing in cloud) · size S.

  3. added
    domain:cloud
    pm:queue
    priority:p2
    on Nov 21, 2026
  4. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

    Claim: PM loop round 5 · 2026-11-23T10:26Z
    Session: session_01JQwxbZeHNsF3RWcWpj7rGj
    Thread session: session_01JQwxbWrBeaAdzGenmHdHuk
    Account: os-warren
    Branch: the card thread's own branch, named at its first push; the seat amends this claim then
    Worktree: objectstack-issue-36115
    Domain: domain:cloud
    Seat: repo:objectstack#1
    Area: card thread #36115 (w5-D)
    Dispatch: the maintainer's ruling in this seat's project thread, 2026-11-23T10:20Z verbatim 「objectstack area:cloud 也让 objectstack 座位接手」, then the decision card at 2026-11-23T10:21Z: 「p1 和 p2 都接」. p2, child of epic #36232; needs the cloud repository (maintainer 2026-11-21T14:43Z: 「需要 cloud 仓库的任务,分配到 area:cloud」).
    File surface: read-only: objectstack-ai/cloud at a named commit; the result is a census comment on this card (three kinds, path:line + verdict each). No code, no PR, unless the census finds a kind-2 registration, which then gets its own card (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: opus — dispatch-gates --tier: no path-derived mandate, default tier; the thread's first report states the served tier, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — an ADR-0155 O8 census before step 6
    Thread-read: 7065119061
    Premise: holds as filed; the thread names the cloud commit it reads
    Serial constraints cleared: no open PR names #36115; ADR-0155 step 6 (#33787) waits on this census

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 23, 2026
  6. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbWrBeaAdzGenmHdHuk

    维护者速读

    • 结论:cloud 仓库三类都没有命中。第 6 步切换进入 cloud 后,cloud 照常启动,共享读取返回的行与今天相同。
    • 读的是 cloud 主线 777e8e2(2026-11-23)。
    • 要你做的:无。

    O8 census: objectstack-ai/cloud at 777e8e22f1dc254b0912d07ae21530a478c8e790

    Read on 2026-11-23T10:27Z by the card thread for #36115 (session session_01JQwxbWrBeaAdzGenmHdHuk), from a fresh origin/main checkout.

    Verdict: no hit of any kind. (1) No outside reader of buildReadFilter / buildWriteFilter / getReadFilter. (2) No registration names sys_record_share, and no host opts it into readAudit. (3) Eight middleware registrations name no object; none changes a read, so none changes a system read of sys_record_share. No D-0 finding, so nothing goes back to #33787 and the bump that pins the switch needs no cloud change for O8.

    Method: grep -rn over packages/**, plugins/**, apps/**, scripts/** (*.ts, *.mts, *.mjs, *.js, *.tsx; node_modules/dist excluded). Searched: buildReadFilter|buildWriteFilter|getReadFilter|getWriteFilter|readFilter (case-insensitive), ISharingService|SharingService|getService(...'sharing'), the methods cloud calls on the security service, registerMiddleware( (plus the indirect register.call( and ql.on('before…') spellings), registerHook( (literal and variable event names, each variable read to its event list), beforeFind|afterFind anywhere, object: '*', readAudit|recordView|AuditPlugin(, declarative events: [...] and *.hook.ts, and sys_record_share|record_share. Test files were searched too for parts (1) and (2); none reads the filter or registers on the table.

    (1) Readers of buildReadFilter / buildWriteFilter and of the security service's read filter

    Site What it is Verdict
    none in code The only hit is a comment, packages/security-enterprise/src/hierarchy/cache.ts:8, which says buildReadFilter calls the hierarchy resolver not a reader
    packages/security-enterprise/src/hierarchy/resolver.ts (hierarchy-scope-resolver service) A callee of buildReadFilter: it returns owner ids for the hierarchy arm. It never receives or reads the share arm unaffected
    security-service calls in service-ai, service-ai-studio, service-cloud Only getReadableFields, getWritableFields, getRecordFieldAccess, getEffectiveObjectPermissions. No read-filter method not a reader

    No cloud code serialises, walks or matches a sharing filter in process. The two ast.where rewriters (control-plane-org-scope-plugin.ts:460, marketplace-visibility-plugin.ts:42, both combineWhere) wrap the existing where in $and without looking inside it, and they run only on the control-plane objects listed under (2).

    (2) Registrations naming sys_record_share (object-scoped middleware, beforeFind/afterFind, readAudit.objects)

    None. Every object-scoped registration in cloud, by the object it names:

    Site Kind Object(s)
    packages/service-cloud/src/control-plane-org-scope-plugin.ts:795 beforeFind the 18 keys of SCOPE_RULES (:331): sys_environment, sys_audit_log, sys_invitation, sys_team, sys_app, sys_organization, sys_member, sys_cloud_connection, sys_domain, sys_quota_usage, sys_api_key, sys_package_installation, sys_environment_credential, sys_environment_revision, sys_environment_usage, sys_billing_payout_accrual, sys_slug_reservation, sys_billing_invoice_line
    packages/service-cloud/src/read-filter-middleware.ts:90 object-scoped middleware (count/aggregate), via registerCountAndAggregateFilter callers: control-plane-org-scope-plugin.ts:799 (same 18), marketplace-visibility-plugin.ts:206 (sys_package), :228 (sys_package_version)
    packages/service-cloud/src/marketplace-visibility-plugin.ts:202, :224 beforeFind sys_package, sys_package_version
    packages/objectos-runtime/src/env-admin-projection.ts:994 object-scoped middleware sys_account
    packages/objectos-runtime/src/environment-one-organization-guard.ts:180 object-scoped middleware sys_organization

    Write hooks (beforeInsert/Update/Delete, afterInsert/Update/Delete) are not in the class and none names the table either (env-admin-projection.ts:1027-1028 sys_user_permission_set; control-plane-org-scope-plugin.ts:877 the same 18; environment-admin-projection.ts:398-400 and environment-identity-revocation.ts:1017-1018 sys_member, :1153-1154 sys_session; platform-sso.ts:823 sys_organization; audit-compliance-plugin.ts:398 sys_audit_log/sys_ai_audit_log; the AI-model, conversation and ledger guards on their own AI objects).

    readAudit: cloud constructs AuditPlugin twice and never passes it. packages/service-cloud/src/control-plane-preset.ts:969 passes only getLocale. The per-environment loader (packages/objectos-runtime/src/capability-loader.ts:482-485) declares audit with no configKey, so a tenant bundle cannot hand it options (:1242). No hit for readAudit anywhere in cloud.

    (3) Registrations naming no object that change a system read of sys_record_share

    Eight middleware registrations name no object. None alters a query or a result on any read:

    Site What it acts on Verdict
    packages/objectos-runtime/src/env-owner-admin-grant.ts:381 after next(), insert/create only no read change
    packages/objectos-runtime/src/first-record-report.ts:245 (body :208) after next(), a person's insert on a non-sys_ app object no read change
    packages/objectos-runtime/src/activation-funnel-report.ts:269 (body :217) after next(), fires a telemetry report on a non-system person read of a non-sys_ object (isPersonRead :162, countsAsAppObject in first-record-report.ts:153); never touches the query or result observes only; skips system reads and sys_*
    packages/objectos-runtime/src/environment-agent-account-plan-gate.ts:459 (body :369) sys_user insert, sys_member insert/update; everything else next() no read change
    packages/service-cloud/src/developer-member-cap.ts:584 (body :455, membershipInsert :337) sys_member/sys_invitation insert no read change
    packages/service-cloud/src/active-org-session-hook.ts:147 after next(), sys_member insert no read change
    packages/service-cloud/src/invitation-acceptance-verified-address.ts:267 (body :199, isInvitationAcceptance :148) sys_invitation update to accepted no read change
    packages/security-enterprise/src/ai-seat/ai-seat-plugin.ts:396 sys_user, sys_member, sys_user_permission_set writes no read change

    No find hook names no object, and nothing registers on '*'.

    Outside the three kinds, noted for the seat

    • packages/objectos-runtime/src/tenant-sharing-rule-mirrors.ts:233 reads sys_record_share itself, as the system, through engine.find. It is a direct read of the table, not a sharing-scoped read, so the switch does not touch it.
    • packages/service-cloud/src/control-plane-proxy-driver.ts:30 (ControlPlaneProxyDriver) is a driver wrapper that adds an organization_id filter. It is not mounted anywhere in the repo (its header, and artifact-kernel-factory.ts:14), so no sharing-scoped object is bound to it today. If a host mounts it, that is D4's first class (another datasource), not O8's.
    • Tenant app hooks bound at runtime by the platform's hook binder are tenant-authored, not in this tree. They are D4's boundary, and the switch changeset tells the host, as plugin-sharing: a member with more than 5000 share grants on one object silently loses access to the grants past 5000 (list misses rows, GET answers 404) #33787 notes.

    Generated by Claude Code

  7. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbWrBeaAdzGenmHdHuk
    os-dev-report

    {
      "issue": 36115,
      "status": "reading",
      "branch": "claude/project-thread-au9ked (no commits; census only)",
      "pr": null,
      "session": "session_01JQwxbWrBeaAdzGenmHdHuk",
      "premise_still_valid": true,
      "summary": "O8 census of objectstack-ai/cloud at 777e8e22f1dc254b0912d07ae21530a478c8e790, recorded in comment 7098018847. (1) No reader of buildReadFilter/buildWriteFilter/getReadFilter outside plugin-sharing; the hierarchy resolver is a callee, not a reader. (2) No object-scoped middleware, find hook or readAudit opt-in names sys_record_share; AuditPlugin is built without readAudit on both paths. (3) Eight no-object middleware registrations, none changes any read. No D-0 finding: nothing goes to #33787, and the bump that pins the switch needs no cloud change for O8.",
      "tests": "n/a: a reading, no code changed",
      "gates": "n/a: no PR",
      "dogfood_battery": "n/a: no `!` in a PR title and no narrowing arm",
      "mcp_calls": "0",
      "api_writes": "2: POST /repos/objectstack-ai/objectstack/issues/36115/comments (census, this report) via post-stamped",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

    维护者速读

    平台把「共享读取」从 5000 条名单换成数据库子查询之前,要先查一遍 cloud 仓库里有没有会受影响的地方。查完了,三类都没有,cloud 升级到含这次切换的平台版本不需要额外改动。卡关闭。
    要你做的:无。

    Closure — completed · 2026-11-23T10:30Z

  9. removed
    pm:dispatched
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clouddomain:cloudpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions