#0069 Configuration Validation #145

Merged
fuzzy merged 1 commit from feature/0069-configuration-validation into main 2026-07-06 07:03:19 +00:00
Owner

Adds pre-flight configuration validation with helpful error messages.

Changes:

  • src/hottea/cli.pyvalidate_environment() function, called at start of main()
  • tests/test_cli.py — 4 tests covering pass/fail conditions

Validates:

  • Git is installed on PATH
  • Current directory is inside a git repository
  • All 4 HOTTEA_FORGEJO_* environment variables are set
  • End-date format is valid ISO8601 (if provided)

On failure:

  • Prints all errors at once to stderr
  • Exits with code 1
  • Each error includes actionable guidance

Closes: #0069, #0064, #0065, #0066, #0067, #0068

Adds pre-flight configuration validation with helpful error messages. **Changes:** - `src/hottea/cli.py` — `validate_environment()` function, called at start of `main()` - `tests/test_cli.py` — 4 tests covering pass/fail conditions **Validates:** - Git is installed on PATH - Current directory is inside a git repository - All 4 `HOTTEA_FORGEJO_*` environment variables are set - End-date format is valid ISO8601 (if provided) **On failure:** - Prints all errors at once to stderr - Exits with code 1 - Each error includes actionable guidance **Closes:** #0069, #0064, #0065, #0066, #0067, #0068
feat(validate): add configuration validation with helpful errors
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m26s
bb73c22f77
Add validate_environment() that runs all pre-flight checks
before the pipeline starts with clear error messages.

- Checks git is installed and cwd is a git repo
- Checks all 4 env vars are set
- Validates end-date format (ISO8601)
- Exits with all errors at once, not just the first one

Closes #64, #65, #66, #67, #68, #69
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-06 07:02:01 +00:00
the.auditor left a comment

Audit Review — PR #145

Good pre-flight validation. Reports all errors at once with actionable messages, checks git availability, repo validity, env vars, and end-date format. Good use of existing find_repo_root and env var constants.

Suggestions

  1. src/hottea/cli.py:112 — Uses __import__("os").environ instead of a standard import os at module top. Unusual pattern — use normal import for clarity. Filed as #146.

  2. src/hottea/cli.py:93 — Catches Exception when calling find_repo_root. Should catch InvalidRepoError specifically. Filed as #147.

Summary

Result: COMMENT — 2 non-blocking suggestions filed as issues.

## Audit Review — PR #145 Good pre-flight validation. Reports all errors at once with actionable messages, checks git availability, repo validity, env vars, and end-date format. Good use of existing `find_repo_root` and env var constants. ## Suggestions 1. `src/hottea/cli.py:112` — Uses `__import__("os").environ` instead of a standard `import os` at module top. Unusual pattern — use normal import for clarity. Filed as #146. 2. `src/hottea/cli.py:93` — Catches `Exception` when calling `find_repo_root`. Should catch `InvalidRepoError` specifically. Filed as #147. ## Summary **Result:** COMMENT — 2 non-blocking suggestions filed as issues.
the.auditor left a comment

APPROVED. Pre-flight validation works end-to-end with good error messages. Non-blocking suggestions in #146, #147 — address at your leisure.

APPROVED. Pre-flight validation works end-to-end with good error messages. Non-blocking suggestions in #146, #147 — address at your leisure.
fuzzy merged commit bb73c22f77 into main 2026-07-06 07:03:19 +00:00
fuzzy deleted branch feature/0069-configuration-validation 2026-07-06 07:03:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/hottea!145
No description provided.