Task: Investigate decommissioning ores.controller.service and its DB tables
Table of Contents
This page documents a task in the Systemd resource management and per-environment isolation story. It captures the goal, current status, acceptance, and any notes or results.
Goal
The split-services-into-per-service-containers story moved process
launch/lifecycle from ores.controller.service=/=process_supervisor
to systemd cascading. That story's own follow-up work is tracked
elsewhere; this task is specifically about auditing what's left over
in the DB/codebase now that the controller no longer launches
anything: is the ores.controller.service binary/=process_supervisor=
code itself still built and shipped, and are there any
ores_controller_* tables/columns that are genuinely dead (not the
service_definitions=/=service_dependencies tables, which
systemd_generate.py actively reads as its source of truth)?
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Systemd resource management and per-environment isolation |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-08-04 |
Acceptance
- Inventory: is
ores.controller.service=/=process_supervisorstill built/deployed anywhere, or already fully replaced by systemd? - Inventory: which
ores_controller_*DB tables/columns are still load-bearing (service_definitions=/=service_dependencies, read bysystemd_generate.py) vs. genuinely dead. - A decision recorded (here or as a follow-up task) on what to actually remove, with nothing removed speculatively before this audit confirms it's dead.
Plan
- Grep the full repo (excluding
build/,venv/) forprocess_supervisorandores.controllerreferences in code, CMake, and SQL, and checkprojects/for any remainingores.controller*directory. - Enumerate every
ores_controller_*table (projects/ores.sql/create/controller/) and grep the full repo for readers/writers of each. - Cross-reference against
systemd_generate.pyto confirm which tables it actually reads. - Record findings and file a follow-up capture for anything found dead, rather than removing it in this audit-only task.
Notes
Confirmed the binary/code side is already fully gone – this was
Sprint 24's decommission-controller-service task (PR #1806): no
projects/ores.controller* directory exists, and the only remaining
process_supervisor=/=ores.controller string hits in the whole repo
(outside build/) are historical/documentary, in
systemd_generate.py's and compass_services.py's own docstrings
explaining why the DB-driven systemd approach replaced it, and in
how_do_i_start_services.org, which already states plainly that
ores.controller.service=/=process_supervisor "were decommissioned
once this landed."
DB side: projects/ores.sql/create/controller/ has four tables –
ores_controller_service_definitions_tblandores_controller_service_dependencies_tbl– confirmed still load-bearing:systemd_generate.py'sfetch_service_definitions()=/ =fetch_dependencies()query them live as the source of truth forcompass systemd generate. Not dead, and not this task's to touch; a separate capture (6E3720AB, already filed) proposes moving this static topology into a codegen model instead of a DB round-trip – a bigger, separate piece of work.ores_controller_service_instances_tbl(PID/phase/restart-count bookkeeping, one row per running instance) andores_controller_service_events_tbl(a TimescaleDB hypertable event log of start/stop/crash transitions) – genuinely dead. Both were the controller's own Kubernetes-style Pod/Event bookkeeping for processes it launched and supervised; a full-repo grep for both table names found zero readers or writers anywhere in C++, Python, or SQL. systemd's own unit state and journal replaced this function entirely; nothing populates or queries these tables post-migration.
Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario, run
through the QA Validation Runner panel) that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
PRs
| PR | Title |
|---|---|
| #1841 | [agile] Audit ores.controller.service decommission: binary gone, 2 tables dead |
Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | New capture not registered in the autogenerated inbox index (flagged by all 4 review passes) | doc/agile/product_backlog/inbox.org | Fixed | Ran regenerate_backlog_indexes.py; the capture now has a row. |
| 2 | Status table cells (State/Next/Last touched) have leftover padding from previous longer values, columns misaligned | task_investigate_decommission_controller_tables.org | Fixed | Re-aligned the table. |
Result
Audit complete, decision recorded, nothing removed speculatively:
ores.controller.service=/=process_supervisorbinary and code: 100% gone already (Sprint 24, PR #1806). No further action.ores_controller_service_definitions_tbl=/=dependencies_tbl: still load-bearing (systemd_generate.py's source of truth). Not touched; their eventual codegen migration is tracked separately (capture6E3720AB).ores_controller_service_instances_tbl=/=events_tbl: genuinely dead, zero remaining readers/writers repo-wide. Filed as a follow-up capture rather than dropped here, since dropping tables is a real migration (projects/ores.sql/drop/controller/already has the drop scripts ready) that deserves its own task/PR, not a speculative deletion tacked onto an audit-only task. See Drop dead ores_controller_service_instances_tbl/events_tbl.