clearotron 0.5.1 → 0.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/.env.example +7 -7
  2. package/INSTALL.md +10 -10
  3. package/QUICKSTART.md +6 -6
  4. package/README.md +2 -2
  5. package/THIRD-PARTY-NOTICES.md +4 -4
  6. package/bin/README.md +2 -2
  7. package/bin/clearotron.mjs +1 -1
  8. package/bin/connect.mjs +1 -1
  9. package/bin/disconnect.mjs +1 -1
  10. package/bin/example.mjs +2 -2
  11. package/bin/grant.mjs +1 -1
  12. package/bin/onboard.mjs +78 -23
  13. package/bin/start.mjs +88 -33
  14. package/bin/update.mjs +13 -3
  15. package/build-info.json +2 -2
  16. package/docs/DELIVERY.md +1 -1
  17. package/docs/PORTAL.md +1 -1
  18. package/docs/RELEASES.md +1 -1
  19. package/docs/architecture/02-architecture.md +10 -2
  20. package/docs/architecture/03-run-lifecycle.md +6 -2
  21. package/docs/architecture/04-configuration-reference.md +3 -3
  22. package/docs/architecture/05-config-governance.md +5 -4
  23. package/docs/architecture/08-development-guide.md +4 -4
  24. package/docs/architecture/09-security-and-data.md +1 -1
  25. package/{driver/skills/clearance-search/SKILL.md → docs/architecture/retired-manuals/clearance-search-spine.md} +17 -30
  26. package/{driver/skills/clearance-search/templates/email/generic.md → docs/architecture/retired-manuals/email-generic.md} +1 -1
  27. package/{driver/skills/clearance-search → docs/architecture/retired-manuals}/template-formatting.md +3 -4
  28. package/docs/configuration.md +1 -1
  29. package/docs/decisions/0002-no-dark-functionality.md +5 -0
  30. package/driver/CHANGELOG.md +69 -0
  31. package/driver/README.md +11 -1
  32. package/driver/accepted-order.mjs +13 -5
  33. package/driver/attempt-rows.mjs +64 -0
  34. package/driver/attributed-span.mjs +1 -1
  35. package/driver/authority-trees.mjs +1 -1
  36. package/driver/band-shape.mjs +21 -3
  37. package/driver/best-draft.mjs +3 -3
  38. package/driver/blind-frame-record.mjs +2 -2
  39. package/driver/cancel.mjs +3 -2
  40. package/driver/carry-through.mjs +2 -2
  41. package/driver/citation-census.json +3 -3
  42. package/driver/clearance-variants-record.mjs +4 -10
  43. package/driver/common-law-coverage-status.mjs +3 -3
  44. package/driver/common-law-receipts.mjs +2 -2
  45. package/driver/commonlaw-carry-floor.json +3 -3
  46. package/driver/compare.mjs +1 -1
  47. package/driver/config-inventory.mjs +6 -79
  48. package/driver/consumption-ledger.mjs +2 -1
  49. package/driver/contract-arm2-baseline.json +2 -3
  50. package/driver/contract-dictation-registry.mjs +5 -0
  51. package/driver/contract-e3-backlog.mjs +45 -66
  52. package/driver/contract-e3-baseline.json +16 -16
  53. package/driver/contract-vocabulary.mjs +8 -6
  54. package/driver/corrections-feedforward.mjs +3 -1
  55. package/driver/coverage-form-io.mjs +7 -8
  56. package/driver/coverage-tool.mjs +1 -1
  57. package/driver/declination-tool.mjs +2 -2
  58. package/driver/degraded-parts.mjs +9 -9
  59. package/driver/demo-container.mjs +5 -4
  60. package/driver/demo-posture.mjs +17 -0
  61. package/driver/deploy-live-run-guard.mjs +19 -7
  62. package/driver/derived-state.mjs +2 -2
  63. package/driver/dev-portal.mjs +2 -1
  64. package/driver/dispatch-record.mjs +1 -1
  65. package/driver/disposition-tool.mjs +2 -1
  66. package/driver/doubt-closure-tool.mjs +2 -2
  67. package/driver/driver.config.mjs +35 -724
  68. package/driver/e2e-rounds.mjs +3 -4
  69. package/driver/engine/CONTRACT.md +3 -0
  70. package/driver/engine/README.md +2 -0
  71. package/driver/engine/anthropic-agent.mjs +13 -42
  72. package/driver/engine/auth.mjs +74 -0
  73. package/driver/engine/child-record.mjs +1 -1
  74. package/driver/engine/deny-authority-write.mjs +2 -2
  75. package/driver/engine/jx-turn.mjs +10 -2
  76. package/driver/engine/mcp/README.md +1 -1
  77. package/driver/engine/mcp/band-server.mjs +20 -13
  78. package/driver/engine/mcp/codex-config.mjs +1 -1
  79. package/driver/engine/mcp/declination-server.mjs +2 -3
  80. package/driver/engine/mcp/dispositions-server.mjs +3 -3
  81. package/driver/engine/mcp/gather-config.mjs +24 -19
  82. package/driver/engine/mcp/grid-provenance.mjs +1 -1
  83. package/driver/engine/mcp/held-answers.mjs +5 -5
  84. package/driver/engine/mcp/perplexity-server.mjs +16 -7
  85. package/driver/engine/mcp/recording-server.mjs +7 -6
  86. package/driver/engine/mcp/register-server.mjs +29 -0
  87. package/driver/engine/mcp/stdio-server.mjs +5 -5
  88. package/driver/engine/mcp/supplemental.mjs +9 -9
  89. package/driver/engine/openai-agent.mjs +5 -2
  90. package/driver/engine/registry.mjs +103 -0
  91. package/driver/engine/run-choices.mjs +162 -0
  92. package/driver/engine/stamps.mjs +35 -0
  93. package/driver/enqueue-schema.mjs +4 -4
  94. package/driver/envelope-settle.mjs +3 -2
  95. package/driver/feedback-issues.mjs +1 -1
  96. package/driver/feedback-mint.mjs +3 -2
  97. package/driver/feedback-store.mjs +3 -2
  98. package/driver/findings-model.mjs +1 -1
  99. package/driver/flag-snapshot.mjs +5 -4
  100. package/driver/floor-duty.mjs +3 -3
  101. package/driver/foreign-record-links.mjs +1 -1
  102. package/driver/frame-diff-record.mjs +2 -8
  103. package/driver/framework.mjs +1 -1
  104. package/driver/gate-metrics.mjs +10 -11
  105. package/driver/gateway.mjs +220 -839
  106. package/driver/goods-evidence.mjs +26 -14
  107. package/driver/jx-lanes.mjs +3 -3
  108. package/driver/jx-units.mjs +31 -37
  109. package/driver/jx.mjs +44 -59
  110. package/driver/knockout-assess-record.mjs +3 -3
  111. package/driver/knockout-caveats.mjs +21 -0
  112. package/driver/knockout-correction-record.mjs +58 -28
  113. package/driver/knockout-frame-record.mjs +2 -2
  114. package/driver/knockout-register-read.mjs +38 -21
  115. package/driver/knockout-register-record.mjs +5 -6
  116. package/driver/knockout-review-record.mjs +12 -11
  117. package/driver/ladder/model-gauge.mjs +88 -0
  118. package/driver/ladder/next-rung.mjs +296 -0
  119. package/driver/ladder/rescue.mjs +146 -0
  120. package/driver/ladder/stage-tools.mjs +57 -0
  121. package/driver/ladder/turn-failure.mjs +166 -0
  122. package/driver/log.mjs +2 -2
  123. package/driver/matter-frame-record.mjs +4 -4
  124. package/driver/methodology-witness.mjs +2 -2
  125. package/driver/named-band.mjs +60 -3
  126. package/driver/narrative-refutation-record.mjs +145 -42
  127. package/driver/one-build-per-run.mjs +62 -0
  128. package/driver/outbox-backoff.mjs +4 -4
  129. package/driver/owner-screen.mjs +0 -10
  130. package/driver/owner-use-check.mjs +2 -28
  131. package/driver/package.json +1 -1
  132. package/driver/partial-payload-baseline.json +1 -1
  133. package/driver/parts-not-completed.mjs +1 -1
  134. package/driver/pipeline-knockout.mjs +1015 -1001
  135. package/driver/pipeline.mjs +714 -9351
  136. package/driver/placement-decisions.mjs +2 -2
  137. package/driver/placement-form-io.mjs +7 -9
  138. package/driver/placement-union.mjs +0 -6
  139. package/driver/plan-stability.mjs +7 -10
  140. package/driver/portal-acks.mjs +3 -2
  141. package/driver/portal-confirmation.mjs +48 -0
  142. package/driver/portal-families.mjs +3 -2
  143. package/driver/portal-local-auth.mjs +1 -2
  144. package/driver/portal-routes/README.md +24 -0
  145. package/driver/portal-routes/admin.mjs +425 -0
  146. package/driver/portal-routes/compose.mjs +66 -0
  147. package/driver/portal-routes/config.mjs +118 -0
  148. package/driver/portal-routes/connect.mjs +283 -0
  149. package/driver/portal-routes/feedback.mjs +178 -0
  150. package/driver/portal-routes/me.mjs +165 -0
  151. package/driver/portal-routes/queue.mjs +64 -0
  152. package/driver/portal-routes/report.mjs +106 -0
  153. package/driver/portal-routes/run.mjs +508 -0
  154. package/driver/portal-routes/runs.mjs +127 -0
  155. package/driver/portal-routes/usage.mjs +82 -0
  156. package/driver/portal-runs.mjs +588 -0
  157. package/driver/portal-service.mjs +82 -2593
  158. package/driver/portal-static.mjs +3 -1
  159. package/driver/predelivery-lint.mjs +101 -9
  160. package/driver/production-pool-guard.mjs +1 -1
  161. package/driver/profiles.mjs +5 -4
  162. package/driver/progress.mjs +29 -24
  163. package/driver/publish/README.md +10 -5
  164. package/driver/publish/archive-tags.mjs +3 -2
  165. package/driver/publish/demo-marking.mjs +2 -2
  166. package/driver/publish/index.mjs +215 -140
  167. package/driver/publish/knockout.mjs +153 -107
  168. package/driver/publish/office-record-links.mjs +22 -0
  169. package/driver/publish/parse.mjs +20 -5
  170. package/driver/publish/pool-admin.mjs +9 -3
  171. package/driver/publish/render.mjs +11 -3
  172. package/driver/publish/report-dates.mjs +3 -4
  173. package/driver/publish/report-registry.mjs +7 -10
  174. package/driver/publish/seed-pool.mjs +3 -2
  175. package/driver/publish/shell.mjs +106 -0
  176. package/driver/publish/templates/report.css +9 -7
  177. package/driver/queue-order.mjs +4 -3
  178. package/driver/record-carry.mjs +0 -9
  179. package/driver/record-discard.mjs +1 -4
  180. package/driver/record-fold.mjs +3 -3
  181. package/driver/record-goods.mjs +79 -23
  182. package/driver/reference-score.mjs +2 -3
  183. package/driver/register-capabilities.mjs +0 -6
  184. package/driver/register-count.mjs +3 -2
  185. package/driver/register-digest-record.mjs +7 -7
  186. package/driver/register-fixture-marker.mjs +3 -3
  187. package/driver/register-plan.mjs +2 -2
  188. package/driver/register-records.mjs +2 -2
  189. package/driver/register-taint.mjs +3 -3
  190. package/driver/register-unit-record.mjs +48 -9
  191. package/driver/register-unreachable.mjs +4 -3
  192. package/driver/registry-fidelity.mjs +79 -34
  193. package/driver/repair-composers.mjs +14 -9
  194. package/driver/repair-digest.mjs +4 -6
  195. package/driver/repair-scope.mjs +3 -3
  196. package/driver/repair-targets.mjs +24 -9
  197. package/driver/repairs.mjs +44 -58
  198. package/driver/replay-archive.mjs +7 -7
  199. package/driver/report-card-record.mjs +3 -3
  200. package/driver/report-overview-record.mjs +4 -4
  201. package/driver/research-answers.mjs +38 -6
  202. package/driver/research-checks.mjs +4 -4
  203. package/driver/result-noun-fields.mjs +28 -11
  204. package/driver/review-addresses.mjs +163 -0
  205. package/driver/rule-shape.mjs +1 -1
  206. package/driver/run-delivered.mjs +340 -0
  207. package/driver/run-economics.mjs +8 -26
  208. package/driver/run-failed.mjs +545 -0
  209. package/driver/run-integrity.mjs +1 -1
  210. package/driver/run-outcome.mjs +314 -0
  211. package/driver/run-park.mjs +23 -0
  212. package/driver/run-quote.mjs +32 -0
  213. package/driver/run-record.mjs +352 -0
  214. package/driver/run-requirements.mjs +22 -0
  215. package/driver/run-shell.mjs +55 -0
  216. package/driver/runner.mjs +71 -33
  217. package/driver/saved-register-pages.mjs +4 -4
  218. package/driver/score-redaction.mjs +2 -2
  219. package/driver/search-policy.mjs +12 -13
  220. package/driver/settle-stamp.mjs +4 -3
  221. package/driver/skeptic-record.mjs +2 -2
  222. package/driver/skeptic-search.mjs +1 -1
  223. package/driver/skills/README.md +7 -7
  224. package/driver/skills/blind-frame/SKILL.md +1 -2
  225. package/driver/skills/case-law-citation/SKILL.md +9 -37
  226. package/driver/skills/case-law-citation/sources/courtlistener.md +1 -3
  227. package/driver/skills/case-law-citation/sources/eurlex.md +8 -11
  228. package/driver/skills/case-law-citation/sources/legaldatahunter.md +1 -1
  229. package/driver/skills/clearance-common-law/SKILL.md +45 -111
  230. package/driver/skills/clearance-common-law/perplexity-prompts.md +7 -79
  231. package/driver/skills/clearance-register/SKILL.md +15 -33
  232. package/driver/skills/clearance-register/digest.md +35 -96
  233. package/driver/skills/clearance-register/providers/clarivate.md +2 -2
  234. package/driver/skills/clearance-register/providers/corsearch.md +5 -5
  235. package/driver/skills/clearance-register/providers/euipo.md +1 -2
  236. package/driver/skills/clearance-register/providers/free-tier.md +0 -19
  237. package/driver/skills/clearance-register/providers/signa.md +6 -25
  238. package/driver/skills/clearance-register/providers/uspto-local.md +0 -24
  239. package/driver/skills/clearance-register/register-recipes.md +8 -15
  240. package/driver/skills/clearance-register/status-rules.md +6 -24
  241. package/driver/skills/clearance-register/unit.md +11 -20
  242. package/driver/skills/clearance-search/delivery-contract.md +24 -120
  243. package/driver/skills/clearance-search/field-doctrine-pharma.md +1 -5
  244. package/driver/skills/clearance-search/firm-wide-reasoning.md +24 -43
  245. package/driver/skills/clearance-search/phase2-execution.md +29 -77
  246. package/driver/skills/clearance-search/report-prose.md +3 -4
  247. package/driver/skills/clearance-search/risk-framework-demo.md +1 -1
  248. package/driver/skills/clearance-search/risk-framework-triage.manifest.json +3 -3
  249. package/driver/skills/clearance-search/risk-framework-triage.md +7 -9
  250. package/driver/skills/clearance-search/risk-framework.manifest.json +1 -1
  251. package/driver/skills/clearance-search/risk-framework.md +1 -1
  252. package/driver/skills/clearance-search/synthesis-rules.md +30 -107
  253. package/driver/skills/clearance-search/worked-examples.md +5 -5
  254. package/driver/skills/clearance-variants/SKILL.md +46 -45
  255. package/driver/skills/clearance-variants/transliteration-scripts.md +4 -4
  256. package/driver/skills/frame-diff/SKILL.md +1 -1
  257. package/driver/skills/knockout-assess/SKILL.md +6 -14
  258. package/driver/skills/knockout-frame/SKILL.md +1 -1
  259. package/driver/skills/matter-frame/SKILL.md +7 -12
  260. package/driver/skills/matter-frame/watchlist-reference.md +1 -4
  261. package/driver/skills/narrative-refutation/SKILL.md +20 -30
  262. package/driver/skills/placement-inquiry/SKILL.md +10 -20
  263. package/driver/skills-store-provenance.mjs +1 -1
  264. package/driver/stage-context.mjs +32 -35
  265. package/driver/stage-freshness.mjs +127 -11
  266. package/driver/stages-knockout.mjs +49 -22
  267. package/driver/stages.mjs +89 -288
  268. package/driver/status-snapshot.mjs +2 -1
  269. package/driver/steps/correction-cycle.mjs +311 -0
  270. package/driver/steps/corrections.mjs +644 -0
  271. package/driver/steps/delivery.mjs +1287 -0
  272. package/driver/steps/frame-comparison.mjs +927 -0
  273. package/driver/steps/intake.mjs +84 -0
  274. package/driver/steps/open-run.mjs +419 -0
  275. package/driver/steps/overview-and-cards.mjs +899 -0
  276. package/driver/steps/placement-and-digest.mjs +23 -0
  277. package/driver/steps/register-sweep.mjs +1563 -0
  278. package/driver/steps/skeptic-and-follow-up.mjs +836 -0
  279. package/driver/steps/synthesis.mjs +261 -0
  280. package/driver/steps/verdict-gate.mjs +968 -0
  281. package/driver/suite-census.json +456 -96
  282. package/driver/surface-exit-verdict.mjs +0 -8
  283. package/driver/synthesis-record.mjs +72 -6
  284. package/driver/terminal-clamp.mjs +10 -0
  285. package/driver/tokens.mjs +8 -62
  286. package/driver/tool-calls.mjs +2 -2
  287. package/driver/unexecuted-asserts.json +2 -2
  288. package/driver/unit-state-verdict.mjs +1 -1
  289. package/driver/usage-ledger.mjs +2 -1
  290. package/driver/verify-knockout.mjs +20 -35
  291. package/driver/verify.mjs +47 -36
  292. package/driver/web-grid.mjs +3 -4
  293. package/driver/whatif-memo-run.mjs +2 -2
  294. package/driver/whatif-queue.mjs +4 -3
  295. package/driver/withheld-families.mjs +14 -15
  296. package/driver/worker-heartbeat.mjs +3 -2
  297. package/driver/write-up-form.mjs +0 -3
  298. package/mcp-server/CHANGELOG.md +8 -0
  299. package/mcp-server/http-server.mjs +11 -12
  300. package/mcp-server/lib/brief.mjs +22 -4
  301. package/mcp-server/lib/events.mjs +2 -2
  302. package/mcp-server/lib/evidence.mjs +3 -2
  303. package/mcp-server/lib/findings.mjs +2 -1
  304. package/mcp-server/lib/knockout.mjs +9 -10
  305. package/mcp-server/lib/ops.mjs +9 -9
  306. package/mcp-server/lib/runs.mjs +9 -10
  307. package/mcp-server/lib/trace.mjs +1 -1
  308. package/mcp-server/lib/whatif.mjs +2 -3
  309. package/mcp-server/package.json +1 -1
  310. package/mcp-server/server.mjs +5 -5
  311. package/node_modules/buffers/package.json +1 -1
  312. package/package.json +2 -1
  313. package/portal-ui/dist/assets/{index-fPqAU0sx.js → index-CYaO2ygd.js} +26 -14
  314. package/portal-ui/dist/assets/{index-AtB9ZpDH.css → index-izLa9apq.css} +2 -2
  315. package/portal-ui/dist/index.html +4 -4
  316. package/portal-ui/package.json +3 -3
  317. package/providers/README.md +1 -1
  318. package/providers/_shared/answer-memory.mjs +4 -5
  319. package/providers/_shared/execute-plan.mjs +48 -1
  320. package/providers/_shared/records-from-search.mjs +46 -0
  321. package/providers/clarivate/README.md +2 -2
  322. package/providers/clarivate/src/adapter.js +147 -0
  323. package/providers/clarivate/src/core.js +1 -14
  324. package/{driver/engine/mcp/clarivate-server.mjs → providers/clarivate/src/mount.js} +5 -10
  325. package/providers/corsearch/README.md +3 -3
  326. package/providers/corsearch/src/adapter.js +80 -0
  327. package/providers/corsearch/src/core.js +14 -11
  328. package/{driver/engine/mcp/corsearch-server.mjs → providers/corsearch/src/mount.js} +5 -10
  329. package/providers/euipo/README.md +2 -2
  330. package/providers/euipo/src/adapter.js +85 -0
  331. package/providers/euipo/src/core.js +1 -1
  332. package/providers/euipo/src/euipo-client.js +1 -2
  333. package/{driver/engine/mcp/euipo-server.mjs → providers/euipo/src/mount.js} +5 -10
  334. package/providers/free-tier/README.md +2 -2
  335. package/providers/free-tier/src/adapter.js +127 -0
  336. package/{driver/engine/mcp/free-tier-server.mjs → providers/free-tier/src/mount.js} +5 -10
  337. package/providers/jx-subclass/coverage.mjs +1 -6
  338. package/providers/jx-subclass/score-truth.mjs +2 -1
  339. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  340. package/providers/oauth-mcp-bridge/package.json +1 -1
  341. package/providers/perplexity/src/core.js +2 -2
  342. package/providers/signa/README.md +2 -2
  343. package/providers/signa/src/adapter.js +157 -0
  344. package/providers/signa/src/capabilities.js +0 -3
  345. package/providers/signa/src/core.js +2 -2
  346. package/{driver/engine/mcp/signa-server.mjs → providers/signa/src/mount.js} +7 -12
  347. package/providers/signa/src/offices.generated.js +17 -15
  348. package/providers/uspto-local/README.md +1 -1
  349. package/providers/uspto-local/bin/verify-index.mjs +1 -1
  350. package/providers/uspto-local/src/adapter.js +75 -0
  351. package/{driver/engine/mcp/uspto-local-server.mjs → providers/uspto-local/src/mount.js} +5 -10
  352. package/scripts/band-shape-probe.mjs +2 -2
  353. package/scripts/citation-line-check.mjs +7 -7
  354. package/scripts/compare.mjs +1 -1
  355. package/scripts/dead-names.mjs +2 -2
  356. package/scripts/e2e-first-time.mjs +19 -7
  357. package/scripts/e2e.mjs +13 -13
  358. package/scripts/engine-probe.mjs +1 -1
  359. package/scripts/env-audit.mjs +7 -4
  360. package/scripts/env-classify.mjs +5 -1
  361. package/scripts/feedback-mint.mjs +1 -1
  362. package/scripts/freeze-example-run.mjs +7 -7
  363. package/scripts/mint-suite-census.mjs +2 -2
  364. package/scripts/nightly-notice.mjs +1 -1
  365. package/scripts/release-cut-decision.mjs +7 -2
  366. package/scripts/release-note-required.mjs +26 -9
  367. package/scripts/release-notes-lint.mjs +3 -2
  368. package/scripts/release-version-pr-checks.mjs +1 -1
  369. package/scripts/render-check.mjs +1 -1
  370. package/scripts/settings-render-check.mjs +23 -3
  371. package/scripts/test-run.mjs +5 -5
  372. package/scripts/travelling-predicates.mjs +1 -1
  373. package/scripts/undeclared-field-census.mjs +1 -1
  374. package/scripts/unexecuted-asserts.mjs +3 -3
  375. package/scripts/verify-publishable.mjs +1 -1
  376. package/shared/client-door.mjs +1 -1
  377. package/shared/connect-clients.mjs +1 -1
  378. package/shared/connector-signin-probe.mjs +1 -1
  379. package/shared/customer-store.mjs +3 -2
  380. package/shared/env-aliases.mjs +1 -1
  381. package/shared/invocation.mjs +14 -2
  382. package/shared/names-in-force.mjs +2 -0
  383. package/shared/register-selection.mjs +2 -2
  384. package/shared/store-in-repo.mjs +3 -3
  385. package/shared/summary-blocks.mjs +0 -3
  386. package/shared/trigger-lane.mjs +1 -1
  387. package/shared/vacuous-pass.mjs +2 -2
  388. package/shared/verb-shim.mjs +4 -2
  389. package/vendor/buffers/package.json +1 -1
  390. package/node_modules/exceljs/README.md +0 -3023
