Re-express ward pkg brew scoped wrapper as ward-kdl #95

Closed
opened 2026-06-15 15:31:10 +00:00 by coilysiren · 2 comments
Owner

ward pkg brew (cmd/ward/pkg_brew.go) scoped wrapper -> ward-kdl. Decide if the scoped brew shape fits the exec-dialect or needs a complex action.

Part of the coily -> ward -> ward-kdl consolidation. Epic: #91. Milestone: ward-side "coily to ward to ward-kdl consolidation".

`ward pkg brew` (cmd/ward/pkg_brew.go) scoped wrapper -> ward-kdl. Decide if the scoped brew shape fits the exec-dialect or needs a complex action. Part of the coily -> ward -> ward-kdl consolidation. Epic: #91. Milestone: ward-side "coily to ward to ward-kdl consolidation".
coilysiren added
P3
and removed
P2
labels 2026-06-17 08:39:14 +00:00
Member

🔒 Reserved by ward agent claude — container ward-ward-issue-95-claude-d88923f0 on host kais-macbook-pro.local is carrying this issue (reserved 2026-06-18T08:50:10Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent claude` — container `ward-ward-issue-95-claude-d88923f0` on host `kais-macbook-pro.local` is carrying this issue (reserved 2026-06-18T08:50:10Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Author
Owner

Resolved by ff72678 (decision recorded in docs; no behaviour change).

Decision: the scoped/mutating ward pkg brew verbs fit neither the exec dialect's declarative guards nor a complex action at cli-guard v0.43.0, so they stay as hand-written gated Go (cmd/ward/pkg_brew.go). ward#94 already landed the read/passthrough half as the exec-dialect guardfile; the scoped verbs stay never run there.

Why the exec dialect can't express the scope policy:

  • when/deny-when are existential (one match passes) where the rule is universal (every formula must be in tap scope);
  • no conditional escape hatch for the --allow-untapped opt-out, and the engine forwards every arg verbatim so that ward-side flag would leak to brew;
  • a bare zero-positional brew upgrade can't be denied (guards react only to selected values).

Why a complex action isn't reachable from ward: the only extension seam is the gate registry (gateRegistry), a closed map holding one aws-read gate; execverb.Config exposes no gate-injection field. Re-expressing the scoped half needs an upstream cli-guard change (a Config.Gates seam or a first-class brew-scope gate) plus a flag-stripping seam. Mirrors ward#92's forgejo_issue.go outcome. Full rationale: docs/ward-kdl.brew.scoped.md.

Resolved by ff72678 (decision recorded in docs; no behaviour change). **Decision: the scoped/mutating `ward pkg brew` verbs fit neither the exec dialect's declarative guards nor a complex action at cli-guard v0.43.0, so they stay as hand-written gated Go (`cmd/ward/pkg_brew.go`).** ward#94 already landed the read/passthrough half as the exec-dialect guardfile; the scoped verbs stay `never run` there. Why the exec dialect can't express the scope policy: - `when`/`deny-when` are existential (one match passes) where the rule is universal (every formula must be in tap scope); - no conditional escape hatch for the `--allow-untapped` opt-out, and the engine forwards every arg verbatim so that ward-side flag would leak to brew; - a bare zero-positional `brew upgrade` can't be denied (guards react only to selected values). Why a complex action isn't reachable from ward: the only extension seam is the gate registry (`gateRegistry`), a closed map holding one `aws-read` gate; `execverb.Config` exposes no gate-injection field. Re-expressing the scoped half needs an upstream cli-guard change (a `Config.Gates` seam or a first-class `brew-scope` gate) plus a flag-stripping seam. Mirrors ward#92's `forgejo_issue.go` outcome. Full rationale: `docs/ward-kdl.brew.scoped.md`.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#95
No description provided.