feat(steerwish): wish commands in the cli - declare, list, show, close - #31
Merged
Conversation
The cli takes up the steerwish logic ahead of the workflow smoke test:
the wish becomes a first-class command family, mirroring the
systemtender pattern one-to-one.
- lib.rs: Steerwish types mirroring the openapi schemas (Steerwish,
SteerwishSummary, SteerwishCreate, SteerwishBand, SteerwishLimits,
SteerwishEvent) - camelCase wire names (maxChange, createdAt, type),
optionals skipped so a minimal declare carries exactly outcome+band.
- client.rs: list/declare/get/close against /steerwishes, plus
declare_steerwish_from_yaml - the declare artifact is the yaml file
we settled on (outcome, band, limits, budget, regime).
- main.rs: `godon_cli wish {list|declare|show|close}` with text/json
output; the text renderer prints the full receipt - band, target
marked receipt-only, limits, budget (unbounded when omitted), and
the event history with refusal reasons.
- Stub tests (first in this crate): yaml create parse, minimal-create
serialization omits optionals, event-history parse incl. refusal
detail, summary parse without band - all keyed to the openapi
examples.
Note: no local cargo; CI is the gate (established pattern).
Co-authored-by: cherusk <10729954+cherusk@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
godon_cli wish {list | declare --file wish.yaml | show --id | close --id}-the steerwish becomes a first-class cli command family, mirroring the
systemtender pattern. This is the cli half of the steerwish chain: the
control API landed first (godon-images 983068e), the workflow smoke test
comes next and drives the cli.
Details
(Steerwish, SteerwishSummary, SteerwishCreate, SteerwishBand,
SteerwishLimits, SteerwishEvent). Wire names preserved
(
maxChange,createdAt,type); optionals skipped on serialize,so a minimal declare carries exactly
outcome+band(omittedbudget = upkeep indefinitely; omitted regime = standing).
/steerwishes,plus
declare_steerwish_from_yaml: the declare artifact is the yamlfile (outcome, band, limits, budget, regime).
view prints the full receipt: band edges, target marked receipt-only,
excluded inputs, max change, budget (
unboundedwhen omitted),regime, and the event history with refusal reasons.
create serializes without optionals, event-history parse including a
refusal naming its binding constraint, summary parse without band.
All keyed to the openapi examples.
Notes
Co-authored-by: cherusk 10729954+cherusk@users.noreply.github.com