Skip to content

feat(cli)!: remove remaining config-shaped flags (--tmux, --tool, build --compression, shutdown --timeout)#536

Merged
mensfeld merged 2 commits into
masterfrom
feat/remove-remaining-config-flags
Jul 3, 2026
Merged

feat(cli)!: remove remaining config-shaped flags (--tmux, --tool, build --compression, shutdown --timeout)#536
mensfeld merged 2 commits into
masterfrom
feat/remove-remaining-config-flags

Conversation

@mensfeld

@mensfeld mensfeld commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Follow-up to the #532 flag-consistency audit: removes the four remaining config-shaped flags so the CLI is fully coherent with the config/profiles-first model. Flags now exist only for per-invocation choices (workspace, slot, resume, profile, force, format, ...).

Removed → replacement (config, project config, or profile)

Removed flag Replacement
coi shell --tmux [shell] use_tmux (was a flag+config duplicate with a documented override rule — the exact two-sources-of-truth pattern 0.10 eliminates)
coi shell --tool [tool] name, or a per-tool profile (carries the tool's whole setup, not just the name)
coi build --compression NEW [container.build] compression config key — a profile defining a build can now declare its compression; coi image publish --compression stays (raw plumbing)
coi shutdown --timeout NEW [container] shutdown_timeout config key (default 60) — a graceful-shutdown window is policy, not a per-invocation whim

Details

  • removedFlagHint generalized to a flag→config-key map: every removed flag errors with a hint naming its exact replacement key; exact-token matching keeps prefix collisions (--tmux-session, --tooling, --timeouts, --compression-level) hint-free. All verified live.
  • New config keys wired through merge functions + JSON schema defs; ShutdownTimeoutSeconds() accessor defaults to 60.
  • Tests migrated: use_tmux config test asserts the hint instead of flag override; compression tests config-driven (renamed compression_config.py); shutdown tests use trusted-config timeout; hint coverage for all four removals in Go + Python; shell help asserts the flags are gone.
  • README tool-selection/build/usage sections rewritten config-first; CHANGELOG breaking entry expanded (still under 0.10.0).

Gates: go build/vet/test, golangci-lint v2.12.2 (0 issues), gofmt, ruff — all green locally.

Maciej Mensfeld added 2 commits July 3, 2026 09:33
…ild --compression, shutdown --timeout

Flag-consistency audit follow-up: everything config-shaped goes via
config/profiles; flags are only for per-invocation choices.

- coi shell --tmux removed: [shell] use_tmux is the single source of truth
  (the flag+config pair with a documented override rule was exactly the
  two-sources-of-truth pattern 0.10 eliminates).
- coi shell --tool removed: [tool] name in config, or a per-tool profile
  (which can carry the tool's whole setup, not just its name).
- coi build --compression removed; NEW [container.build] compression config
  key (merge + schema), read from the resolved profile at all four build
  sites. coi image publish --compression stays (raw plumbing).
- coi shutdown --timeout removed; NEW [container] shutdown_timeout config key
  (merge + schema + ShutdownTimeoutSeconds() accessor, default 60).
- removedFlagHint generalized to a flag→config-key map: every removed flag
  errors with a hint naming its exact replacement key; exact-token matching
  keeps prefix collisions (--tmux-session, --tooling, --timeouts,
  --compression-level) hint-free.
- Tests migrated; README rewritten config-first; CHANGELOG breaking entry
  expanded.
@mensfeld mensfeld merged commit d848ce5 into master Jul 3, 2026
25 checks passed
@mensfeld mensfeld deleted the feat/remove-remaining-config-flags branch July 3, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant