clearotron 0.5.0 → 0.5.1-beta.0

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 (123) hide show
  1. package/CONTRIBUTING.md +2 -2
  2. package/INSTALL.md +334 -302
  3. package/QUICKSTART.md +12 -4
  4. package/README.md +12 -7
  5. package/THIRD-PARTY-NOTICES.md +4 -4
  6. package/bin/README.md +14 -11
  7. package/bin/clearotron.mjs +1 -1
  8. package/bin/connect.mjs +73 -25
  9. package/bin/example.mjs +4 -2
  10. package/bin/onboard.mjs +562 -336
  11. package/bin/start.mjs +184 -36
  12. package/bin/update.mjs +26 -13
  13. package/build-info.json +2 -2
  14. package/docs/PORTAL.md +2 -2
  15. package/docs/architecture/02-architecture.md +3 -3
  16. package/docs/architecture/04-configuration-reference.md +1 -2
  17. package/docs/architecture/05-config-governance.md +1 -1
  18. package/docs/architecture/06-operations-runbook.md +1 -1
  19. package/driver/CHANGELOG.md +77 -0
  20. package/driver/README.md +2 -2
  21. package/driver/config-inventory.mjs +20 -11
  22. package/driver/contract-e3-backlog.mjs +27 -27
  23. package/driver/contract-e3-baseline.json +2 -2
  24. package/driver/contract-vocabulary.mjs +1 -1
  25. package/driver/degraded-parts.mjs +67 -3
  26. package/driver/dev-portal.mjs +1 -1
  27. package/driver/digest-queue.mjs +5 -5
  28. package/driver/driver.config.mjs +9 -9
  29. package/driver/engine/CONTRACT.md +1 -1
  30. package/driver/engine/anthropic-agent.mjs +4 -2
  31. package/driver/engine/mcp/band-server.mjs +1 -21
  32. package/driver/engine/mcp/clarivate-propose-tool.mjs +26 -0
  33. package/driver/engine/mcp/clarivate-server.mjs +2 -18
  34. package/driver/engine/mcp/fixture-register-server.mjs +33 -0
  35. package/driver/engine/mcp/gather-config.mjs +48 -7
  36. package/driver/engine/mcp/recording-server.mjs +206 -14
  37. package/driver/engine/mcp/supplemental.mjs +4 -2
  38. package/driver/engine/openai-agent.mjs +3 -1
  39. package/driver/engine/probe.mjs +10 -0
  40. package/driver/filing-goods.mjs +95 -0
  41. package/driver/findings-model.mjs +3 -0
  42. package/driver/gateway.mjs +42 -40
  43. package/driver/knockout-assess-record.mjs +54 -4
  44. package/driver/knockout-correction-record.mjs +342 -0
  45. package/driver/knockout-frame-record.mjs +4 -2
  46. package/driver/knockout-register-read.mjs +705 -0
  47. package/driver/knockout-register-record.mjs +222 -0
  48. package/driver/knockout-review-record.mjs +96 -25
  49. package/driver/narrative-refutation-record.mjs +87 -1
  50. package/driver/order-tables.mjs +23 -0
  51. package/driver/owner-use-check.mjs +5 -2
  52. package/driver/package.json +1 -1
  53. package/driver/partial-payload-baseline.json +8 -0
  54. package/driver/pipeline-knockout.mjs +506 -313
  55. package/driver/pipeline.mjs +179 -86
  56. package/driver/portal-local-auth.mjs +7 -1
  57. package/driver/portal-service.mjs +62 -6
  58. package/driver/progress.mjs +2 -2
  59. package/driver/publish/index.mjs +18 -21
  60. package/driver/publish/knockout.mjs +40 -18
  61. package/driver/publish/render-knockout.mjs +40 -27
  62. package/driver/publish/report-dates.mjs +43 -0
  63. package/driver/recall-reconciliation.mjs +2 -2
  64. package/driver/record-goods.mjs +50 -9
  65. package/driver/register-count.mjs +12 -59
  66. package/driver/register-fixture-marker.mjs +22 -0
  67. package/driver/register-plan.mjs +48 -0
  68. package/driver/register-records.mjs +84 -266
  69. package/driver/register-taint.mjs +2 -2
  70. package/driver/repair-composers.mjs +15 -8
  71. package/driver/result-noun-fields.mjs +6 -2
  72. package/driver/run-requirements.mjs +54 -4
  73. package/driver/runner.mjs +4 -13
  74. package/driver/skills/clearance-register/providers/clarivate.md +2 -2
  75. package/driver/skills/knockout-assess/SKILL.md +101 -100
  76. package/driver/skills/knockout-frame/SKILL.md +3 -1
  77. package/driver/skills/knockout-register-read/SKILL.md +77 -0
  78. package/driver/stages-knockout.mjs +159 -98
  79. package/driver/stages.mjs +4 -2
  80. package/driver/suite-census.json +389 -71
  81. package/driver/systemd/README.md +2 -2
  82. package/driver/verify-knockout.mjs +175 -39
  83. package/driver/verify.mjs +10 -9
  84. package/mcp-server/CHANGELOG.md +4 -0
  85. package/mcp-server/CONNECT.md +4 -0
  86. package/mcp-server/demo-mode.mjs +6 -0
  87. package/mcp-server/lib/demo-texts.mjs +38 -0
  88. package/mcp-server/lib/http-handler.mjs +7 -1
  89. package/mcp-server/lib/knockout.mjs +3 -2
  90. package/mcp-server/lib/options.mjs +3 -1
  91. package/mcp-server/lib/plan.mjs +6 -1
  92. package/mcp-server/mint-token.mjs +1 -1
  93. package/mcp-server/package.json +1 -1
  94. package/mcp-server/serve.mjs +11 -0
  95. package/mcp-server/server.mjs +13 -5
  96. package/package.json +1 -1
  97. package/portal-ui/dist/assets/{index-D2wrw9cH.css → index-AtB9ZpDH.css} +29 -0
  98. package/portal-ui/dist/assets/{index-DcLbvFmQ.js → index-C1oE78Wk.js} +161 -195
  99. package/portal-ui/dist/index.html +2 -2
  100. package/portal-ui/package.json +4 -4
  101. package/providers/README.md +4 -4
  102. package/providers/_shared/execute-plan.mjs +45 -1
  103. package/providers/_shared/term-shape.mjs +1 -1
  104. package/providers/clarivate/src/capabilities.js +7 -6
  105. package/providers/clarivate/src/core.js +11 -7
  106. package/providers/clarivate/src/wider-list.js +104 -0
  107. package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
  108. package/providers/oauth-mcp-bridge/package.json +1 -1
  109. package/providers/signa/src/capabilities.js +0 -9
  110. package/scripts/e2e-first-time.mjs +8 -7
  111. package/scripts/freeze-example-run.mjs +2 -2
  112. package/scripts/settings-render-check.mjs +5 -3
  113. package/scripts/test-run.mjs +8 -2
  114. package/shared/client-door.mjs +11 -8
  115. package/shared/connect-clients.mjs +10 -4
  116. package/shared/demo-connection.mjs +43 -0
  117. package/shared/demo-start-args.mjs +7 -2
  118. package/shared/invocation.mjs +18 -3
  119. package/shared/permanent-install.mjs +14 -0
  120. package/shared/scope.mjs +8 -1
  121. package/shared/stdio-connect.mjs +43 -21
  122. package/shared/trigger-lane.mjs +7 -0
  123. package/shared/tty-style.mjs +21 -5
@@ -35,7 +35,7 @@ import { buildRunContext, deriveSlug, kebab } from "./phase0.mjs";
35
35
  import { paths, STAGES, axisTier, decideAxes, assertTierSanity, assertEffectiveTier, lines, whatsappRouting,
36
36
  chainEntries, stageOrdinal, stageInputs, stageOutputs, dependencyOrder, REGISTER_AXES, REGISTER_ENUMERATE_TOOL,
37
37
  buildEscalationFollowup, buildEnvelopeCloseFollowup, buildFrameReopenFollowup,
38
- buildFrameReopenRetryMessage, thinkingFor, composeFollowup, stampDispatchBlocks, recordEmptyReturn, nothingFound, nothingToRead, PROVIDER_META, proseRungDirective, inquiryRungDirective } from "./stages.mjs"; import { bandSizeForStage, derivedLimitSec, limitExceedsCeiling, ceilingRefusal, stagesRefusingBand } from "./band-size.mjs";
38
+ buildFrameReopenRetryMessage, thinkingFor, composeFollowup, stampDispatchBlocks, recordEmptyReturn, nothingFound, nothingToRead, PROVIDER_META, inquiryRungDirective } from "./stages.mjs"; import { bandSizeForStage, derivedLimitSec, limitExceedsCeiling, ceilingRefusal, stagesRefusingBand } from "./band-size.mjs";
39
39
  import { handResearchAnswers, RESEARCH_ANSWERS_FILE, RESEARCH_REPLAY_FILE, replayAnswersFile, savedResearchCount, runResearchAnswers, researchAnswerKey, handResearchAfterReview } from "./research-answers.mjs"; // the research a stage's earlier attempts got, handed to a later one; a replay of it
40
40
  import { IDENTITY_FILE as REPORT_IDENTITY_FILE, renderReportOverview } from "./report-overview-record.mjs";
41
41
  import { writePartNotCompleted, readPartNotCompleted, clearPartNotCompleted, clearPartsNotCompleted, NOT_COMPLETED_DIR, slicesNotYetRecorded, axesNotYetDisclosed, unitsNotYetRecorded } from "./parts-not-completed.mjs";
@@ -45,7 +45,7 @@ import { dispatchRows, clearedSignatures } from "./seat-attempts.mjs";
45
45
  import { CONTEXT_DERIVATIONS, DISPATCH_EXTRAS, INLINE_CONTEXT, sandboxManifest, sandboxGaps, derivationsFor } from "./stage-context.mjs"; // — what a stage is actually handed
