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 - nginx_proxy_manager_default
autonomy: autonomy:
profiles: [autonomy]
build: build:
context: . context: .
provenance: false provenance: false
@@ -47,13 +46,14 @@ services:
NODE_ENV: production NODE_ENV: production
DURIIN_DB: /data/archive.sqlite DURIIN_DB: /data/archive.sqlite
INTELLIGENCE_DB: /data/intelligence.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 restart: unless-stopped
networks: networks:
- nginx_proxy_manager_default - nginx_proxy_manager_default
coordinator: coordinator:
profiles: [autonomy]
build: build:
context: . context: .
provenance: false provenance: false
@@ -66,13 +66,14 @@ services:
NODE_ENV: production NODE_ENV: production
DURIIN_DB: /data/archive.sqlite DURIIN_DB: /data/archive.sqlite
INTELLIGENCE_DB: /data/intelligence.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 restart: unless-stopped
networks: networks:
- nginx_proxy_manager_default - nginx_proxy_manager_default
autonomy-outcomes: autonomy-outcomes:
profiles: [autonomy]
build: build:
context: . context: .
provenance: false provenance: false
@@ -83,13 +84,14 @@ services:
environment: environment:
NODE_ENV: production NODE_ENV: production
INTELLIGENCE_DB: /data/intelligence.sqlite 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 restart: unless-stopped
networks: networks:
- nginx_proxy_manager_default - nginx_proxy_manager_default
calibration: calibration:
profiles: [autonomy]
build: build:
context: . context: .
provenance: false provenance: false
@@ -100,13 +102,14 @@ services:
environment: environment:
NODE_ENV: production NODE_ENV: production
INTELLIGENCE_DB: /data/intelligence.sqlite 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 restart: unless-stopped
networks: networks:
- nginx_proxy_manager_default - nginx_proxy_manager_default
execution: execution:
profiles: [autonomy]
build: build:
context: . context: .
provenance: false provenance: false
@@ -117,9 +120,11 @@ services:
environment: environment:
NODE_ENV: production NODE_ENV: production
INTELLIGENCE_DB: /data/intelligence.sqlite INTELLIGENCE_DB: /data/intelligence.sqlite
AUTONOMY_EXECUTION_MODE: "shadow" AUTONOMY_EXECUTION_MODE: "${AUTONOMY_EXECUTION_MODE:-shadow}"
AUTONOMY_DEFAULT_NOTIONAL: "100" AUTONOMY_DEFAULT_NOTIONAL: "${AUTONOMY_DEFAULT_NOTIONAL:-100}"
AUTONOMY_EXECUTION_POLL_MS: "10000" AUTONOMY_EXECUTION_POLL_MS: "${AUTONOMY_EXECUTION_POLL_MS:-10000}"
cpus: "0.25"
mem_limit: 384m
restart: unless-stopped restart: unless-stopped
networks: networks:
- nginx_proxy_manager_default - nginx_proxy_manager_default
+3 -10
View File
@@ -1,8 +1,7 @@
# Duriin autonomy runtime # Duriin autonomy runtime
The autonomy runtime is additive to the existing archive and intelligence The autonomy runtime is additive to the existing archive and intelligence
tables. It is deliberately disabled until the paper-trading cutover is tables. Its workers are part of the default runtime and restart automatically.
approved.
## Services ## Services
@@ -13,16 +12,10 @@ approved.
- `calibration`: creates empirical calibration snapshots and deterministic decisions. - `calibration`: creates empirical calibration snapshots and deterministic decisions.
- `intelligence`: legacy worker, available only under the `legacy` Compose profile. - `intelligence`: legacy worker, available only under the `legacy` Compose profile.
Start only the API by default: Start the API and autonomy runtime:
```bash ```bash
docker compose up -d api docker compose up -d
```
The new runtime is explicitly opt-in:
```bash
docker compose --profile autonomy up -d autonomy coordinator autonomy-outcomes calibration
``` ```
## Authority rules ## Authority rules
+3 -1
View File
@@ -74,7 +74,9 @@ async function runAutonomyWorker({ archivePath, intelligencePath, workerId = `au
initAutonomySchema(intelligenceDb); initAutonomySchema(intelligenceDb);
while (true) { 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; } if (!job) { await sleep(pollMs); continue; }
try { try {
if (job.job_type === 'reconcile_archive') { if (job.job_type === 'reconcile_archive') {