Skip to content

fix(describe): a module the caller can change part of is partial, not read-only - #55

Closed
ahmad-ajmal wants to merge 2 commits into
mainfrom
fix/module-access-label
Closed

ahmad-ajmal wants to merge 2 commits into
mainfrom
fix/module-access-label

Conversation

@ahmad-ajmal

@ahmad-ajmal ahmad-ajmal commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

describe's root said read-only for any caller that had less than everything in a module. A caller that could write every record, but run no operation, was told "read-only for you", and its writes worked. Three agents doing real bridge tasks (#56) were confused by it.

Now

access Means
full everything in the module
partial (new) some of what changes it; whoami's scopes say which
read-only nothing that changes anything
none nothing readable and nothing runnable

The same rule also fixes the opposite mistake: a module with only operations was full when the caller could run any one of them, even a read-only one. And PocketBase said full to every caller.

Why a new value. With the three there were, every choice is untrue for such a caller. full promises calls the app refuses, which class A already forbids. read-only hides calls that work. An extra field next to read-only would leave the wrong word in front of agents on MCP and HTTP, which read the JSON.

What it costs older clients

  • A CLI without this change prints "no access" for partial (tried: it still walks the module and writes). So release the CLI before, or with, the adapters.
  • Both SDKs treat anything but none as reachable, so they are unaffected. A validator using the old describe schema would reject the value.
  • This CLI reads any word it does not know as some access, so the next value will not have this problem. The schema now says clients do that.

Changed: the reference, all five native adapters, the CLI's root screen, the SDK type, the describe schema (0.2 only), the connect skill.

Tested

  • A new class A check and 6 new starter checks cover it. Changes to the .test files are left out, on request; with them, 3 of 7 new cases in adapter-core failed on the old code and passed on this.
  • conformance/starter/run.mjs has 6 new checks. Run against real apps in both auth modes: React-Node, Python, Go, Rust and Rails 38/38. PocketBase passes the 6. Its other 12 failures are the same 12 as on main, run side by side (Host on /, dataVersion, guard codes and the like); main fails 4 of the 6 as well.
  • conformance/multi-user/run.mjs: 77/77 on all six.
  • Self-tests: Python, Go, Rust, Rails, PocketBase's rules. PocketBase e2e: 111/111.
  • The same kind of credential the agents had, through this CLI, now reads "partial access: whoami lists it".
  • pnpm -r build, typecheck, test.

Cut from main. Merge it before #58, which contains it.

… read-only

The root called a module read-only for any caller with less than everything in
it, so one that could write every record was told it could not. `full` is now
everything, `read-only` nothing that changes anything, and `partial` what lies
between; a module with only operations is judged the same way, and PocketBase
no longer says full to everyone.

The CLI reads a word it does not know as some access. An older one prints "no
access" for `partial`, so it is released no later than the adapters.
@ahmad-ajmal

Copy link
Copy Markdown
Collaborator Author

Replaced by #61, which has this same code. The branch is kept.

@ahmad-ajmal ahmad-ajmal closed this Dec 1, 2026
@ahmad-ajmal
ahmad-ajmal deleted the fix/module-access-label branch December 2, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant