Skip to content

The opaque wrapper with all() and first(): operation access, the Access Filter as a filter entry, Silent failure #1146

Description

@borisno2

Parent

#1123 — build spec 3 of the Prisma 8 architecture spec. Lands on the prisma-8 integration branch, not main.

What to build

context.db.Post (PascalCase) is an opaque wrapper over a collection; .where(...) composes an immutable value; .all() and .first() resolve operation-level query access lazily, add the access filter as a second entry in the collection's filter list, enter the engine origin around the ORM call, materialise, and return []/null on denial. getDbKey is deleted.

Acceptance criteria

  • Anonymous, author and other-user sessions over a blog fixture get exactly their rows; a denied list returns []/null, indistinguishable from empty
  • The recording middleware shows the access filter as a filter entry ANDed with the caller's predicate, never hand-merged
  • No Collection or CollectionState is reachable from the wrapper's type or value
  • context.db.authUser is a compile error; context.db.AuthUser works; getDbKey no longer exists
  • Every terminal runs inside the engine origin (tripwire in throw mode passes)

Blocked by


Generated by Claude Code

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

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions