specverb: auto-resolve op by path+method convention, op becomes override #147
Labels
No labels
burndown-2026-06
sunday-sprint
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/cli-guard#147
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?
Problem
After ward#146 / commit
3dd1d4d(delete the engine expansion table), everycangrant must hand-bindop "<operationId>". That made the engine durable across specs but pushed vendor-string boilerplate into every guardfile (createCurrentUserRepo,issueGetMilestonesList, ...). The Forgejo guardfile alone carried ~39 explicit ops.Change
Resolve
opautomatically by generic REST convention, withopretained as an override seam.specverb.resolveOp(new,http/specverb/resolve.go) maps the canonical CRUD verbs (get/view/list/create/edit/delete) to an operation by HTTP method + the path's resource segment, against the embedded spec. Spec-agnostic: pure path+method, no vendor strings in engine code; the OpenAPI-3 reader lowers into the same internal model, so one resolver drives Swagger 2 / OpenAPI 3.x.opbecomes optional oncan; explicitopalways wins (irregular endpoints, fixed-body toggles, ambiguous matches).resolveDescriptor(specverb.go) andgrantedPathMethods(prune.go) via the oneresolveOpseam.Decision
Pure runtime resolution, nothing recorded (no lock-table). Determinism comes from the vendored+locked+skew-checked spec; auditability from
describe+ fail-closed build errors.Verification
Resolver reproduces the exact explicit op for every convention-resolvable grant across all three real ward specs (Forgejo/Tailscale/Trello) with zero mismatches. New
resolve_test.gocovers convention/override/fail-closed/ambiguous/PUT-fallback. Suite + vet + lint + godoc + doc-caps green.Downstream: ward drops
opon the resolvable grants in its four guardfiles.🔒 Reserved by
ward agent claude— containerward-cli-guard-issue-147-claude-1ebfdd62on hostkais-macbook-pro-2.localis carrying this issue (reserved 2026-06-23T08:29:30Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (2h0m0s TTL);--forceoverrides.— Claude (she/her), via
ward agentResolved and on canonical
main. The convention resolver landed inc7d4c9b(feat(specverb): auto-resolve op by path+method convention, op becomes override) and was extended byf8b71b2(full generic convention set) andef765d0(operationId-word fallback) — all ancestors ofmain/origin/main.Delivered exactly as scoped:
specverb.resolveOp(http/specverb/resolve.go) — spec-agnostic path+method → operation; one resolver over Swagger 2.0 / OpenAPI 3.x.opnow optional oncan; explicitopalways wins (override seam).resolveOpseam fromresolveDescriptor(specverb.go) andgrantedPathMethods(prune.go); guardfile parser no longer requiresop.resolve_test.gocovers convention / override / fail-closed / ambiguous / PUT-fallback.docs/specverb-resolution.mdadded.Those commits referenced the issue URL but never used a
closeskeyword, so it stayed open. Closing now —make testshows the specverb suite green; the only failures are the privilege-dependentcli/sandboxseccomp/ptrace/jail tests, which can't run inside this nested container and are unrelated to this change.closes #147
— Claude (she/her), via
ward agent