fix: resolve 4 Info findings from code review (IN-01 to IN-04)#13
Closed
W00DSRULES wants to merge 4 commits into
Closed
fix: resolve 4 Info findings from code review (IN-01 to IN-04)#13W00DSRULES wants to merge 4 commits into
W00DSRULES wants to merge 4 commits into
Conversation
The _coerce_budget validator used a falsy check (if not v:) which treated both None/empty-string AND 0/0.0 as "unset" — silently disabling the budget guard when the user explicitly set the cap to zero. Switched to explicit None/empty-string check so 0.0 propagates and BudgetGuard correctly blocks all calls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
apps/worker/main.py was an infinite sleep loop — never wired into docker-compose, never imported, no queue infrastructure exists. The FastAPI server handles backgrounding via in-process asyncio.create_task. Removing the stub rather than implementing a feature that was never actually planned. Updated logging and architecture docs to remove worker entrypoint references. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…module Created providers/placeholders.py as the single home for the placeholder helpers. Resolves two issues at once: - IN-02: _generate_placeholder_json was duplicated byte-for-byte between providers/adapters.py and providers/unified.py. Both now import from providers.placeholders. - IN-03: core/orchestrator/thesis_flow.py imported five private symbols (_build_placeholder_*) from providers/thesis_agents.py, creating a cross-module private-API dependency. Promoted them to public symbols in the new shared module so both thesis_agents and thesis_flow consume them through a stable public interface. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add __all__ so mypy --strict (--no-implicit-reexport) accepts the placeholder builder imports in core/orchestrator/thesis_flow.py. Co-Authored-By: Claude Opus 4.7 <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.
Follow-up to #12 — addresses the 4 Info findings left out of the previous PR.
Changes
core/config.py—_coerce_budgetvalidator now distinguishesMAX_BUDGET_USD=0(block all calls) from unset (guard disabled). Previous falsy check silently disabled the guard when the user explicitly set the cap to zero.apps/worker/main.py, an unused infinite sleep loop. Not indocker-compose.yml, never imported, no queue infrastructure exists. The FastAPI server already handles backgrounding via in-processasyncio.create_task. Updated docs (architecture.md,DEVELOPMENT.md) and thecore/logging.pydocstring to drop worker references.providers/placeholders.pyas the single home for placeholder helpers. Resolves both:_generate_placeholder_jsonwas duplicated byte-for-byte betweenproviders/adapters.pyandproviders/unified.py— both now import from the shared module.core/orchestrator/thesis_flow.pyimported five_build_placeholder_*private symbols across module boundaries fromproviders/thesis_agents.py. Promoted to public symbols in the new shared module.Verification
pytest tests/)E,W,F,I(no E501): clean🤖 Generated with Claude Code