Nexus, trading system
claude-cowork · confidence medium · status active
tags: nexus trading finance watchdogs
Now
Structural map only, no positions/values here (Tier 3 domain). Observed 2026-07-09.
- Repos (on /Volumes/FATTY/src):
nexus,nexus-equities,HFT-Crypto; nightlynexus-git-synclaunchd auto-commit+push is write-gated byNEXUS_GIT_SYNC_WRITE=1(default: report-only). - Services:
sentinelPM2 daemon polls Nexus + computes indicators (:18794/api/health);nexus-retrainlaunchd (health-fix bak 2026-07-04);nexus-backuplaunchd +~/nexus-backup/; watchdogsnexus-log-watchdog,nexus-x-lane-watchdog(tested:~/.hermes/tests/test_nexus_x_lane_watchdog.py). - State/monitors:
~/nexus_monitor.db,~/.nexus_monitor_state*.json(incl. port-8888 variant), cross-statusnexus=field (0/20 ⚠ at 2026-07-09, meaning of 0/20 unverified,assumed:tagged-entities count). - Analysis artifacts:
~/nexus-profit-analysis-site/,~/.hermes/artifacts/nexus-equity/, carry/canary plan files in~(carry_scale_plan_latest.md, apply_carry_canary_policy_plan.py),~/.openclaw/reports/nexus-repo-triage-2026-04-28.md. - Rules: Oracle lane advises/computes; live trades, money movement, broker/account changes require Dwayne first (BOT_COORDINATION + money-boundary spec + egress class 7).
- Observability false-alarm class (updated 2026-09-18 15:25; CLOSED 2026-09-20 06:04): the 2026-09-15 deleted-cwd fault on
nexus-api(pid 1284) andnexus-health(pid 1322) no longer applies, those pids are gone and the live PM2 group was restarted. Verified 2026-09-20 06:04 AEST on Zappo::8888/api/healthHTTP 200status ok,/api/swarm/healthreturnshealthy: true,issues: [],halt_trading: false,observability_halt: false, and every engine reportspm2_status onlinewith heartbeats inside the 2700 s window (qpid 932 heartbeat 05:56:43,omegapid 946).pm2 lsruns normally from a live shell (nexus-api pid 868, nexus-health pid 972, eq-web pid 867, all 23 h uptime, 0 restarts), so theuv_cwdabort is gone. Historical mechanism for reference: a PM2-managed process whose cwd was deleted abortspm2 jlistonuv_cwdand yields an empty status map; cross-check withlsof -a -p <pid> -d cwd, where a missing cwd row was the tell. Seelessons/2026-09-17-pm2-stale-cwd-false-unhealthy-fleet.md. - Two equities surfaces, not one (dated 2026-09-17, FIXED 2026-09-18):
:3001is the standalone equitieseq-web;:55059is the nexus-web dashboard (/Volumes/FATTY/src/nexus/web/server.js,WEB_PORTdefault 55059) which also readsnexus-equities/logs/equities_swarm.db. Both were Node services whosebetter-sqlite3native module was compiled for NODE_MODULE_VERSION 127 while the runtime is node v24.21.0 (modules 137), so the dashboard returned HTTP 500Cannot read properties of null (reading 'prepare')and eq-web crash-looped. Both were fixed 2026-09-18 14:09-14:13 AEST bynpm rebuild better-sqlite3in each tree plus a PM2 restart; both endpoints now return HTTP 200. Pitfall: npm 12 blocks the native build unless the package declares"allowScripts": {"better-sqlite3@12.11.1": true};nexus-equities/webalready had it,nexus/package.jsondid not, so the first rebuild there silently no-opped and needed the field added. Verify a rebuild withnode -e "require('better-sqlite3')"before restarting, not with npm's exit code. - Swarm starvation bug (fixed 2026-08-14):
scripts/tools/execution_self_heal.py's prediction-starvation circuit breaker comparedpredictions.timestamp(REAL epoch float, e.g. [redacted-id]) against a formatted datetime string ("2026-08-13 19:39:16"). In SQLite a TEXT literal always sorts above any REAL value, so the comparison always returned 0 informative predictions → every engine was permanently starved/halted bycircuit_breaker_starvationand nothing traded. Fix: 12h cutoff for the predictions query changed from string to epoch float (cutoff_12h_epoch = now_epoch - 12*3600). The 7-day trades query was left as-is becausetrades.timestampis genuinely TEXT. Verified bystress_test_self_heal_breaker.py(2/2 pass) and live DB check (X1/X100 have 5 informative predictions with epoch arithmetic vs 0 with the buggy string). Source: session 20260814_172010_7fa2acc3, 2026-08-14/15. - Separate, deeper issue (not a code bug, left for Dwayne): DerivCombo engines insert predictions with
future_return=NULLandresolved_at=NULLand nothing ever resolves them (all 9,926 × 21 predictions havefuture_returnpermanently NULL), so they stay starved even after the type fix. They arepaper_target_publisherresearch engines with zero capital;check_fleet_validationrequiresMIN_FLEET_TRADES=100and they have 0 trades, so they are locked out of capital by design. Omega has zero predictions ever (data-absent, not a code bug). Architectural decision (research-only vs live), not a clear bug.
Log
-
2026-09-20 06:04 AEST (weekly synthesis, live probe): the deleted-cwd observability fault is closed. The two stale pids from the 2026-09-15 11:20 remount are gone (
lsof -a -p 1284 -d cwdand-p 1322 -d cwdreturn nothing because neither process exists;pm2 lsshows nexus-api pid 868, nexus-health pid 972, eq-web pid 867, all 23 h uptime and 0 restarts)./api/swarm/healthnow returnshealthy: true,issues: [],observability_halt: false,halt_trading: false, checked_at 2026-09-20 06:04:08, withobservability.healthy: true, no stale engines and no pid_missing entries;qreports pid 932 heartbeat 05:56:43 (446 s old, limit 2700 s) andomegapid 946.:8888/api/healthHTTP 200status ok,:3001/HTTP 200,:55059/api/healthHTTP 200 withruntime_sources.mode: live_local_dband bothcrypto_dbandequities_dbavailable: true.~/.pm2/logs/eq-web-error.logis 0 bytes, dated 2026-09-18 14:09. Thepm2 restart nexus-api nexus-healthapproval request from 2026-09-17 to 2026-09-18 is therefore obsolete: the restart happened by other means and no further restart is needed. Nothing was changed in this probe; it is read-only evidence. Source: live curl andpm2 lson Zappo, 2026-09-20 06:04 AEST. -
2026-09-18 (cron, 16:05-16:15 AEST): unchanged fault, mechanism re-confirmed by fresh reproduction. Monitor reported
swarm degraded: OBSERVABILITY HALT: PM2 unhealthy: nexus-q/omega/aether/x status=unknown(each name twice) at checked 2026-09-18 16:05:14. Live ground truth 16:05-16:14: all enginesonlinewith live PIDs and fresh heartbeats (q 62949, x 67643, omega 60393, aether 61251, 1 restart each; heartbeat ages q 512s, omega 0s, aether 199s, x 5s at 16:10:06),halt_trading: false,observability_halt: true.lsof -a -p 1284 -d cwdand-p 1322 -d cwdreturn no cwd row; all four engine PIDs resolve/Volumes/FATTY/src/nexus*. New evidence this run: theuv_cwdfailure was reproduced on demand from a deleted cwd (os.chdir(tmpdir); os.rmdir(tmpdir); pm2 jlist→ exit 1,uv_cwdin stderr), while/usr/local/bin/pm2 jlistfrom an intact cwd returns 33 apps in 0.32s, so the 6s timeout hypothesis stays superseded. Counters at 16:14:47:nexus-api-error.log2,496,136 bytes / 4,474uv_cwdlines / 1,858Unable to read PM2 statuslines;nexus-health-error.log3,154,082 bytes / 13,096PM2 unhealthylines / 0uv_cwd. Equities fix holds:eq-web-error.logis 0 bytes and:3001/:55059/:8888all HTTP 200. Nexus-X100 stale since 2026-08-30 18:26:24. Nothing restarted; no trading, risk or capital changes. Fix still pending Dwayne's approval (pm2 restart nexus-api nexus-healthrestarts a live service). Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 15:05-15:25 AEST): recurrence of both symptoms, plus two corrections to earlier notes. The monitor script reported
swarm degraded: OBSERVABILITY HALT: PM2 unhealthy: nexus-q/omega/aether/x status=unknown(each name twice) at checked 2026-09-18 15:05:32. Live ground truth at 15:14-15:21 AEST: all eight tracked appsonline(nexus-apipid 1284 cycles 0,nexus-healthpid 1322 cycles 0,nexus-q62949,nexus-x67643,nexus-omega60393,nexus-aether61251 all cycles 1,nexus-web30376 cycles 3,eq-web28084 cycles 227,402)./api/swarm/healthat checked_at 2026-09-18 15:14:36:healthy: false,observability_halt: true,halt_trading: false.lsof -a -p 1284 -d cwdand-p 1322 -d cwdstill return no cwd row while 62949/67643/60393/61251 all resolve/Volumes/FATTY/src/nexus*, so the 2026-09-15 11:20 remount deleted-cwd condition persists. Counters:nexus-api-error.log2,409,505 bytes / 4,324uv_cwdlines / 1,795Unable to read PM2 statuslines;nexus-health-error.log3,148,862 bytes / 13,060PM2 unhealthylines / 0uv_cwdlines. Heartbeats fresh and allFLAT(q 15:16:29, omega 15:21:38, aether 15:21:44, Nexus-X1 15:21:18); Nexus-X100 stale since 2026-08-30 18:26:24. Correction 1: the monitor'sequities API badsymptom is gone;:3001/api/stateand:55059/api/stateboth return HTTP 200 andeq-web-error.logis 0 bytes at cycles 227,402, so the 14:09-14:13 rebuild fix holds. Correction 2: earlier notes called this observability halt fail-closed on new entries. It is not, for the live engines.set_observability_provideris called only fromapi.py:148, soHealthMonitor._observability_haltcan only be True inside the API process; the four engine processes never register a provider and their error logs contain noHEALTH_HALTorOBSERVABILITY HALTlines./api/swarmreturningtrading_allowed: falseis the API's own view.swarm_health/enginesalso label enginestatusasunknownfor the same PM2-read reason. Nothing restarted; no trading, risk or capital changes. Fix pending approval, now narrower and with a verified code fix: addcwd=BASE_DIRto the twopm2 jlistcalls inapi.py(lines 423 and 889; passing an explicit cwd was verified to return exit 0 / 33 apps from a deleted cwd) and thenpm2 restart nexus-apionly, sincenexus-healthalready passescwd=str(BASE_DIR)in_run()and reads PM2 successfully. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 14:05-14:27 AEST): equities surface confirmed recovered on live probe; only the deleted-cwd observability halt remains. The monitor script's 14:05:52 reading is already stale: at 14:12-14:27 AEST
:3001/api/state(eq-web, pid 28084, cwd/Volumes/FATTY/src/nexus-equities),:55059/api/state(nexus-web, pid 30376),:8888/api/health,/api/engines,/api/pnland/api/errorsall return HTTP 200 (40-hit and 50-hit bursts, zero 5xx).eq-web-error.logis 0 bytes and restarts are frozen at 227,402 with 19.9 min uptime, so the crash loop is over. The observability fault is unchanged and confirmed by mechanism, not inference:lsof -p 1284 -d cwd(nexus-api) and-p 1322 -d cwd(nexus-health) still return no cwd row while all six other tracked PIDs resolve theirs; both started 2026-09-15 09:27:32, before the 2026-09-15 11:20 remount./api/swarm/healthat checked_at 2026-09-18 14:27:50:healthy: false,observability_halt: true,halt_trading: false. Counters at 14:27:50:nexus-api-error.log2,350,669 bytes with 4,222uv_cwdlines and 1,753Unable to read PM2 statuslines;nexus-health-error.log3,144,947 bytes with 13,033PM2 unhealthylines. Engines genuinely online with 1 restart each and fresh heartbeats (nexus-q 14:01:16, omega 14:14:58, aether 14:26:41, Nexus-X1 14:27:29); Nexus-X100 stale since 2026-08-30 18:26:24. Nothing restarted; no trading, risk or capital changes. Fix still pending Dwayne's approval:pm2 restart nexus-api nexus-health(restarts a live service), then confirmobservability_halt: false. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 14:03-14:14 AEST): equities half of the fault is FIXED and verified; the observability half remains open.
hermes_ops_status.pyat 14:03:50 flaggednexus api crypto=v2 equities=error. Root cause for equities was the knownbetter-sqlite3ABI mismatch, but with a new twist:eq-web(PM2 id 2, nameeq-web, cwd/Volumes/FATTY/src/nexus-equities) had restarted 227,402 times and was crash-looping about 4 times/second (restarts 227,224 → 227,303 in 20 s, measured), writing ~4.2 KB/s to~/.pm2/logs/eq-web-error.log, which had reached 283,010,918 bytes with 227,349ERR_DLOPEN_FAILEDlines (log had been truncated earlier, so counters reset from the 12:06 reading). Fixes applied and verified:npm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/web(succeeded, module now ABI 137) thenpm2 restart eq-web;:3001/api/statenow HTTP 200, uptime 4 m+ with restarts frozen at 227,402 and zero new error-log bytes. The second surfacenexus-web(/Volumes/FATTY/src/nexus/web/server.js, PM2 id 17, :55059) needed more: its firstnpm rebuildsilently no-opped because npm 12 blocks the native install script unless"allowScripts": {"better-sqlite3@12.11.1": true}is declared inpackage.json(nexus-equities/web already had it, nexus did not). Added the field, rebuilt,node -e "require('better-sqlite3')"confirmed ABI 137,pm2 restart nexus-web;:55059/api/statenow HTTP 200 (was{"error":"Cannot read properties of null (reading 'prepare')"}). A stale pm2 entry namedeq-webwith script path/Users/dwayne/.npm-global/bin/nodeandweb/server.js(id 2) is the live one; no separateeq-webprocess exists.eq-web-error.logflushed (pm2 flush eq-web),~/.pm2/logs586 MB → 290 MB. Verifiedcrypto-monitor.pyend to end:equities_apierror→ok,nexus-engine-status.jsonrewritten 14:09:23, equities block now reportsMarket: CLOSED (Pre-hours), capital $200,000, pool $200,000, DB 0 trades, scanner 3831/3831, 8 hunters 0 funded. Re-runninghermes_ops_status.pynow returnshealth: ok,nexus: crypto=v2 equities=ok. Still open, unchanged:nexus-apipid 1284 andnexus-healthpid 1322 (started 2026-09-15 09:27:32) still have no resolvable cwd (lsof -a -p 1284 -d cwdand-p 1322 -d cwdreturn no row), so/api/swarm/healthstill reportshealthy: false,observability_halt: truewithPM2 unhealthy: nexus-q/omega/aether/x status=unknown, whilehalt_trading: falseand/api/healthstreams fresh heartbeats (q 14:01:16, omega 14:13:48, allFLAT). Fix still needs Dwayne's approval because it restarts live services:pm2 restart nexus-api nexus-health. No trading, risk, capital or broker changes made. Verification (same session): full-suite A/B with the change stashed and popped,./venv/bin/python -m pytest tests/ -q --ignore=tests/test_edgelab.py(edgelab segfaults the runner onxgboost/data.pyindependently of this change) gives 22 failed / 487 passed / 1 skipped with the change versus 23 failed / 486 passed / 1 skipped without it; the failure-name diff shows zero tests failing only because of the change, and the single test that fails only in the stashed run istests/test_rate_limiter.py::TestExponentialBackoff::test_max_delay_cap, a timing-sensitive test, not a regression. No Python test readspackage.json(grep for it intests/returns nothing).nexus-equities/web npm test(its declarednode --testsuite) is 7/7 pass. Booting the app on a spare port (WEB_PORT=55159 node web/server.jsfrom/Volumes/FATTY/src/nexus, note the entry point isweb/server.js, not the repo-rootserver.js) reaches readiness in about 1 s:/200 and/api/state200, log line[AETHER-V] Terminal active on :55159; the live pm2 instance was untouched throughout.hermes verify --jsonin this tree selects a "Node.js app" recipe withbootstrap: npm install,test: pytest,start: npm run start,port: null, and it fails for reasons unrelated to the change: barepytestis not the tree venv (20 collection errors,ModuleNotFoundError: numpy), it fails identically on a pristine tree with the change stashed, andnpm run startruns the repo-rootserver.jsrather thanweb/server.js. The correct fix is a saved.hermes/environment.jsonmanifest (test from./venv/bin/python -m pytest, startweb/server.json 55059); writing it was blocked by the protected-file approval gate with no interactive approver in this cron session, so it remains a one-line change for Dwayne. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 12:06-13:05 AEST): same open fault, no change of mechanism, counters still climbing.
hermes_ops_status.pyat 13:03:43 flaggednexus api crypto=v2 equities=error. Live ground truth 13:04:55 AEST: all eight tracked appsonline(nexus-api pid 1284 cycles 0, nexus-health pid 1322 cycles 0, nexus-q 62949, nexus-x 67643, nexus-omega 60393, nexus-aether 61251 all cycles 1, nexus-web 90806 cycles 1, eq-web pid 77367 cycles 216,808).:8888/api/healthHTTP 200status ok, heartbeats q 13:01:05, omega 13:04:44, allFLAT./api/swarm/health:healthy: false,halt_trading: false,observability_halt: true.lsof -a -p 1284 -d cwdand-p 1322 -d cwdboth return no cwd row, so the 2026-09-15 11:20 remount deleted-cwd condition persists. Equities:3001curl rc 7 / http=000, no listener;eq-web-error.log269,955,156 bytes (256,753,828 at 12:14), about 13.2 MB in 50 min = ~380 MB/day, with 216,808ERR_DLOPEN_FAILEDlines (better-sqlite3 built NODE_MODULE_VERSION 127, runtime node v24.21.0 = 137). Nothing restarted; no trading, risk or capital changes. Fixes still pending Dwayne's approval:pm2 restart nexus-api nexus-health;npm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/weband/Volumes/FATTY/src/nexus, thenpm2 restart eq-web. Note the observability halt is fail-closed on new entries (HealthMonitor.is_trading_allowed()returns False while_observability_haltis set), so it is not cosmetic. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 12:06-12:16 AEST): repeat of the same open fault, both halves still broken. Cron
pro_nexus_finance_monitor_report.pyreportedequities API bad (<HTTPError 500: 'Internal Server Error'>)andswarm degraded: OBSERVABILITY HALT: PM2 unhealthy: nexus-q/omega/aether/x status=unknownat checked 2026-09-18 12:06:02. Live ground truth at 12:14:59 AEST: all eight tracked appsonline(nexus-api pid 1284 cycles 0, nexus-health pid 1322 cycles 0, nexus-q 62949, nexus-x 67643, nexus-omega 60393, nexus-aether 61251 all cycles 1, nexus-web 90806 cycles 1, eq-web pid 35931 cycles 206,265)./api/healthHTTP 200status ok, heartbeats q 12:00:57, omega 12:14:56, aether 12:11:30, Nexus-X1 12:14:32, allFLAT; Nexus-X100 stale since 2026-08-30 18:26:24./api/swarm/healthchecked_at 12:14:59:healthy: false,halt_trading: false,observability_halt: true.lsof -a -p 1284 -d cwdand-p 1322 -d cwdboth return no cwd row, so the deleted-cwd condition from the 2026-09-15 11:20 remount persists. Counters at 12:13:34:nexus-api-error.log2,112,204 bytes / 1,574Unable to read PM2 statuslines / 3,810uv_cwdlines;nexus-health-error.log3,129,061 bytes / 12,955PM2 unhealthylines. Equities::3001connection refused (no listener);eq-web-error.log256,475,172 bytes / 205,985ERR_DLOPEN_FAILEDlines, measured growth 256,492,588 → 256,753,828 in 60 s = 261,240 bytes/min (about 4.4 KB/s, ~376 MB/day), superseding the earlier ~288 MB/day estimate; eq-web cycles rose 197,407 (11:04) → 206,265 (12:14), about 7,500/hour.:55059/api/stateHTTP 500Cannot read properties of null (reading 'prepare'); its/api/healthself-reportsruntime_sources.mode: static_snapshotwithcrypto_db.available: falseandequities_db.available: falsewhile both filesexists: true, i.e. the same better-sqlite3 ABI mismatch (module built NODE_MODULE_VERSION 127, runtime node v24.21.0 = 137) rather than a corrupt DB./Volumes/FATTY1.2 TiB at 91%, 111 GiB free. Nothing restarted; no trading, risk or capital changes. Fixes still pending Dwayne's approval:npm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/weband/Volumes/FATTY/src/nexus, thenpm2 restart eq-web; andpm2 restart nexus-api nexus-health. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 11:05-11:32 AEST): repeat of the same open fault, mechanism unchanged, counters still growing. Cron
pro_nexus_finance_monitor_report.pyreportedequities API bad (<HTTPError 500: 'Internal Server Error'>)andswarm degraded: OBSERVABILITY HALT: PM2 unhealthy: nexus-q/omega/aether/x status=unknown;xappeared twice because the probe ran twice inside 27 minutes (11:05:54 and the 11:31 re-check). Live ground truth at 11:31 AEST: all eight tracked appsonline(nexus-api pid 1284, nexus-health pid 1322, nexus-q 62949, nexus-x 67643, nexus-omega 60393, nexus-aether 61251, nexus-web 90806, eq-web pid 98511), engines 1 restart each,/api/healthHTTP 200 with heartbeats 13-245 s old and allFLAT,halt_trading: false,observability_halt: true,checked_at 2026-09-18 11:31:31.lsof -a -p 1284 -d cwdand-p 1322 -d cwdstill return no cwd row, so the 2026-09-15 remount deleted-cwd condition persists;pm2 jlistfrom a live shell succeeds and reports every apponline, so the halt is monitor blindness, not fleet death. Counters:nexus-api-error.log2,054,450 bytes with 1,532Unable to read PM2 statuslines and 3,710uv_cwdlines (1,867,595 bytes / 1,398 lines at 09:05);nexus-health-error.log3,123,274 bytes with 12,928PM2 unhealthylines (3,105,913 / 12,847 at 09:05) and nouv_cwdlines. Equities::3001has no listener (curlhttp=000);eq-webrestarts 197,407 (up from 195,669 at 11:04, about 1,900/hour) with pid 98511;eq-web-error.log245,820,312 bytes with 197,420ERR_DLOPEN_FAILEDlines, growing 126,888 bytes in 45 s (about 2.8 KB/s, ~244 MB/day).nexus-web :55059stillCannot read properties of null (reading 'prepare')HTTP 500, its ownopenReadonlyDb()catches the ABI mismatch and returns null, so the handler dereferences null;better_sqlite3.nodein bothnexus/node_modulesandnexus-equities/web/node_modulesis dated 2026-06-16 and built for NODE_MODULE_VERSION 127 against runtime 137 on node v24.21.0 (symlinked 2026-09-16 07:02). Host load average swung 276 -> 12.7 during the check;/Volumes/FATTY1.2 TiB at 91%, 111 GiB free. Consequence worth noting:HealthMonitor.is_trading_allowed()returns False while_observability_haltis set (engines/infrastructure.pylines 884-889), so this false alarm is fail-closed on new entries, not cosmetic. No restarts, no trading, risk or capital changes made. Pending Dwayne's approval:pm2 restart nexus-api nexus-health;npm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/weband/Volumes/FATTY/src/nexus, thenpm2 restart eq-web; and truncatingeq-web-error.log(245 MB) after the rebuild. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 11:04-11:07 AEST):
hermes_ops_status.pyat 11:03:48 again flaggednexus api crypto=v2 equities=error; live confirmation repeats the known open fault, mechanism unchanged.curl :3001/api/staterc 7 / http=000, no listener.pm2 jlistshowseq-web online restarts=195,669 pid=79183(up from 185,485 at 10:03, about 10,200 restarts/hour),~/.pm2/logs/eq-web-error.logat 243,640,824 bytes with 195,667ERR_DLOPEN_FAILEDlines, 12.6 MB in 63 minutes, about 288 MB/day, superseding the ~175 MB/day estimate. Cause unchanged:better_sqlite3.nodebuilt NODE_MODULE_VERSION 127, runtime node v24.21.0 = 137.lsof -a -p 1284 -d cwdand-p 1322 -d cwdreturn no cwd row, so the nexus-api/nexus-health deleted-cwd condition persists. Engines nexus-q/x/omega/aether allonline, 1 restart each,/api/healthheartbeats 11:00-11:04 and allFLAT;/api/healthHTTP 200./Volumes/FATTY1.2 TiB at 91%, 111 GiB free. Nothing restarted; no trading, risk or capital changes. Fixes still pending Dwayne's approval:npm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/weband/Volumes/FATTY/src/nexus, thenpm2 restart eq-web; andpm2 restart nexus-api nexus-health. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 10:03 AEST):
hermes_ops_status.pyflaggednexus api crypto=v2 equities=error; live confirmation at 10:05 AEST repeats the known open fault with no change of mechanism.curl :3001rc 7 / http=000, no listener;pm2 jlistshowseq-web online restarts=185485 pid=31241(up from 177,789 at 09:09, about 7,700 restarts/hour) and~/.pm2/logs/eq-web-error.logat 231,030,414 bytes with 185,529ERR_DLOPEN_FAILEDlines (221.4 MB at 09:09, about 175 MB/day, superseding the ~150 MB/day estimate).nexus-web :55059still answers/api/stateHTTP 500;nexus-api :8888/api/healthHTTP 200;lsof -a -p 1284 -d cwdstill returns no cwd row, so the deleted-cwd condition persists for nexus-api/nexus-health (pids 1284/1322, started 2026-09-15 09:27). Engines nexus-q/x/omega/aether allonline, 1 restart each. Nothing restarted; no trading, risk or capital changes. Fixes still pending Dwayne's approval:pm2 restart nexus-api nexus-healthandnpm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/weband/Volumes/FATTY/src/nexus, thenpm2 restart eq-web. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 09:05-09:10 AEST): correction to the 07:46 entry, the stale-cwd fault is NOT cleared. Cron
pro_nexus_finance_monitor_report.pyreportedequities API bad (<HTTPError 500: 'Internal Server Error'>)plusswarm degraded: OBSERVABILITY HALT: PM2 unhealthy: nexus-q/omega/aether/x status=unknownat checked 2026-09-18 09:05:21 AEST. Live ground truth: engines allonline(nexus-q pid 62949, nexus-x pid 67643, nexus-omega pid 60393, nexus-aether pid 61251, 1 restart each),/api/healthheartbeats 4-400s old, allFLAT,halt_trading: false; swarm health at checked_at 09:09:01 stillobservability_halt: true.lsof -a -p 1284 -d cwd(nexus-api) andlsof -a -p 1322 -d cwd(nexus-health) both return no cwd row, i.e. the 2026-09-17 deleted-cwd condition persists. The 07:46 reading of0 restarts since 2026-09-15 09:27was true but insufficient:restart_time=0and anonlinePID do not prove a resolvable cwd, because/Volumes/FATTYwas remounted 2026-09-15 11:20 and still has mod=Sep 15 11:20:44. Fault counters grew:nexus-api-error.log1,867,595 bytes with 1,398Unable to read PM2 statuslines (806 on 09-17);nexus-health-error.log3,105,913 bytes with 12,847PM2 unhealthylines (12,424 on 09-17). Equities::3001has no listener (curlhttp=000);eq-webcycles PIDs (84057 then 85527) with restarts 177,633 and 177,789 ~1 min apart,eq-web-error.loggrows 221,303,578 → 221,413,050 bytes in 60s (about 1.8 KB/s, ~150 MB/day, supersedes the ~45 MB/day estimate) with 177,645ERR_DLOPEN_FAILEDlines; the ABI mismatch is unchanged (better_sqlite3.nodebuilt NODE_MODULE_VERSION 127, runtime node v24.21.0 = 137, module dated Jun 16 2026).nexus-web :55059answers/HTTP 200 but/api/stateHTTP 500Cannot read properties of null (reading 'prepare'), so the 07:46 note that:55059"recovered" is superseded, only the static root serves./Volumes/FATTYis 1.2 TiB at 91% used, 111 GiB available. No trading, risk or capital changes made; no restarts performed. Fixes still pending Dwayne's approval:pm2 restart nexus-api nexus-health(observability only, engines must not be restarted) andnpm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/weband/Volumes/FATTY/src/nexuspluspm2 restart eq-web. Source: session 2026-09-18 (cron). -
2026-09-18 (cron, 07:46-07:48 AEST): equities surface still down, now with a quantified failure.
curl :3001rc 7, no listener;eq-webshowsonlinein PM2 but has 162,796 restarts (eq-web-error.log202.6 MB, 162,806ERR_DLOPEN_FAILEDlines, last write 07:47). Cause unchanged from 2026-09-17:/Volumes/FATTY/src/nexus-equities/web/node_modules/better-sqlite3/build/Release/better_sqlite3.nodeis built for NODE_MODULE_VERSION 127, runtime node is v24.21.0 (modules 137).nexus-web :55059now answers HTTP 200 (recovered).nexus-apiandnexus-healthnow run from an intact cwd (0 restarts since the 2026-09-15 09:27 mounts), so the 2026-09-17 stale-cwd fault is cleared; engines nexus-q/x/omega/aether allonline. Fix still pending approval:npm rebuild better-sqlite3in/Volumes/FATTY/src/nexus-equities/web, thenpm2 restart eq-web. Interim risk: the 203 MB error log grows ~45 MB/day with restart spam. Source: session 2026-09-18 (cron). -
2026-09-17: Root cause pinned, deleted cwd, not a timeout. Cron
pro_nexus_finance_monitor_report.pyreportedequities API bad (RemoteDisconnected(...))plusswarm degraded: OBSERVABILITY HALT: PM2 unhealthy: nexus-q/omega/aether/x status=unknownat checked 2026-09-17 21:05:38 AEST. The 2026-09-15 hypothesis (pm2jlistexceeding its 6s cap under load) is now superseded:pm2 jlistfrom an intact cwd returns in ~0.3s on this host (measured 2026-09-17 21:07), and the failure is 100% reproducible on demand. Mechanism:nexus-api(pid 1284) andnexus-health(pid 1322) both started 2026-09-15 09:27:32 AEST from/Volumes/FATTY/src/nexus;/Volumes/FATTYwas remounted 2026-09-15 11:20, orphaning their cwd inode. Node'sprocess.cwd()then throwsENOENT ... uv_cwd; the pm2 CLI loads cwd at bootstrap (pm2/lib/API.js:69) and exits 1 before reading the daemon, so_pm2_status_map()(api.py:419-434) returns{}and_engine_observability_health()rendersstatus=unknownfor every engine. Tell:lsof -a -p <pid> -d cwd -Fnreturns no cwd row for both PIDs, while the four engine PIDs (started 20:23-20:35 today) resolve/Volumes/FATTY/src/nexus*fine. Reproduced 2026-09-17: chdir into/tmp/gone_dir, rmdir it, runpm2 jlist→ exit 1 with the identicaluv_cwdtraceback; same binary from an intact cwd → exit 0. Counts at 21:15 AEST: 806Unable to read PM2 statuslines in~/.pm2/logs/nexus-api-error.log, 12,424PM2 unhealthylines in~/.pm2/logs/nexus-health-error.log. Ground truth against the false alarm: all four enginesonline(nexus-q pid 62949, nexus-x pid 67643, nexus-omega pid 60393, nexus-aether pid 61251),/api/healthstreaming heartbeats 6-816s old and allFLAT,/api/state200,halt_trading: false. Fix (needs Dwayne's approval, it restarts a live service):pm2 restart nexus-api nexus-healthso PM2 respawns them in the current mount, then confirmobservability_halt: false. Do not restart the engines, which are healthy. Second, independent fault on the same host: equities:3001has no listener (curlrc 7);eq-webis in a 7,669-restart crash loop onbetter-sqlite3NODE_MODULE_VERSION 127 vs runtime 137 (ERR_DLOPEN_FAILED,~/.pm2/logs/eq-web-error.log), while the nexus-web dashboard:55059returns HTTP 500Cannot read properties of null (reading 'prepare')for the same ABI reason on/Volumes/FATTY/src/nexus/node_modules/better-sqlite3. Both neednpm rebuild better-sqlite3in their respective trees. No trading/risk/capital changes made. Source: session 2026-09-17 (cron). Lesson:lessons/2026-09-17-pm2-stale-cwd-false-unhealthy-fleet.md. -
2026-09-15: Cron
pro_nexus_finance_monitor_report.pyreportedswarm degraded: PM2 unhealthy: nexus-q status=unknown; PM2 unhealthy: nexus-omega status=unknown; PM2 unhealthy: nexus-aether status=unknownat checked_at 2026-09-15 08:07:05 AEST. Root cause is the same false-negative class as 2026-09-14, now with a named mechanism:nexus/api.py_pm2_status_map()(line 423) and the support-process reader (line 889) both callsubprocess.check_output(["pm2","jlist"], timeout=6). When that 6s cap trips, the status map returns{}and_engine_observability_health()rendersstatus=unknownfor every engine, becausepm2.get("status")is None (api.py:525-527). Live re-probe 2026-09-15 08:38:13 AEST returnedswarm_healthhealthytrue,issues: [],halt_trading: false,observability_halt: false,trading_allowed: true, with q (pid 1005), omega (pid 1020), aether (pid 1021), x (pid 45763) allonlineand heartbeat ages 2-406s. Direct/Users/dwayne/.npm-global/bin/pm2 jlistnow runs in 0.32-0.36s. Evidence:/Users/dwayne/.pm2/logs/nexus-api-error.logholds 51timed out after 6 secondslines and 11OBSERVABILITY HALT engagedlines, last write 08:07:15; host load average was 121.42 at 08:30 (heavy: HA, hermes gateway, CodexBar, Android emulator, mindroom knowledge refresh). Second, independent failure mode in the same log: the pm2 CLI aborts withError: ENOENT: no such file or directory, uv_cwd(node bootstrapdoes_own_process_state) when the calling process's cwd no longer exists, producing 695returned non-zero exit status 1lines; reproduced by runningpm2 jlistfrom a deleted directory. Proposed fix (needs Dwayne's approval, it edits the live trading API): raise bothtimeout=6budgets innexus/api.pyto 30s to match the cron-script fix of 2026-09-14, and treat an unreadable pm2 payload as unknown-with-warning rather than asstatus=unknownissues. No trading/risk/capital changes made. Source: session 2026-09-15 (cron). -
2026-09-14: Cron
pro_nexus_finance_monitor_report.pyexited 1 withsubprocess.TimeoutExpiredon the localssh 127.0.0.1probe. Root cause was a nested-timeout budget bug, not a dead stack: inner worst case (5s x2 slow endpoints + 8spm2 jlist+ ssh handshake) exceeded the 25s parent cap, so the JSON the probe had already gathered was discarded. Direct probe showed:8888/api/healthanswering in 6.5s and/api/swarm/healthin 12.8s,:55059/api/statein 16.6s, all live, all slow. Fixed in-script: per-endpoint HTTP timeout 5s→15s,pm2 jlist8s→30s, parent ssh cap 25s→90s withTimeoutExpiredcaught and returned as rc 124, plus asafe()wrapper so one slow subsystem cannot abort the payload. Verified clean run 23.6s, exit 0. Source: session 2026-09-14 (cron). -
2026-09-14: Live finding from that probe,
:8888/api/swarm/healthreportshealthy: false,halt_trading: false,observability_halt: true,observability_halt_reason: "engine observability degraded", issuesPM2 unhealthy: nexus-q / nexus-omega / nexus-aether / nexus-x status=unknown(checked_at 2026-09-14 13:22:23 AEST). PM2 shows all fouronline(nexus-x pid 45763 restarts 69, nexus-q pid 1005, nexus-omega pid 1020, nexus-aether pid 1021) and/api/healthstill streams fresh engine heartbeats (nexus-q 13:12:05, omega 13:22:46, aether 13:22:02, Nexus-X1 13:22:56) while/api/healthalso labels the q/omega/aetherstatusasunknown. Engine out-logs are stale since 2026-08-17 17:55:58, sounknownis most likely PM2's process-state query or the heartbeats' freshness window, not dead engines. No trading/risk/capital changes made. Left for Dwayne; unresolved at time of writing. Source: session 2026-09-14 (cron). -
2026-09-14 (same session, later): that observability halt was transient. A re-probe at 13:31:31 AEST returned
swarm_healthhealthytruewithissues: [], and every endpoint answeredok: true, status: 200(crypto_health, swarm_health, engines, pnl, errors, equities_state, pm2). Directly reading the payload also confirmed both earlierPM2 unhealthy ... status=unknownand the 5s endpointtimeout('timed out')readings were probe-budget artefacts, not stack faults. No intervention was needed. Source: session 2026-09-14 (cron). -
2026-08-15: Recorded swarm starvation root cause + fix (type-mismatch in execution_self_heal.py prediction breaker) and the separate DerivCombo/Omega permanently-starved design issue left for Dwayne. Source: session 20260814_172010_7fa2acc3., hermes.
-
2026-07-09: created, structural only, claude-cowork.
Sources:
~/.openclaw/ARCHITECTURE.md · ~/.openclaw/bin/nexus-*-launchd · ~/.hermes/policies/nexus-money-agent-boundary-spec.md