feat(validate+watch): H23 bare-sleep rule + watchdog recommendation -- closes #184 #182#186
Merged
Merged
Conversation
#182 #184 — H23: No Bare Sleep Delays in Scripts - Add H23 to docs/governance/RULES.md and rules.md.j2 scaffold template - Add _check_bare_sleep() to validator.py: scans .sh/.ps1/.cmd/.bash for bare sleep/Start-Sleep without any loop/retry context (for/while/ until/max_retries/retry). Flags as a warning; files with loop context are exempt (sleep inside a polling loop is intentional). - Wire into run_validate() alongside _check_blocking_loops() #182 — watchdog recommendation - Improve specsmith watch message: shows interval, explains how to add watchdog>=4.0 to pyproject.toml [project.optional-dependencies].dev - Add watchdog>=4.0 to the pyproject.toml.j2 scaffold template so new projects get it in their dev extras automatically Co-Authored-By: Oz <oz-agent@warp.dev>
This was referenced May 20, 2026
tbitcs
added a commit
that referenced
this pull request
May 21, 2026
* fix(agent/run): silent no-response + provider visibility — closes #186-followup Root causes of specsmith run returning nothing: 1. DEFAULT_OLLAMA_MODEL=qwen2.5:7b not installed; Ollama 404 silently swallowed 2. run_chat returning None gave user zero feedback 3. EventEmitter always wrote JSONL even in interactive terminal mode Fixes: - chat_runner: _pick_ollama_model() queries /api/tags and selects the first installed model from a preference list (lighter models first); falls back to DEFAULT_OLLAMA_MODEL only when the API is unreachable or list is empty. SPECSMITH_OLLAMA_MODEL env var still wins unconditionally. - runner: _handle_command() prints an actionable hint when run_chat returns None — explains whether Ollama is running (with model name) or no provider is available at all. - events: PlainTextEmitter subclass — token() writes raw text to stdout, emit() is a no-op. Used by AgentRunner when json_events=False so LLM responses render as readable prose instead of JSONL blobs. - runner: check_providers() probes all four providers (Ollama, Anthropic, OpenAI, Gemini) and returns ProviderStatus(name, available, model, note). - runner: _print_banner() shows a provider status table in interactive mode so the user knows upfront which model will respond before typing. - cli: specsmith run --check validates providers and exits 0/1 without starting the REPL. - run_interactive: adds a trailing newline after each streamed response so the next prompt doesn't bleed onto the last output line. 19 new tests in test_agent_run_feedback.py (854 total, 0 failures). Co-Authored-By: Oz <oz-agent@warp.dev> * style: ruff format cli.py Co-Authored-By: Oz <oz-agent@warp.dev> * style: fix import sort in test_agent_run_feedback.py Co-Authored-By: Oz <oz-agent@warp.dev> --------- Co-authored-by: Oz <oz-agent@warp.dev>
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.
Closes #184, closes #182. See commit message for full details. 831 tests passing.
Co-Authored-By: Oz oz-agent@warp.dev