Skip to content

Comments

feat: deploy branch — all fixes and features for production#158

Open
adryserage wants to merge 13 commits intospacedriveapp:mainfrom
adryserage:deploy
Open

feat: deploy branch — all fixes and features for production#158
adryserage wants to merge 13 commits intospacedriveapp:mainfrom
adryserage:deploy

Conversation

@adryserage
Copy link
Contributor

@adryserage adryserage commented Feb 23, 2026

Summary

Complete deploy branch ready for production. Includes all fixes, features, and CI compatibility changes:

Fixes

  • Dockerfile Railway compatibility: Remove VOLUME keyword (banned by Railway), remove BuildKit cache mounts
  • Body size limit: Add DefaultBodyLimit::max(100MB) — file uploads were silently failing at axum's 2MB default
  • PDF extraction panic safety: Wrap pdf_extract in catch_unwind to handle malformed CFF fonts gracefully
  • API error messages: Extract error messages from multiple response formats (OpenAI, Gemini status, FastAPI detail, top-level message)
  • Switch controlled warning: Default SwitchField.value to false to prevent React warning
  • Compilation fixes: reqwest::Url instead of missing url crate, axum 0.8 State extractor pattern
  • Gemini thought_signature: Capture and echo back thought_signature from Gemini 2.5+ thinking models — fixes 400 errors
  • CI fixes: Resolve all fmt, clippy, and test failures for Rust 1.93

Features

  • Auto display name toggle: New auto_display_name setting in cortex config — when disabled, agent ID is used as display name instead of cortex-generated name
  • Delete agent button: More visible with red styling and explicit "Delete Agent" label
  • Custom Anthropic env vars: Support for custom environment variable configuration

Test plan

  • Deploy to Railway — verify no Dockerfile build errors
  • Upload a file >2MB via ingestion UI — should succeed
  • Upload a PDF with malformed fonts — should log error, not panic
  • Use a Gemini 2.5+ model with thinking enabled — tool calls should work without 400 errors
  • Toggle auto_display_name off — agent should use its ID as display name
  • Delete agent button should be clearly visible in red
  • Toggle a Switch in the UI — no console warning

- Add DefaultBodyLimit::max(100MB) to API router for file uploads
- Default SwitchField.value to false to prevent uncontrolled→controlled
- Wrap pdf_extract calls in catch_unwind to gracefully handle panics
  from malformed fonts (e.g. cff-parser encoding errors) instead of
  crashing the worker thread
- Extract error messages from multiple API response formats (OpenAI,
  Gemini, FastAPI) instead of showing "unknown error" on 4xx/5xx
- Run cargo fmt on all files with formatting drift
- Fix context_dump test: handle Result from render_channel_prompt
- Fix bold+italic nested HTML in Telegram markdown converter by
  processing ***...*** before ** and * patterns separately
- cargo fmt with Rust 1.93 formatting rules (20 files)
- Fix clippy collapsible_if warnings (auto-fixed)
- Fix clippy let-else → ? operator in config.rs
- Fix clippy items-after-test-module in scheduler.rs
- Allow too_many_arguments on TwitchAdapter::new
When disabled, the agent ID is used as the display name instead of a cortex-generated name. Users can toggle this in the cortex settings section.
Gemini 2.5+ thinking models return a thought_signature with function
calls that must be echoed back in subsequent turns. Without it, the
API rejects requests with a 400 error.
@adryserage adryserage changed the title fix: Railway deployment fixes and ingestion robustness feat: deploy branch — all fixes and features for production Feb 23, 2026
Add runtime state checks (runtime_configs, agent_pools) in addition
to config-level existence check. An agent may survive in runtime even
after being removed from config during hot-reload, keeping its redb
file locked. Now returns a clear error instead of a 500.
When config.toml contains duplicate [[agents]] entries (e.g. from
repeated create_agent API calls), redb panics with "Database already
open" because the same agent is initialized twice.

- Deduplicate agents by ID during config parsing (last definition wins)
- Add TOML-level existence check in create_agent to prevent writing
  duplicate entries
- Add runtime state checks (runtime_configs, agent_pools) to catch
  agents that survive config hot-reload
@Marenz
Copy link
Collaborator

Marenz commented Feb 23, 2026

When you say "all fixes" what fixes specifically do you mean? The open PRs?

@Marenz
Copy link
Collaborator

Marenz commented Feb 23, 2026

Or just things you found unrelated to any other PRs?

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.

2 participants