Repository navigation
Closed
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Description
Parent
What to build
thirdshift setup from a terminal (stdin and stderr both terminals) asks the Setup questions on stderr, then writes the User config the same way as without a terminal (every key, comments, in-place edit). Each question's default answer is the current value from an existing User config, or else the setting's default (including the suggested GitHub email for the address). In order:
- Every Run a Merge run? (
merge.always, y/N) - Every Run first fast-forwards the Base branch checkout? (
launch.pull, y/N) - Run notifications? (
email.always, y/N). If yes: the address (email.to), asked again until it contains@, and the sender (email.from), where an empty answer keeps Resend's shared sender. - If notifications are on and
RESEND_API_KEYis unset or empty, print theexportline to add to a shell profile. The key is never written anywhere. - If notifications are on and
RESEND_API_KEYis set, offer to send a test email (default No), reusingemail-testunchanged.
logs.dir is never asked about. Stdout stays empty. Ctrl-C during the questions writes no file.
Adds a Scenario helper that runs the binary on a pseudo-terminal (via libc::openpty; libc is already a dependency), feeds scripted answers and returns stdout, stderr, the exit code and the file. See the spec in #126.
Acceptance criteria
- Answering the questions writes the chosen values; pressing Enter throughout writes the defaults, or keeps an existing file's values.
- Over a hand-commented User config, the comments survive.
- An address without
@is asked again. - Notifications off: no address, sender, key hint or test-email questions.
- The
RESEND_API_KEYhint appears only when the variable is unset or empty, and the key appears nowhere in the file. - Accepting the test-email offer sends one test email through the fake Resend; declining sends none.
- Ctrl-C mid-questions leaves no file (and an existing file unchanged).
- All prompts are on stderr; stdout is empty.
- Terminal-path tests use the new pseudo-terminal
Scenariohelper; no test-only env var fakes a terminal.
Blocked by
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Activity
thirdshift setupwrites the defaults User config with no terminal #127