Repository navigation
Sync chat routing, evaluation, and personal storage updates - #242
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c324d57188
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| name = next( | ||
| candidate for candidate in numbered_names(art["filename"]) | ||
| if not files.occupied(space, f"{directory}/{candidate}" if directory else candidate) | ||
| ) |
There was a problem hiding this comment.
Reserve deliverable filenames atomically with the space write
When two conversations for the same user concurrently pin different files named, for example, report.txt, both calls can pass files.occupied() before either copy starts. SpaceFiles.copy_from() and write() lock only their individual writes and allow overwriting existing files, so the second copy silently replaces the first while both deliveries report success. A deterministic concurrent exercise of this function reproduced two successful results with only one working-space file remaining. Hold the space lock across filename selection and creation, or use create-if-absent semantics with collision retries; add a concurrent same-name delivery test that verifies both files survive.
Useful? React with 👍 / 👎.
| def upgrade() -> None: | ||
| op.execute( | ||
| sa.text( | ||
| "UPDATE scheduled_tasks SET status = 'disabled', next_run_at = NULL, " | ||
| "manual_trigger_at = NULL, last_error = :message WHERE task_type = 'plan'" |
There was a problem hiding this comment.
Apply plan-schedule retirement to SQLite upgrades too
On an existing desktop SQLite installation with active plan schedules, this retirement never runs: core/db/engine.py explicitly skips Alembic and instead uses startup schema reconciliation/data repairs, and neither those paths nor features/automation/schema.py performs this update. The schedules therefore remain active after upgrade, but automation_dispatch.execute_task() no longer handles plan, so their next executions fail with Unknown task type: plan rather than appearing as intentionally retired schedules. Add an equivalent SQLite startup repair that disables these rows and clears both triggers, and test upgrading an existing active plan schedule.
AGENTS.md reference: AGENTS.md:L18-L19
Useful? React with 👍 / 👎.
Purpose and behavior
Change walkthrough
src/backend/api/routes/v1/chat_modes.pyandsrc/backend/core/chat/mode_router.pyinto the existing run pipeline. Turn completion queues the evaluation decision and exposes it throughsrc/backend/api/routes/v1/chats/evaluations.py. Delivery writes throughsrc/backend/core/files/artifacts/service.py, andsrc/backend/alembic/versions/ce_0049_retire_plan_automations.pyretires old schedules.Risk and compatibility
Verification
Recovery
Review follow-up