Repository navigation
Add thirdshift setup: write the defaults User config with no terminal - #135
Merged
Merged
Conversation
2026-09-29T22:18:13Z, host tracewake. Uncommitted work at the time of failure is included in this commit.
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 new command,
thirdshift setup. This PR adds only its no-terminal form: with no User config, it writes~/.thirdshift/config.tomlwith every setting at its default and asks no questions.The file it writes (the README's User config section now shows it too):
helpnow liststhirdshift setup.Evidence
thirdshift setupwas read as an Issue URL and failed with an argument error.After:
tests/setup.rshas 7 tests, all passing. They run the binary through the pipedScenarioharness and check:0, stdout emptyemail.tois commented out~/.thirdshift/logs--emailstill stops for want ofemail.tosetup extraexits2with the help text and writes nothingDEFAULTSparses to the sameUserConfiga Run uses with no file.cargo testsuite passes, and clippy is clean.Merge Danger
Door: two-way
It adds a command and writes a file only when asked to. Nothing changes for Runs.
Blast Radius: minimal
Only people who run
thirdshift setupare affected.Unaddressed findings
Standards
DEFAULTS,UserConfig::defaults,email::DEFAULT_FROM, the README and the help text. The spec requires the README to show the file, and a unit test tiesDEFAULTStoUserConfig::defaults. The README copy is documentation, not code.setup()repeatsload()'s "read, else NotFound" shape. It is two short matches whose arms differ, and a shared helper wouldn't make either clearer.email.fromwritten out explicitly pinsonboarding@resend.dev. The spec requires it ("email.from = "onboarding@resend.dev"", and real values wherever there is a default).DEFAULT_FROMispubrather thanpub(crate): this is a binary crate, and the rest of the codebase usespub.AGENT_OPENS_PR/PR_URLare copied intotests/setup.rs: this matches the existing practice in five other test files. Moving them intotests/supportbelongs in its own change.Spec
setupwrites the defaults even from a terminal. The questions don't exist yet, so a terminal check would have nothing to branch to. It belongs to the thirdshift setup #126 slice that adds the questions.thirdshift setupwrites the defaults User config with no terminal #127: I kept it because it follows thirdshift setup #126 stories 32 and 34, and it never overwrites a user's file. It keeps values and refuses a broken file, and its test and README now say "keeps its values" rather than "left as it is", so the next slice can add missing keys without reversing anything.Closes #127
🤖 Generated with Claude Code