46
46
  import { derivedStateOf, recordedDerivedState, replayOfDerivation } from "./derived-state.mjs"; // the register picture a dispatch was handed, so a replay can be checked against it
47
47
  import { parseVerdict, countCitedDefects, parseCorrectionKinds, parseCorrections, validators, findReviewerCoherenceFlags, lateReviewAgainst, VERDICT_RANK } from "./verify.mjs";
48
- import { readAcceptedFlags, nextRefutationSeq, readAcceptedReviewSince, REVIEW_EXCLUSIONS_FILE, listedExclusionPositions } from "./narrative-refutation-record.mjs"; // T3b — the typed flags, not the re-parse
48
+ import { readAcceptedFlags, nextRefutationSeq, readAcceptedReviewSince, settleRecheckSave, REVIEW_EXCLUSIONS_FILE, listedExclusionPositions } from "./narrative-refutation-record.mjs"; // T3b — the typed flags, not the re-parse
49
49
  import { evidenceClaimViolations, evidenceClaimTable } from "./evidence-claim-invariant.mjs"; //
50
50
  import { buildCorrectionsApplied, correctionsWorklist, correctionsAppliedTable, correctionScope, flaggedPositions, scopeDrift, unresolvedFlags, reportLines, linesOf, REPORT_LINE_KEY, REPORT_LINE_LABEL, answersLeftBehind } from "./corrections-feedforward.mjs";
51
51
  import { correctionTargets, deliveredOutcomes } from "./corrections-delivered.mjs"; // whether each correction reached the record the report was built from
@@ -232,6 +232,7 @@ import { RunCancelled, isCancelled, assertNotCancelledBeforePublish } from "./ca
232
232
  import { BRAND } from "../shared/brand.mjs"; // — the operator name a client is told to expect, from the tenant seam
233
233
  import { CLIENT_ACTION, assessmentNotCompletedNote } from "../shared/client-failure-note.mjs"; // — the action, worded once; this surface names the mark itself
234
234
  import { stopReason } from "../shared/stop-reason.mjs"; // — one builder, four cancel sites
235
+ import { reachableCommand } from "../shared/invocation.mjs"; // — a printed command the reader can type later, from anywhere
235
236
 
236
237
  // Fix-1 (deterministic common-law closure): the lanes that dictate a supplementary grid SPEC (the driver
237
238
  // writes the spec, the plugin writes the ledger, the driver folds it in code). One tag per lane so