@@ -59,8 +59,8 @@ const asList = process.argv.includes("--list");
59
59
  //
60
60
  // `resolveAuthMode({env = process.env})` reads `env.CODEX_API_KEY`. Textually there is no
61
61
  // `process.env.` before the name, so the `process.env`-only scanner recorded nothing — and this is not
62
- // an oddity, it is the refactor this repository keeps choosing (`laneArmed(lane, env)`,
63
- // `deriveJxSliceStatement({env})`). Every such conversion silently removed its variables from
62
+ // an oddity, it is the refactor this repository keeps choosing (a pure function handed `env`, as
63
+ // `resolveAuthMode` is). Every such conversion silently removed its variables from
64
64
  // governance: the guard went QUIET rather than red, which is the failure class ADR-0002 exists to end.
65
65
  // Seven product names were invisible, two of them deciding billing.
66
66
  //
@@ -324,6 +324,9 @@ export function isProductFile(rel) {
324
324
  // when this was added: HOME, PATH, TMPDIR and that delay were all the checks read, and the first three
325
325
  // stay product, because shipping code reads them too.
326
326
  if (/^scripts\/[a-z0-9-]+-render-check\.mjs$/.test(rel)) return false;
327
+ // THE SECRET SCANNER'S DOWNLOAD. CI passes it the version, hash and cache folder, and the package does not
328
+ // ship it, so a row for those in `.env.example` would hand an operator settings nothing they run reads.
329
+ if (rel === "scripts/secret-scanner-fetch.mjs") return false;
327
330
  return true;
328
331
  }
