Skip to content

init: Remove agent-mode and log-file defaults from questionnaire#15

Closed
iyaki wants to merge 1 commit into
mainfrom
main_init_clean
Closed

init: Remove agent-mode and log-file defaults from questionnaire#15
iyaki wants to merge 1 commit into
mainfrom
main_init_clean

Conversation

@iyaki

@iyaki iyaki commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Per the requirement, the ralph init command now always shows NO default for agent-mode and log-file fields in the interactive questionnaire, even when an existing config file contains these values.

Changes

  • internal/cli/init.go: Modified seedInitStringDefaults() to intentionally omit AgentMode and LogFile from seeding
  • Tests updated: Verified that these fields remain empty while other fields (Model, SpecsDir, etc.) continue to preserve their existing config values as defaults

Testing

✅ All existing tests pass
✅ Updated TestSeedInitStringDefaults to validate fields are NOT seeded
✅ Updated TestInitCommandSeedsQuestionDefaultsFromExistingConfig to reflect new behavior

Behavior

Before: Existing config values for agent-mode and log-file were shown as defaults
After: These fields always show empty/no default; logging questions only appear when user provides non-empty log path

Other fields (model, specs-dir, etc.) continue to show their existing values as defaults.

@iyaki iyaki force-pushed the main_init_clean branch from aea6eac to 0175873 Compare June 17, 2026 01:45
The ralph init command now always shows NO default for agent-mode and
log-file fields in the interactive questionnaire, even when an existing
config file contains these values. This ensures users explicitly choose
whether to set these optional fields on each run.

Changes:
- seedInitStringDefaults(): Intentionally omit AgentMode and LogFile
  from seeding while keeping other string fields (Model, SpecsDir, etc.)
- Tests updated to reflect new behavior where these fields remain empty
- Added tests for AskQuestions, askSingleQuestion, and exported test helpers
  to maintain 95%+ coverage requirement

Other fields continue to preserve their existing config values as defaults.
Logging questions (truncate?) only appear when user provides non-empty log path.
@iyaki iyaki force-pushed the main_init_clean branch from 0175873 to 55b6139 Compare June 17, 2026 02:09
@iyaki iyaki closed this Jun 17, 2026
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