Repository navigation
User config, with merge.always and --no-merge - #116
Merged
Merged
Conversation
…r after the Issue URL thirdshift reads ~/.thirdshift/config.toml at the start of a Run. merge.always = true makes every Run a Merge run; no-merge/--no-merge overrides it for one Run. An unparsable config or an unknown key or section stops the Run before any work, naming the file and the key. update, version and help never read it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Run now reads the User config,
~/.thirdshift/config.toml.merge.always = truemakes every Run a Merge run, andno-merge/--no-mergeturns that off for one Run. Argument parsing moved out ofmainintosrc/args.rs, so later flags drop in cleanly.The help text and README document
--no-merge, the config location andmerge.always.Evidence
Before:
thirdshift <url> --merge→ exit 2, "unexpected argument after the Issue URL". There was no User config.After:
tests/user_config.rs(new, 10 end-to-end tests through the compiled binary, with aScenario::user_config_ishelper) passes:merge.always = truewith no flag → PR mergedno-merge/--no-merge, before or after the URL, withmerge.always→ ready for review, nogh pr merge[merge]alone,always = false→ not a Merge run[merge/alway/[merges]/colour→ exit 1 before any work, naming the file and keyhelpandversionwith a broken config → exit 0.updateis covered intests/update.rs.All
cargo testsuites pass, andcargo clippy --all-targetsis clean.Merge Danger
Door: two-way
Revert the commits. No one has a config file until they write one, and the new flag positions only accept more.
Blast Radius: CLI
Every Run now reads
~/.thirdshift/config.toml. A stray or typo'd file there stops Runs, which is on purpose.<url> mergeused to exit 2 and now starts a Merge run. A missingHOMEmeans no config, not an error.Unaddressed findings
Standards
main.rs(config load vs. interrupt install): this follows the existing pattern inmain, and a helper for two three-line blocks adds little.mergebut dashed--no-merge: the issue asks help to list--no-merge, and an existing test forbids help from listing the--mergealias. Both spellings are accepted and the README gives both.AGENT_OPENS_PR/PR_URLcopied intotests/user_config.rs: each test file already keeps its own copy. Moving them intotests/supportis a separate cleanup.UserConfig::parseas well as the end-to-end tests: it's a cheap internal seam for error wording, and the end-to-end tests stay the contract.merge_always: boolcould store aGoal: the bool mirrors the config key. Later sections ([email],[logs]) will sit alongside it the same way.Spec
merge = true,always = "yes") are errors too: not asked for, but a value thirdshift silently ignored would defeat the "unknown key stops the Run" rule.HOMEmeans no config: the spec doesn't say. These match how the other pre-flight failures behave.Closes #111
🤖 Generated with Claude Code