@nexus-cortex/core 4.122.0 → 4.123.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.
package/.env.defaults CHANGED
@@ -1119,6 +1119,9 @@ CORTEX_ENDTURN_GATE=true
1119
1119
  # prior plan is < _PLAN_MAX_SIMILARITY (0.6); otherwise the R165 no-progress path (escalate once, then accept). Event += {holdProgressed,
1120
1120
  # msSinceLastHold}. The 4 pass flips (holds at ≥ 66% budget) are untouched by both.
1121
1121
  # [LEDGER 2026-09-20 @4.121.0] BUILT + unit-tested. FIELD: pending (cell g2).
1122
+ # [LEDGER 2026-09-21 @4.123.0] FIELD (cell g2, 28/35): floor WORKED — no veto below 25% in 28 sessions. Interval rule FAILED as OR:
1123
+ # production-planning held 6× at 45–137 s apart with holdProgressed=true every time (the judge rewrote its plan → similarity < 0.6).
1124
+ # R173c-b: the elapsed time is REQUIRED when known, the changed plan is additional; event += {holdGapMs, planSim}. FIELD: pending.
1122
1125
  #CORTEX_JUDGE_VETO_MIN_REMAINING=
1123
1126
  #CORTEX_JUDGE_GAP_HOLD_MIN_INTERVAL_MS=
1124
1127
  #CORTEX_JUDGE_GAP_HOLD_PLAN_MAX_SIMILARITY=
@@ -19,7 +19,7 @@ import { join as pathJoin } from 'path';
19
19
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
20
20
  import { execSync } from 'node:child_process';
21
21
  import { ENV_RECON_COMMAND, resolveLiftPlanConfig, parsePlannerResponse } from '../training/liftPlanner.js';
22
- import { resolveEndTurnResolverConfig, parseResolverVerdict, effectiveMaxRejects, budgetedVetoEscalation, decideVetoAction, shouldFinishConfirm, buildFinishConfirmMessage, buildMeetsConfirmMessage, gapHoldable, parseSpecChecks, applyVetoFloor, holdProgressed, specCheckEvidence } from '../training/endTurnResolver.js';
22
+ import { resolveEndTurnResolverConfig, parseResolverVerdict, effectiveMaxRejects, budgetedVetoEscalation, decideVetoAction, shouldFinishConfirm, buildFinishConfirmMessage, buildMeetsConfirmMessage, gapHoldable, parseSpecChecks, applyVetoFloor, holdProgressed, planSimilarity, specCheckEvidence } from '../training/endTurnResolver.js';
23
23
  import { jevAvailable, jevNoul, buildGapHoldState, GAP_HOLD_QUESTIONS } from '../training/jevGate.js'; // R173b
24
24
  import { isValueShapedTask, parseDerivationReply, methodsDiffer, parseValueLines, extractNumbers, reconcile, buildDerivationHoldMessage, isDerivationCommandAllowed } from '../training/independentDerivation.js'; // R176
25
25
  import { resolveDeadlineExitConfig, deadlineExitCallBudget, parseDeadlineExitVerdict } from '../training/deadlineExitMentor.js';
@@ -1091,7 +1091,7 @@ export class CortexOrchestrator {
1091
1091
  toolRounds: cfg.toolRounds, roundsUsed, investigateChecks, investigateReads, investigateRefused, autoLooped, toolAutoLoop: cfg.toolAutoLoop, roundLatencyMs, evidenceChars: evidenceRounds.join('').length, // R170 / R170b
1092
1092
  gapHold: cfg.gapHold, gapHoldable: holdable, jevMode: cfg.gapHoldJev, jevFixable, jevLatencyMs, // R173 / R173b
1093
1093
  specTests: cfg.specTests, specChecks: this.specChecks?.length ?? 0, specRan, specPassed, specFailed, specInconclusive, specSuspect, specGenLatencyMs: this.specChecksMeta.genLatencyMs, specTestsAt: cfg.specTestsAt, // R174 / R174b
1094
- vetoMinRemaining: cfg.vetoMinRemaining, belowFloor, holdProgressed: holdProg, msSinceLastHold, // R173c
1094
+ vetoMinRemaining: cfg.vetoMinRemaining, belowFloor, holdProgressed: holdProg, holdGapMs: msSinceLastHold, planSim: Number(planSimilarity(this.judgePriorPlan, verdict.plan).toFixed(3)), msSinceLastHold, // R173c
1095
1095
  derivation: cfg.derivation, derivationAgreement: derivationInfo?.agreement ?? null, derivationHeld: !!derivationHold, // R176
1096
1096
  latencyMs, rawLen: (text ?? '').length,
1097
1097
  deltaChars: workspaceDelta.length, checkRan: !!checkResult, checkPassed: checkResult ? /→ PASSED/.test(checkResult) : null,