Skip to content

feat(config): every CLI setting is now settable in config.json - #142

Open
Emasoft wants to merge 1 commit into
mlhher:mainfrom
Emasoft:feat/config-cli-parity
Open

Emasoft wants to merge 1 commit into
mlhher:mainfrom
Emasoft:feat/config-cli-parity

Conversation

@Emasoft

@Emasoft Emasoft commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Wiring status

16 of the 20 settings are wired end-to-end on this branch. The remaining 4 — bash-timeout, subagent-idle-timeout, subagent-idle-kill-after, max-concurrent-llm-requests — have their config-layer fields, resolvers, and tests in place, but their CLI application points (tool.SetShellTimeout, the orchestrator SetIdlePolicy, client.SetLLMConcurrency) arrive with the sibling PRs that introduce those flags (#130, #131, #132). The wiring will be added as those merge — that is inherent to the independent-PR structure, not an omission.

Every flag that makes sense to persist now has a config.json equivalent: 20 new kebab-case entries mirroring the flag names exactly — --bash-timeout → "bash-timeout", --system-prompt → "system-prompt", and so on.

Precedence is explicit and enforced

explicitly-passed flag > config.json > built-in default. The explicitly-passed set is built with flag.Visit, so only flags actually typed on the command line override the config file — a flag left at its Go default doesn't shadow config. max-stream-retries keeps its env layer: flag > env > config > default.

Typing rules

  • durations are strings ("45s", "2m") — no unit confusion
  • default-true bools and meaningful-zero ints are tri-state pointers, so config can distinguish "unset" from "explicitly false/zero"

Each flag's -h usage string names its config.json key.

Honest scope

16 of the 20 are wired end-to-end on this branch. The other 4 — bash-timeout, subagent-idle-timeout, subagent-idle-kill-after, max-concurrent-llm-requests — have fields, resolvers, and tests at the config layer; their CLI application points ride with the sibling PRs that add those flags.

Dependency note: docs/config-reference.md ships with the strict-parsing PR.

Testing

$ go test -count=1 -race ./...
ok  	late/cmd/late	3.091s
?  	late/cmd/mcp-run	[no test files]
ok  	late/internal/agent	2.026s
?  	late/internal/assets	[no test files]
ok  	late/internal/client	1.558s
ok  	late/internal/common	3.278s
ok  	late/internal/config	3.077s
ok  	late/internal/executor	7.905s
ok  	late/internal/git	2.425s
ok  	late/internal/mcp	1.855s
ok  	late/internal/orchestrator	4.318s
?  	late/internal/pathutil	[no test files]
ok  	late/internal/plugin	11.884s
ok  	late/internal/session	3.304s
ok  	late/internal/skill	3.391s
ok  	late/internal/tool	3.337s
ok  	late/internal/tool/ast	3.702s
ok  	late/internal/tui	8.807s

exit 0 — all 18 packages green (15 ok, 3 without test files).

20 new kebab-case entries mirroring the flag names exactly, resolved
with the mandatory precedence explicitly-passed flag > config.json >
built-in default (explicitFlags via flag.Visit). Durations are strings,
default-true bools and meaningful-zero ints are tri-state pointers, and
max-stream-retries keeps its env layer (flag > env > config > default).
Each flag's -h usage names its config.json key.
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