ulysses/src
lekt8 0ec8415f0e
Fix multi-file uploads tripping the per-IP concurrency guard (#1346) (#1362)
* Stop multi-file uploads from tripping the per-IP concurrency guard

The /api/upload concurrency check summed its condition over `files`, but the
condition didn't reference the loop variable — so it collapsed to len(files)
whenever the IP had any recent upload. A single multi-file batch sent right
after another upload therefore counted itself as N concurrent uploads and hit
max_concurrent_uploads (3), returning 429. The browser swallows the 429 (no
`files` in the body) and sends the chat with no attachments, so the model
"doesn't even see" them (issue #1346).

Count genuine recent upload events instead, via a pure count_recent_uploads()
helper, independent of the current batch's file count. save_upload still
enforces the per-minute sliding-window rate limit per file, so throttling is
preserved.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Also reconcile the per-minute upload rate limit with the batch cap

Follow-up within #1346: even after the concurrency-guard fix, a 6+ file batch
still failed because save_upload() counts each file against upload_rate_limit
(was 5/min) while the composer allows MAX_FILES=10 per batch — the reporter saw
"5 attachments work, 6 fail". Raise the per-minute file cap to 60 so a single
full batch (and a few of them) isn't self-rejected; burst abuse stays bounded by
max_concurrent_uploads. Add a real 6-file regression + a config guard that the
cap exceeds the frontend MAX_FILES.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 04:04:19 +09:00
..
search fix: research query misclassifies 'whatsapp'/'however' as questions (#1247) 2026-06-03 01:10:06 +09:00
action_intents.py Route calendar action requests to tools 2026-06-01 14:32:41 +09:00
agent_loop.py Route "read that report" to manage_research instead of the HTML render (#1375) 2026-06-03 03:24:09 +09:00
agent_runs.py Handle incomplete detached agent streams 2026-06-01 16:54:11 +09:00
agent_tools.py Add SSRF-guarded web fetch agent tool 2026-06-01 16:57:28 +09:00
ai_interaction.py feat(ai): add OpenRouter and Ollama Cloud providers (#231) 2026-06-01 14:26:10 +09:00
api_key_manager.py API keys: skip undecryptable entries on load 2026-06-02 20:28:26 +09:00
app_helpers.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
app_initializer.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
assistant_log.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
auth_helpers.py Attribute API-token sessions to the token owner (effective_user) (#871) 2026-06-02 11:39:01 +09:00
bg_jobs.py chore: use explicit utf-8 for shell job files (#820) 2026-06-02 11:12:13 +09:00
bg_monitor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
builtin_actions.py Scope skills usage by owner (#1312) 2026-06-03 02:27:43 +09:00
builtin_mcp.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
caldav_sync.py Harden CalDAV credentials and URLs (#1310) 2026-06-03 02:50:02 +09:00
caldav_writeback.py feat: CalDAV write-back — push local event create/update/delete to the remote (#800) (#1282) 2026-06-03 01:44:02 +09:00
chat_handler.py Use LM Studio-reported vision capability for image passthrough (#1130) 2026-06-02 23:01:04 +09:00
chat_helpers.py Use LM Studio-reported vision capability for image passthrough (#1130) 2026-06-02 23:01:04 +09:00
chat_processor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
chroma_client.py fix: ChromaDB unreachable blocks app startup for 30-60s (#326) (#476) 2026-06-01 22:22:41 +09:00
cleanup_service.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
config.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
constants.py Align SearXNG fallback URL 2026-06-01 10:50:07 +09:00
context_budget.py feat: adapt agent_input_token_budget to the model context window (#1170) (#1230) 2026-06-03 00:13:53 +09:00
context_compactor.py Preserve system messages during context compaction 2026-06-01 23:10:58 +09:00
database.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
deep_research.py Inject current date into deep research planning and query prompts (#1347) 2026-06-03 03:00:52 +09:00
document_actions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
document_processor.py Documents: strip PDF marker without corrupting text 2026-06-02 20:35:27 +09:00
email_thread_parser.py Email: recognize forwarded message dividers 2026-06-02 20:32:56 +09:00
embeddings.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
endpoint_resolver.py Harden session endpoint owner scope (#1308) 2026-06-03 02:40:22 +09:00
event_bus.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
exceptions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
goal_based_extractor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
integrations.py Secure by default uplift (#511) 2026-06-01 22:30:07 +09:00
llm_core.py fix: surface reasoning_content when content is empty (thinking models) (#1233) 2026-06-03 01:41:24 +09:00
markitdown_runtime.py Add optional markitdown extraction for Office/EPUB documents (#766) 2026-06-02 11:28:52 +09:00
mcp_manager.py fix(mcp): invalidate tool prompt cache on connect/disconnect/error (#1235) 2026-06-03 00:49:29 +09:00
memory.py Fix AttributeError on bullet lines in extract_memory_from_chat (#873) 2026-06-02 11:46:06 +09:00
memory_vector.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
model_context.py Models: prefer longest known context match 2026-06-02 20:33:09 +09:00
model_discovery.py Discover LM Studio via host/port scanning and native-API fingerprint (#1126) 2026-06-02 23:04:58 +09:00
pdf_form_doc.py Harden PDF document markers against cross-owner upload access (#445) 2026-06-01 22:38:14 +09:00
pdf_forms.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
pdf_runtime.py Show a clear message when PyMuPDF is missing 2026-06-01 18:27:17 +09:00
personal_docs.py Ignore invalid personal docs state (#1401) 2026-06-03 04:02:16 +09:00
preset_manager.py Presets: fill missing built-in defaults on load 2026-06-02 20:32:08 +09:00
prompt_security.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rag_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rag_singleton.py Re-enable VectorRAG init with lazy retry 2026-06-01 14:32:13 +09:00
rag_vector.py fix(rag): use a stable hash for document IDs so dedup survives restarts (#1098) 2026-06-02 22:42:23 +09:00
rate_limiter.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
readiness.py feat: add /api/ready readiness probe (DB, data dir, local-first) (#1200) 2026-06-02 23:33:22 +09:00
request_models.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
research_handler.py Inject current date into deep research planning and query prompts (#1347) 2026-06-03 03:00:52 +09:00
research_utils.py fix: deep research discards valid sources mentioning cookies/copyright (#481) 2026-06-01 22:26:37 +09:00
secret_storage.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
session_actions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
settings.py Fall back from invalid settings stores (#1416) 2026-06-03 03:53:05 +09:00
settings_scrub.py Deep-scrub secrets from public settings 2026-06-01 23:11:50 +09:00
task_endpoint.py Harden session endpoint owner scope (#1308) 2026-06-03 02:40:22 +09:00
task_scheduler.py fix: once-schedule comparison uses local time against UTC date (#1349) 2026-06-03 03:07:00 +09:00
teacher_escalation.py Treat Venice as a tool-capable SOTA cloud provider (#1173) 2026-06-02 23:03:46 +09:00
text_helpers.py Text: strip dangling think blocks after visible text 2026-06-02 20:36:37 +09:00
tool_execution.py fix(tools): strict path confinement with sensitive-subpath deny list (#1072) 2026-06-02 23:13:30 +09:00
tool_implementations.py fix: MCP reconnect via tool passes only server_id to connect_server (#1385) 2026-06-03 03:46:07 +09:00
tool_index.py Polish email and cookbook flows 2026-06-02 22:42:07 +09:00
tool_parsing.py fix(agent): map native google_search and surface empty rounds 2026-06-02 12:57:45 +09:00
tool_schemas.py fix: RRULE added to schema (#1322) 2026-06-03 02:47:14 +09:00
tool_security.py Tools: restrict app_api and serve_preset to admins 2026-06-02 20:29:47 +09:00
topic_analyzer.py Topics: hydrate session history before analysis 2026-06-02 20:44:27 +09:00
upload_handler.py Fix multi-file uploads tripping the per-IP concurrency guard (#1346) (#1362) 2026-06-03 04:04:19 +09:00
url_safety.py fix: SSRF hardening for the custom embedding endpoint URL (#132) (#1206) 2026-06-02 23:46:33 +09:00
visual_report.py Fix visual report chapter navigation (#505) 2026-06-01 22:26:13 +09:00
webhook_manager.py Webhook: block IPv6 SSRF bypasses 2026-06-02 20:28:12 +09:00
youtube_handler.py YouTube: enforce comment fetch timeout while waiting 2026-06-02 20:44:24 +09:00