fix: run autonomy workers by default
This commit is contained in:
+17
-12
@@ -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
@@ -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
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user