Skip to content

Cross-cutting (verify/qa coverage): verify --rls cannot reach by-id-write, authz-conformance overclaims 'enforced', and the console permission-matrix editor is read-only by default #7685

Description

@huangyiirene

Symptom

Three coverage/tooling findings from the run, consolidated per the maintainer instruction. Itemised:

(i) verify --rls reports 0 HOLES but structurally cannot reach the by-id-write class. Its member probe holds no object grants, so every such probe is masked by the object-level gate (403) before record scope is ever tested. A second probe persona holding object read+edit but outside the record scope would catch it. Compounding this, a showcase_account auto-record 400 cascades into 5 downstream skips, so 8 of 23 objects are skipped on a stock run — and a skip is exactly where the privately-reported D11 defect hid. The run calls this the single highest-value fix: the tool's green is currently not evidence. (Tool: packages/verify/src/rls.ts.)

(ii) authz-conformance.matrix.ts overclaims. It marks both rls-by-id-write (#1994) and controlled-by-parent as state:'enforced', while neither holds as shipped. The showcase's own permission-sets.ts comment repeats the same false claim. (File: packages/qa/dogfood/test/authz-conformance.matrix.ts — both entries carry state: 'enforced' on origin/main.)

(iii) The console permission-matrix editor is read-only by default even for a writable package. On a stock boot it renders "Read-only (OS_METADATA_WRITABLE not enabled)" with every checkbox disabled, at both the metadata-admin route and inside Studio's Access pillar for a writable package — because the editor computes writable = !!resolved.allowOrgOverride && !readOnly and the server returns allowOrgOverride:false for type permission. Yet the server accepts the package-door write in that same default env (PUT …?package=<writable pkg> → 200 via allowRuntimeCreate). The type gate locks a surface the server would allow.

Root cause

As located, per item above: (i) the probe persona holds no object grants + an auto-record 400 skip cascade in packages/verify/src/rls.ts; (ii) hard-coded state:'enforced' rows in authz-conformance.matrix.ts (and the mirroring permission-sets.ts comment); (iii) the objectui editor's writable = !!resolved.allowOrgOverride && !readOnly computation against a server that returns allowOrgOverride:false for type permission.

Reproduction

  • (i) Run verify --rls on a stock showcase → 0 HOLES; note 8/23 objects skipped and that the member probe holds no object grants.
  • (ii) Read authz-conformance.matrix.tsrls-by-id-write and controlled-by-parent are state:'enforced', contradicting the shipped behaviour proven elsewhere in this run.
  • (iii) Stock boot; open the permission-matrix editor at the metadata-admin route and inside Studio for a writable package → all checkboxes disabled, "Read-only" banner; yet PUT /api/v1/meta/permission/<set>?package=<writable pkg> → 200.

Routing note

Filed as one finding in objectstack-ai/objectstack with domain:cli, because the dominant fix site is the verify/qa tooling (items i–ii). Item (iii)'s fix is objectui (the writable computation in the console permission-matrix editor); it is kept here as one consolidated finding per the maintainer instruction rather than split, but whoever picks it up should route (iii) to objectui.

Suggested fix

(i) Add a probe persona with object read+edit but outside the record scope so the by-id-write class is reachable, and stop the auto-record 400 from cascading into skips (a skip must not read as a pass). (ii) Downgrade the two state:'enforced' claims to match shipped behaviour and correct the permission-sets.ts comment. (iii) In the objectui editor, allow editing when the server would accept the package-door write (allowRuntimeCreate) rather than gating solely on allowOrgOverride.

Source

Extracted from the QA run #7637 (framework 92f26f7, console 09987b680).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions