Make specgen's value providers pluggable through pkg/valuesource instead of baking ssm/tailscale into codegen #283
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#283
Loading…
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?
Split out of the dead-package sweep (see #282). Everything else in that sweep landed; this is the one AWS surface left standing, because it is live and removing it would break AOS.
What is there now
http/specgen/codegen/codegen.gocarries aHasSSM(and siblingHasTailscale) flag that gates emitted consumer code:codegen.go:105-107-HasSSM/HasTailscalefields on the template payloadcodegen.go:173- set from the parsed speccodegen.go:251-252- emitsawsconfig "github.com/aws/aws-sdk-go-v2/config"and"github.com/aws/aws-sdk-go-v2/service/ssm"into the generated filecodegen.go:320- registers"ssm": ssmTokenResolverin the generated resolver tablecodegen.go:411-433- emitsgetSSMParam, plus a~/.aws/credentialsSSO-shadowing workaround that prints an operator note to stderrSo the generator knows one cloud vendor's SDK, its config-file precedence rules, and its parameter-store API shape.
Why it did not just get deleted
It is load-bearing. Two AOS guardfiles resolve tokens through it:
.specgen/guardfiles/aosguard/actions.kdl:7-value ssm "/forgejo/coilyco-ops/api-token".specgen/guardfiles/aosguard/forgejo.kdl:18-value ssm "/forgejo/coilyco-ops/api-token"Deleting the branch breaks AOS token minting, so this needs a replacement rather than a removal.
Why it is worth fixing
It contradicts the repo's own doctrine two ways:
A vendor SDK hardcoded in the generator is exactly the leak those rules forbid. It also means every consumer of specgen inherits an
aws-sdk-go-v2dependency edge whether or not it resolves anything from SSM.The shape of the fix
pkg/valuesourcealready exists as the "sharedvalue <provider>resolution" primitive, and mcp-beaver already imports it. The provider set should come from there and be registerable by the consumer, rather than being a fixedif HasSSMbranch in the template:pkg/valuesourcea provider-registration surface (name -> resolver constructor).ssmprovider (and its~/.aws/credentialsSSO workaround) out of umbra and into the consumer that wants it - AOS is the only current one.tailscaleon the same path; it has the identical shape.Acceptance:
grep -ri aws http/ cli/ pkg/ cmd/returns nothing in shipped non-test code, and AOS'sactions.kdl/forgejo.kdlstill mint tokens with no guardfile syntax change.Related
A smaller instance of the same problem is marked
TODO(#282)incli/execverb/argv.go: thevalueFlagstable is still one vendor's global-flag list. It stayed because dropping it silently weakens a live guard - withaws s3 ls --region us-east-1 s3://my-tfstate, losing the strip makesarg0resolve tous-east-1and AOS'sdeny-when arg0 matches *tfstate*fails open. Right fix there is declaring value-taking flags in the guardfile, where the spec knows its own binary. Worth doing in the same pass if the provider work opens that door.