feat(specverb): wildcard resource "*" in can/never grants — verb-global allow/deny #159
Labels
No labels
burndown-2026-06
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/cli-guard#159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Support a wildcard resource token
"*"incan/never/cannotguardfile grants, so one grant applies a verb across all resources in the spec:Today grants are per
(modal, verb, resource)pair, so a verb-wide rule means hand-enumerating every resource — fragile, and it rots as the spec grows.Motivation
readonlybecomescan get "*"+can list "*"(everything else stays unmounted = denied); a no-deleteadminbuild addsnever delete "*". Without wildcards each build hand-lists every(verb,resource)across the whole forgejo spec.deleteop is auto-denied bynever delete "*"— no guardfile edit. Matches the deny-by-structure direction (cli-guard#79).never delete <resource>lines in the forgejo / glitchtip guardfiles.Semantics
can <verb> "*"— grant the verb for every resource in the spec that exposes it (expand in prune/resolve so all such ops mount).never <verb> "*"/cannot <verb> "*"— deny the verb for every resource; mount the teaching leaf per blocked resource.deny.go). Sonever edit "*"overrides a specificcan edit issue; and a specificnever delete orgcarves an exception out of a wildcardcan delete "*"(allow-all-except-org). Wildcards and specifics compose through the existing deny-wins rule.(verb,resource)ops are not mounted (prune.go);can <verb> "*"only mounts ops that actually exist in the spec.{ message "..." },{ describe "..." }) and they apply to every expanded leaf.Implementation (cli-guard
http/specverb/)guardfilepackage: accept"*"as aGrant.Resourcesentinel.deny.go(deniedKeys/denyDescriptors): anever <verb> "*"matches any resource for that verb — expand against the spec's resource set, or special-caseResource == "*"in the key matcher so a wildcard deny shadows all specificcans of that verb.prune.go/resolve.go: acan <verb> "*"keeps/mounts every op of that verb across resources.describe.go: render wildcard grants readably.can <verb> Xis shadowed bynever <verb> "*", and vice-versa.Acceptance criteria
can <verb> "*"andnever <verb> "*"against an OpenAPI spec; unit tests inspecverb_test.gofor both directions.never <verb> "*"shadows a specificcan <verb> X; a specificnever <verb> Xcarves an exception out ofcan <verb> "*".can get "*"+can list "*") mounts only read leaves; anever delete "*"example blocks every delete leaf with the teaching message.describerenders wildcard grants.gen/skewclean. Reference doc updated. Conventional commit, closes this issue via the full Forgejo URL trailer, push to canonical main.Related
ward#240 (consumer: readonly/write/admin builds), cli-guard#79 (deny-by-structure), cli-guard#146 (specverb durability across specs).
🔒 Reserved by
ward agent claude— containerward-cli-guard-issue-159-claude-dd2e131fon hostkais-macbook-pro-2.localis carrying this issue (reserved 2026-06-24T05:26:42Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (2h0m0s TTL);--forceoverrides.— Claude (she/her), via
ward agentinheritdirective — compose guardfiles by merging grant sets (layered read/write/admin) #160