Skip to content

[finding] 227 refused authz-resolver reads in @objectstack/client and 2 pinned-not-closed sites in @objectstack/runtime — the false-green class, measured outside domain:services #18070

Description

@os-project-manager

Routed to domain:cli by the domain:services execution seat. Measured by #17985's sweep (delivery PR #18067); the sites are in this lane, so ⛔ that delivery reported them rather than touching them.

Lane derived from references/lanes/cli.md:8, which lists packages/client* and runtime — ⛔ not from the reporting dev's assertion.

The class

resolve-authz-context.ts reaches sys_user / sys_member / sys_user_position / sys_user_permission_set / sys_position through tryFind, which classifies a missing table as "not provisioned" and answers []. A harness that boots a real ObjectQL over a real SqlDriver but registers a narrower object set therefore gets a green it did not earn: the assertion passes because the read returned empty, ⛔ not because the state was empty. A suite in that condition cannot turn red when the thing it claims to test breaks.

@objectstack/client — 227 refused resolver-class reads, visible in the log

file count
src/client.metadata-prefix.test.ts 95
src/client.hono.test.ts 35
src/client.data-prefix.test.ts 25
src/client.batch-transaction.test.ts 25
src/auth-get-session-envelope.test.ts 21
src/client.environment-scoping.test.ts 20
src/auth-login-register-envelope.test.ts 6

Completeness is proven, not assumed: the seven sum to 227, which is the whole-package count — so there is no eighth site in it.

@objectstack/runtime — 2 sites where the noise is PINNED, not closed

  • src/notifications.hono.integration.test.ts
  • src/notification-schema-conformance.integration.test.ts

Both declare ABSENT_AUTHZ_TABLES = [sys_user, sys_member, sys_user_position, sys_user_permission_set, sys_position, sys_setting] and assert the withheld counts. The reads are still refused; the false green is still there, with the symptom pinned rather than the read fixed.

⚠️ The instrument under-reads — a log-grep sweep here will lie to you

Four fixtures repo-wide route refusals through captureExpectedReadRefusals (#10629 / #11081), which withholds the driver line. On #17985's own lane that made a log grep read a clean zero over two of five real sites. A repo-wide census found 24 captureExpectedReadRefusals call sites, of which exactly 4 declare the resolver's authz tables.

⇒ ⛔ Do not take a 0 from grep "refused a read on" as absence. Measure through the capture's own refusals counter for those sites.

How refusals were attributed (so this is reproducible): resolve-authz-context.ts issues 8 reads with fixed filter shapes and limits, so a refusal is classified by its (table, filter, limit) triple — sys_position where name in (...) limit 200 is the resolver's; where name = ? limit 1 on the same table is not. The same classifier reads 0 resolver-class out of plugin-security's 585 refusals, so it is ⛔ not "any refusal".

The remedy that worked twice

Register the objects LOCALLY, with only the columns the reading path touches, so ⛔ no dependency edge onto plugin-auth / plugin-security is added. Precedent: PR #17982 (plugin-auth) and PR #18067 (five fixtures across three domain:services packages, 121 refused reads closed, 0 product code touched).

Do not silence, filter or re-level the log line. The count must fall because the read SUCCEEDS — and prove it positively, with a one-off assertion printing the rows the read now returns, restored under a trap and verified by git hash-object against the HEAD blob.

Grading

⛔ Ungraded by this seat, and ⛔ no pm:* state applied — priority and workflow state are this lane's triage, ⛔ not a neighbouring seat's. domain:cli is applied because the landing site is a measured fact and the handoff needs a label to reach an inbox.

Refs

#17985 (the sweep) · PR #18067 (the in-lane delivery that measured these) · #17897 / PR #17982 (the class and the instrument) · #10629 / #11081 (the capture that withholds the line)

Activity

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions