|
| 1 | +# Session (2026-08-24T01:34:50.000Z) |
| 2 | + |
| 3 | +**Agent:** Claude Code |
| 4 | + |
| 5 | +**The node quality-review round (Eric's screenshot-driven pass — the twin of |
| 6 | +mercury-python's PR #16 round), executed on `chore/quality-polish`.** 14 commits |
| 7 | +(incl. Eric's LICENSE year refresh at the base and the EventEmitter rationale |
| 8 | +doc-comment from the standing agenda); `npm test` 48/48 after every commit; live |
| 9 | +drives where the suite has no coverage (demo, CLI). Pending Eric's PR gate. |
| 10 | + |
| 11 | +## Fixed, by rule |
| 12 | + |
| 13 | +- **Editor determinism:** `"types": ["node"]` pinned in tsconfig (the node:crypto/ |
| 14 | + process "cannot find name" errors were Eric's stale TS server — restart fixed; |
| 15 | + the pin makes editor resolution explicit). Lesson: SonarQube-for-IDE analyzes |
| 16 | + OPEN FILES only — every flagged rule got a repo-wide sweep. |
| 17 | +- **S2933** readonly on construction-only fields: Mailbox.items/waiters, |
| 18 | + EventBus.mailboxes, FunctionRegistry.services, AppConfig.overrides. |
| 19 | +- **S7773** Number.parseInt over the global (cli, server). |
| 20 | +- **config.ts batch:** S6606 (`instance ??=`), S6582 (`!key?.trim()`), |
| 21 | + S6594 (hoisted WHOLE_REF.exec; twin fixed in log.ts). |
| 22 | +- **S6551 arc (the big one):** no default Object stringification — evolved into ONE |
| 23 | + shared `asText` exported from envelope.ts (config's copy deleted; actuator's |
| 24 | + asList converted). **Durable TS lesson: negating `typeof x === 'object'` on an |
| 25 | + `unknown` widens the remainder to `{} | undefined`, which re-admits objects — |
| 26 | + the rule only clears with POSITIVE primitive narrowing** (string/number/bigint/ |
| 27 | + boolean/symbol enumerated; function → toString; object/null → JSON; undefined |
| 28 | + literal). Rendering now aligns with the python twin's `str()` behavior better |
| 29 | + than `[object Object]` ever did. Demo: text validated as string (non-string → |
| 30 | + teaching 400, live-proven). |
| 31 | +- **S3776 ×2** house helper-extraction: envelope.fromMap 23 → copyStringFields/ |
| 32 | + copyNumericFields; actuator.checkServices 20 → per-route checkService. |
| 33 | +- **S7722** the call-site stack probe's Error carries a message. |
| 34 | +- **S8786 ×2 (two rounds!):** colon-exclusion in the class was NOT enough — an |
| 35 | + unanchored scanning regex with overlapping classes stays polynomial on |
| 36 | + non-matching input. callSite now parses right-to-left with lastIndexOf — |
| 37 | + strictly linear. Lesson: for tail-parsing, string ops beat regex scanning. |
| 38 | +- **S6571** Handler returns honest `unknown` (the union was absorbed); teaching |
| 39 | + moved to the doc comment. |
| 40 | +- **S7785** cli.ts uses top-level await (ESM, node>=20); error exits re-verified 1. |
| 41 | +- **S9073** composite test assertions split ×3 (envelope + 2 siblings in server). |
| 42 | +- **bus.ts header** now records the anycast-vs-broadcast EventEmitter rationale |
| 43 | + (the standing agenda item from Eric's pre-workshop question). |
| 44 | + |
| 45 | +## Loose-ends round (same branch, after the smells) |
| 46 | + |
| 47 | +Eric's three engine-parity items, signatures extracted from the Java repo (commit |
| 48 | +`956c706`; python twin `da60593` on feature/actuator-polish): `GET /` index page |
| 49 | +(platform-core public/index.html style, embedded — no static file service); actuator |
| 50 | +JSON pretty-printed (SimpleMapper's default pretty Gson); unknown paths and non-GET |
| 51 | +methods answer SimpleHttpUtility's `{status, message, type: "error"}` with |
| 52 | +`Resource not found`. 51/51 incl. three new pins; live drive verified all three shapes. |
| 53 | + |
| 54 | +## Charset ruling (Eric) |
| 55 | + |
| 56 | +Content types verified live on both wrappers: application/json on every actuator |
| 57 | +endpoint and the error shape, text/plain only on /livenessprobe (engine parity), text/ |
| 58 | +html on /. Eric ruled the twins match EACH OTHER with explicit `; charset=utf-8` |
| 59 | +(node updated, `a73332f`) rather than python going bare like the Java engine. |
| 60 | + |
| 61 | +## Memory References |
| 62 | + |
| 63 | +- referenced: thread-node-quality-review, thread-primitive-event-bus-node, |
| 64 | + thread-actuator-endpoints-node, bp-publish-interop-gate |
| 65 | +- updated substance: thread-node-quality-review (executed, pending PR) |
0 commit comments