fix: run autonomy workers by default

This commit is contained in:
ImBenji
2026-08-03 14:43:30 +01:00
parent c4028cc394
commit 0724f5dc36
3 changed files with 23 additions and 23 deletions
+17 -12
View File
@@ -34,7 +34,6 @@ services:
- nginx_proxy_manager_default
autonomy:
profiles: [autonomy]
build:
context: .
provenance: false
@@ -47,13 +46,14 @@ services:
NODE_ENV: production
DURIIN_DB: /data/archive.sqlite
INTELLIGENCE_DB: /data/intelligence.sqlite
AUTONOMY_POLL_MS: "1000"
AUTONOMY_POLL_MS: "${AUTONOMY_POLL_MS:-5000}"
cpus: "0.50"
mem_limit: 512m
restart: unless-stopped
networks:
- nginx_proxy_manager_default
coordinator:
profiles: [autonomy]
build:
context: .
provenance: false
@@ -66,13 +66,14 @@ services:
NODE_ENV: production
DURIIN_DB: /data/archive.sqlite
INTELLIGENCE_DB: /data/intelligence.sqlite
AUTONOMY_POLL_MS: "1000"
AUTONOMY_POLL_MS: "${AUTONOMY_COORDINATOR_POLL_MS:-5000}"
cpus: "0.75"
mem_limit: 768m
restart: unless-stopped
networks:
- nginx_proxy_manager_default
autonomy-outcomes:
profiles: [autonomy]
build:
context: .
provenance: false
@@ -83,13 +84,14 @@ services:
environment:
NODE_ENV: production
INTELLIGENCE_DB: /data/intelligence.sqlite
AUTONOMY_OUTCOME_POLL_MS: "60000"
AUTONOMY_OUTCOME_POLL_MS: "${AUTONOMY_OUTCOME_POLL_MS:-60000}"
cpus: "0.25"
mem_limit: 384m
restart: unless-stopped
networks:
- nginx_proxy_manager_default
calibration:
profiles: [autonomy]
build:
context: .
provenance: false
@@ -100,13 +102,14 @@ services:
environment:
NODE_ENV: production
INTELLIGENCE_DB: /data/intelligence.sqlite
AUTONOMY_CALIBRATION_POLL_MS: "60000"
AUTONOMY_CALIBRATION_POLL_MS: "${AUTONOMY_CALIBRATION_POLL_MS:-60000}"
cpus: "0.25"
mem_limit: 384m
restart: unless-stopped
networks:
- nginx_proxy_manager_default
execution:
profiles: [autonomy]
build:
context: .
provenance: false
@@ -117,9 +120,11 @@ services:
environment:
NODE_ENV: production
INTELLIGENCE_DB: /data/intelligence.sqlite
AUTONOMY_EXECUTION_MODE: "shadow"
AUTONOMY_DEFAULT_NOTIONAL: "100"
AUTONOMY_EXECUTION_POLL_MS: "10000"
AUTONOMY_EXECUTION_MODE: "${AUTONOMY_EXECUTION_MODE:-shadow}"
AUTONOMY_DEFAULT_NOTIONAL: "${AUTONOMY_DEFAULT_NOTIONAL:-100}"
AUTONOMY_EXECUTION_POLL_MS: "${AUTONOMY_EXECUTION_POLL_MS:-10000}"
cpus: "0.25"
mem_limit: 384m
restart: unless-stopped
networks:
- nginx_proxy_manager_default
+3 -10
View File
@@ -1,8 +1,7 @@
# Duriin autonomy runtime
The autonomy runtime is additive to the existing archive and intelligence
tables. It is deliberately disabled until the paper-trading cutover is
approved.
tables. Its workers are part of the default runtime and restart automatically.
## Services
@@ -13,16 +12,10 @@ approved.
- `calibration`: creates empirical calibration snapshots and deterministic decisions.
- `intelligence`: legacy worker, available only under the `legacy` Compose profile.
Start only the API by default:
Start the API and autonomy runtime:
```bash
docker compose up -d api
```
The new runtime is explicitly opt-in:
```bash
docker compose --profile autonomy up -d autonomy coordinator autonomy-outcomes calibration
docker compose up -d
```
## Authority rules
+3 -1
View File
@@ -74,7 +74,9 @@ async function runAutonomyWorker({ archivePath, intelligencePath, workerId = `au
initAutonomySchema(intelligenceDb);
while (true) {
const job = leaseNextJob(intelligenceDb, workerId, 120);
// This worker owns maintenance reconciliation only. Without the type filter it
// can lease coordinator_event jobs and complete them without analysis.
const job = leaseNextJob(intelligenceDb, workerId, 120, ['reconcile_archive']);
if (!job) { await sleep(pollMs); continue; }
try {
if (job.job_type === 'reconcile_archive') {