Skip to content

doctor: surface settings resolution problems as warnings - #164

Merged
coordt merged 1 commit into
mainfrom
159-doctor-settings-warnings
Aug 16, 2026
Merged

doctor: surface settings resolution problems as warnings#164
coordt merged 1 commit into
mainfrom
159-doctor-settings-warnings

Conversation

@coordt

@coordt coordt commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

  • doctor's config line now reports all five settings (docs_dir, repo_root, branch_prefix, batch_byte_cap, batch_file_cap) and each field's resolution source, not just docs_dir.
  • Adds three new [warn] conditions, matching the existing severity split (warnings, not report.ok/exit-1 failures):
    • both .wiki-toolkit.toml and pyproject.toml's [tool.wiki_toolkit] table present
    • repo_root resolution failed (no .git found walking up) and fell back to cwd
    • a promoted setting's resolved value was invalid and fell back to default, naming the source that supplied the bad value
  • settings.py gets a new diagnose_settings() used only by doctor; build_context()'s public signature is unchanged.

Closes #159.

Test plan

  • pytest (276 passed)
  • ruff check, mypy clean on changed files
  • New unit tests on run_doctor()/DoctorReport for each new warning condition (tests/test_doctor.py)
  • New CLI-level tests for each warning (tests/test_cli.py)
  • Fixed the doctor console example in docs/tutorials/index.md to match the new output shape

Expand doctor's config line to all five settings and their sources,
and add three new [warn] conditions: dedicated-file + pyproject table
both present, repo_root falling back to cwd with no .git found, and
a promoted setting's value being invalid and falling back to default.
All are warnings, matching the existing severity split (never gate
report.ok / exit 1).
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callowayproject.github.io/wiki-toolkit/pr-preview/pr-164/

Built to branch gh-pages at 2026-08-16 13:00 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Version hint: patch
Current version: 0.28.2
New version (when merged): 0.28.3

Comment ID: Display version hint-auto-generated

@coordt
coordt merged commit 686e55f into main Aug 16, 2026
7 checks passed
@coordt
coordt deleted the 159-doctor-settings-warnings branch August 16, 2026 13:02
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.

doctor: surface settings resolution problems as warnings

1 participant