Env-configurable Ollama knobs + README sync + ruff in CI - #19
Merged
jackparnell merged 1 commit intoJun 30, 2026
Merged
Conversation
Three quality-of-life improvements: 1. Env-configurable Ollama/scan settings. OLLAMA_HOST, the default model (SENTINEL_MODEL), OLLAMA_TIMEOUT, OLLAMA_CONNECT_TIMEOUT, OLLAMA_SLOW_WARN_SECONDS and SCAN_SAVE_EVERY now read from the environment via small _env_str/_env_int helpers (a bad int warns to stderr and falls back rather than crashing at import). You can switch models or tune timeouts without editing code: `SENTINEL_MODEL=qwen3.5:27b make run`. OLLAMA_HOST is the same var the ollama CLI honours. 2. README sync. The config table had drifted: model casing (now qwen3.5:9b-q4_k_m), OLLAMA_TIMEOUT (600 -> 180), and it was missing the connect-timeout / slow-warn / scan-save-every settings. Added an "Env override" column and a note on why there's no num_predict cap (thinking model). Lowercased the model in the prerequisites + pull cmd. 3. CI lint. requirements-dev pins ruff and tests.yml runs `ruff check .` before pytest. The repo already passes. Pinned by tests/test_config.py (8 tests): _env_int valid/invalid/missing/ empty, _env_str, and a reload-based check that the constants honour env. Full suite: 140 passing; ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quality-of-life follow-ups (no behaviour change to a healthy run).
1. Env-configurable Ollama knobs.
OLLAMA_HOST, the default model (SENTINEL_MODEL),OLLAMA_TIMEOUT,OLLAMA_CONNECT_TIMEOUT,OLLAMA_SLOW_WARN_SECONDS,SCAN_SAVE_EVERYnow read from the environment (bad int → warn + fall back, never crash). Switch models without a code change:SENTINEL_MODEL=qwen3.5:27b make run.2. README sync. Config table had drifted — model casing (
qwen3.5:9b-q4_k_m),OLLAMA_TIMEOUT600→180, missing connect/slow-warn/save-every rows; added an Env-override column + the no-num_predictnote.3. CI lint.
ruff check .runs before pytest (repo already passes).Tests:
test_config.py(8) — env helpers + a reload check that constants honour env. Full suite 140 passing.🤖 Generated with Claude Code