feat!: make value providers consumer-declared, drop the AWS SDK #286
No reviewers
Labels
No labels
burndown-2026-06
sunday-sprint
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/umbra!286
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pluggable-value-providers"
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?
Closes #283.
specgen baked one cloud vendor into the generator: a
HasSSMbranch emittingaws-sdk-go-v2imports, aGetParametercall and a~/.aws/credentialsSSO workaround, plus aHasTailscaletwin. Every generated binary inherited that dependency whether or not it resolved anything from a store.pkg/valuesourcealready had the right shape -Provider,Builtins,Merge, fail-closedResolve- and its own package doc already said consumers register store-backed resolvers "so neither engine imports a store SDK". Only codegen disagreed. This makes the doc true.The mechanism
A store-backed provider is declared in the guardfile as a subprocess contract, in either dialect:
The address is appended as the final argument. Only stdout is read and trimmed, so a resolved value never reaches argv, the audit row, or an error message - a non-zero exit surfaces the exit status alone.
BREAKING
A guardfile naming a non-builtin provider must now declare it.
env,fileandliteralstay built in.The failure mode is loud, which was the design constraint. An undeclared name yields an empty generated registry, so
valuesource.Resolvereturnsno provider registered for "ssm"- never an empty token silently used as a credential:AOS needs a companion change: it names
ssminactions.kdlandforgejo.kdl. That lands separately once this releases, since it has to lock against a published version.The trade, stated plainly
Credential resolution becomes whatever the declared binary does. The SDK's profile-precedence and SSO-fallback behaviour is replaced by the aws CLI's, and that CLI must exist wherever the generated binary runs. That is a real behaviour change for live token minting, chosen deliberately over keeping a vendor SDK in a policy-free engine.
docs/value-providers.mdsays so in the doc rather than burying it.A latent bug the new grammar exposed
kdl.Value.String()debug-formats non-string kinds, so a bare-4inexec tailscale ip -4came through as the literal text"<kdl.Int -4>"and would have been passed to the subprocess verbatim.argTextnow renders the token a shell would actually receive. Covered by a test that pins the-4case specifically.Worth noting the same
.String()pattern is used for arguments elsewhere in both grammars, so unquoted numeric-looking tokens may misrender in other nodes too. Out of scope here; the existing convention is to quote (docs/execverb.mdalready says a*glob needs quoting).Verification
Full gate green (
build,vet,tidy,test,lint0 issues), plus end to end against a scratch copy of AOS's real guardfiles:aws-sdkentries to zerogrep -riE '\baws\b' cli/ http/ pkg/ cmd/is now clean in shipped non-test codeAOS's guardfiles were copied to a scratch dir for that test; the agentic-os repo is untouched by this PR.
Not included
The
valueFlagstable incli/execverb/argv.gois still one vendor's global-flag list, markedTODO(#282). Dropping it silently weakens a live guard (deny-when arg0 matches *tfstate*fails open once--region us-east-1stops being stripped), so it wants the same treatment: declared in the guardfile, by the spec that knows its own binary. Left for a follow-up.