specverb: optional base-url scheme, redirect-safe default client, Mount() path generation #88
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#88
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?
Summary
Consumer-ergonomics pass on the
specverbengine, surfaced while wiring the first real consumer (ward, ward#62). Three additive changes that move boilerplate out of the consumer and into the engine, so a consumer needs only the embeds + aTokenResolver, no hand-written mount glue.Changes
base-url scheme optional. A Guardfile
base-url "forgejo.coilysiren.me/api/v1"should resolve tohttps://....Buildprependshttps://when the resolved base-url carries noscheme://. HTTPS is the only sane default for a token-auth API.Redirect-safe default HTTP client. When
Config.HTTPClientis nil the engine now defaults to a client that follows redirects for GET/HEAD but refuses them for mutating methods (a redirected POST/PATCH/PUT is downgraded to GET with the body dropped by net/http, so it must fail loudly instead). Mirrors coily'sforgejoCheckRedirect. Removes the need for every consumer to hand-roll this client.Mount(root, cfg)generates the whole command path.Buildreturns only the leaf group (e.g.forgejo).Mountgrafts that group onto a root*cli.Command, creating the intermediate path groups the Guardfile names (wrap ward ops forgejo-> find-or-createopsunder root, attachforgejo). The consumer no longer hand-writes theopswrapper.Done when
Builddefaults the scheme + client,Mountexists with a test proving it creates intermediate path groups and is idempotent against an existing one,make test/make lintgreen,godoc-current.txtregenerated.