329
332
 
@@ -432,7 +435,7 @@ export function declaredEffects(rows) {
432
435
  }
433
436
 
434
437
  export function auditEnv(root = ROOT) {
435
- const tracked = trackedFiles("env-audit (#692 governance ratchet)", { root });
438
+ const tracked = trackedFiles("env-audit (governance ratchet)", { root });
436
439
  if (!tracked) return null;
437
440
  const files = tracked.filter((f) => CODE_RE.test(f) && !f.startsWith("node_modules/"));
438
441
 
@@ -736,7 +739,7 @@ const TOKEN_RE = /[A-Z][A-Z0-9_]*/g;
736
739
  * function until review.
737
740
  */
738
741
  export function auditCatalogue(root = ROOT) {
739
- const tracked = trackedFiles("env-audit (#1426 catalogue ratchet)", { root });
742
+ const tracked = trackedFiles("env-audit (catalogue ratchet)", { root });
740
743
  if (!tracked) return null;
741
744
  const file = ".env.example";
742
745
  if (!existsSync(join(root, file)))
@@ -221,7 +221,11 @@ export function setupNames(root = ROOT) {
221
221
  // `tokenEnv` joined the row shape with (the headless sign-in's captured token —
222
222
  // the wizard writes it through a COMPUTED key, `candidate[eng.headless.tokenEnv]`, so the literal
223
223
  // candidate-write matchers above cannot see it; the table field is the one derivable spelling).
224
- for (const m of cfg.matchAll(/(?:env|authEnv|apiKeyEnv|credEnv|tokenEnv):\s*"([A-Z][A-Z0-9_]*)"/g)) seed.add(m[1]);
224
+ // Each register states its credential in its own adapter, which PROVIDERS lists.
225
+ const providersDir = join(root, "providers");
226
+ const adapters = existsSync(providersDir) ? readdirSync(providersDir).map((p) => join(providersDir, p, "src", "adapter.js")).filter((f) => existsSync(f)) : [];
227
+ for (const text of [cfg, ...adapters.map((f) => readFileSync(f, "utf8"))])
228
+ for (const m of text.matchAll(/(?:env|authEnv|apiKeyEnv|credEnv|tokenEnv):\s*"([A-Z][A-Z0-9_]*)"/g)) seed.add(m[1]);
225
229
  // THE NAMES A HELPER RETURNS AND THE WIZARD MERGES IN. The sign-in step hands back the `.env` keys it
226
230
  // wants written, and the wizard writes them with `Object.assign(candidate, await askSignIn(…))`. None of
227
231
  // the matchers above sees a key inside a returned object, so both names that step writes — the address
@@ -82,7 +82,7 @@ if (!canWrite && !dryRun) {
82
82
  console.error(
83
83
  `No GitHub credential.\n\n` +
84
84
  `This host has neither an authenticated \`gh\` nor ${TOKEN_VAR} in its environment, so it cannot\n` +
85
- `create an issue. That is the open question on #264 rather than a misconfiguration — see the header\n` +
85
+ `create an issue. That is an open question rather than a misconfiguration — see the header\n` +
86
86
  `of this file for the two ways to close it.\n\n` +
87
87
  `--dry-run works without a credential and prints what would be minted.`,
88
88
  );
@@ -65,12 +65,12 @@ const FROZEN_FILES = [
65
65
  { path: "case-law-findings.md", why: "`clPath` declared in index.mjs, the case-law section" },
66
66
  { path: "common-law-grid.json", why: "`commonLawJoinedTerms` declared in index.mjs, common-law coverage" },
67
67
  // publish/index.mjs — the _driver sidecars it reads by name
68
- { path: "_driver/receipts.json", why: "publish/index.mjs:780 fetchReceipts" },
69
- { path: "_driver/senior-rights.json", why: "publish/index.mjs:806 seniorRights" },
68
+ { path: "_driver/receipts.json", why: "publish/index.mjs:764 fetchReceipts" },
69
+ { path: "_driver/senior-rights.json", why: "publish/index.mjs:790 seniorRights" },
70
70
  { path: "_driver/verdict.json", why: "publish/index.mjs:811 verdictInfo" },
71
71
  { path: "_driver/framework.json", why: "publish/index.mjs, the frozen band vocabulary the run was rated under" },
72
- { path: "_driver/register-plan.json", why: "publish/index.mjs:935 scopeBasis" },
73
- { path: "_driver/instructed-scope.json", why: "publish/index.mjs:937 searchedJurisdictions, the fallback for register-plan" },
72
+ { path: "_driver/register-plan.json", why: "publish/index.mjs:919 scopeBasis" },
73
+ { path: "_driver/instructed-scope.json", why: "publish/index.mjs:930 searchedJurisdictions, the fallback for register-plan" },
74
74
  { path: "_driver/enforcer-signals.json", why: "`esPath` declared in index.mjs" },
75
75
  { path: "_driver/predelivery-lint.json", why: "publish/index.mjs:173 lintSink" },
76
76
  { path: "_driver/escalation-state.json", why: "publish/index.mjs:174 escSink" },
@@ -111,14 +111,14 @@ const KNOCKOUT_FILES = [
111
111
  { path: "_driver/search-policy.json", why: "report-registry.mjs:71 level + stage label" },
112
112
  { path: "_driver/profile.json", why: "report-registry.mjs:72 customer key and the delivery overlay" },
113
113
  { path: "_driver/verdict.json", why: "publish/index.mjs:811 verdictInfo" },
114
- { path: "_driver/receipts.json", why: "publish/index.mjs:780 fetchReceipts" },
114
+ { path: "_driver/receipts.json", why: "publish/index.mjs:764 fetchReceipts" },
115
115
  // THE COUNT SIDECARS, AND THE PROOF IS WHAT FOUND THEM. Without register-counts.json the republished
116
116
  // meta carries `registerCounts: undefined` where the source carried the provider, the taken-at stamp
117
117
  // and the per-mark counts — so the workbook's Register column and every counted figure in the
118
118
  // knockout report render empty (`buildKnockoutWorkbook` in publish/knockout.mjs). Named by `koPaths` in stages-knockout.mjs.
119
119
  { path: "_driver/register-counts.json", why: "buildKnockoutWorkbook in publish/knockout.mjs: counted figures + the Register column" },
120
120
  { path: "_driver/register-records.json", why: "koPaths in stages-knockout.mjs: the terms behind the close-variation axis" },
121
- { path: "_driver/instructed-scope.json", why: "publish/index.mjs:937 searchedJurisdictions, the fallback for register-plan" },
121
+ { path: "_driver/instructed-scope.json", why: "publish/index.mjs:930 searchedJurisdictions, the fallback for register-plan" },
122
122
  ];
123
123
 
124
124
  /** The allowlist for a template. One place, so a new template cannot half-exist. */
@@ -174,7 +174,7 @@ const SCRUB = [
174
174
  // hides the next real difference.
175
175
  const VOLATILE = [
176
176
  { id: "issued", re: /\d{4}-\d{2}-\d{2} · \d{2}:\d{2} [A-Z]{2,5}/g, sub: "<issued>", why: "publish/index.mjs, the issue stamp in the firm locale" },
177
- { id: "iso-timestamp", re: /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z/g, sub: "<ts>", why: "publish/index.mjs:669 asOf" },
177
+ { id: "iso-timestamp", re: /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z/g, sub: "<ts>", why: "publish/index.mjs:668 asOf" },
178
178
  ];
179
179
 
180
180
  // ── REWRITES — what is CHANGED on the way out, as opposed to what is refused ───────────────────────
@@ -55,7 +55,7 @@ const CHECK = process.argv.includes("--check");
55
55
  const ALLOW_LOSS = process.argv.includes("--allow-loss");
56
56
 
57
57
  const README = [
58
- "#1010 — THE SUITE'S SELF-CENSUS. Minted and checked by shared/suite-census.mjs's ONE counter, so the",
58
+ "THE SUITE'S SELF-CENSUS. Minted and checked by shared/suite-census.mjs's ONE counter, so the",
59
59
  "minting side cannot drift from the checking side and manufacture its own findings.",
60
60
  "",
61
61
  "Collection is a glob, so a test file that is DELETED or RENAMED out of it simply stops being",
@@ -309,7 +309,7 @@ function main() {
309
309
  console.error("\nOne of the two moved. Either a workspace's test script or a root test script was "
310
310
  + "re-pointed, or CENSUS_WORKSPACES / CENSUS_ROOT_SCRIPTS in shared/suite-census.mjs is out of "
311
311
  + "date. Fix the disagreement — do not re-stamp over it, because a census minted against a corpus "
312
- + "nothing runs is the defect #1010 names, not the fix for it.");
312
+ + "nothing runs is the defect, not the fix for it.");
313
313
  process.exitCode = 1;
314
314
  return;
315
315
  }
@@ -143,7 +143,7 @@ export function noticeBody({ runUrl, sha, subject, failedJobs = [], lastGreenAt,
143
143
  + "in the repository was exercised. Read this as an infrastructure or billing failure until "
144
144
  + "something says otherwise — there is no code regression to look for yet."
145
145
  : "macOS falsifies three things a Linux-only pipeline cannot see — `node:sqlite`, executable "
146
- + "resolution across PATH, and spawning a child with a modified environment (#777). A red here "
146
+ + "resolution across PATH, and spawning a child with a modified environment. A red here "
147
147
  + "is one of those, or it is the platform gate itself breaking; both need a person.",
148
148
  "",
149
149
  nothingRan
@@ -71,7 +71,8 @@ export function cutRef(env = process.env) {
71
71
  }
72
72
 
73
73
  function main() {
74
- const version = versionAtHead({ ref: cutRef() });
74
+ const ref = cutRef();
75
+ const version = versionAtHead({ ref });
75
76
  const tags = tagsHere();
76
77
  // A CHECKOUT WITH NO TAGS AT ALL CANNOT ANSWER THIS. Every version would read as never released, and
77
78
  // the pipeline would publish on every push. `fetch-depth: 0` brings tags; if it ever stops, this
@@ -85,7 +86,11 @@ function main() {
85
86
  const { cut } = cutDecision({ version, tags });
86
87
  console.log(cut ? `v${version} has no tag — this push cut it.` : `v${version} is already released — nothing to publish.`);
87
88
  const out = process.env.GITHUB_OUTPUT;
88
- if (out) appendFileSync(out, `version=${version}\ncut=${cut}\n`);
89
+ // THE COMMIT THE ANSWER IS ABOUT. A job that then builds something names this, or it builds whatever its event
90
+ // commit happened to be: a scheduled run queued before a version commit asks about main and would pack the tree
91
+ // from before it. Measured 2026-11-08, when a scheduled run tried to publish the previous version again.
92
+ const sha = execFileSync("git", ["rev-parse", `${ref}^{commit}`], { encoding: "utf8" }).trim();
93
+ if (out) appendFileSync(out, `version=${version}\ncut=${cut}\nsha=${sha}\n`);
89
94
  }
90
95
 
91
96
  if (isEntrypoint(import.meta.url)) main();
@@ -117,8 +117,12 @@
117
117
  // commit cannot answer for itself;
118
118
  // - the reason is read by NO_NOTE itself, so the two forms cannot drift. Empty, or a dash, is refused;
119
119
  // - one commit takes one answer: two lines naming the same commit are both refused, even when they agree;
120
- // - an answer naming a commit that owes none (it ships no code, carries a note, or gives its own reason)
121
- // is refused as stale. An answer ignored in silence reads as though it did something.
120
+ // - an answer naming a commit that owes none because it carries a note or gives its own reason is
121
+ // refused as stale. An answer ignored in silence reads as though it did something;
122
+ // - an answer naming a commit that ships no code is printed as answering nothing, and not refused. What
123
+ // ships is read off the package's own list, so a file can stop counting after an answer was written for
124
+ // it, in history nobody may rewrite (measured 2026-11-11: two answers for test helpers, once `**/test/`
125
+ // was read as npm reads it). A mistyped sha gains nothing from this: the commit that was meant still owes.
122
126
  // Every answer taken is printed with the sha that gave it, and every refused answer fails the check and
123
127
  // names the commit that carries it. The answering commit is read like any other: one that ships no code,
124
128
  // such as an empty commit, owes nothing of its own.
@@ -180,15 +184,22 @@ export function shipsCode(path, files) {
180
184
  return shipped;
181
185
  }
182
186
 
183
- /** The small slice of glob the `files` list actually uses: a directory prefix, and star wildcards. */
187
+ /**
188
+ * The small slice of glob the `files` list actually uses: a directory prefix, and star wildcards.
189
+ *
190
+ * A DIRECTORY PATTERN WITH A STAR is everything under every directory it matches, as npm reads it:
191
+ * `**\/test/` excludes a helper under `driver/test/` as well as a `*.test.mjs` file. Read as a plain
192
+ * prefix it matched nothing, and 47 helpers npm never packs were asked for a release note (measured
193
+ * against `npm pack --dry-run`, 2026-11-11).
194
+ */
184
195
  function matches(path, glob) {
185
- if (glob.endsWith("/")) return path.startsWith(glob);
186
- if (!glob.includes("*")) return path === glob || path.startsWith(`${glob}/`);
196
+ const dir = glob.endsWith("/");
197
+ if (!glob.includes("*")) return dir ? path.startsWith(glob) : path === glob || path.startsWith(`${glob}/`);
187
198
  const re = new RegExp("^" + glob
188
199
  .replace(/[.+^${}()|[\]\\]/g, "\\$&")
189
200
  .replace(/\*\*\//g, "(?:.*/)?")
190
201
  .replace(/\*\*/g, ".*")
191
- .replace(/(?<!\.)\*/g, "[^/]*") + "$");
202
+ .replace(/(?<!\.)\*/g, "[^/]*") + (dir ? "" : "$"));
192
203
  return re.test(path);
193
204
  }
194
205
 
@@ -268,6 +279,7 @@ const shipped = (paths, files) => paths.filter((p) => !NEVER_A_NOTE.some((re) =>
268
279
  * withdrawals:Array<{sha:string, subject:string, note:string, by:string, reason:string}>,
269
280
  * answered:Array<{sha:string, subject:string, by:string, reason:string}>,
270
281
  * refusedAnswers:Array<{sha:string, subject:string, text:string, problem:string}>,
282
+ * unneeded:Array<{sha:string, by:string, said:string}>,
271
283
  * owed:Array<{sha:string, subject:string, why:"no-note"|"prose"|"bare-none"|"names-a-missing-note"|"note-withdrawn-unsaid",
272
284
  * paths?:string[], text?:string, by?:string}>}}
273
285
  */
@@ -319,7 +331,7 @@ export function commitVerdicts({ commits = [], files = [], atHead = null, isAnce
319
331
  });
320
332
  // AND A NAME THE HEAD STILL CARRIES WAS NEVER WITHDRAWN AT ALL: the release assembles what the head has.
321
333
  if (presentNames) for (const name of [...withdrawn.keys()]) if (presentNames.has(name)) withdrawn.delete(name);
322
- const declined = [], owed = [], withdrawals = [], answered = [];
334
+ const declined = [], owed = [], withdrawals = [], answered = [], unneeded = [];
323
335
  const { answers, refused: refusedAnswers } = readAnswers(commits, isAncestor);
324
336
  const used = new Set();
325
337
  for (const [i, c] of commits.entries()) {
@@ -372,8 +384,10 @@ export function commitVerdicts({ commits = [], files = [], atHead = null, isAnce
372
384
  }
373
385
  // AN ANSWER THAT ANSWERED NOTHING IS REFUSED, NOT IGNORED (see the header).
374
386
  const owing = new Set(owed.map((o) => o.sha));
387
+ const shipsNothing = new Set(commits.filter((c) => !shipped(c.paths, files).length).map((c) => c.sha));
375
388
  for (const [sha, a] of answers) {
376
389
  if (used.has(sha)) continue;
390
+ if (shipsNothing.has(sha)) { unneeded.push({ sha, by: a.by, said: a.note ?? a.reason }); continue; }
377
391
  refusedAnswers.push({ sha: a.by, subject: a.subject, text: a.text,
378
392
  problem: owing.has(sha)
379
393
  ? (a.note
@@ -381,7 +395,7 @@ export function commitVerdicts({ commits = [], files = [], atHead = null, isAnce
381
395
  : `names ${sha.slice(0, 7)}, which owes a note this line cannot give: an answer covers only a bare \`none\``)
382
396
  : `names ${sha.slice(0, 7)}, which owes no answer: it ships no code, carries a note, or gives its own reason` });
383
397
  }
384
- return { visible, notes, declined, withdrawals, owed, answered, refusedAnswers };
398
+ return { visible, notes, declined, withdrawals, owed, answered, refusedAnswers, unneeded };
385
399
  }
386
400
 
387
401
  const argAfter = (flag) => {
@@ -448,7 +462,7 @@ function main() {
448
462
  }
449
463
  // ANCESTRY FROM GIT, NEVER TIMESTAMPS: an answer must come from a commit the named one is an ancestor of.
450
464
  const isAncestor = (a, b) => { try { git("merge-base", "--is-ancestor", a, b); return true; } catch { return false; } };
451
- const { visible, notes, declined, withdrawals, owed, answered, refusedAnswers } = commitVerdicts({ commits, files, atHead, isAncestor });
465
+ const { visible, notes, declined, withdrawals, owed, answered, refusedAnswers, unneeded } = commitVerdicts({ commits, files, atHead, isAncestor });
452
466
  console.log(`release-note-required: ${changed.length} changed file(s) against ${base}`
453
467
  + `${head === "HEAD" ? "" : ` (head ${head})`}; `
454
468
  + `${visible.length} ship as code; ${notes.length} release note(s) in the range; ${commits.length} commit(s) read`
@@ -472,6 +486,9 @@ function main() {
472
486
  ? ` ${a.sha.slice(0, 7)} said ${a.said === "none" ? "a bare `none`" : `"${a.said}"`}, which ${a.by.slice(0, 7)} answers with ${a.note}`
473
487
  : ` ${a.sha.slice(0, 7)} said a bare \`none\`, which ${a.by.slice(0, 7)} answers: ${a.reason}`);
474
488
  }
489
+ for (const u of unneeded) {
490
+ console.log(` ${u.sha.slice(0, 7)} ships no code, so ${u.by.slice(0, 7)} answers for nothing it owed: ${u.said}`);
491
+ }
475
492
  if (!owed.length && !refusedAnswers.length) return;
476
493
  if (refusedAnswers.length) {
477
494
  console.error(`\n${refusedAnswers.length} Release-note-for answer(s) refused:\n`);
@@ -30,8 +30,9 @@ export const GROUPS = ["Before you upgrade", "New", "Fixed", "For operators"];
30
30
 
31
31
  /** At most this many words in a sentence, or in each clause of it after a semicolon or a colon. The contract's number,
32
32
  * not a tuned one. It has risen only to the length of a sentence the owner approved word for word, and no further:
33
- * 25 to 26 on 2026-10-28, and 26 to 30 on 2026-10-30, for a note of 30 words in one clause. */
34
- export const MAX_WORDS = 30;
33
+ * 25 to 26 on 2026-10-28, 26 to 30 on 2026-10-30, for a note of 30 words in one clause, and 30 to 41 on 2026-11-11,
34
+ * for a note of 41 words in one clause approved under the owner's delegation. A ceiling, not a target. */
35
+ export const MAX_WORDS = 41;
35
36
 
36
37
  /**
37
38
  * Our internal vocabulary. Every one of these is a word we use fluently and the reader has never met in
@@ -56,7 +56,7 @@ const nameOf = (r) => r?.name ?? "(unnamed)";
56
56
  *
57
57
  * A GUARD THAT ONLY NAMES THE PROBLEM COSTS THE READER THE SAME HOUR EVERY TIME. This one fires on
58
58
  * every version pull request — the bot parks under the narrowest policy this repository can set — so it
59
- * is read often, and by whoever is on shift rather than by whoever built it. The run id is the only
59
+ * is read often, and by whoever is cutting the release rather than by whoever built it. The run id is the only
60
60
  * thing that is not already in the sentence.
61
61
  */
62
62
  const howToClear = (repo, runs) => {
@@ -256,7 +256,7 @@ const SHELL = `<!doctype html><html><head><meta charset="utf-8"><title>render-ch
256
256
  <h1 style="font-size:19px;margin:0">Mark</h1><span style="flex:1"></span>
257
257
  <button class="nav-item" id="exp" style="width:auto">Export</button></div></div>
258
258
  <div data-anon="mark" style="margin-top:12px">
259
- <!-- The SAME sandbox Result.tsx sets, verbatim (#705). This shell exists to reproduce the portal's
259
+ <!-- The SAME sandbox Result.tsx sets, verbatim. This shell exists to reproduce the portal's
260
260
  report frame in a real browser, and a harness that sandboxes it more tightly than production
261
261
  cannot see a defect that only production's permissions expose — it can only invent one. -->
262
262
  <iframe id="f" src="rep.html" scrolling="auto"
@@ -71,7 +71,7 @@ const adminConfig = {
71
71
  }
72
72
  const about = productIdentity()
73
73
 
74
- const state = { contact: CONTACT, reset: null }
74
+ const state = { contact: CONTACT, reset: null, programMissing: false }
75
75
  // THE PAGE'S OWN LOADS, COUNTED. A screen that asks the server twice paints exactly like one that asks once,
76
76
  // and each request spends the person's rate budget, so the only instrument that sees a double load is a count.
77
77
  const loads = []
@@ -88,7 +88,9 @@ const server = createServer((req, res) => {
88
88
  access: [{ kind: 'everything' }], organisations: [{ key: 'northwind', name: 'Northwind Group' }],
89
89
  accountNames: { northwind: 'Northwind Foods' }, brand: 'Northwind Group', administratorContact: state.contact })
90
90
  }
91
- if (path === '/portal/admin/config' && !wantsPage) return json(adminConfig)
91
+ if (path === '/portal/admin/config' && !wantsPage) {
92
+ return json(state.programMissing ? { ...adminConfig, engine: { ...adminConfig.engine, binaryPresent: false } } : adminConfig)
93
+ }
92
94
  if (path === '/portal/api/about') return json(about)
93
95
  if (path === '/portal/admin/roster' && !wantsPage) return json({ customers: [{ key: 'northwind', name: 'Northwind Foods' }] })
94
96
  // THE PEOPLE SCREEN'S OWN DATA. Rows with real-length values on purpose: the defect this screen was
@@ -389,7 +391,7 @@ const SPEC = {
389
391
  blurLine: 'On the top bar. It covers every mark and company on screen, and an open report whole. It stays as you left it on this computer.',
390
392
  // The sign-in page's wording is the owner's, approved 2026-09-19 and used verbatim.
391
393
  identity: (email) => `This Clearotron has one user: ${email}. Enter its passphrase.`,
392
- reset: 'The passphrase was printed once when this Clearotron first started. Lost it? Run clearotron passphrase --reset on the machine running this portal. It prints a new one, once, for the same user.',
394
+ reset: 'The passphrase was printed once, when this Clearotron first started or was last reset. Lost it? Run clearotron passphrase --reset on the machine running this portal. It prints a new one, once, for the same user.',
393
395
  key: 'A key from clearotron key issue is for an AI assistant, not for this page.',
394
396
  addPeople: 'To add people, put it behind a login system such as your company single sign-on. How to set that up',
395
397
  }
@@ -453,6 +455,24 @@ for (const theme of ['light', 'dark']) {
453
455
  `one visit asks for the settings once and for the source address once (saw ${JSON.stringify(loads)})`)
454
456
  }
455
457
 
458
+ // ── Installation settings, the engine program missing
459
+ // The Engine row's fault names the program and the setup command in backticks, as a terminal prints them. Drawn
460
+ // as text, the reader saw the backticks; each pair is now code, and no backtick is left on the row.
461
+ console.log('\nInstallation settings, engine program missing:')
462
+ state.programMissing = true
463
+ if (await open('/portal/admin/config', "document.querySelectorAll('.cfg-row').length >= 9", 'Installation settings drew its rows with the program missing')) {
464
+ await setTheme(theme)
465
+ const row = (await evalIn(`(() => {
466
+ const note = [...document.querySelectorAll('.cfg-note.bad')].find((p) => /cannot be found or run/.test(p.textContent));
467
+ return note ? { text: note.textContent, code: [...note.querySelectorAll('code')].map((c) => c.textContent) } : null;
468
+ })()`)) ?? null
469
+ ok(row !== null, 'the Engine row says its program cannot be found or run')
470
+ ok(row && !row.text.includes('\u0060'), `the Engine row shows no backtick (saw ${JSON.stringify(row?.text)})`)
471
+ ok(row && same(row.code, ['claude', 'npx clearotron install']), `the program and the setup command are drawn as code (saw ${JSON.stringify(row?.code)})`)
472
+ await capture(`installation-settings-program-missing-${theme}`)
473
+ }
474
+ state.programMissing = false
475
+
456
476
  // ── Preferences, contact set and unset
457
477
  for (const [label, contact] of [['contact-set', CONTACT], ['contact-unset', null]]) {
458
478
  console.log(`\nPreferences, ${label}:`)
@@ -102,9 +102,9 @@ const REAL_TMP = process.env.CT_TEST_TMP_BASE || tmpdir();
102
102
  // temp root that is perfectly contained.
103
103
  //
104
104
  // IT ONLY EVER WORKED BY WAY OF THE LITERAL `/tmp`. In CI `TMPDIR` is unset, every root is under `/tmp`,
105
- // and the literal in `PLATFORM_TMP` below covered the sibling. On a box whose temp directory is anywhere
106
- // else — this one exports `TMPDIR=/mnt/datadisk1/tmp` — nothing in the list covered it, so ten arms that
107
- // drive the runner recursively failed here and passed in CI on the same commit. The guard was not
105
+ // and the literal in `PLATFORM_TMP` below covered the sibling. On a machine whose `TMPDIR` points
106
+ // outside `/tmp`, nothing in the list covered it, so ten arms that drive the runner recursively failed
107
+ // there and passed in CI on the same commit. The guard was not
108
108
  // protecting a differently-rooted box at all; it was refusing it.
109
109
  //
110
110
  // So this is read ONCE, at the outermost run, before `TMPDIR` is rewritten, and passed down untouched.
@@ -316,7 +316,7 @@ if (missingDeps.length) {
316
316
  console.error(``);
317
317
  console.error(` A fresh 'git worktree add' has no node_modules. Running anyway would report ~190`);
318
318
  console.error(` tests that never executed as ~295 failed assertions, which reads as code defects and`);
319
- console.error(` makes a clean-looking baseline diff out of a suite that was never run. #535.`);
319
+ console.error(` makes a clean-looking baseline diff out of a suite that was never run.`);
320
320
  process.exit(1);
321
321
  }
322
322
 
@@ -383,7 +383,7 @@ const DATA_PLANE_VARS = Object.freeze([
383
383
  // minted yet at this point, but it is created UNDER one of these, so a value pointing inside it passes.
384
384
  //
385
385
  // THE PLATFORM TEMP DIRECTORY IS IN THIS LIST SEPARATELY FROM `tmpdir()`, and the first draft of this
386
- // guard was wrong for want of it: this box exports `TMPDIR=/mnt/datadisk1/tmp`, so `tmpdir()` answers
386
+ // guard was wrong for want of it: on a machine whose `TMPDIR` points outside `/tmp`, `tmpdir()` answers
387
387
  // that and a perfectly contained `/tmp/...` value was REFUSED. A guard that refuses correct work gets
388
388
  // removed, and then nothing is guarded at all — the false refusal is the expensive direction here, not
389
389
  // the missed one, because the value this is protecting against is somebody's live estate under /home
@@ -76,7 +76,7 @@ import { trackedFiles } from "../shared/tracked-files.mjs";
76
76
  import { isEntrypoint } from "../shared/is-entrypoint.mjs"; // — realpath both sides, or a symlinked invocation exits 0 silently
77
77
 
78
78
  /** Named once so the test can report the SAME guard in its skip reason. */
79
- export const GUARD = "#1100 travelling-predicate candidates";
79
+ export const GUARD = "travelling-predicate candidates";
80
80
 
81
81
  const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
82
82
 
@@ -111,7 +111,7 @@ console.log(` ${"route".padEnd(28)} ${"jobs".padStart(6)} ${"with an undeclar
111
111
  for (const [via, v] of Object.entries(census.byRoute).sort((a, b) => b[1].jobs - a[1].jobs))
112
112
  console.log(` ${via.padEnd(28)} ${String(v.jobs).padStart(6)} ${String(v.withUndeclared).padStart(26)}`);
113
113
  console.log(`\n A door-stamped job CANNOT carry one — its assembler dropped it before the manifest was written.`);
114
- console.log(` So the rate that answers #1325 is over the unstamped route alone:\n`);
114
+ console.log(` So the rate to read is over the unstamped route alone:\n`);
115
115
  console.log(` ${unstamped.withUndeclared} of ${unstamped.jobs} hand-written manifest(s) carry a field no door declares`
116
116
  + `${unstamped.jobs ? ` — ${Math.round((unstamped.withUndeclared / unstamped.jobs) * 100)}%` : ""}`);
117
117
  console.log(` (${stampedJobs} further job(s) arrived through a door and are excluded, with their reason above)`);
@@ -79,7 +79,7 @@ const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
79
79
  const CENSUS = join(ROOT, "driver", "unexecuted-asserts.json");
80
80
 
81
81
  const README = [
82
- "#1010's FIFTH MEMBER — an arm that ran and asserted nothing. The other four move the file's text and",
82
+ "THE FIFTH MEMBER — an arm that ran and asserted nothing. The other four move the file's text and",
83
83
  "driver/suite-census.json counts it; a GATED arm — an early return behind a condition nobody satisfies —",
84
84
  "moves no token at all, so the suite passes, the census passes, and the arm asserts nothing.",
85
85
  "",
@@ -109,7 +109,7 @@ const README = [
109
109
  " 4 a comment at the site says the branch IS taken and it is not (portal-service's grants file,",
110
110
  " profiles-page's anon config). The comment is the claim; the coverage is the measurement.",
111
111
  "",
112
- "The last two groups are the instrument's first findings and are ON #1010's thread, not fixed here.",
112
+ "The last two groups are the instrument's first findings and are recorded for follow-up, not fixed here.",
113
113
  "",
114
114
  "RE-STAMP DELIBERATELY: npm run assert-census -- <lcov> --apply",
115
115
  ];
@@ -201,7 +201,7 @@ if (isEntrypoint(import.meta.url)) {
201
201
  // the workflow file to find out what to substitute. A guard whose remedy has to be looked up is a
202
202
  // guard people delete (its own rule, applied to its own error message).
203
203
  console.error(`\nCHECK FAILED — ${grew.length} file(s) grew an assert site that never ran.\n\n`
204
- + "READ EACH ONE FIRST. An arm that stopped asserting is the defect this exists to find (#1010);\n"
204
+ + "READ EACH ONE FIRST. An arm that stopped asserting is the defect this exists to find;\n"
205
205
  + "a new honest branch — a platform check, an else nobody takes here — is re-stamped deliberately:\n\n"
206
206
  + " CT_COVERAGE_DIR=/tmp/cov npm run test:full\n"
207
207
  + " npm run assert-census -- /tmp/cov/driver.lcov --apply\n\n"
@@ -110,7 +110,7 @@ try {
110
110
  const m = JSON.parse(readFileSync(mf, "utf8"));
111
111
  if (m.license !== "AGPL-3.0-only" || !/[Cc]lean-room/.test(m.description ?? "")) {
112
112
  fail(`${d} is NOT the clean-room replacement (license=${m.license}) — the unlicensed buffers@0.1.1 `
113
- + "reached a consumer tree, which is the whole reason vendor/buffers exists (#854)");
113
+ + "reached a consumer tree, which is the whole reason vendor/buffers exists");
114
114
  }
115
115
  }
116
116
  if (dirs.length && process.exitCode !== 1) ok(`all ${dirs.length} \`buffers\` in the tree are the clean-room replacement`);
@@ -695,7 +695,7 @@ export function describeChange(plan, { applied = false, publicAddress = null, re
695
695
  // `publicAddress` is whatever the operator put in `CLEAROTRON_CLIENT_MCP_URL`, and a loopback value
696
696
  // is a thing an operator does set — it is the address that works for them at the keyboard. The
697
697
  // sentence below then made the exact claim the paragraph above says never to make wrongly, out of a
698
- // value nobody had checked. Driven by the test lane on a real box.
698
+ // value nobody had checked. Driven on a real machine.
699
699
  //
700
700
  // So the claim is made from the address's HOST, not from the variable being non-empty. An address
701
701
  // that cannot be parsed is not claimed about either — the last branch already exists for that.
@@ -114,7 +114,7 @@ const TRY_IT = "Try it: in your assistant, ask **“Show my recent Clearotron cl
114
114
  // NEITHER ROUTE IS DELETED. A bare self-hosted install with no provider in front is the key door, and it
115
115
  // is the only route that works there. A hosted deployment may run a key door too, as a separate host
116
116
  // (`keyAddress`), for assistants that cannot follow a browser sign-in: see `keySteps` below.
117
- export const DOOR_KINDS = Object.freeze(["sign-in", "key"]);
117
+
118
118
  // NO HINT UNDER THE SIGN-IN DOOR'S FIRST STEP. There was one — "No key: this connector signs you in
119
119
  // through your browser, and the sign-in is the authentication your assistant is asking about." — and the
120
120
  // approved design (2026-09-16) removes it rather than rewording it: the sign-in step says the same thing
@@ -39,7 +39,7 @@
39
39
  // ── IT WRITES, WHICH IS WHY IT IS NEVER DEFAULT ─────────────────────────────────────────────────────
40
40
  //
41
41
  // Every successful registration CREATES AN OAUTH CLIENT on the operator's account. INSTALL.md promises
42
- // `doctor` "reads; writes nothing, calls nobody", and that sentence is load-bearing — it is why a
42
+ // `doctor` "reads; writes nothing and contacts nothing outside this machine", and that sentence is load-bearing — it is why a
43
43
  // reader runs `doctor` on a production box without thinking about it. So this is opt-in at the command
44
44
  // line, it says what it is about to create before it creates it, and it reports what it left behind.
45
45
 
@@ -59,8 +59,9 @@ export function customerStoreDir({ env = process.env, bundledDir } = {}) {
59
59
  export function customerStoreLine(label, { dir, source }) {
60
60
  return source === "configured"
61
61
  ? `${label} ON — store=${dir} (CLEAROTRON_CUSTOMERS_DIR)`
62
- : `${label} ON — store=${dir} (BUNDLED DEMO ROSTER — CLEAROTRON_CUSTOMERS_DIR is unset, so no customer `
63
- + "added to a config store is visible here)";
62
+ : `${label} ON — store=${dir}, the folder that ships with this install (CLEAROTRON_CUSTOMERS_DIR is unset). A company `
63
+ + "whose profile is in a separate config store is not shown here until CLEAROTRON_CUSTOMERS_DIR is set to that store's "
64
+ + "profiles directory.";
64
65
  }
65
66
 
66
67
  /**
@@ -42,7 +42,7 @@ import { NAMES_IN_FORCE } from "./names-in-force.mjs";
42
42
  // can rot alone.
43
43
  export const RETIRED_NEW_SPELLINGS = Object.freeze({
44
44
  CLEAROTRON_DELIVERY:
45
- "delivery is one behaviour and not a setting since #1014 — every requester-facing event is a "
45
+ "delivery is one behaviour and not a setting — every requester-facing event is a "
46
46
  + "self-contained outbox packet (docs/DELIVERY.md). If this was set to `stage`, nothing is sending "
47
47
  + "your notices: the packets are being written and are waiting for an integrator to consume them.",
48
48
  });
@@ -180,6 +180,18 @@ function readerEnv(env) {
180
180
  return { ...env, PATH: path.split(delimiter).filter((d) => !/[\\/]_npx[\\/]/.test(d)).join(delimiter) };
181
181
  }
182
182
 
183
+ /**
184
+ * Does the `clearotron` at `path` lead to THIS install? A link npm made to its executable, or our shim naming
185
+ * it. Run from a project that installed the package, as INSTALL §2 has a tarball installed, npm puts that
186
+ * project's `node_modules/.bin` first on the PATH of what it runs, and the `clearotron` there is a link to
187
+ * this very install. It was reported as "a different `clearotron` earlier on your PATH" (measured in a
188
+ * stranger walk of a beta, 2026-11-10), and the commands after it named a full path where the bare name works.
189
+ */
190
+ const leadsHere = (installDir, io) => (path) => {
191
+ const { kind } = inspectShim(path, io.read ? { installDir, read: io.read } : { installDir });
192
+ return kind === "ours" || kind === "npm-link";
193
+ };
194
+
183
195
  export function invocationForm(env = process.env, io = FS, installDir = INSTALL_DIR) {
184
196
  const dir = shimDir(env);
185
197
  const path = shimPath(env);
@@ -191,7 +203,7 @@ export function invocationForm(env = process.env, io = FS, installDir = INSTALL_
191
203
  ? inspectShim(path, io.read ? { installDir, read: io.read } : { installDir })
192
204
  : { kind: "absent-or-unreadable", installDir: null };
193
205
  if (shim.kind === "ours" && shim.interpreterMissing !== true) {
194
- const { onPath, shadowedBy } = pathPosition(dir, readerEnv(env), { exists: io.exists });
206
+ const { onPath, shadowedBy } = pathPosition(dir, readerEnv(env), { exists: io.exists, same: leadsHere(installDir, io) });
195
207
  if (onPath && !shadowedBy) {
196
208
  return { form: "bare", prefix: "", shim: path, dir, onPath: true, shadowedBy: null, staleInterpreter: null };
197
209
  }
@@ -208,7 +220,7 @@ export function invocationForm(env = process.env, io = FS, installDir = INSTALL_
208
220
  // disk would answer differently on a box that really has a global install — the reason the FS note at
209
221
  // the top of this file gives for injecting both halves.
210
222
  if (globalExe && shim.kind !== "ours" && io.exists(globalExe)) {
211
- const { onPath, shadowedBy } = pathPosition(globalDir, readerEnv(env), { exists: io.exists });
223
+ const { onPath, shadowedBy } = pathPosition(globalDir, readerEnv(env), { exists: io.exists, same: leadsHere(installDir, io) });
212
224
  if (onPath && !shadowedBy) {
213
225
  return { form: "bare", prefix: "", shim: globalExe, dir: globalDir, onPath: true, shadowedBy: null, staleInterpreter: null, via: "global" };
214
226
  }
@@ -112,6 +112,8 @@ export const NAMES_IN_FORCE = Object.freeze([
112
112
  "CLEAROTRON_MIN_TOKENS_WARMUP_MS",
113
113
  "CLEAROTRON_MODEL_WIRE_CHECK",
114
114
  "CLEAROTRON_NATIVE_LANGUAGE_",
115
+ "CLEAROTRON_NATIVE_LANGUAGE_JA",
116
+ "CLEAROTRON_NATIVE_LANGUAGE_KO",
115
117
  "CLEAROTRON_NATIVE_LANGUAGE_ZH",
116
118
  "CLEAROTRON_NO_ENV_FILE",
117
119
  "CLEAROTRON_NO_PROGRESS_FLOOR_MS",
@@ -74,9 +74,9 @@ const USPTO_WARNINGS = [
74
74
 
75
75
  export const PROVIDERS = [
76
76
  {
77
- id: "signa", label: "Signa — recommended: US + EU + WIPO and ten more offices", cost: "subscription",
77
+ id: "signa", label: "Signa — recommended: US + EU + WIPO and twelve more offices", cost: "subscription",
78
78
  covers: "the US and EU registers together, plus WIPO/Madrid, the UK, Switzerland, Canada, Australia, "
79
- + "France, Spain, Mexico, Singapore, Norway and Sweden — thirteen offices — with native sound-alike search, exact "
79
+ + "France, Spain, Italy, Mexico, Brazil, Singapore, Norway and Sweden — fifteen offices — with native sound-alike search, exact "
80
80
  + "result counts and opposition state. One self-serve key, no sales call.",
81
81
  credentials: ["SIGNA_API_KEY"],
82
82
  signup: SIGNA_SIGNUP,
@@ -31,8 +31,8 @@
31
31
  // wrong `false` is therefore an OUTAGE, while a wrong `true` is the status quo this defect already
32
32
  // describes. So a path is outside only when BOTH the lexical reading and the symlink-resolved one say so:
33
33
  // `resolve()` alone is lexical, and these stores are routinely reached through symlinked paths
34
- // (`/opt/cordillera/...`), where a store genuinely inside the repository resolves to a string that does
35
- // not look like it.
34
+ // (a packaged deployment's path), where a store genuinely inside the repository resolves to a string
35
+ // that does not look like it.
36
36
  //
37
37
  // A path that cannot be read falls back to its own lexical form, NOT to "contained". A store directory
38
38
  // that does not exist yet is still misconfigured if it names another tree — the service would create it
@@ -187,7 +187,7 @@ export function makeCommittableAudit({ auditPath, repoRoot }) {
187
187
  // lexical reading first and falls back to the symlink-resolved one; a path that cannot be read falls
188
188
  // back to its own lexical form. The store DIRECTORY exists, so it resolves. The audit file does not
189
189
  // exist yet at wiring time, so it does not — and under a store reached through a symlink (every
190
- // `/opt/cordillera/...` deployment) the resolved repo root and the unresolved file path have nothing
190
+ // packaged deployment's path) the resolved repo root and the unresolved file path have nothing
191
191
  // in common. The guard one screen up would pass, this would answer `false`, no row would ever be
192
192
  // staged, and NOTHING WOULD RED: the failure is a return value nobody asserts on. Measured, before
193
193
  // the arm below existed: boot guard true, file-level test false, same two directories.
@@ -34,9 +34,6 @@
34
34
  /** A line that opens a block rather than continuing prose: any ATX heading, or a `-`/`*` bullet. */
35
35
  export const SUMMARY_BLOCK_LINE = /^[ \t]*(?:#{1,6}[ \t]|[-*][ \t])/m;
36
36
 
37
- /** An H1 inside a summary — never a block, always a defect. See the header. */
38
- export const SUMMARY_SECTION_BREAK = /^[ \t]*#[ \t]+\S/m;
39
-
40
37
  /**
41
38
  * Parse ONE chunk (a run of lines between blank lines) into typed blocks. PURE.
42
39
  *
@@ -34,7 +34,7 @@
34
34
  // that is fixed, which is precisely the class this file was written about. A comment asserting a
35
35
  // structural fact outlives the fact, and the assertion is what makes it dangerous rather than merely old.
36
36
  //
37
- // Found by the test lane driving `render-units.mjs --apply` into a scratch destination and reading
37
+ // Found by driving `render-units.mjs --apply` into a scratch destination and reading
38
38
  // `PORTAL_MCP_URL=http://127.0.0.1:18790` out of the result — driven, not read.
39
39
  //
40
40
  // ── THE CLASS ────────────────────────────────────────────────────────────────────────────────────────