@@ -417,8 +418,8 @@ export function isFallbackEligible(fail) { // @internal
417
418
 
418
419
  // A5 strike predicate — is this run.jsonl stage-row failure a CONTENT verdict (counts toward the
419
420
  // invalid-artifact strike cap) rather than infra weather (breaks the streak)? isFallbackEligible alone
420
- // is NOT enough: it matches only the model-fallback token set, but the trail also carries transient
421
- // shapes that never enter the fallback chain — `rate_limited` (the subscription 5h cap), bare
421
+ // is NOT enough: it matches only the transient-infrastructure token set, but the trail also carries
422
+ // transient shapes that set does not match — `rate_limited` (the subscription 5h cap), bare
422
423
  // `unparseable_json`, and prose transport causes from code-side units ("… direct execution failed:
423
424
  // HTTP 502 …"). repairs.mjs's own doctrine says those are sampling noise, not a content verdict — so
424
425
  // anything classifyFailureReason calls transient breaks the streak too. Exported so the strike tests
@@ -3058,7 +3059,7 @@ function quarantineCoverageLedger(ctx, failReason, trigger) {
3058
3059
 
3059
3060
  // ── — THE SAVE-ONLY FOLLOWUP IS GONE, BECAUSE NOTHING ASKS THE MODEL TO SAVE ANYTHING ─────────
3060
3061
  //
3061
- // `ensureCoverageLedgerSaved` dispatched a warm followup that DICTATED the machine ledger's JSON schema
3062
+ // `ensureCoverageLedgerSaved` dispatched a followup that DICTATED the machine ledger's JSON schema
3062
3063
  // by hand — "a JSON ARRAY, one object per prose Coverage-ledger table row, keys EXACTLY {axis, scope,
3063
3064
  // status, reason}…" — a fourth copy of a contract that lives in coverage-ledger.parseCoverageLedgerJson.
3064
3065
  // The artifact it asked for is now derived by the driver from the coverage form, so a missing JSON can
@@ -3088,7 +3089,7 @@ function noteCoverageLedgerAbsent(ctx, trigger) {
3088
3089
  //
3089
3090
  // Artifact: _driver/recall-reconciliation.json (the gate-visible discrepancy list; crowd memberships
3090
3091
  // counted on the delivered surface, enumerated only here). Event: `recall-reconciliation` on every
3091
- // derivation — unended:0 is ASSERTED, never absent. Enforcement: unended ⇒ ONE warm followup on the
3092
+ // derivation — unended:0 is ASSERTED, never absent. Enforcement: unended ⇒ ONE followup on the
3092
3093
  // winning digest session dictating the three ending forms (at most RECALL_FOLLOWUP_MAX attempts per
3093
3094
  // unended-set signature, so a park/resume gets a fresh attempt without ever looping); what remains
3094
3095
  // unended after that ships NAMED from the pre-verdict floor, through the terminal guards' deliver-and-clamp (the
@@ -4290,7 +4291,7 @@ async function enforceRecallReconciliation(ctx, r, trigger) {
4290
4291
  const P = ctx.paths;
4291
4292
  let artifact = deriveRecallReconciliation(ctx, trigger);
4292
4293
  if (!artifact?.computable || !artifact.totals.unended) return;
4293
- // one warm followup per unended-set signature, bounded across resumes (RECALL_FOLLOWUP_MAX):
4294
+ // one followup per unended-set signature, bounded across resumes (RECALL_FOLLOWUP_MAX):
4294
4295
  // the receipt rides the artifact file itself, so a crash between followup and re-derive re-arms
4295
4296
  // at most one extra attempt — bounded either way by the recovery ladder's identical-signature stop.
4296
4297
  // The receipt now SURVIVES the re-derive (carryRecallFollowup inside writeArtifact) — before that
@@ -5365,7 +5366,7 @@ async function stageOnce(name, ctx, opts = {}) {
5365
5366
  //
5366
5367
  // The task order is deliberately NOT restored: `def.message(ctx)` stays out, because re-commissioning
5367
5368
  // the stage fights the followup's own "do NOT redo it". freshMessage (doc-44 — a standalone message on a
5368
- // fresh session that STILL goes through the fallback chain, unlike followup which is single-model) gets
5369
+ // fresh session, dispatched as any fresh stage is: its one model, with the gateway's own retries) gets
5369
5370
  // the same composition for the same reason: it is equally a session with nothing in it.
5370
5371
  //
5371
5372
  // The declared inputs are filtered to what is ON DISK here, not in stages.mjs — that module is a pure
@@ -5448,8 +5449,8 @@ async function stageOnce(name, ctx, opts = {}) {
5448
5449
  message,
5449
5450
  model,
5450
5451
  thinking,
5451
- // opts.sessionKey lets a followup RESUME the exact key a prior run won on (winning-key hardening); else
5452
- // the canonical base key. (A followup with a stale base key would resume a failed attempt — see runStage.)
5452
+ // opts.sessionKey names the key a prior run won on (winning-key hardening), so a followup's records sit
5453
+ // beside it; else the canonical base key. No engine resumes by key (A-1): a followup is fresh either way.
5453
5454
  sessionKey: opts.sessionKey ?? stageSessionKey(ctx, name, keyAxis),
5454
5455
  timeoutSec: derivedLimit.sec ?? def.timeoutSec,
5455
5456
  derivedLimit, // recorded on every attempt row: the size it was derived from, and the number
@@ -5473,8 +5474,8 @@ async function stageOnce(name, ctx, opts = {}) {
5473
5474
  ...(patch == null && typeof def.refreshCtx === "function"
5474
5475
  ? { refreshMessage: () => def.message(messageCtxFor(name, def.refreshCtx(ctx))) + (opts.extra ? `\n\n${opts.extra}` : "") }
5475
5476
  : {}),
5476
- // #5b: a followup is a warm session resume — tell runStage so a hard-wall timeout breaks after ONE attempt
5477
- // (an already-over-budget resume can't fit the 1.5× extension; this restores ~1× the wall, was ~2.5×).
5477
+ // The caller's word that this is a followup: a FRESH session (A-1), journalled on every attempt row. At its
5478
+ // hard wall it takes the same one extended retry as any dispatch (gateway.mjs warmHardWallStop).
5478
5479
  followup: opts.followup != null,
5479
5480
  // copper-lattice re-route: a supplemental-lane register unit never sees register_enumerate — its
5480
5481
  // judgment additions ride register_propose_supplemental (contract-gated so frozen pre-flag resumes
@@ -5727,8 +5728,8 @@ async function stage(name, ctx, opts = {}) {
5727
5728
  // rather than armed — see driver.config.mjs for the reasoning. The retry ladder is now the whole, honest
5728
5729
  // failure story: below it a stage FAILS, loudly, and the run parks or reports.
5729
5730
  //
5730
- // followups (warm resume) and explicitly model-pinned calls still delegate straight to stageOnce, because
5731
- // they carry their own model (the cache is model-specific and a resume must not move it).
5731
+ // followups and explicitly model-pinned calls still delegate straight to stageOnce, on their own model. The
5732
+ // reason given for followups was a resumed session's model-specific cache, which a fresh session does not have.
5732
5733
  async function stageWithChain(name, ctx, opts = {}) {
5733
5734
  if (opts.followup || opts.model) return stageOnce(name, ctx, opts);
5734
5735
  const [entry] = chainEntries(name, ctx.axis);
@@ -6144,22 +6145,19 @@ export function extractRulingsTail(placementMd, { cap = 8000 } = {}) { // @int
6144
6145
  * The architecture's delivery rule: the directive is composed ONCE per run and rides every dispatch of
6145
6146
  * that family — fresh, corrective, re-dispatch — with the inclusion asserted at the call site.
6146
6147
  *
6147
- * WHY A WARM DISPATCH NEEDS IT AT ALL. A dispatch with no `sessionKey` is a fresh turn: the driver
6148
+ * WHY A FOLLOWUP DISPATCH NEEDS IT AT ALL. A dispatch with no `sessionKey` is a fresh turn: the driver
6148
6149
  * rebuilds the whole message from `STAGES.<name>.message`, and the directive is in there. A dispatch
6149
- * WITH a `sessionKey` resumes a session and sends only its followup — so it inherits nothing the
6150
+ * WITH a `sessionKey` sends its followup in place of that message — so it inherits nothing the
6150
6151
  * message builder produces. That is not a theoretical gap: it is how the delivered narrative came from
6151
6152
  * a pass carrying no directive at all while the fresh pass carried one.
6152
6153
  *
6153
6154
  * Composed from the same function the fresh dispatch uses, so the two are the same string rather than
6154
6155
  * two texts that agree today.
6155
6156
  */
6156
- export function stageCharter(stageName, depth, framework = null) { // @internal
6157
- // THE BAND ORDER RIDES THE CHARTER, because rule 2 names the run's own band labels and a warm dispatch
6158
- // that composed them from nothing would send a DIFFERENT directive to the same seat — which is the
6159
- // whole failure this helper exists to prevent, reintroduced one argument down.
6160
- const directive = stageName === "synthesis" ? proseRungDirective(depth, framework?.bands ?? null)
6161
- : stageName === "placement-inquiry" ? inquiryRungDirective(depth)
6162
- : "";
6157
+ export function stageCharter(stageName, depth) { // @internal
6158
+ // SYNTHESIS CARRIES NO DEPTH RUNG ANY MORE: its per-finding write-up rules contradicted the synthesis call, which records
6159
+ // sections only (design, 2026-11-06). The placement inquiry's rung still rides every dispatch of that stage.
6160
+ const directive = stageName === "placement-inquiry" ? inquiryRungDirective(depth) : "";
6163
6161
  return directive ? `\n\n${directive}` : "";
6164
6162
  }
6165
6163
 
@@ -6889,7 +6887,7 @@ export function partitionDeliveryStale(staleStages) { // @internal
6889
6887
  // entities actually reached findings.json (the file every client surface renders from). Deterministic:
6890
6888
  // proper-name candidates from the review ∩ the findings' marks/owner names = the named set; if the
6891
6889
  // file is byte-unchanged (or every named finding's object is) and no corrections marker landed, fire
6892
- // ONE warm followup demanding the re-emit; a terminal miss NEVER withholds (never-withhold) — it logs,
6890
+ // ONE followup demanding the re-emit; a terminal miss NEVER withholds (never-withhold) — it logs,
6893
6891
  // flags the internal review bar, and closes the CLIENT export via _driver/corrections-state.json.
6894
6892
  export function snapshotFindingsForCorrections(P, runDir) { // @internal
6895
6893
  let raw = null;
@@ -8432,7 +8430,7 @@ export function registerJurisdictions(job, profile) { // @internal
8432
8430
  // (this is a delivery-quality pass, never a gate; a malformed findings.json is already handled upstream).
8433
8431
  // A6 — the intake-ask register. Parse the matter-frame's "### Intake asks" section into
8434
8432
  // machine rows, freeze them at _driver/intake-asks.json (temp+rename), and expose ctx.intakeAsks to
8435
- // every downstream message builder. Section missing on a fresh run ⇒ ONE warm save-only followup
8433
+ // every downstream message builder. Section missing on a fresh run ⇒ ONE save-only followup
8436
8434
  // (the grid-ledger-followup posture), then proceed with [] + a logged note — never-kill, replay-safe
8437
8435
  // (archived runs simply have no sidecar and all consumers falsy-skip).
8438
8436
  export function parseIntakeAsks(matterContextMd) { // @internal
@@ -8660,6 +8658,15 @@ export function coverageJudgmentRows(ledgerRows, planExecution, plan = null, for
8660
8658
  return rows.filter((r) => r.area && r.note);
8661
8659
  }
8662
8660
 
8661
+ // A COVERAGE ROW THAT WAS NOT ADDED. Each adder below catches its own failure and the run goes on (ruled 2026-09-25:
8662
+ // deliver, and flag in the audit what still failed), so the row it exists to add is missing from the report and
8663
+ // the workbook. Its note is the run's own line; this event is what delivery reads (degraded-parts.mjs, coverageRows),
8664
+ // so the audit workbook names the part. It never throws from the catch that calls it.
8665
+ function coverageRowNotAdded(runDir, adder, e) {
8666
+ try { runLog(runDir, { event: "coverage-row-not-added", adder, fail: String(e?.message || e).replace(/\s+/g, " ").slice(0, 200) }); }
8667
+ catch { /* the note the caller wrote still stands */ }
8668
+ }
8669
+
8663
8670
  export function stampCoverageJudgmentRows(P, runDir, note, ctx) { // @internal
8664
8671
  try {
8665
8672
  if (!existsSync(P.findings)) return;
@@ -8686,6 +8693,7 @@ export function stampCoverageJudgmentRows(P, runDir, note, ctx) { // @internal
8686
8693
  note(`[coverage-judgment] rows[] written from the ledger + the plan-execution receipt: ${rows.length} open slice(s)${discarded ? `; ${discarded} authored row(s) replaced` : ""}`);
8687
8694
  } catch (e) {
8688
8695
  note(`[coverage-judgment] rows[] stamp skipped: ${String(e?.message || e).replace(/\s+/g, " ").slice(0, 100)}`);
8696
+ coverageRowNotAdded(runDir, "coverage-judgment", e);
8689
8697
  }
8690
8698
  }
8691
8699
 
@@ -8731,6 +8739,7 @@ export function injectDeferralCoverage(P, runDir, note) { // @internal — exp
8731
8739
  note(`[frame-reopen] injected ${added} deferral coverage row(s) — the reader sees every unclosed directive`);
8732
8740
  } catch (e) {
8733
8741
  note(`[frame-reopen] coverage injection skipped: ${String(e?.message || e).replace(/\s+/g, " ").slice(0, 100)}`);
8742
+ coverageRowNotAdded(runDir, "frame-reopen", e);
8734
8743
  }
8735
8744
  }
8736
8745
 
@@ -8939,6 +8948,7 @@ export function injectScriptScopeCoverage(P, runDir, note, { searchPolicy = null
8939
8948
  note(`[script-scope] injected the Stage-1.5 honesty coverage row for ${added.join(", ")} — in-scope territory on a run whose ${added.length === 1 ? "lane" : "lanes"} did not run (coverage-limited: a disclosed limit, never a verdict clamp)`);
8940
8949
  } catch (e) {
8941
8950
  note(`[script-scope] coverage injection skipped: ${String(e?.message || e).replace(/\s+/g, " ").slice(0, 100)}`);
8951
+ coverageRowNotAdded(runDir, "script-scope", e);
8942
8952
  }
8943
8953
  }
8944
8954
 
@@ -9015,6 +9025,7 @@ export function injectLaneDepthCoverage(P, runDir, note) { // @internal
9015
9025
  note(`[lane-depth] injected the depth-shortfall coverage row for ${added.join(", ")} — configured full, delivered less (coverage-limited: a disclosed limit, never a verdict clamp)`);
9016
9026
  } catch (e) {
9017
9027
  note(`[lane-depth] coverage injection skipped: ${String(e?.message || e).replace(/\s+/g, " ").slice(0, 100)}`);
9028
+ coverageRowNotAdded(runDir, "lane-depth", e);
9018
9029
  }
9019
9030
  }
9020
9031
 
@@ -9134,6 +9145,7 @@ export function injectScreenGateCoverage(P, runDir, note, ctx = {}) { // @inte
9134
9145
  note(`[screen-gate] injected ${added} unexamined-drop coverage row(s) — the reader sees every mark the run could not examine`);
9135
9146
  } catch (e) {
9136
9147
  note(`[screen-gate] coverage injection skipped: ${String(e?.message || e).replace(/\s+/g, " ").slice(0, 100)}`);
9148
+ coverageRowNotAdded(runDir, "screen-gate", e);
9137
9149
  }
9138
9150
  }
9139
9151
 
@@ -9252,6 +9264,8 @@ const softNorm = (s) => String(s ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "")
9252
9264
  export const CODE_BUILT_SECTIONS = Object.freeze({ // @internal
9253
9265
  onlyYou: "### Only you can close these",
9254
9266
  reviewerOpenPoints: "### Reviewer's open questions",
9267
+ // Under it, the points of the review that stood when the recheck after the correction saved none.
9268
+ earlierReview: "#### Earlier review — correction not rechecked",
9255
9269
  askAnswers: "### Answers to your instructions",
9256
9270
  reasonedNegatives: "# Reasoned negatives",
9257
9271
  });
@@ -9476,7 +9490,23 @@ export function buildOnlyYouSection(actions, findings, { nowMs = Date.now(), wit
9476
9490
  // impossible, and rendering nothing would ship a report whose body reads as reviewed while the reviewer
9477
9491
  // refused. Silence is the one thing the section exists to prevent. The wording is the sidecar's own,
9478
9492
  // already carried at the degenerate branch above — one sentence for one fact, in both places.
9479
- export function buildReviewerOpenPointsSection(reviewMd, appliedRows = null) { // @internal
9493
+ //
9494
+ // ── THE EARLIER REVIEW'S POINTS SAY WHOSE THEY ARE (heading approved 2026-11-04) ──────────────────
9495
+ //
9496
+ // A recheck after the correction that saved no review leaves the review from before the correction in
9497
+ // place, and its verdict stands. Built from it with nothing said, the points read as the reviewer's view of
9498
+ // the corrected record, and nobody reviewed that record. So the caller passes `earlier` — the file holding
9499
+ // that review, and whether it is the one in place (earlierReviewNotRechecked) — and the section puts that
9500
+ // review's points under `CODE_BUILT_SECTIONS.earlierReview`, with that file as a value and no sentence added.
9501
+ //
9502
+ // THE HEADING GOES BY THE POINT, NOT BY THE SECTION. A review of a delivery-check repair can be read after that
9503
+ // recheck and print its points in the same record. It read only the repair, so the correction is still not
9504
+ // rechecked and the earlier review's points are still the earlier review's; its own points (`later`, from the
9505
+ // caller) stay above the heading. The lead is chosen by the verdict of the review in place, so it goes where that
9506
+ // review's points go: under the heading when that is the earlier review, above it when a later one hardened the
9507
+ // verdict. The points, their outcomes and the leads are untouched, nothing is dropped, and the section's own
9508
+ // heading stays first for every reader that keys on it. Without `earlier`, not a byte of the section changes.
9509
+ export function buildReviewerOpenPointsSection(reviewMd, appliedRows = null, { earlier = null } = {}) { // @internal
9480
9510
  const blocking = parseVerdict(reviewMd) === "BLOCKING";
9481
9511
  const cited = blocking ? parseCorrections(reviewMd) : [];
9482
9512
  const unfixed = (Array.isArray(appliedRows) ? appliedRows : []).filter((r) => r?.ground === true || unresolvedFlags([r]).length);
@@ -9492,6 +9522,10 @@ export function buildReviewerOpenPointsSection(reviewMd, appliedRows = null) {
9492
9522
  seen.add(key);
9493
9523
  rows.push(r);
9494
9524
  }
9525
+ // The earlier review's heading, then where its points come from, as a value: the review's file.
9526
+ const fromEarlier = earlier
9527
+ ? [CODE_BUILT_SECTIONS.earlierReview, "", ...(earlier.review ? [`*(\`${earlier.review}\`)*`, ""] : [])]
9528
+ : [];
9495
9529
  if (!rows.length) {
9496
9530
  // Signed, and nothing left open: no section. This is the majority of runs and it is the whole
9497
9531
  // reason the emptiness is checked AFTER the union rather than by the verdict.
@@ -9499,6 +9533,7 @@ export function buildReviewerOpenPointsSection(reviewMd, appliedRows = null) {
9499
9533
  return [
9500
9534
  "### Reviewer's open questions",
9501
9535
  "",
9536
+ ...(earlier?.inPlace ? fromEarlier : []),
9502
9537
  "**The independent reviewer did not sign this report off, and cited no specific defect.** A "
9503
9538
  + "refusal without a named ground is not a finding you can act on — read the reviewer's own note "
9504
9539
  + "before relying on this report.",
@@ -9533,7 +9568,7 @@ export function buildReviewerOpenPointsSection(reviewMd, appliedRows = null) {
9533
9568
  "section-unchanged": "the line this named was left as written",
9534
9569
  "line-removed": "the line this named was removed rather than corrected",
9535
9570
  };
9536
- const items = rows.map((r) => {
9571
+ const item = (r) => {
9537
9572
  const bits = [];
9538
9573
  if (Array.isArray(r.ordinals) && r.ordinals.length) bits.push(`finding ${r.ordinals.join(", ")}`);
9539
9574
  // An outcome nobody has classified takes the unchecked wording, never the checked one — the same
@@ -9543,7 +9578,7 @@ export function buildReviewerOpenPointsSection(reviewMd, appliedRows = null) {
9543
9578
  if (r.outcome) bits.push((r.ground === true ? null : QUALIFIER[r.outcome]) ?? "the run could not check whether this was addressed");
9544
9579
  const tail = bits.length ? ` *(${bits.join(" — ")})*` : "";
9545
9580
  return `- ${ADVISORY_TAG["client-fact"]} ${String(r.text).trim()}${tail}`;
9546
- });
9581
+ };
9547
9582
  // Two leads for two different facts about the report in the reader's hands. Collapsing them into one
9548
9583
  // sentence would either tell a client the reviewer refused when it signed, or bury a refusal.
9549
9584
  const lead = blocking
@@ -9554,7 +9589,15 @@ export function buildReviewerOpenPointsSection(reviewMd, appliedRows = null) {
9554
9589
  + "closed.** Each was put back to the drafting pass; what the run could establish about each one "
9555
9590
  + "is noted against it. They are open questions for the reviewing lawyer's judgment — not "
9556
9591
  + "conditions for you to satisfy, and not steps that complete the work.";
9557
- return [CODE_BUILT_SECTIONS.reviewerOpenPoints, "", lead, "", items.join("\n")].join("\n");
9592
+ // Whose each point is: what the review in place cites is that review's, a row of the first correction is the
9593
+ // earlier review's flag, and a row the caller marks `later` is the later review's.
9594
+ const isEarlier = (r) => Boolean(earlier) && r.later !== true && (earlier.inPlace === true || !cited.includes(r));
9595
+ const earlierItems = rows.filter(isEarlier).map(item).join("\n");
9596
+ const otherItems = rows.filter((r) => !isEarlier(r)).map(item).join("\n");
9597
+ if (!earlierItems) return [CODE_BUILT_SECTIONS.reviewerOpenPoints, "", lead, "", otherItems].join("\n");
9598
+ const others = otherItems ? [otherItems, ""] : [];
9599
+ return [CODE_BUILT_SECTIONS.reviewerOpenPoints, "",
9600
+ ...(earlier.inPlace ? [...others, ...fromEarlier, lead, ""] : [lead, "", ...others, ...fromEarlier]), earlierItems].join("\n");
9558
9601
  }
9559
9602
 
9560
9603
  // PR-9 — the code-built "Answers to your instructions" section, the only-you pattern one lane over:
@@ -9687,6 +9730,34 @@ export const CORRECTIONS_DELIVERED_FILE = "corrections-delivered.json";
9687
9730
  // entry verdict and the verdict that stood. An unread recheck is a correction nobody verified.
9688
9731
  export const CORRECTIVE_RECHECK_FILE = "corrective-recheck.json";
9689
9732
 
9733
+ /**
9734
+ * Where the review from before the correction stands when the recheck after it saved none, as `{review, inPlace}`: the
9735
+ * file holding it, relative to the run, and whether that is the review in place. null when the recheck saved a review,
9736
+ * when a review that read the corrected record has replaced it, or when the records cannot be read; each of those
9737
+ * builds the open points as they were. Never throws.
9738
+ *
9739
+ * THE BYTES SAY WHICH REVIEW STANDS, NOT THE CALLS. The recheck's record keeps the sha of the review it found. Those
9740
+ * bytes in place mean that review stands, whatever was accepted since: a narrowed review after a repair is accepted and
9741
+ * the whole review then put back. Other bytes in place mean another review was saved over it, through the tool or by
9742
+ * rewriting the file, and its points are its own. The one such review that did not read the corrected record is a
9743
+ * narrowed review that hardened the verdict and stays in place: the earlier review is then the one kept beside it, and
9744
+ * the correction's rows are still its flags. A record with no sha, from an earlier version, builds as it was.
9745
+ */
9746
+ function earlierReviewNotRechecked(P) {
9747
+ try {
9748
+ const runDir = dirname(P.report);
9749
+ const recheck = JSON.parse(readFileSync(driverDir(runDir, CORRECTIVE_RECHECK_FILE), "utf8"));
9750
+ if (recheck?.status !== "unread" || !recheck.reviewSha) return null;
9751
+ const named = (file) => relative(runDir, file).replace(/\\/g, "/");
9752
+ const inPlace = shaOf(P.seniorEyeReview);
9753
+ if (inPlace === recheck.reviewSha) return { review: named(P.seniorEyeReview), inPlace: true };
9754
+ const narrowed = JSON.parse(readFileSync(driverDir(runDir, "post-repair-review.json"), "utf8"));
9755
+ const kept = reviewBeforeRepairPath(runDir);
9756
+ return narrowed?.status === "read" && narrowed.whole !== true && inPlace === shaOf(reviewAfterRepairPath(runDir)) && shaOf(kept) === recheck.reviewSha
9757
+ ? { review: named(kept), inPlace: false } : null;
9758
+ } catch { return null; }
9759
+ }
9760
+
9690
9761
  /** Keep the basis at the corrective pass, from the two records the applied table was built from. Throws on a write failure; the caller is never-kill. */
9691
9762
  export function recordCorrectionsBasis(runDir, rows, preDoc, postDoc) { // @internal
9692
9763
  const basis = correctionTargets(rows, preDoc, postDoc);
@@ -9838,7 +9909,7 @@ export function assembleReportMd(P, findings, cardOrdinals, { grouped = [], byRi
9838
9909
  try {
9839
9910
  const doc = JSON.parse(readFileSync(driverDir(dirname(P.report), "post-repair-corrections.json"), "utf8"));
9840
9911
  const after = doc?.rows;
9841
- if (Array.isArray(after) && after.length) applied = [...(applied ?? []), ...(doc.grounds === true ? after.map((r) => ({ ...r, ground: true })) : after)];
9912
+ if (Array.isArray(after) && after.length) applied = [...(applied ?? []), ...after.map((r) => ({ ...r, later: true, ...(doc.grounds === true ? { ground: true } : {}) }))];
9842
9913
  } catch { /* no correction after a repair on this run */ }
9843
9914
  // …and a review after a repair that was read and never corrected: the run was parked before its one correction,
9844
9915
  // and nothing on a resume repeats it. Its points are not shown closed, so they print through the same rule.
@@ -9847,12 +9918,13 @@ export function assembleReportMd(P, findings, cardOrdinals, { grouped = [], byRi
9847
9918
  const rec = JSON.parse(readFileSync(driverDir(runDir, "post-repair-review.json"), "utf8"));
9848
9919
  if (rec?.status === "read" && !existsSync(driverDir(runDir, "post-repair-corrections.json"))) {
9849
9920
  const rows = (Array.isArray(rec.points) ? rec.points : []).filter((x) => String(x?.text ?? "").trim())
9850
- .map((x) => ({ text: String(x.text), kind: x.kind ?? null, outcome: "not-checkable" }));
9921
+ .map((x) => ({ text: String(x.text), kind: x.kind ?? null, outcome: "not-checkable", later: true }));
9851
9922
  if (rows.length) applied = [...(applied ?? []), ...rows];
9852
9923
  }
9853
9924
  } catch { /* no review after a repair on this run */ }
9925
+ // …and where the recheck after the correction saved no review, the earlier review's points are named as its own.
9854
9926
  const openPoints = existsSync(P.seniorEyeReview)
9855
- ? buildReviewerOpenPointsSection(readFileSync(P.seniorEyeReview, "utf8"), applied)
9927
+ ? buildReviewerOpenPointsSection(readFileSync(P.seniorEyeReview, "utf8"), applied, { earlier: earlierReviewNotRechecked(P) })
9856
9928
  : "";
9857
9929
  const record = driverDir(dirname(P.report), REVIEWER_OPEN_QUESTIONS_FILE);
9858
9930
  if (openPoints) {
@@ -10632,7 +10704,7 @@ async function pipelineInner(job, opts = {}) {
10632
10704
  };
10633
10705
  // The settlement flush: ONE warm re-digest carrying every queued segment (plus the frame-reopen
10634
10706
  // segment when that block fired), sectioned, ending with the standard FULL re-emission contract.
10635
- // Timeout ⇒ one fresh retry through the fallback chain (the legacy frame-reopen re-digest's own
10707
+ // Timeout ⇒ one retry on a fresh session, on the same model (the legacy frame-reopen re-digest's own
10636
10708
  // recovery). A flush that still fails leaves its items PENDING (durable — the late flush or the next
10637
10709
  // resume's settlement gets one more chance) and the run continues on the prior digest: the funnel
10638
10710
  // never gates delivery. On success, items are receipted (markFlushed — they can never re-fire), the
@@ -10653,7 +10725,7 @@ async function pipelineInner(job, opts = {}) {
10653
10725
  const trigger = pass === "late" ? "late-flush" : "settlement-flush";
10654
10726
  let rd = await runDigest(ctx, { force: true, followup, sessionKey: ctx.digestKey, trigger });
10655
10727
  if (!rd.ok && /timeout/.test(String(rd.fail))) {
10656
- note(`digest-funnel: ${trigger} timed out — ONE fresh retry through the fallback chain`);
10728
+ note(`digest-funnel: ${trigger} timed out — ONE retry on a fresh session, same model`);
10657
10729
  runLog(run.runDir, { event: "digest-flush-timeout", pass, fail: String(rd.fail).slice(0, 120) });
10658
10730
  rd = await runDigest(ctx, { force: true, trigger: `${trigger}-retry` });
10659
10731
  }
@@ -10769,7 +10841,7 @@ async function pipelineInner(job, opts = {}) {
10769
10841
  const bind = { customer: String(b.customer), exclusions: Array.isArray(b.exclusions) ? b.exclusions.map(String) : [] };
10770
10842
  // WS-B: a bound applicant that IS the profile customer activates the profile's exclusion seed —
10771
10843
  // union it into the reply's exclusions so EVERY downstream consumer (fold, digest-message
10772
- // block, warm-redigest followup) sees one combined set, not just the matter-frame line.
10844
+ // block, re-digest followup) sees one combined set, not just the matter-frame line.
10773
10845
  if (applicantMatchesProfile(ctx.profile, bind.customer) && ctx.profile?.selfExclusionOwners?.length) {
10774
10846
  bind.exclusions = [...new Set([...bind.exclusions, ...ctx.profile.selfExclusionOwners])];
10775
10847
  ctx.exclusionSeed = ctx.profile.selfExclusionOwners;
@@ -11302,7 +11374,7 @@ async function pipelineInner(job, opts = {}) {
11302
11374
  // The common-law member's result, BY NAME. It was read as gatherResults[0] in four places, which was
11303
11375
  // only ever correct because the member is built first and always present — drop it for a register-only
11304
11376
  // run and [0] silently becomes a register unit, and the grid-ledger pass below would then send a
11305
- // "you are RESUMING your own common-law session" followup into it rather than skip (its guard is
11377
+ // grid-ledger save followup addressed to the common-law session into it rather than skip (its guard is
11306
11378
  // gridVariants × !skipped × no-ledger, and gridVariants comes from the manifest either way).
11307
11379
  const clIndex = gather.findIndex((g) => g.name === "common-law");
11308
11380
  const clMember = () => (clIndex >= 0 ? gatherResults[clIndex] : null);
@@ -12066,7 +12138,7 @@ async function pipelineInner(job, opts = {}) {
12066
12138
  // record discloses: its recovery is spent, and its band is read as the last pass left it.
12067
12139
  const dispatched = disclosedAxes.has(a) ? null : await dispatchPlanQids(a, null, "taint-dispatch");
12068
12140
  if (dispatched) repairs.push(`taint-dispatch:${dispatched}`);
12069
- // T1 — ONE fresh in-loop re-run, pre-synthesis only (a fresh full pass, full fallback chain)
12141
+ // T1 — ONE fresh in-loop re-run, pre-synthesis only (a fresh full pass on the stage's one model)
12070
12142
  // — held until the real result is in hand; see the push below the taint re-read.
12071
12143
  let taintRerunDispatch = null;
12072
12144
  // — ONE ceiling, named once and read by BOTH ends. A literal repeated at the record site is a
@@ -12335,8 +12407,8 @@ async function pipelineInner(job, opts = {}) {
12335
12407
  }
12336
12408
 
12337
12409
  // WS2 (B3) — the plan⇄band IDENTITY JOIN (plan mode only; legacy runs have no plan and skip).
12338
- // Every guard-active plan entry must own a band block carrying its qid. A missing qid gets ONE warm
12339
- // targeted followup on the owning axis's winning session dictating exactly the unexecuted entries;
12410
+ // Every guard-active plan entry must own a band block carrying its qid. A missing qid gets ONE
12411
+ // targeted followup on the owning axis's winning key dictating exactly the unexecuted entries;
12340
12412
  // whatever is still missing is a StageFailure — a clean can never ship over a slice the PLAN dictated
12341
12413
  // and nothing ran (the F2/F3 seam). The receipt (_driver/plan-execution.json, incl. the code-derived
12342
12414
  // coverage skeleton) is what the digest ledger gate and the refutation plan-audit read.
@@ -12549,7 +12621,7 @@ async function pipelineInner(job, opts = {}) {
12549
12621
  // Machine-receipts contract gate (post-mortem §1b): a FRESH common-law run under a dictated key list
12550
12622
  // must save the grid stdout JSON (the validator already exact-joins it when present). A resumed run
12551
12623
  // that skipped the stage is exempt (archived/pre-machine-receipts artifacts are legacy by design).
12552
- // One warm followup on the winning session asks for just the save; still missing ⇒ the run fails —
12624
+ // One followup on the winning session asks for just the save; still missing ⇒ the run fails —
12553
12625
  // a new run silently on the legacy prose path would be the inference disease growing back.
12554
12626
  // A1 split: this lane is single-member only BY CONSTRUCTION — each half validator is ledger-or-fail
12555
12627
  // (its spec sidecar always dictates the grid), and mergeCommonLawArtifacts just wrote the canonical
@@ -12572,7 +12644,7 @@ async function pipelineInner(job, opts = {}) {
12572
12644
  // ── V4-4: coverage closure — a gap the machine can close itself never ships as a recommendation ──
12573
12645
  // At the point the run consumes the common-law findings on its way to synthesis (fresh, resumed, or
12574
12646
  // skipped — V4-1 semantics: this operates on the FILE, not on session events). Coverage-limited cells
12575
- // not exempted by a mechanical-error gap/ledger entry get ONE warm corrective followup on the stage's
12647
+ // not exempted by a mechanical-error gap/ledger entry get ONE corrective followup on the stage's
12576
12648
  // winning session, dictating exactly the missing variant×platform cells (batched at the profile-
12577
12649
  // derived ceiling, the convention). Whatever survives ships as a GENUINE attempted-and-unreachable front-matter
12578
12650
  // note with a priced offer — never as a "commission a re-run" recommendation (the S&I line-154
@@ -12706,8 +12778,8 @@ async function pipelineInner(job, opts = {}) {
12706
12778
  runLog(run.runDir, { event: "closure-partition", cells: closable.length,
12707
12779
  per_half: Object.fromEntries(GRID_HALVES.map((h) => [h, cellJobs[h].length])),
12708
12780
  unassigned: bal.unassigned.length });
12709
- // CONCURRENCY (2026-07-13): the two half followups run CONCURRENTLY on their OWN warm half-
12710
- // sessions (the same runBatched fan-out that dispatched the half gather members) — the halves are
12781
+ // CONCURRENCY (2026-07-13): the two half followups run CONCURRENTLY on their OWN half keys,
12782
+ // each a fresh session (the same runBatched fan-out that dispatched the half gather members) — the halves are
12711
12783
  // independent, so serializing them only doubled the closure wall.
12712
12784
  await runBatched(GRID_HALVES, config.gatherConcurrency, async (h) => {
12713
12785
  const cells = cellJobs[h];
@@ -12748,8 +12820,8 @@ async function pipelineInner(job, opts = {}) {
12748
12820
  // ── Property 1+2 (frame-omission design): the blind frame-diff + the reopen channel ────────────────
12749
12821
  // The blind-frame stage re-derived the threat model STARVED of the matter frame (gather, parallel with
12750
12822
  // the sweeps). Diff that cold model against what the run ACTUALLY scoped/searched (frame-diff), and act
12751
- // on the gaps: a targeted SUPPLEMENTAL SWEEP of the missing variant/field/source, then ONE warm
12752
- // re-digest — generalizing the screen-gate's warm-re-digest channel from commission (a drop without a
12823
+ // on the gaps: a targeted SUPPLEMENTAL SWEEP of the missing variant/field/source, then ONE re-digest
12824
+ // followup — generalizing the screen-gate's re-digest channel from commission (a drop without a
12753
12825
  // fetch) to OMISSION (a layer never scoped). Bounded exactly like escalation/envelope/coverage-closure:
12754
12826
  // an idempotency receipt (set-equality on the firing directives), ONE re-digest per pass, a byte-diff
12755
12827
  // guard, NO in-process re-diff, one-shot (CLEAROTRON_FRAME_REOPEN_MAX). Same digest-lock as escalation:
@@ -13339,13 +13411,13 @@ async function pipelineInner(job, opts = {}) {
13339
13411
  else note(`frame-reopen: ${a} unchanged after the supplemental sweep`);
13340
13412
  } else {
13341
13413
  regMechFail = r.fail; note(`frame-reopen: ${a} supplemental sweep failed mechanically (${r.fail})`);
13342
- // doc-44: a core coverage sweep must NOT be one-shot-then-abandon. On a TIMEOUT (the warm resume hit
13343
- // the hard wall — a dead session a re-resume can't revive), do ONE fresh, SCOPED re-sweep of the SAME
13344
- // near-form threats through the normal fallback chain (retries + BACKUP PROVIDER — a warm followup is
13345
- // single-model and can't cross-provider). Scoped (not the whole axis) + bounded detail-fetch so it
13414
+ // doc-44: a core coverage sweep must NOT be one-shot-then-abandon. On a TIMEOUT (the followup used its
13415
+ // own attempts, its extended retry included, and still hit the wall), do ONE fresh, SCOPED re-sweep of the SAME
13416
+ // near-form threats on a fresh session: the stage's one model and the gateway's retries, as any fresh
13417
+ // stage gets. There is no second model or provider. Scoped (not the whole axis) + bounded detail-fetch so it
13346
13418
  // fits the budget. Still fails ⇒ fall through to the deferral exactly as before.
13347
13419
  if (/timeout/.test(String(regMechFail))) {
13348
- note(`frame-reopen: ${a} timed out — ONE fresh SCOPED retry through the fallback chain (backup provider + retries)`);
13420
+ note(`frame-reopen: ${a} timed out — ONE fresh SCOPED retry on a fresh session (same model, the gateway's retries)`);
13349
13421
  const retryMsg = repairFollowup("register-unit:frame-reopen-retry", { paths: P, axis: a, directives: regDirectives,
13350
13422
  supplementalLane: !!ctx.registerPlan?.contract?.supplemental_lane, job: ctx.job, profile: ctx.profile });
13351
13423
  const r2 = await stage("register-unit", { ...ctx, axis: a }, { force: true, freshMessage: retryMsg, sessionKey: `clearance-${ctx.run.slug}-${ctx.run.codename}-register-unit-${a}-reopen-retry`, trigger: "frame-reopen-retry" });
@@ -13377,7 +13449,7 @@ async function pipelineInner(job, opts = {}) {
13377
13449
  // and surfaces the newly-enumerated conflicts as findings — this block runs BEFORE synthesis).
13378
13450
  // T1 (J2/G8): the re-digest honors the block's NON-FATAL contract — the old must here
13379
13451
  // killed a full run on a re-digest timeout AFTER the sweeps had already landed (the F5
13380
- // 48%-timeout class). One fresh retry through the fallback chain on a timeout; still failing ⇒
13452
+ // 48%-timeout class). One retry on a fresh session, same model, on a timeout; still failing ⇒
13381
13453
  // the swept register directives are DEMOTED back to deferrals (open coverage row + the
13382
13454
  // CLEAR→CONDITIONAL clamp — "can't close → disclose") and the run continues on the prior digest.
13383
13455
  // CROWDED-FIELD FIX (teal-gantry, 2026-07-21) — RETIRED BY, and this is the whole win.
@@ -13836,8 +13908,8 @@ async function pipelineInner(job, opts = {}) {
13836
13908
  const escHeld = splitDeferredByCloseability(ledger, a, escalationGapAxes,
13837
13909
  { fullyDeferred: escalationFullyDeferred.has(a.toLowerCase()), heldUnits: stickyGapUnits(P), uncovered: officeGapOf(ctx.registerPlan), askable: askableOf(escalationReceipt) }).held;
13838
13910
  followup += escalationHeldNote(escHeld);
13839
- // No opts.model → stays on this axis's original tier (axisTier: sonnet/haiku) so the resume is a warm
13840
- // cache hit. sessionKey: unitKey[a] resumes the EXACT key the unit won on. force bypasses idempotency.
13911
+ // No opts.model → stays on this axis's original tier (axisTier: sonnet/haiku); the followup is a fresh
13912
+ // session, so no cache rides on it. sessionKey: unitKey[a] names the EXACT key the unit won on. force bypasses idempotency.
13841
13913
  const r = await stage("register-unit", { ...ctx, axis: a }, { force: true, followup, sessionKey: unitKey[a], trigger: "escalation" });
13842
13914
  if (!r.ok) return { axis: a, changed: false, ok: false };
13843
13915
  const afterUnit = readFileSync(P.registerUnit(a), "utf8");
@@ -13881,7 +13953,7 @@ async function pipelineInner(job, opts = {}) {
13881
13953
  // Floor obligations = `deferred` Coverage-ledger rows (planned but never run — incl. material
13882
13954
  // jurisdictions the digest reconciliation found unsearched). `coverage-limited` rows are documented
13883
13955
  // accepted limits (Lever 4) — a re-run cannot close them, so they are not floors here. Close mechanics
13884
- // mirror the skeptic-escalation block above: warm followup on the owning unit's winning session,
13956
+ // mirror the skeptic-escalation block above: a followup on the owning unit's winning key,
13885
13957
  // byte-diff guard, ONE re-digest for materially-changed axes. Same audit-spine lock: never re-fire
13886
13958
  // past synthesis. The decision (envelope arithmetic + choice) is always logged; whatever remains
13887
13959
  // unclosed at delivery is stated in the report with its MECHANICAL cause (front-matter, code-built).
@@ -14066,9 +14138,9 @@ async function pipelineInner(job, opts = {}) {
14066
14138
  // RECOVER-THEN-DISCLOSE (completes the Fix-3 escalation): the gate is correct and must never be silenced,
14067
14139
  // but the flagged marks are FETCHABLE — a high-conflict run (KINETIC) where the digest took the
14068
14140
  // name-inferred shortcut on a few marks should SELF-HEAL, not die. So on the first violation we do ONE
14069
- // warm followup re-digest that forces the worker to record_fetch the flagged URIs and re-decide on their
14070
- // REAL goods (mirrors the coverage-ledger recoverCoverageLedger / candidate-self warm-followup pattern,
14071
- // resuming the WINNING digest session so the worker keeps its screening context). Whatever is STILL
14141
+ // followup re-digest that forces the worker to record_fetch the flagged URIs and re-decide on their
14142
+ // REAL goods (mirrors the coverage-ledger recoverCoverageLedger / candidate-self followup pattern, on the
14143
+ // WINNING digest key; a fresh session, so the message names the findings it re-decides). Whatever is STILL
14072
14144
  // violating after that one recovery pass is disclosed as unexamined + clamps the verdict (owner
14073
14145
  // decision 2026-07-22 — the terminal branch below); the gate never silently passes a drop.
14074
14146
  {
@@ -14507,7 +14579,7 @@ async function pipelineInner(job, opts = {}) {
14507
14579
  // the same wrong premise — and composeFollowup's own doc block records that a followup dispatch is
14508
14580
  // NOT a resumed session but a fresh attempt 1, so it holds nothing of its own.
14509
14581
  //
14510
- // The true reason the warm followups do not carry the blocks is simply that they pass no `extra`:
14582
+ // The true reason the followups do not carry the blocks is simply that they pass no `extra`:
14511
14583
  // they are targeted corrections to work that exists, and their message is the correction. That is a
14512
14584
  // live choice, not a mechanism that forbids it — the corrective re-synthesis below could be given
14513
14585
  // the blocks by passing `extra`, and if a corrective pass is ever found rewriting a coverage claim
@@ -14543,7 +14615,7 @@ async function pipelineInner(job, opts = {}) {
14543
14615
  // doc 50 — the dictation demands schema_version 4 (band-rated under the framework in force).
14544
14616
  // The demand fires ONLY when synthesis actually RAN this turn: a skip-resumed stage (a parked run
14545
14617
  // whose prior v3 findings.json still validates on the legacy path) keeps its declared version —
14546
- // forcing a mid-run contract switch across the deploy boundary would burn a warm followup fighting
14618
+ // forcing a mid-run contract switch across the deploy boundary would burn a followup fighting
14547
14619
  // the run's own frozen artifact. Logged loudly instead; that run's gates judge it as v3.
14548
14620
  if (declaredSv !== null && declaredSv < 4 && synth.skipped) {
14549
14621
  note(`[findings] schema_version ${declaredSv} retained on a resumed run (pre-doc-50 artifact) — v${declaredSv} gates apply; no re-emit demanded`);
@@ -14965,6 +15037,8 @@ async function pipelineInner(job, opts = {}) {
14965
15037
  : "";
14966
15038
  const recheckSeq0 = nextRefutationSeq(run.runDir);
14967
15039
  const reviewShaBefore = shaOf(P.seniorEyeReview);
15040
+ let reviewBefore = null;
15041
+ try { reviewBefore = readFileSync(P.seniorEyeReview, "utf8"); } catch { reviewBefore = null; }
14968
15042
  const rc = firstRef.key
14969
15043
  ? await stage("narrative-refutation", ctx, {
14970
15044
  force: true, sessionKey: firstRef.key, model: firstRef.model, thinking: firstRef.thinking, trigger: "verdict-recheck",
@@ -14983,23 +15057,31 @@ async function pipelineInner(job, opts = {}) {
14983
15057
  // a verification nobody made. Such a recheck is a failed one: the entry verdict stands, the record says the
14984
15058
  // correction was not verified, no receipt is written, and the earlier review stays in place as the earlier review.
14985
15059
  //
14986
- // TWO WAYS TO SAVE, BOTH COUNTED. The message above orders the review file rewritten, and a seat may do that or
14987
- // record the review through its tool; both are seen on test runs. So a save is an accepted tool call made since
14988
- // this dispatch began, or review bytes that differ from the ones before it. A byte-identical rewrite reads as no
14989
- // save, which costs only a cycle run again on a resume: the same bytes carry the same verdict.
14990
- const recheckCall = rc.ok ? readAcceptedReviewSince(run.runDir, recheckSeq0) : null;
14991
- const recheckRewrote = rc.ok && !recheckCall && shaOf(P.seniorEyeReview) !== reviewShaBefore && shaOf(P.seniorEyeReview) != null;
14992
- const recheckRead = recheckCall ? { by: "tool", seq: recheckCall.seq } : recheckRewrote ? { by: "file", seq: null } : null;
15060
+ // TWO WAYS TO SAVE, BOTH COUNTED, UNDER ONE SET OF RULES. The message above orders the review file rewritten, and a
15061
+ // seat may do that or record the review through its tool; both are seen on test runs. So a save is an accepted tool
15062
+ // call made since this dispatch began, or review bytes that differ from the ones before it and that the tool's rules
15063
+ // would accept (settleRecheckSave). A refused rewrite gives way to the accepted call or to the earlier review, and
15064
+ // reads as no save. A byte-identical rewrite reads as no save, which costs only a cycle run again on a resume: the
15065
+ // same bytes carry the same verdict.
15066
+ const recheckSave = settleRecheckSave(run.runDir, { before: reviewBefore, stageOk: rc.ok === true, seq0: recheckSeq0 });
15067
+ if (recheckSave.restore != null) {
15068
+ try { atomicWrite(P.seniorEyeReview, recheckSave.restore); }
15069
+ catch (e) { note(`[corrections] the review could not be put back after the recheck (${String(e?.message ?? e).slice(0, 100)})`); }
15070
+ }
15071
+ if (recheckSave.refused) runLog(run.runDir, { event: "verdict-recheck-file-save-refused", refused: recheckSave.refused, seq0: recheckSeq0, entryVerdict });
15072
+ const recheckRead = recheckSave.read;
14993
15073
  if (rc.ok && !recheckRead) {
14994
- runLog(run.runDir, { event: "verdict-recheck-unread", fail: "no-accepted-call", seq0: recheckSeq0, entryVerdict });
14995
- note(`[corrections] the recheck after the correction recorded no review — the correction is not verified, the entry verdict (${entryVerdict}) stands, and the review in place is the one from before the correction`);
15074
+ runLog(run.runDir, { event: "verdict-recheck-unread", fail: recheckSave.fail, seq0: recheckSeq0, entryVerdict });
15075
+ note(`[corrections] the recheck after the correction recorded no review it could accept (${recheckSave.fail}) — the correction is not verified, the entry verdict (${entryVerdict}) stands, and the review in place is the one from before the correction`);
14996
15076
  }
14997
- verdict = recheckRead ? (parseVerdict(readFileSync(P.seniorEyeReview, "utf8")) ?? entryVerdict) : entryVerdict;
15077
+ // What stands is what was decided, so a put-back that could not be written never reads a refused verdict back.
15078
+ verdict = recheckRead ? (parseVerdict(recheckSave.restore ?? readFileSync(P.seniorEyeReview, "utf8")) ?? entryVerdict) : entryVerdict;
14998
15079
  correctiveRecheckOk = rc.ok === true && Boolean(recheckRead);
14999
15080
  try {
15000
15081
  atomicWrite(driverDir(run.runDir, CORRECTIVE_RECHECK_FILE), JSON.stringify({ ts: new Date().toISOString(),
15001
15082
  status: correctiveRecheckOk ? "read" : "unread", by: recheckRead?.by ?? null, entryVerdict, verdict, seq0: recheckSeq0, seq: recheckRead?.seq ?? null,
15002
- ...(correctiveRecheckOk ? {} : { fail: rc.ok ? "no-accepted-call" : String(rc.fail ?? "failed").slice(0, 160) }) }, null, 2) + "\n");
15083
+ reviewSha: reviewShaBefore, // the review this recheck found: earlierReviewNotRechecked tells it from any saved later
15084
+ ...(correctiveRecheckOk ? {} : { fail: rc.ok ? recheckSave.fail : String(rc.fail ?? "failed").slice(0, 160) }) }, null, 2) + "\n");
15003
15085
  } catch (e) { note(`[corrections] the recheck's record could not be written (${String(e?.message ?? e).slice(0, 100)}) — the run log still holds the outcome`); }
15004
15086
  runLog(run.runDir, { event: "verdict-2", verdict, read: correctiveRecheckOk });
15005
15087
  writeRunStatus(ctx, signoffPatch(verdict));
@@ -15121,7 +15203,7 @@ async function pipelineInner(job, opts = {}) {
15121
15203
  // ── P2-A pre-verdict floor: the reconciliation's hard discrepancy list ─────────────────────────
15122
15204
  // screened-live dominant-element candidates ∖ endings is read here as it always was, and it no longer THROWS:
15123
15205
  // the owner's ruling of 2026-10-19 that a run is never held replaces the Round-2 rule that this one class never
15124
- // ships. The run first recovers what it can in-run (the digest seam's warm followups; placement assessing late
15206
+ // ships. The run first recovers what it can in-run (the digest seam's followups; placement assessing late
15125
15207
  // evidence before the writer); whatever is still unended ships NAMED, through the terminal guards' deliver-and-clamp
15126
15208
  // (`clampOnTheRecallGate`, beside the floor duty's clamp below), never as a run that delivers nothing.
15127
15209
 
@@ -15418,6 +15500,8 @@ async function pipelineInner(job, opts = {}) {
15418
15500
  // stale BLOCKING to CLEAR — that outcome must pass the SAME deliver-conditional floor, never
15419
15501
  // bypass it because the clamp already ran once.
15420
15502
  const applyCoverageFloor = () => {
15503
+ // Each entry is the floors' state, so delivery reads only a floor that threw since the last of these.
15504
+ runLog(run.runDir, { event: "verdict-floors-pass" });
15421
15505
  // review fix: the machinery arm below must judge the verdict AS IT ENTERED the floor —
15422
15506
  // when the legalActions arm clamps CLEAR→CONDITIONAL first, the machinery gaps (coverage, frame,
15423
15507
  // screen-gate, senior, registerGap) must still be computed and APPENDED, or a run
@@ -15540,7 +15624,12 @@ async function pipelineInner(job, opts = {}) {
15540
15624
  // the dedup and deliver CLEAR — the precise defect this issue is about.
15541
15625
  if (clReason && verdict === "CLEAR") { verdict = "CONDITIONAL"; writeRunStatus(ctx, signoffPatch(verdict)); }
15542
15626
  }
15543
- } catch (e) { note(`common-law downgrade floor skipped (${String(e.message).slice(0, 80)}) — never-kill`); }
15627
+ } catch (e) {
15628
+ note(`common-law downgrade floor skipped (${String(e.message).slice(0, 80)}) — never-kill`);
15629
+ // Nothing else would clamp this: the audit workbook names it (degraded-parts.mjs, checks).
15630
+ try { runLog(run.runDir, { event: "verdict-floor-failed", floor: "common-law", fail: String(e?.message ?? e).slice(0, 200) }); }
15631
+ catch { /* the note above still stands */ }
15632
+ }
15544
15633
  if (entryVerdict === "CLEAR") {
15545
15634
  const frameGap = ctx.frameReopenGap === true;
15546
15635
  let frameDeferrals = [];
@@ -15865,7 +15954,7 @@ async function pipelineInner(job, opts = {}) {
15865
15954
  if (verdict === "BLOCKING") {
15866
15955
  // Repair-first A5 (2026-07-05): the reviewer verdict is documented noisy (the U1 comment above —
15867
15956
  // "flips on byte-identical input"), so before the terminal the gate refuses a DEGENERATE artifact:
15868
- // a carried BLOCKING whose own file no longer says BLOCKING (the copper-spire shape — a failed warm
15957
+ // a carried BLOCKING whose own file no longer says BLOCKING (the copper-spire shape — a failed
15869
15958
  // re-check silently kept the stale entry verdict while the review on disk said CLEAR), or a
15870
15959
  // BLOCKING citing ZERO defects (nothing exists for the corrective ladder to fix). ONE forced-fresh
15871
15960
  // re-ask demands the verdict + file-anchored defects. A REASONED blocking is never re-rolled —
@@ -15960,6 +16049,9 @@ async function pipelineInner(job, opts = {}) {
15960
16049
  // THE SEAM'S WRITES ARE ONE CLOSURE, so they can run again: a synthesis save after this point rewrites
15961
16050
  // findings.json from the seat's own call, and every write below went with it (`stage()` re-runs them).
15962
16051
  const seamWrites = async () => {
16052
+ // A pass follows each rewrite of findings.json and adds the rows below again, so delivery reads only the adders
16053
+ // that failed since the last of these.
16054
+ runLog(run.runDir, { event: "coverage-rows-pass" });
15963
16055
  injectDeferralCoverage(P, run.runDir, note); injectMeaningGapCoverage(P, run.runDir, note); // A3: unclosed reopen directives, and meaning searches that did not complete, become reader-visible coverage rows first
15964
16056
  // qw/cn-scope-honesty — the sibling injection: a CN-family-scope run whose zh lane did not run
15965
16057
  // discloses what the native-language investigation would have searched, and where it is offered
@@ -17159,7 +17251,7 @@ async function pipelineInner(job, opts = {}) {
17159
17251
  if (shellFixable.length && rov) { await redo("report-overview", shellFixable, rov.sessionKey, rov.model, rov.thinking, P.reportOverview); if (repaired.includes("report-overview")) reassembled = true; }
17160
17252
  // — THE NARRATIVE REDO ROUTE. The same mechanism report-overview already has, re-aimed at
17161
17253
  // the seat that wrote narrative.md. Without it a depth check could only FLAG, and a flag on a
17162
- // narrative that broke the rules is the run shipping the defect with a note attached. ONE warm
17254
+ // narrative that broke the rules is the run shipping the defect with a note attached. ONE followup
17163
17255
  // pass, named violations; a second overrun ships and the lint row is the record.
17164
17256
  //
17165
17257
  // A FAULT IN A LINE COMPOSED FROM THE RECORD (a finding's own sentence, a short entry, a grouped line) is the
@@ -19489,7 +19581,7 @@ export function retiredFlagRefusal(argv) { // @internal
19489
19581
  // the warning string, which was true of all three entries and would have become false of the fourth —
19490
19582
  // a line that dates every retirement to the first one is worse than a line with no date at all.
19491
19583
  const RETIRED_ENV = {
19492
- CLEAROTRON_KNOCKOUT_MODE: ["2026-07-27", "knockout availability is a property of the BUILD and the wired provider (search-policy.mjs BUILT)"],
19584
+ CLEAROTRON_KNOCKOUT_MODE: ["2026-07-27", "knockout availability is a property of the BUILD and the wired provider (search-policy.mjs BUILT)"], CLEAROTRON_KNOCKOUT_RECORD_CAP: ["2026-11-05", "a knockout reads the lists its reading step selects, in full; there is no record cap"],
19493
19585
  CLEAROTRON_JX_LANES: ["2026-07-27", "the jx lane decision is frozen into the run's search policy; the per-lane CLEAROTRON_NATIVE_LANGUAGE_<XX> switches are still live"],
19494
19586
  CLEAROTRON_RECIPES_MODE: ["2026-07-27", "a saved search is honoured wherever it resolves"],
19495
19587
 
@@ -19542,16 +19634,17 @@ export function retiredEnvWarnings(env = process.env) {
19542
19634
  //
19543
19635
  // Pure and exported so every branch is testable with no run, no run dir and no spend.
19544
19636
  //
19545
- // ABSOLUTE PATHS on purpose: this line is read hours later, possibly from a different directory, and a
19546
- // relative path that silently resolves somewhere else would be a worse answer than no line at all.
19547
- export function resumeCommand({ script, jobPath, codename, agent = null }) { // @internal
19637
+ // THE PRODUCT'S OWN VERB, in the form that reaches this install from any directory, and an ABSOLUTE job path:
19638
+ // this line is read hours later, possibly from a different directory, and a relative path that silently
19639
+ // resolves somewhere else would be a worse answer than no line at all.
19640
+ export function resumeCommand({ jobPath, codename, agent = null, command = reachableCommand }) { // @internal
19548
19641
  // THE IDENTITY IS THE CODENAME, NOT THE JOB PATH, and requiring both is what made this print nothing
19549
19642
  // on the failures that most needed it. A resume rebuilds the job from the run's own status when no
19550
19643
  // `--job` is given, so a command without one is valid — and it is the only valid one by the time a
19551
19644
  // failure has made a resume necessary, because the queue entry carrying the job is long consumed.
19552
19645
  // Requiring a path here meant every such failure was told "nothing to resume", which was false.
19553
- if (!script || !codename) return null;
19554
- return `node ${script}${jobPath ? ` --job ${jobPath}` : ""}${agent ? ` --agent ${agent}` : ""} --resume ${codename}`;
19646
+ if (!codename) return null;
19647
+ return `${command("run")}${jobPath ? ` --job ${jobPath}` : ""}${agent ? ` --agent ${agent}` : ""} --resume ${codename}`;
19555
19648
  }
19556
19649
 
19557
19650
  // The stderr lines a non-clean exit owes its reader, as an array (empty = say nothing further).
@@ -19568,12 +19661,12 @@ export function resumeCommand({ script, jobPath, codename, agent = null }) { /
19568
19661
  // And where NO identity exists yet (the door preflights: tier sanity, engine binary, register credential,
19569
19662
  // an unresolvable resume codename), the honest line says there is nothing to resume rather than printing a
19570
19663
  // command with a hole in it.
19571
- export function resumeAdvice({ result = null, error = null, signal = null, script = null, jobPath = null, agent = null, codename = null, experiment = false, noResume = false } = {}) { // @internal
19664
+ export function resumeAdvice({ result = null, error = null, signal = null, jobPath = null, agent = null, codename = null, experiment = false, noResume = false, command = reachableCommand } = {}) { // @internal
19572
19665
  if (result?.ok) return [];
19573
19666
  if (experiment) return [];
19574
19667
  if (noResume || error?.noResume) return [];
19575
19668
  if (result?.cancelled) return [`stopped at ${result.failedStage ?? "an early stage"} because you asked — terminal. Nothing was delivered and nothing resumes; start a new run when you want one.`];
19576
- const cmd = resumeCommand({ script, jobPath, codename, agent });
19669
+ const cmd = resumeCommand({ jobPath, codename, agent, command });
19577
19670
  // No identity yet: the door preflights and the unresolvable-codename guard all fire before a run dir
19578
19671
  // exists, and a signal can arrive there too. Say there is nothing to resume rather than print a command
19579
19672
  // with a hole in it — and do not point at an "error above" when a signal is what happened.
@@ -19582,10 +19675,10 @@ export function resumeAdvice({ result = null, error = null, signal = null, scrip
19582
19675
  : "nothing to resume: this stopped before the run had an identity, so no work was started and none was lost. Fix the error above and run the same command again."];
19583
19676
  // A park is NOT a failure, and the difference is the reader's whole decision: wait, or act. Both park
19584
19677
  // kinds resume themselves wherever something re-invokes the runner — the systemd units on a server, or
19585
- // `runner.mjs --watch` on a machine that has none — so the line says that first and offers the manual
19678
+ // `clearotron run-queue --watch` on a machine that has none — so the line says that first and offers the manual
19586
19679
  // command second. On a laptop with neither, the manual command is the only path, which is exactly why
19587
19680
  // it is printed rather than left to be looked up.
19588
- const watching = script ? `node ${join(dirname(script), "runner.mjs")} --watch` : "node driver/runner.mjs --watch";
19681
+ const watching = `${command("run-queue")} --watch`;
19589
19682
  const lines = [];
19590
19683
  if (result?.postponed && result.recovery) {
19591
19684
  lines.push(`parked for automatic recovery${result.resetsAt ? ` until ${result.resetsAt}` : ""} — nothing failed terminally and every finished stage is kept.`);
@@ -19745,11 +19838,10 @@ if (isEntrypoint(import.meta.url)) void (async () => {
19745
19838
  const opts = a.experiment
19746
19839
  ? { ...base, codename: a.codename, experiment: a.experiment, model: a.model, instructions: a.instructions, axis: a.axis, label: a.label, dispatchTrigger: a.dispatchTrigger, research: a.research, orderRecovery }
19747
19840
  : { ...base, codename: a.codename, fromStage: a.fromStage, ...(a.job ? { explicitJob: true } : { jobRebuiltFromStatus: true }), records: a.records };
19748
- const script = resolve(fileURLToPath(import.meta.url));
19749
19841
  // `jobPath` is null on a rebuilt resume, so the advice composes a command that does not name a file
19750
19842
  // the box does not have — which is the whole defect this path exists to close, and printing it again
19751
19843
  // in the exit advice would reintroduce it one layer along.
19752
- const advise = (o) => { for (const line of resumeAdvice({ script, jobPath: a.job ? resolve(a.job) : null, agent: a.agent ?? null, experiment: Boolean(a.experiment), ...o })) console.error(line); };
19844
+ const advise = (o) => { for (const line of resumeAdvice({ jobPath: a.job ? resolve(a.job) : null, agent: a.agent ?? null, experiment: Boolean(a.experiment), ...o })) console.error(line); };
19753
19845
 
19754
19846
  // ── the laptop case: a closed lid, a shutdown, a ^C ────────────────────────────────────────────────
19755
19847
  // Until now this CLI had NO signal handler: node's default die-now killed the process mid-stage, the run
@@ -19922,6 +20014,7 @@ export function injectMeaningGapCoverage(P, runDir, note) { // @internal — e
19922
20014
  runLog(runDir, { event: "meaning-gap-coverage", added });
19923
20015
  } catch (e) {
19924
20016
  note(`[common-law] meaning-gap coverage skipped: ${String(e?.message || e).replace(/\s+/g, " ").slice(0, 100)}`);
20017
+ coverageRowNotAdded(runDir, "meaning-gap", e);
19925
20018
  }
19926
20019
  }
19927
20020