BrainOS

BrainOS TODO

A living list of what's deliberately deferred and what's still open, as of 2026-09-01. Detailed incident history belongs in git log (this repo's commit messages are written as full incident/design writeups on purpose), not here. Keep it this way: when something here gets fixed, delete the line instead of turning it into a paragraph.

Still to do

  1. restructure_stalled's oversized-leaf recovery path has no per-module claim lock. advance()'s main path (_decompose_or_defer, and the depth-limit materialize_task call) now takes a Postgres advisory lock per module before two concurrent autonomy lanes can decompose or materialize it (see Settings.autonomy_parallel_lanes, added 2026-09-01). restructure_stalled's own oversized-leaf-to-decompose call (_decompose_if_oversized) was deliberately left unprotected: it's a rarer batch-recovery path (only reached when next_actionable finds nothing), and a collision there just means one leaf gets decomposed twice - wasteful, not corrupting. Worth closing if it's ever observed live, not urgent enough to hold up the main fix.
  2. Watch whether the new parallel autonomy lanes actually help. AutonomousLoop.begin_tick and Supervisor.run_once no longer serialize the whole autonomy loop to one lane (a strict "one AutonomyRun running anywhere" check and an unparameterized global Redis lock both did, despite the underlying task/module selection already being safe for concurrent access via row-level and advisory locking). Confirm live that two lanes actually run concurrently against independent work, that GPU utilization reflects it, and that no advisory-lock contention or DB pool exhaustion shows up under real load before raising autonomy_parallel_lanes past 2.
  3. Push the paper-focus anchor's remaining research past the planning stage. The current publication-focus module (brain model-role-list/ the problem tree will show the live one; as of this writing it compares three ML-fault-localization methods on real ONNX Runtime/PyTorch regressions) has zero implementation started — every child branch is still being broken down into smaller experiment-design tasks, and one sub-branch (designing the pre-registration protocol) has repeatedly stalled during that breakdown. The 45-minute decompose timeout and 3-strikes hosted escalation (see "Local generative models" in README) bound the cost of a stall now; they don't substitute for the literature and experiment-design work itself still being needed.
  4. Observe whether wiring the remaining call sites onto the idle-model pool changes throughput. supervisor.py's generic task cycle, purpose.py's opportunity discovery and paper drafting, paper_pipeline.py's worthiness/drafting, workflows.py's memory consolidation, and the research API/CLI now balance across both residents instead of always using one assigned model. Watch whether idle GPU time actually drops and whether previously single-model-bound lanes (e.g. memory consolidation) start completing measurably faster.
  5. Audit SearXNG's remaining default engines. Only duckduckgo, brave, startpage, and wikidata were disabled (2026-09-01, confirmed CAPTCHA/rate-limited from this host's shared proxy IP); google cse and wikipedia were confirmed working, but the rest of use_default_settings's ~50 engines are unvetted. Revisit if search result quality or latency becomes a recurring complaint.
  6. TriageService._prompt (triage.py) still passes a large pre-digested bundle (tree, branch_summary, workspaces, publication_feedback as curated JSON, distinct from the policy/semantics text that should stay) to a hosted agent with real tool access, unlike the twice-daily review and active-mode coding prompts, which were rewritten to have the agent query the tree/workspaces/database itself. The fix is dropping the four data-dump arguments, not a wholesale rewrite.
  7. Repeat-verify Codex OSS's hardened completion path. It runs prompt-free YOLO with an execution-first contract, rejects actionless/untested results, requires a tool-created completion marker, and gets one corrective pass under the same deadline. Repeatability across models/tasks is still not fully characterized.
  8. Finish and observe outcome-memory backfill. Automatic planning cycles continue the idempotent backfill from the first bounded batch. Monitor duplicate-reuse audit events, false-positive lexical matches, and whether cross-project repetition actually falls before increasing the comparison window.
  9. Add a small real-Postgres integration gate. The unit suite still cannot catch transaction-lifecycle and async ORM failures. Cover mutate/commit/reload/serialize, notification deduplication, and concurrent admission against throwaway PostgreSQL.
  10. Make degraded scheduled results operationally distinct from success. A benchmark or research stage returning status=degraded can still sit inside a completed job run. Propagate degraded status into dashboard/alerts.
  11. Verify backup restore, not just archive creation. brainos-backup.timer is installed and has been producing a daily snapshot in backups/runtime/ (confirmed current as of this writing); what's still unverified is a full restore drill, not just archive existence.
  12. Attest context consumption, not only availability. Every local generative role runs through Codex OSS with role-relevant durable state assembled into its prompt/workspace bundle. Bundle audits prove availability; add bounded evidence showing which supplied records actually influenced a result, without incentivizing indiscriminate context.
  13. Remove the stale Ollama systemd drop-in. /etc/systemd/system/ollama.service.d/20-brainos-concurrency.conf still sets OLLAMA_MAX_LOADED_MODELS=2; brainos.conf (loaded after it alphabetically) sets =3 and wins today, so behavior is correct, but the superseded file is confusing leftover config. Root-owned — prepare the removal for the owner to apply per CLAUDE.md rule 9.
  14. Route or retire long-orphaned proposed tasks with no CodingJob at all. A task in proposed state with neither a queued coding job nor supervisor eligibility (proposed isn't ready) will never be picked up by anything. Worth a periodic sweep distinguishing genuinely stale/superseded ones from ones that just need re-routing, rather than a one-time list (the specific tasks named in past incidents have long since resolved one way or another).

Known open threads (not yet actionable; watch for recurrence)

Deferred by design (explicit decision, not yet started)

Sleep-phase model tuning (LoRA/QLoRA, "fast methods", smaller models)

Owner decision: pushed to the far future, deliberately not scoped as near-term work. ImprovementCycleService._tuning_readiness() only ever reports "automatic_training": False — training examples accumulate (TrainingExample, tuning-export CLI command) but nothing ever launches a training job, creates an adapter, merges one, or retires one. This host's two Titan RTX GPUs (48GiB total) are already fully committed at inference time to keeping two resident models warm; there is no VRAM headroom left to also run a training job without evicting one of them, and training is far more VRAM-hungry per parameter than inference even with LoRA/QLoRA. Revisit only if a second, separate machine is ever dedicated to training. If picked up, it still needs: a reviewed, reproducible LoRA/QLoRA recipe; a bounded, cheap "does this look worth it" check before spending GPU time; and a full adapter lifecycle (create, benchmark, promote/discard, retire).

Implemented but currently dormant

Domain-expert model routing

The planner judges a domain (e.g. "medicine", "law", "physics") per decomposition candidate in the same structured-output call that already judges requires_implementation, stored on Module.domain. Routing (model_registry.resolve_domain_model, CodingCycleService._role_model) tries a "role:domain"-keyed model_roles row first, falling back to the plain generalist role whenever none exists or is installed. Wired into the coding pipeline's implementer role only, not the generic Supervisor/Director path or research synthesis. This is a routing mechanism only — it never installs a model, and with no domain-expert models actually installed, every domain-qualified lookup falls through to the generalist role today.

Open architecture questions (need a decision, not just code)