Guard / foldkit-guard

Limits

  • may reflects the last read row: live patches to guarded fields require a refetch to refresh may.
  • Custom handlers check their own fields: GuardServer.mutation checks the row rule for its interaction; field-level and link-level rules inside custom handler bodies stay the handler's responsibility.
  • Cross-row Read rules skip live list placement: Guards.attach tracks own-row Read fields for list refetches, while changes on reached rows stay at the list's last read until refetched.
  • Sync documents share one audience: per-member or per-row secrecy inside a replicated Sync document is refused by GuardSync.document.
  • Revisions pin declared writes: raw SQL or migrations outside declared writes advance revisions only if the database installs revisionTrigger from foldkit-remote-drizzle (omitted on Sync-managed tables).
  • Sync admit lags the journal slightly: admit reads the current table when admitted, so concurrent ownership changes belong in guarded Remote writes outside the Sync document.
  • Sync authorize runs synchronously: keep principal guard bodies synchronous when used with Sync.
  • Server-owned creator fields: declare fields like ownerId with Entity.sets so RemoteServer.write populates them before guards evaluate.

Next