Skip to content

Reject --runtime-config for non-Spin adapters #458

Open

Description

@aram356

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 push and config diff reject 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-config stays 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

  1. self-assigned this
    on Nov 10, 2026
  2. added theissue type on Nov 10, 2026
  3. added this to the 202611 milestone on Nov 10, 2026
  4. removed their assignment
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions