ZDDC/zddc/internal/fs
ZDDC 53a10ab119 feat(listing): per-entry verbs string for client-side capability gating
Add a `verbs` field (canonical "rwcda" subset) to every directory
listing entry, computed via a new
`policy.EffectiveVerbsFromChainP(ctx, d, chain, p, path)` helper that
routes each of the five actions through the decider and unions the
allowed bits — so an external OPA's overrides surface in the wire
field, and active-admin elevation produces the full grant.

Semantics:
  - file entry: verbs from the parent dir's chain (files inherit;
    they have no .zddc of their own). Same chain Writable uses.
  - directory entry: verbs from the subdir's OWN chain, so a fenced
    or extended .zddc inside it shows through.
  - virtual entries (auto-own homes, canonical-folder placeholders,
    workflow received/ window, table.yaml/form.yaml spec rows):
    verbs computed against the would-be path's chain so client
    affordances render correctly before any write materialises a
    real folder.

Writable stays in lockstep with verbs for the transition window so
existing clients (markdown/yaml editor save buttons) keep working
unchanged. Clients should migrate to checking 'w' in verbs and let
Writable wither.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 08:14:25 -05:00
..
resolve.go feat(server): case-insensitive URL canonicalization at dispatch 2026-05-09 09:09:47 -05:00
resolve_test.go feat(server): case-insensitive URL canonicalization at dispatch 2026-05-09 09:09:47 -05:00
tree.go feat(listing): per-entry verbs string for client-side capability gating 2026-05-21 08:14:25 -05:00
tree_test.go feat(listing): per-entry verbs string for client-side capability gating 2026-05-21 08:14:25 -05:00