Skip to content

fix: resolve 4 Info findings from code review (IN-01 to IN-04)#13

Closed
W00DSRULES wants to merge 4 commits into
mainfrom
fix/code-review-findings
Closed

fix: resolve 4 Info findings from code review (IN-01 to IN-04)#13
W00DSRULES wants to merge 4 commits into
mainfrom
fix/code-review-findings

Conversation

@W00DSRULES
Copy link
Copy Markdown
Collaborator

Follow-up to #12 — addresses the 4 Info findings left out of the previous PR.

Changes

  • IN-04core/config.py_coerce_budget validator now distinguishes MAX_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.
  • IN-01 — Removed apps/worker/main.py, an unused infinite sleep loop. Not in docker-compose.yml, never imported, no queue infrastructure exists. The FastAPI server already handles backgrounding via in-process asyncio.create_task. Updated docs (architecture.md, DEVELOPMENT.md) and the core/logging.py docstring to drop worker references.
  • IN-02 / IN-03 — Created providers/placeholders.py as the single home for placeholder helpers. Resolves both:
    • _generate_placeholder_json was duplicated byte-for-byte between providers/adapters.py and providers/unified.py — both now import from the shared module.
    • core/orchestrator/thesis_flow.py imported five _build_placeholder_* private symbols across module boundaries from providers/thesis_agents.py. Promoted to public symbols in the new shared module.

Verification

  • 123 tests pass (pytest tests/)
  • ruff E,W,F,I (no E501): clean
  • black: clean

🤖 Generated with Claude Code

imer and others added 4 commits May 9, 2026 11:00
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>
@W00DSRULES W00DSRULES closed this May 15, 2026
@W00DSRULES W00DSRULES deleted the fix/code-review-findings branch May 15, 2026 14:09
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.

1 participant