|
| 1 | +# Session (2026-08-23T03:19:20.000Z) |
| 2 | + |
| 3 | +**Agent:** Claude Code |
| 4 | + |
| 5 | +Actuator endpoints on `feature/primitive-event-bus` — the node half of Eric's directive |
| 6 | +(wrapper apps deploy as Kubernetes PODs, so they carry the engines' operational surface). |
| 7 | +Commits `342a854` (feature) + `7a8b12c` (spelling + origin-test assert, aligning with the |
| 8 | +python twin's IDE/Sonar round). Python twin: `56c002c` + `a674198` — the full design |
| 9 | +narrative lives in mercury-python's log `2026-08-23-031558` (single-authored, shared |
| 10 | +design); this log records the node-side specifics. |
| 11 | + |
| 12 | +## What shipped (node specifics) |
| 13 | + |
| 14 | +- `src/actuator.ts`: GET `/info`, `/info/routes`, `/env`, `/health`, `/livenessprobe`; |
| 15 | + shapes mirror the Rust engine's actuator (the approved minimalist port of Java |
| 16 | + `ActuatorServices`), byte-symmetric with the python twin except the runtime block |
| 17 | + (`{language: "node.js", node: process.version, mercury_composable: VERSION}`). |
| 18 | +- Health check functions speak the engines' `type=info` / `type=health` interface |
| 19 | + contract through the event bus (Eric's ruling); `mandatory.health.dependencies` / |
| 20 | + `optional.health.dependencies` config; UP 200 / DOWN 400; `/livenessprobe` follows the |
| 21 | + most recent health outcome. Engine formats verbatim (origin = UTC yyyyMMdd + 32-hex |
| 22 | + uuid per the Java reference; elapsedTime boundary quirks pinned). |
| 23 | +- `Actuator.handle(pathname, res)` single dispatcher; `server.ts` routes every GET |
| 24 | + through it (unknown GET → 404 text). The python twin adopted this dispatcher shape in |
| 25 | + its Sonar round — the twins are now structurally symmetric. |
| 26 | +- `src/version.ts` becomes the single TS-side version source (`index.ts` re-exports) — |
| 27 | + breaks the actuator → index import cycle. |
| 28 | +- The pre-release `/health` "OK" scaffolding endpoint is replaced by the real one. |
| 29 | +- `examples/demo-app.mjs` gained `demo.health` (private, contract-speaking); README |
| 30 | + "Actuator endpoints" section (+ K8s probe wiring); CHANGELOG entry. |
| 31 | + |
| 32 | +## Verification |
| 33 | + |
| 34 | +- 48/48 (`npm test`: tsc + node --test) — 10 actuator pins mirroring the python set |
| 35 | + (five shapes, liveness-follows-health, optional-failure-never-downs, teach-message, |
| 36 | + elapsed/origin vectors); re-run after the alignment round. |
| 37 | +- Live drive: `node dist/src/cli.js examples/demo-app.mjs --port 8398 |
| 38 | + -Dmandatory.health.dependencies=demo.health` → all five endpoints engine-shaped, |
| 39 | + `/health` UP with the full dependency entry, symmetric with python on 8399. |
| 40 | + |
| 41 | +## Follow-up round (Eric's three asks, commit `8ed4266`; python twin `7d5ca6c`) |
| 42 | + |
| 43 | +- `log.format` gains `compact` (single-line JSONL); `json` becomes pretty-printed |
| 44 | + (indent 2) — matching the Java engine's JsonAppender/CompactAppender pair (same data |
| 45 | + map, two renderings). Full rationale in the python twin's log `2026-08-23-031558`. |
| 46 | +- Sample `examples/resources/application.yml` (port 8087, demo.health dependency, |
| 47 | + opt-in /env lists) — auto-loaded by the CLI's next-to-app fallback; the demo runs |
| 48 | + with plain `node dist/src/cli.js examples/demo-app.mjs`. README quick start teaches |
| 49 | + the `-D` override syntax instead of `--port`. |
| 50 | +- Live drive through the yml: /health UP under the demo-app identity, /env opted-in |
| 51 | + keys, `-Dlog.format=compact` emits JSONL. Gates: 48/48. |
| 52 | + |
| 53 | +## Memory References |
| 54 | + |
| 55 | +- created: thread-actuator-endpoints-node |
| 56 | +- referenced: thread-primitive-event-bus-node, bp-publish-interop-gate, |
| 57 | + vision-mercury-nodejs |
0 commit comments