Repository navigation
Description
Description
--runtime-config configures Spin's host-side key-value backend; it is not application configuration to publish. The shared CLI currently accepts the option for config push and config diff with non-Spin adapters, where it is ignored. This makes an apparently valid command misleading.
Restrict this option to --adapter spin. Keep --app-config portable across Axum, Cloudflare, Fastly and Spin.
Current Behavior And Reproduction
In a valid application checkout using its typed application CLI, supply --runtime-config ./runtime-config.toml to config push --adapter axum --dry-run or config diff --adapter axum. The shared arguments accept the option even though that adapter does not use it. The same mismatch applies to Fastly and Cloudflare.
This ticket is based on source inspection, not an executed provider operation:
Expected Behavior
Accept an explicit --runtime-config only for Spin. For other adapters, return a clear usage/validation error such as --runtime-config is only supported with --adapter spin, before runtime-file access or provider activity.
Done When
- Both
config pushandconfig diffreject this option for Axum, Cloudflare and Fastly. - Enforce the rule once in reusable CLI validation, including direct typed-library entrypoints; generated application CLIs and the demo do not duplicate it.
- Spin still accepts the option and preserves its existing explicit/default path, local-backend and cloud behavior.
- Commands without the option behave unchanged; existing case-insensitive adapter matching is preserved.
- Help for both commands explicitly says “Spin only”; documentation distinguishes host runtime settings from the app-config payload.
- Co-located tests cover both commands across all four adapters, presence/absence of the option, and rejection before provider reads/writes or shell-outs.
-
--app-configstays portable; existing validation, storage and outbound contracts are unchanged. Do not retain a compatibility path that silently ignores the invalid option.
Affected Area
CLI (config push/diff), documentation, demo/generated CLI coverage.
Related
Identified while clarifying configuration flags during #275. This is a focused CLI follow-up, not a change to outbound HTTP or provider runtime behavior.
Activity