Skip to content

Prepare User config documents behind one validated interface - #451

Merged
JacobStephens2 merged 2 commits into
mainfrom
issue-450
Oct 6, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
issue-450

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Setup and its first-Run offer use one prepared User config document for completed question defaults and semantic edits. Validation, defaults completion, and TOML preservation now belong to the User config module.

UserConfigDocument::existing / ::defaults
  validate as a Run → complete defaults → settings for questions
render(semantic changes | none)
  preserve spelling, comments, order, and unasked settings
Setup
  write User config → save Credentials → send test email

Closes #450

Evidence

  • Before: enabling_notifications_replaces_examples_at_section_and_document_boundaries failed because the active recipient preceded # mine; quoted_email_headers_keep_one_example_and_render_idempotently found two examples instead of one.
    After: both regressions pass through the prepared document interface; all 31 User config tests and 62 Setup flow tests pass.
  • CLI and terminal regressions: Setup 10/10, Setup offer 7/7, User config 14/14. The added file test verifies atomic replacement, retained permissions, and no replacement for unchanged completed text.
  • cargo check --all-targets, cargo fmt --check, and cargo clippy --all-targets -- -D warnings pass.
  • Full suite: cargo test — 1,195 passed, 0 failed, 0 ignored across 39 test binaries.

Test seams

  • User config prepared document: existing/default construction, completed settings, and consuming semantic rendering.
  • Setup Outside adapter: questions, cancellation, refusal, and write/Credentials/email ordering.
  • CLI and terminal: actual User config files, permissions, atomic replacement, and the first-Run Setup offer.

Merge Danger

Door: two-way

Reversible implementation change; existing User config format and Credentials handling are preserved.

Blast Radius: Setup

User config preparation/editing and both Setup entry paths.

Unaddressed findings

Standards

None. The review against main found no Standards findings.

Spec

None. Both Spec findings were addressed: recipient-example placement at section/document boundaries (P1), and quoted-header completion idempotence (P2). Re-review found no additional gaps.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit b0edfbe into main Oct 6, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-450 branch October 6, 2026 20:00
This was referenced Oct 6, 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.

Deepen User config editing behind one validated document interface

1 participant