feat: RSS, tags, S3 storage, refinement pipeline, ReAct fallback, test fixes#271
feat: RSS, tags, S3 storage, refinement pipeline, ReAct fallback, test fixes#271
Conversation
Re-applies changes from prior session that were lost when remote updated local main: - #236: RSS 2.0 (/rss.xml) and Atom 1.0 (/atom.xml) feed endpoints - #230: Channel tags (tags/channel_tags tables, repo methods, endpoints) - #239: S3-compatible image storage (S3Store + ImageGenerationService wiring) - #240: Multi-step pipeline refinement (refinement_steps on ContentPipeline) - #246: ReAct fallback for Ollama models without native FC (react_agent.py) - #228: Remove duplicate cli_db fixtures from test_cli_extra/extended - #255: Migration for refinement_steps and channel_tags tables - Test model names updated from kimi-k2.5 to llama3 for import-error tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t, fixtures" This reverts commit a78bfb5.
Adds /rss.xml and /atom.xml public endpoints for collected messages. Both support channel_id and limit query params (1–200, default 50). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds tags/channel_tags tables, migration, tag CRUD on ChannelsRepository,
and REST endpoints under /channels/tags and /channels/{pk}/tags.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds S3Store class (boto3, optional). ImageGenerationService auto-uploads local adapter results to S3 when S3_ENDPOINT/S3_BUCKET/S3_ACCESS_KEY/ S3_SECRET_KEY are configured. Falls back to local path otherwise. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds refinement_steps JSON field to ContentPipeline. After initial
generation, each step's prompt (with {text} placeholder) is fed to
the LLM sequentially. New endpoints GET/POST /pipelines/{id}/refinement-steps.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…closes #246) Adds OllamaReActAgent for models in _OLLAMA_NO_NATIVE_FC (kimi-k2.5, kimi-k1.5). Uses text-based tool descriptions + JSON tool call parsing loop, bypassing deepagents tool binding. Tests updated to use llama3 for import-error path testing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed duplicate cli_db from test_cli_extra.py (identical to conftest) and duplicate cli_db from test_cli_extended.py. Both now use the shared conftest.py fixtures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The system has python3 but no python symlink, causing FileNotFoundError. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace outdated llama3.2/qwen2.5/deepseek-r1 with current top open-source models: qwen3, deepseek-v3.2, gemma3, mistral-large3, glm4.7. Default OLLAMA_DEFAULT_MODEL fallback changed from llama3.2 to qwen3. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 3m 0s —— View job Code Review — PR #271
Critical / High-severity Issues1. loop = asyncio.get_event_loop()
return await loop.run_in_executor(None, _upload)
2. RSS item item_link = f"{base_url}/search?q={html.escape(item_title[:40])}"
from urllib.parse import quote
item_link = f"{base_url}/search?q={quote(item_title[:40])}"Medium-severity Issues3. Silent swallowing of all DB exceptions in RSS/Atom — except Exception:
messages = []Any database error (connection failure, schema mismatch, aiosqlite error) silently returns an empty feed with HTTP 200. The caller (RSS reader, monitoring) has no way to distinguish "no messages" from "DB is broken." At minimum, log the exception: except Exception:
logger.exception("Failed to fetch messages for RSS feed")
messages = []4. ReAct agent system prompt is hardcoded in Russian —
5. _OLLAMA_NO_NATIVE_FC: frozenset[str] = frozenset({
"kimi-k2.5",
"kimi-k1.5",
})The PR description says this is a "ReAct fallback for Ollama models without native function calling," but many widely-used Ollama models (e.g. vanilla Llama 3, Mistral, Gemma) also don't support native function calling. The current list only covers two kimi models. If a user runs one of the hundreds of non-FC-capable Ollama models that aren't on this list, they silently get a broken agent rather than the ReAct fallback. Consider making the denylist opt-out (e.g., default to ReAct for all Ollama models unless the model is in a separate Low-severity / Notes
SummaryTwo items need fixes before merge: the |
Review triageFixed (2):
Skipped (4):
Irrelevant (2):
|
- Replace deprecated asyncio.get_event_loop() with get_running_loop() in S3Store.upload_file() (Python 3.10+ compatibility) - Add logger.exception() for silent DB errors in RSS/Atom feed endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@claude review. Focus on critical issues: bugs, security vulnerabilities, logical errors, data loss risks, performance problems. Do NOT nitpick style, naming conventions, minor formatting, or subjective preferences — only flag issues that could break functionality or cause real harm in production. |
|
Claude finished @axisrow's task in 2m 56s —— View job Code Review — PR #271 (Round 2)
Fixes VerifiedBoth items flagged in round 1 are confirmed fixed:
RSS/Atom exception logging — Remaining (deferred by author)RSS New FindingsNo new critical or high-severity issues found. Two items worth noting:
app.include_router(pipelines_router, prefix="/pipelines") # line 146
...
app.include_router(pipelines_router, prefix="/pipelines") # line 156This is a pre-existing issue not introduced by this PR, but it means all pipeline routes are registered twice — FastAPI silently deduplicates for routing but it doubles the route table. Not a blocker. SummaryBoth critical fixes from round 1 are confirmed. No new critical or high-severity issues. The RSS URL encoding deferral is the only open item. Ready to merge pending that tracking. |
Summary
/rss.xml) and Atom 1.0 (/atom.xml) public feed endpointstags/channel_tagstables, repository methods, REST endpointsS3Store+ImageGenerationServicewiring)refinement_stepsonContentPipeline)cli_db/cli_envtest fixturessys.executablein benchmark testsTest plan
ruff check src/ tests/passespytest tests/ -m "not aiosqlite_serial" -n auto— all passpytest tests/ -m aiosqlite_serial— all pass🤖 Generated with Claude Code