Skip to content

feat(cli): take the settings from the config file - #30

Merged
Bakhomious merged 2 commits into
mainfrom
step/config-cli
Nov 3, 2026
Merged

Bakhomious merged 2 commits into
mainfrom
step/config-cli

Conversation

@Bakhomious

Copy link
Copy Markdown
Contributor

Step config-cli of docs/plan.md: baton's commands take their settings from the config file that config (#29) reads.

What changes

  • baton pane gives each role's copilot its model, and its reasoning effort and AI credits cap when the file sets them (--model, --reasoning-effort, --max-ai-credits, the cap in plain digits, as 1000000.5). The orchestrator gets its settings too, and its extra tools from the file in place of the fixed nudge tools.
  • baton feature start takes the round cap and the branch prefix (<prefix><slug>).
  • baton start checks the file before it makes the orchestrator's session, so a mistake shows in the user's shell and not in a pane that ends. It doesn't check when the session already runs.
  • repo.Remote runs git remote get-url origin, which applies the user's insteadOf rewrites. A repo without origin gets the top's settings.
  • The cli tests run with an empty HOME of their own and without XDG_CONFIG_HOME and XDG_CACHE_HOME, so they never read the user's config. TestMain fails the run if a test leaves files in that home.
  • Docs: docs/plan.md (row 53, fact 32, Panes, the orchestrator's session, Config, decisions 38, 41, 45, 49), README's new Config section, and AGENTS.md's new bullet "baton without the user's config".

Lead's calls (flagged in decision 49)

  • The repo's section is found by the origin remote only. Without origin, the top's settings apply, even when other remotes exist.
  • baton pane reads the file after it writes the plugin and before it waits, for the orchestrator's pane too. So a mistake stops a pane before its role picks up work. A pane outside a repo now refuses with "find the origin remote: fatal: not a git repository…", and the orchestrator's pane now needs a repo.
  • baton start checks the file only when it makes the session.

Checks

  • mise run check is green: lint 0 issues, vuln clean, coverage 99.1% total. cli is at 99.8%. The one uncovered branch is waitForWork's openStore error, which can't fire once loadSettings has run git in the same folder; it stays as a guard.
  • QA probes: 35 mutants, all caught. Two mutants that didn't compile were rewritten. Two mutants that panic in a synctest bubble skip TestMain's cleanup and leave the tests' home folder, so AGENTS.md now says to remove it after such a run.
  • Smoke run with the binary, under env -u TMUX -u TMUX_PANE, with its own TMUX_TMPDIR and HOME, on a server started with -f /dev/null, and a stand-in copilot:
    • The lead got --model gpt-5.6-sol --reasoning-effort high (the top's).
    • The engineer got the repo section's --max-ai-credits 1000000.5.
    • The orchestrator got --model claude-sonnet-5.5 --max-ai-credits 30 with no extra tools ([]).
    • The feature ran on branch smoke/demo-1 with "round 1 of 2".
    • A bad roundCap and a mistyped model were each refused with the file's path, and nothing was made.
  • No new suppression, no live run, no model calls.

baton pane, baton feature start and baton start read the config file
for the repo of the origin remote's URL (decision 49, fact 32): each
role's model, reasoning effort and AI credits cap, the orchestrator's
extra tools, the round cap and the branch prefix. repo.Remote runs
git remote get-url origin; a repo without an origin gets the top's
settings. The cli tests run with an empty HOME of their own.
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

@Bakhomious
Bakhomious merged commit 49f12ec into main Nov 3, 2026
3 checks passed
@Bakhomious
Bakhomious deleted the step/config-cli branch November 3, 2026 18:45
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