clearotron 0.5.1 → 0.6.0-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.
- package/.env.example +7 -7
- package/INSTALL.md +10 -10
- package/QUICKSTART.md +6 -6
- package/README.md +2 -2
- package/THIRD-PARTY-NOTICES.md +4 -4
- package/bin/README.md +2 -2
- package/bin/clearotron.mjs +1 -1
- package/bin/connect.mjs +1 -1
- package/bin/disconnect.mjs +1 -1
- package/bin/example.mjs +2 -2
- package/bin/grant.mjs +1 -1
- package/bin/onboard.mjs +78 -23
- package/bin/start.mjs +49 -18
- package/bin/update.mjs +13 -3
- package/build-info.json +2 -2
- package/docs/DELIVERY.md +1 -1
- package/docs/PORTAL.md +1 -1
- package/docs/RELEASES.md +1 -1
- package/docs/architecture/02-architecture.md +10 -2
- package/docs/architecture/03-run-lifecycle.md +6 -2
- package/docs/architecture/04-configuration-reference.md +3 -3
- package/docs/architecture/05-config-governance.md +5 -4
- package/docs/architecture/08-development-guide.md +4 -4
- package/docs/architecture/09-security-and-data.md +1 -1
- package/{driver/skills/clearance-search/SKILL.md → docs/architecture/retired-manuals/clearance-search-spine.md} +17 -30
- package/{driver/skills/clearance-search/templates/email/generic.md → docs/architecture/retired-manuals/email-generic.md} +1 -1
- package/{driver/skills/clearance-search → docs/architecture/retired-manuals}/template-formatting.md +3 -4
- package/docs/configuration.md +1 -1
- package/docs/decisions/0002-no-dark-functionality.md +5 -0
- package/driver/CHANGELOG.md +60 -0
- package/driver/README.md +11 -1
- package/driver/accepted-order.mjs +13 -5
- package/driver/attempt-rows.mjs +64 -0
- package/driver/attributed-span.mjs +1 -1
- package/driver/authority-trees.mjs +1 -1
- package/driver/best-draft.mjs +3 -3
- package/driver/blind-frame-record.mjs +2 -2
- package/driver/cancel.mjs +3 -2
- package/driver/carry-through.mjs +2 -2
- package/driver/citation-census.json +3 -3
- package/driver/clearance-variants-record.mjs +4 -10
- package/driver/common-law-coverage-status.mjs +3 -3
- package/driver/common-law-receipts.mjs +2 -2
- package/driver/compare.mjs +1 -1
- package/driver/config-inventory.mjs +6 -79
- package/driver/consumption-ledger.mjs +2 -1
- package/driver/contract-dictation-registry.mjs +5 -0
- package/driver/contract-e3-backlog.mjs +45 -66
- package/driver/contract-e3-baseline.json +16 -16
- package/driver/contract-vocabulary.mjs +8 -6
- package/driver/corrections-feedforward.mjs +3 -1
- package/driver/coverage-form-io.mjs +7 -8
- package/driver/coverage-tool.mjs +1 -1
- package/driver/declination-tool.mjs +2 -2
- package/driver/degraded-parts.mjs +9 -9
- package/driver/demo-container.mjs +5 -4
- package/driver/deploy-live-run-guard.mjs +19 -7
- package/driver/derived-state.mjs +2 -2
- package/driver/dev-portal.mjs +2 -1
- package/driver/dispatch-record.mjs +1 -1
- package/driver/disposition-tool.mjs +2 -1
- package/driver/doubt-closure-tool.mjs +2 -2
- package/driver/driver.config.mjs +35 -724
- package/driver/e2e-rounds.mjs +3 -4
- package/driver/engine/CONTRACT.md +3 -0
- package/driver/engine/README.md +2 -0
- package/driver/engine/anthropic-agent.mjs +8 -37
- package/driver/engine/auth.mjs +74 -0
- package/driver/engine/child-record.mjs +1 -1
- package/driver/engine/deny-authority-write.mjs +2 -2
- package/driver/engine/jx-turn.mjs +10 -2
- package/driver/engine/mcp/README.md +1 -1
- package/driver/engine/mcp/band-server.mjs +6 -6
- package/driver/engine/mcp/codex-config.mjs +1 -1
- package/driver/engine/mcp/declination-server.mjs +2 -3
- package/driver/engine/mcp/dispositions-server.mjs +3 -3
- package/driver/engine/mcp/gather-config.mjs +24 -19
- package/driver/engine/mcp/grid-provenance.mjs +1 -1
- package/driver/engine/mcp/held-answers.mjs +5 -5
- package/driver/engine/mcp/perplexity-server.mjs +16 -7
- package/driver/engine/mcp/recording-server.mjs +7 -6
- package/driver/engine/mcp/register-server.mjs +29 -0
- package/driver/engine/mcp/stdio-server.mjs +5 -5
- package/driver/engine/mcp/supplemental.mjs +9 -9
- package/driver/engine/openai-agent.mjs +5 -2
- package/driver/engine/registry.mjs +103 -0
- package/driver/engine/run-choices.mjs +162 -0
- package/driver/engine/stamps.mjs +35 -0
- package/driver/enqueue-schema.mjs +4 -4
- package/driver/envelope-settle.mjs +3 -2
- package/driver/feedback-issues.mjs +1 -1
- package/driver/feedback-mint.mjs +3 -2
- package/driver/feedback-store.mjs +3 -2
- package/driver/findings-model.mjs +1 -1
- package/driver/flag-snapshot.mjs +5 -4
- package/driver/floor-duty.mjs +3 -3
- package/driver/foreign-record-links.mjs +1 -1
- package/driver/frame-diff-record.mjs +2 -8
- package/driver/framework.mjs +1 -1
- package/driver/gate-metrics.mjs +10 -11
- package/driver/gateway.mjs +220 -839
- package/driver/goods-evidence.mjs +10 -6
- package/driver/jx-lanes.mjs +3 -3
- package/driver/jx-units.mjs +31 -37
- package/driver/jx.mjs +44 -59
- package/driver/knockout-assess-record.mjs +3 -3
- package/driver/knockout-caveats.mjs +21 -0
- package/driver/knockout-correction-record.mjs +58 -28
- package/driver/knockout-frame-record.mjs +2 -2
- package/driver/knockout-register-read.mjs +38 -21
- package/driver/knockout-register-record.mjs +5 -6
- package/driver/knockout-review-record.mjs +12 -11
- package/driver/ladder/model-gauge.mjs +88 -0
- package/driver/ladder/next-rung.mjs +296 -0
- package/driver/ladder/rescue.mjs +146 -0
- package/driver/ladder/stage-tools.mjs +57 -0
- package/driver/ladder/turn-failure.mjs +166 -0
- package/driver/log.mjs +2 -2
- package/driver/matter-frame-record.mjs +4 -4
- package/driver/methodology-witness.mjs +2 -2
- package/driver/narrative-refutation-record.mjs +145 -42
- package/driver/one-build-per-run.mjs +62 -0
- package/driver/outbox-backoff.mjs +4 -4
- package/driver/owner-screen.mjs +0 -10
- package/driver/owner-use-check.mjs +2 -28
- package/driver/package.json +1 -1
- package/driver/partial-payload-baseline.json +1 -1
- package/driver/parts-not-completed.mjs +1 -1
- package/driver/pipeline-knockout.mjs +1015 -1001
- package/driver/pipeline.mjs +511 -9265
- package/driver/placement-decisions.mjs +2 -2
- package/driver/placement-form-io.mjs +7 -9
- package/driver/placement-union.mjs +0 -6
- package/driver/plan-stability.mjs +7 -10
- package/driver/portal-acks.mjs +3 -2
- package/driver/portal-confirmation.mjs +48 -0
- package/driver/portal-families.mjs +3 -2
- package/driver/portal-local-auth.mjs +1 -2
- package/driver/portal-routes/README.md +24 -0
- package/driver/portal-routes/admin.mjs +425 -0
- package/driver/portal-routes/compose.mjs +66 -0
- package/driver/portal-routes/config.mjs +118 -0
- package/driver/portal-routes/connect.mjs +283 -0
- package/driver/portal-routes/feedback.mjs +178 -0
- package/driver/portal-routes/me.mjs +165 -0
- package/driver/portal-routes/queue.mjs +64 -0
- package/driver/portal-routes/report.mjs +106 -0
- package/driver/portal-routes/run.mjs +508 -0
- package/driver/portal-routes/runs.mjs +127 -0
- package/driver/portal-routes/usage.mjs +82 -0
- package/driver/portal-runs.mjs +588 -0
- package/driver/portal-service.mjs +78 -2592
- package/driver/portal-static.mjs +3 -1
- package/driver/predelivery-lint.mjs +92 -9
- package/driver/production-pool-guard.mjs +1 -1
- package/driver/profiles.mjs +5 -4
- package/driver/progress.mjs +29 -24
- package/driver/publish/README.md +10 -5
- package/driver/publish/archive-tags.mjs +3 -2
- package/driver/publish/demo-marking.mjs +2 -2
- package/driver/publish/index.mjs +215 -140
- package/driver/publish/knockout.mjs +153 -107
- package/driver/publish/office-record-links.mjs +22 -0
- package/driver/publish/parse.mjs +20 -5
- package/driver/publish/pool-admin.mjs +9 -3
- package/driver/publish/render.mjs +11 -3
- package/driver/publish/report-dates.mjs +3 -4
- package/driver/publish/report-registry.mjs +7 -10
- package/driver/publish/seed-pool.mjs +3 -2
- package/driver/publish/shell.mjs +106 -0
- package/driver/publish/templates/report.css +3 -1
- package/driver/queue-order.mjs +4 -3
- package/driver/record-carry.mjs +0 -9
- package/driver/record-discard.mjs +1 -4
- package/driver/record-fold.mjs +3 -3
- package/driver/record-goods.mjs +5 -5
- package/driver/reference-score.mjs +2 -3
- package/driver/register-capabilities.mjs +0 -6
- package/driver/register-count.mjs +3 -2
- package/driver/register-digest-record.mjs +7 -7
- package/driver/register-fixture-marker.mjs +3 -3
- package/driver/register-plan.mjs +2 -2
- package/driver/register-records.mjs +2 -2
- package/driver/register-taint.mjs +3 -3
- package/driver/register-unit-record.mjs +48 -9
- package/driver/register-unreachable.mjs +4 -3
- package/driver/registry-fidelity.mjs +79 -34
- package/driver/repair-composers.mjs +14 -9
- package/driver/repair-digest.mjs +4 -6
- package/driver/repair-scope.mjs +3 -3
- package/driver/repair-targets.mjs +24 -9
- package/driver/repairs.mjs +44 -58
- package/driver/replay-archive.mjs +7 -7
- package/driver/report-card-record.mjs +3 -3
- package/driver/report-overview-record.mjs +4 -4
- package/driver/research-answers.mjs +38 -6
- package/driver/research-checks.mjs +4 -4
- package/driver/result-noun-fields.mjs +28 -11
- package/driver/review-addresses.mjs +163 -0
- package/driver/rule-shape.mjs +1 -1
- package/driver/run-delivered.mjs +340 -0
- package/driver/run-economics.mjs +8 -26
- package/driver/run-failed.mjs +545 -0
- package/driver/run-integrity.mjs +1 -1
- package/driver/run-outcome.mjs +314 -0
- package/driver/run-park.mjs +23 -0
- package/driver/run-quote.mjs +32 -0
- package/driver/run-record.mjs +352 -0
- package/driver/run-requirements.mjs +22 -0
- package/driver/run-shell.mjs +55 -0
- package/driver/runner.mjs +71 -33
- package/driver/saved-register-pages.mjs +4 -4
- package/driver/score-redaction.mjs +2 -2
- package/driver/search-policy.mjs +12 -13
- package/driver/settle-stamp.mjs +4 -3
- package/driver/skeptic-record.mjs +2 -2
- package/driver/skeptic-search.mjs +1 -1
- package/driver/skills/README.md +7 -7
- package/driver/skills/blind-frame/SKILL.md +1 -2
- package/driver/skills/case-law-citation/SKILL.md +9 -37
- package/driver/skills/case-law-citation/sources/courtlistener.md +1 -3
- package/driver/skills/case-law-citation/sources/eurlex.md +8 -11
- package/driver/skills/case-law-citation/sources/legaldatahunter.md +1 -1
- package/driver/skills/clearance-common-law/SKILL.md +45 -111
- package/driver/skills/clearance-common-law/perplexity-prompts.md +7 -79
- package/driver/skills/clearance-register/SKILL.md +15 -33
- package/driver/skills/clearance-register/digest.md +31 -92
- package/driver/skills/clearance-register/providers/clarivate.md +2 -2
- package/driver/skills/clearance-register/providers/corsearch.md +5 -5
- package/driver/skills/clearance-register/providers/euipo.md +1 -2
- package/driver/skills/clearance-register/providers/free-tier.md +0 -19
- package/driver/skills/clearance-register/providers/signa.md +6 -25
- package/driver/skills/clearance-register/providers/uspto-local.md +0 -24
- package/driver/skills/clearance-register/register-recipes.md +8 -15
- package/driver/skills/clearance-register/status-rules.md +6 -24
- package/driver/skills/clearance-register/unit.md +11 -20
- package/driver/skills/clearance-search/delivery-contract.md +24 -120
- package/driver/skills/clearance-search/field-doctrine-pharma.md +1 -5
- package/driver/skills/clearance-search/firm-wide-reasoning.md +24 -43
- package/driver/skills/clearance-search/phase2-execution.md +29 -77
- package/driver/skills/clearance-search/report-prose.md +3 -4
- package/driver/skills/clearance-search/risk-framework-demo.md +1 -1
- package/driver/skills/clearance-search/risk-framework-triage.manifest.json +3 -3
- package/driver/skills/clearance-search/risk-framework-triage.md +7 -9
- package/driver/skills/clearance-search/risk-framework.manifest.json +1 -1
- package/driver/skills/clearance-search/risk-framework.md +1 -1
- package/driver/skills/clearance-search/synthesis-rules.md +30 -107
- package/driver/skills/clearance-search/worked-examples.md +5 -5
- package/driver/skills/clearance-variants/SKILL.md +46 -45
- package/driver/skills/clearance-variants/transliteration-scripts.md +4 -4
- package/driver/skills/frame-diff/SKILL.md +1 -1
- package/driver/skills/knockout-assess/SKILL.md +6 -14
- package/driver/skills/knockout-frame/SKILL.md +1 -1
- package/driver/skills/matter-frame/SKILL.md +7 -12
- package/driver/skills/matter-frame/watchlist-reference.md +1 -4
- package/driver/skills/narrative-refutation/SKILL.md +20 -30
- package/driver/skills/placement-inquiry/SKILL.md +8 -18
- package/driver/skills-store-provenance.mjs +1 -1
- package/driver/stage-context.mjs +32 -35
- package/driver/stage-freshness.mjs +127 -11
- package/driver/stages-knockout.mjs +49 -22
- package/driver/stages.mjs +88 -283
- package/driver/status-snapshot.mjs +2 -1
- package/driver/steps/correction-cycle.mjs +311 -0
- package/driver/steps/corrections.mjs +644 -0
- package/driver/steps/delivery.mjs +1287 -0
- package/driver/steps/frame-comparison.mjs +922 -0
- package/driver/steps/intake.mjs +84 -0
- package/driver/steps/open-run.mjs +419 -0
- package/driver/steps/overview-and-cards.mjs +899 -0
- package/driver/steps/placement-and-digest.mjs +23 -0
- package/driver/steps/register-sweep.mjs +1563 -0
- package/driver/steps/skeptic-and-follow-up.mjs +831 -0
- package/driver/steps/synthesis.mjs +261 -0
- package/driver/steps/verdict-gate.mjs +968 -0
- package/driver/suite-census.json +403 -91
- package/driver/surface-exit-verdict.mjs +0 -8
- package/driver/synthesis-record.mjs +72 -6
- package/driver/terminal-clamp.mjs +10 -0
- package/driver/tokens.mjs +8 -62
- package/driver/tool-calls.mjs +2 -2
- package/driver/unit-state-verdict.mjs +1 -1
- package/driver/usage-ledger.mjs +2 -1
- package/driver/verify-knockout.mjs +20 -35
- package/driver/verify.mjs +47 -36
- package/driver/web-grid.mjs +3 -4
- package/driver/whatif-memo-run.mjs +2 -2
- package/driver/whatif-queue.mjs +4 -3
- package/driver/withheld-families.mjs +14 -15
- package/driver/worker-heartbeat.mjs +3 -2
- package/driver/write-up-form.mjs +0 -3
- package/mcp-server/CHANGELOG.md +4 -0
- package/mcp-server/http-server.mjs +1 -1
- package/mcp-server/lib/brief.mjs +22 -4
- package/mcp-server/lib/events.mjs +2 -2
- package/mcp-server/lib/evidence.mjs +3 -2
- package/mcp-server/lib/findings.mjs +2 -1
- package/mcp-server/lib/knockout.mjs +9 -10
- package/mcp-server/lib/ops.mjs +9 -9
- package/mcp-server/lib/runs.mjs +9 -10
- package/mcp-server/lib/trace.mjs +1 -1
- package/mcp-server/lib/whatif.mjs +2 -3
- package/mcp-server/package.json +1 -1
- package/mcp-server/server.mjs +5 -5
- package/package.json +2 -1
- package/portal-ui/dist/assets/{index-fPqAU0sx.js → index-D5rkCjDc.js} +26 -14
- package/portal-ui/dist/index.html +1 -1
- package/portal-ui/package.json +3 -3
- package/providers/README.md +1 -1
- package/providers/_shared/answer-memory.mjs +4 -5
- package/providers/_shared/execute-plan.mjs +48 -1
- package/providers/_shared/records-from-search.mjs +46 -0
- package/providers/clarivate/README.md +2 -2
- package/providers/clarivate/src/adapter.js +147 -0
- package/providers/clarivate/src/core.js +1 -14
- package/{driver/engine/mcp/clarivate-server.mjs → providers/clarivate/src/mount.js} +5 -10
- package/providers/corsearch/README.md +3 -3
- package/providers/corsearch/src/adapter.js +80 -0
- package/providers/corsearch/src/core.js +14 -11
- package/{driver/engine/mcp/corsearch-server.mjs → providers/corsearch/src/mount.js} +5 -10
- package/providers/euipo/README.md +2 -2
- package/providers/euipo/src/adapter.js +85 -0
- package/providers/euipo/src/core.js +1 -1
- package/providers/euipo/src/euipo-client.js +1 -2
- package/{driver/engine/mcp/euipo-server.mjs → providers/euipo/src/mount.js} +5 -10
- package/providers/free-tier/README.md +2 -2
- package/providers/free-tier/src/adapter.js +127 -0
- package/{driver/engine/mcp/free-tier-server.mjs → providers/free-tier/src/mount.js} +5 -10
- package/providers/jx-subclass/coverage.mjs +1 -6
- package/providers/jx-subclass/score-truth.mjs +2 -1
- package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/providers/perplexity/src/core.js +2 -2
- package/providers/signa/README.md +2 -2
- package/providers/signa/src/adapter.js +157 -0
- package/providers/signa/src/capabilities.js +0 -3
- package/providers/signa/src/core.js +2 -2
- package/{driver/engine/mcp/signa-server.mjs → providers/signa/src/mount.js} +7 -12
- package/providers/signa/src/offices.generated.js +17 -15
- package/providers/uspto-local/README.md +1 -1
- package/providers/uspto-local/bin/verify-index.mjs +1 -1
- package/providers/uspto-local/src/adapter.js +75 -0
- package/{driver/engine/mcp/uspto-local-server.mjs → providers/uspto-local/src/mount.js} +5 -10
- package/scripts/band-shape-probe.mjs +2 -2
- package/scripts/citation-line-check.mjs +7 -7
- package/scripts/compare.mjs +1 -1
- package/scripts/dead-names.mjs +2 -2
- package/scripts/e2e-first-time.mjs +19 -7
- package/scripts/e2e.mjs +13 -13
- package/scripts/engine-probe.mjs +1 -1
- package/scripts/env-audit.mjs +7 -4
- package/scripts/env-classify.mjs +5 -1
- package/scripts/feedback-mint.mjs +1 -1
- package/scripts/freeze-example-run.mjs +7 -7
- package/scripts/mint-suite-census.mjs +2 -2
- package/scripts/nightly-notice.mjs +1 -1
- package/scripts/release-cut-decision.mjs +7 -2
- package/scripts/release-note-required.mjs +26 -9
- package/scripts/release-notes-lint.mjs +3 -2
- package/scripts/release-version-pr-checks.mjs +1 -1
- package/scripts/settings-render-check.mjs +23 -3
- package/scripts/test-run.mjs +5 -5
- package/scripts/travelling-predicates.mjs +1 -1
- package/scripts/undeclared-field-census.mjs +1 -1
- package/scripts/unexecuted-asserts.mjs +1 -1
- package/scripts/verify-publishable.mjs +1 -1
- package/shared/client-door.mjs +1 -1
- package/shared/connect-clients.mjs +1 -1
- package/shared/connector-signin-probe.mjs +1 -1
- package/shared/env-aliases.mjs +1 -1
- package/shared/invocation.mjs +14 -2
- package/shared/names-in-force.mjs +2 -0
- package/shared/register-selection.mjs +2 -2
- package/shared/store-in-repo.mjs +3 -3
- package/shared/summary-blocks.mjs +0 -3
- package/shared/trigger-lane.mjs +1 -1
- package/shared/vacuous-pass.mjs +2 -2
- package/shared/verb-shim.mjs +4 -2
- package/node_modules/exceljs/README.md +0 -3023
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
// PURE except `heldRecordProvenance` and `readRunCallRows`, which read the run's files.
|
|
35
35
|
import { readFileSync, existsSync, readdirSync } from "node:fs";
|
|
36
36
|
import { join } from "node:path";
|
|
37
|
-
import { normalizeRecordUri, readRecordArtifacts, forEachLedgerLine, recordBodyHasContent } from "./registry-fidelity.mjs";
|
|
37
|
+
import { normalizeRecordUri, readRecordArtifacts, forEachLedgerLine, recordBodyHasContent, lineMayMatchRun } from "./registry-fidelity.mjs";
|
|
38
38
|
import { recordGoodsProvenance } from "./record-goods.mjs";
|
|
39
|
-
import { driverDir } from "../shared/driver-dir.mjs";
|
|
40
39
|
import { runPrefixSpellings } from "../shared/pre-rename-spellings.mjs";
|
|
40
|
+
import { driverDir, paths, readJson } from "./run-record.mjs";
|
|
41
41
|
|
|
42
42
|
export const GOODS_EVIDENCE_SCHEMA_VERSION = 1;
|
|
43
43
|
export const GOODS_EVIDENCE_FILE = "goods-evidence.json";
|
|
@@ -71,7 +71,7 @@ export function heldRecordProvenance(runDir) {
|
|
|
71
71
|
session: facts.session ?? prev?.session ?? null, ts: facts.ts ?? prev?.ts ?? null, goods: recordGoodsProvenance(body) });
|
|
72
72
|
};
|
|
73
73
|
let text = "";
|
|
74
|
-
try { text = readFileSync(
|
|
74
|
+
try { text = readFileSync(paths(runDir).registerRecordBodies, "utf8"); } catch { text = ""; }
|
|
75
75
|
for (const line of text.split("\n")) {
|
|
76
76
|
if (!line.trim()) continue;
|
|
77
77
|
let row; try { row = JSON.parse(line); } catch { continue; }
|
|
@@ -98,7 +98,7 @@ export function heldBodiesOf(runDir, uris) {
|
|
|
98
98
|
if (!want.size) return out;
|
|
99
99
|
// A ledger row is written with its `target` before its `body` (providers/_shared/ledger.mjs), so the first target
|
|
100
100
|
// on a line is the row's own, and only the rows of the records asked about are parsed.
|
|
101
|
-
forEachLedgerLine(
|
|
101
|
+
forEachLedgerLine(paths(runDir).registerRecordBodies, (line) => {
|
|
102
102
|
const t = /"target":("(?:[^"\\]|\\.)*")/.exec(line);
|
|
103
103
|
let target = null;
|
|
104
104
|
try { target = t ? JSON.parse(t[1]) : null; } catch { target = null; }
|
|
@@ -112,7 +112,7 @@ export function heldBodiesOf(runDir, uris) {
|
|
|
112
112
|
for (const uri of want) {
|
|
113
113
|
const name = names.get(`${uri.replace(/^\/mark\//, "").replace(/[^a-z0-9]+/gi, "-")}.json`.toLowerCase());
|
|
114
114
|
if (!name) continue;
|
|
115
|
-
let body; try { body =
|
|
115
|
+
let body; try { body = readJson(join(runDir, "_records", name)); } catch { continue; }
|
|
116
116
|
if (!body || typeof body !== "object" || Array.isArray(body)) continue;
|
|
117
117
|
const { _uri, _receipt, ...rest } = body;
|
|
118
118
|
if ((_uri == null || uriKey(_uri) === uri) && recordBodyHasContent(rest)) out.set(uri, rest);
|
|
@@ -129,7 +129,11 @@ const inRun = (row, runPrefix) => !runPrefix || runPrefixSpellings(runPrefix).so
|
|
|
129
129
|
/** This run's rows of the register call ledger. A missing file is no rows; one that cannot be read says so. IMPURE. */
|
|
130
130
|
export function readRunCallRows(callLogPath, runPrefix) {
|
|
131
131
|
const rows = [];
|
|
132
|
+
// The call log is shared by every run on the machine: a line naming none of this run's prefix spellings is
|
|
133
|
+
// skipped before it is parsed. With no prefix every row is the run's, so every line is read.
|
|
134
|
+
const mayMatch = runPrefix ? lineMayMatchRun(runPrefix) : () => true;
|
|
132
135
|
const read = forEachLedgerLine(callLogPath, (line) => {
|
|
136
|
+
if (!mayMatch(line)) return;
|
|
133
137
|
let row; try { row = JSON.parse(line); } catch { return; }
|
|
134
138
|
if (inRun(row, runPrefix)) rows.push(row);
|
|
135
139
|
});
|
|
@@ -271,7 +275,7 @@ export function deriveGoodsEvidence({ records = [], goods = null, held = null, f
|
|
|
271
275
|
const readDriverJson = (runDir, name) => {
|
|
272
276
|
const p = driverDir(runDir, name);
|
|
273
277
|
if (!existsSync(p)) return null;
|
|
274
|
-
try { return
|
|
278
|
+
try { return readJson(p); } catch { return null; }
|
|
275
279
|
};
|
|
276
280
|
|
|
277
281
|
/** The record the run wrote, or null when there is none or it will not parse. IMPURE. */
|
package/driver/jx-lanes.mjs
CHANGED
|
@@ -135,9 +135,9 @@ export function scopeJurisdictions(job, profile) {
|
|
|
135
135
|
*
|
|
136
136
|
* Depth: the customer's jxPolicy.laneDepth[lane] when set ("off" excludes the lane); else
|
|
137
137
|
* "candidates" — the component being selected means the customer bought deepening. `depth` records
|
|
138
|
-
* the depth the CONFIG ASKED FOR and nothing else: no code reads it to gate a slice.
|
|
139
|
-
* slices
|
|
140
|
-
* JX_SLICES, driver/jx-units.mjs)
|
|
138
|
+
* the depth the CONFIG ASKED FOR and nothing else: no code reads it to gate a slice. No switch arms the
|
|
139
|
+
* retrieval slices: the per-slice arms and the per-language off switch are both retired (driver/jx.mjs
|
|
140
|
+
* JX_SLICES, driver/jx-units.mjs).
|
|
141
141
|
*
|
|
142
142
|
* THIS RECORD DOES NOT SAY WHAT EXECUTED. It is frozen at mint, before any slice runs, so the
|
|
143
143
|
* per-lane `executes: "candidates"` it used to carry was a constant asserting that slices 2–3 do not
|
package/driver/jx-units.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
// Copyright 2026 Cordillera Sàrl. Additional terms under section 7 of the AGPL-3.0 apply — see ADDITIONAL-TERMS.md
|
|
3
3
|
// jx-units.mjs — the Phase-4 Stage-1.5 SHADOW units (spec 10.5/10.6): the zh SERP platform grid
|
|
4
|
-
// (slice 2) and jx-nativeread:zh (slice 3). Called from two never-kill blocks in
|
|
4
|
+
// (slice 2) and jx-nativeread:zh (slice 3). Called from two never-kill blocks, in the intake and synthesis steps;
|
|
5
5
|
// everything here degrades and receipts — nothing throws past its own boundary.
|
|
6
6
|
//
|
|
7
7
|
// ARTIFACT BOUNDARY (was the "ship dark" invariant, and it outlived the switches): every artifact these
|
|
@@ -13,9 +13,8 @@
|
|
|
13
13
|
// still ahead of us and a run as byte-identical "with every unit flag off"; both sentences outlived the
|
|
14
14
|
// thing they described by naming a Phase-5 that has happened. There is no flag to turn off and no
|
|
15
15
|
// byte-identical slice-1 run to fall back to — the consume seam is unconditional, gated only on
|
|
16
|
-
// conditions a run already discloses.
|
|
17
|
-
//
|
|
18
|
-
// reasoning where the seam is.
|
|
16
|
+
// conditions a run already discloses. The per-language off switch that outlived them is retired too
|
|
17
|
+
// (2026-11-11): no deployment set it, and a lane runs wherever the frozen lane decision carries it.
|
|
19
18
|
//
|
|
20
19
|
// Grid contract (slice 2): the driver DICTATES `_driver/jx/<lane>-grid-spec.json` (terms × platforms,
|
|
21
20
|
// frozen on first dictation — a resume never re-dictates); a pure code-side executor fills every cell
|
|
@@ -31,15 +30,15 @@
|
|
|
31
30
|
// enforces record_uri ∈ the inlined slice (else the item demotes to a lead); severity_hint is a
|
|
32
31
|
// triage hint and NEVER sets a band — Claude stays the sole rating authority.
|
|
33
32
|
|
|
34
|
-
import { readFileSync, writeFileSync, renameSync, appendFileSync, mkdirSync
|
|
33
|
+
import { readFileSync, writeFileSync, renameSync, appendFileSync, mkdirSync } from "node:fs";
|
|
35
34
|
import { join } from "node:path";
|
|
36
|
-
import { driverDir } from "../shared/driver-dir.mjs"; //
|
|
37
35
|
import { LANGUAGE_LANES, SERP_LANES, isMirrorHost, canonicalTerm, jxBillingStamp, jxModelFields } from "./jx-lanes.mjs";
|
|
38
36
|
import { jxKey, MAX_LANE_ATTEMPTS } from "./jx.mjs";
|
|
39
37
|
import { abbrev } from "./repair-contract.mjs";
|
|
40
38
|
import { kebab } from "./search-policy.mjs";
|
|
41
|
-
import { SERP_PROVIDERS, JX_PROVIDERS
|
|
39
|
+
import { SERP_PROVIDERS, JX_PROVIDERS } from "./driver.config.mjs";
|
|
42
40
|
import { findGridLedgerViolations, findPlatformIdentityViolations } from "./common-law-receipts.mjs";
|
|
41
|
+
import { paths, readJson } from "./run-record.mjs";
|
|
43
42
|
|
|
44
43
|
export const MAX_UNIT_ATTEMPTS = 3; // degraded-unit retries across resumes (repairable, never terminal)
|
|
45
44
|
export const SERP_TERM_CAP = 12; // terms per grid — 12 × 7 cells = 84 paid calls, the hard ceiling
|
|
@@ -52,17 +51,13 @@ export const NATIVEREAD_GRID_ROWS_CAP = 60; // grid-findings rows inlined
|
|
|
52
51
|
export const NATIVEREAD_SLICE_CAP = 12000; // chars of register-unit output inlined into the read payload
|
|
53
52
|
const GAP_DEGRADE_FLOOR = 0.5; // >50% gapped cells ⇒ the grid attempt DEGRADES (the GRID_COVERAGE_FLOOR idiom)
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
// what this executor did. They disagreed; the statement lost, and it shipped.
|
|
57
|
-
const laneEnvOn = (lane) => laneArmed(lane);
|
|
58
|
-
|
|
59
|
-
const jxDir = (runDir) => driverDir(runDir, "jx");
|
|
54
|
+
const jxDir = (runDir) => paths(runDir).jx;
|
|
60
55
|
const unitsPath = (runDir) => join(jxDir(runDir), "units.json");
|
|
61
56
|
const atomic = (path, obj) => { writeFileSync(`${path}.tmp`, JSON.stringify(obj, null, 2) + "\n"); renameSync(`${path}.tmp`, path); };
|
|
62
57
|
|
|
63
58
|
// ── Per-unit resume state (the jx.mjs fold state machine, per unit key like "serp-grid:zh") ─────────
|
|
64
59
|
function readUnits(runDir) {
|
|
65
|
-
try { return
|
|
60
|
+
try { return readJson(unitsPath(runDir)); } catch { return { schema: 1, units: {} }; }
|
|
66
61
|
}
|
|
67
62
|
function writeUnit(runDir, key, record) {
|
|
68
63
|
mkdirSync(jxDir(runDir), { recursive: true });
|
|
@@ -141,7 +136,7 @@ function foldRetryable(ctx, lane) {
|
|
|
141
136
|
// …and so does what the turn said about the model: the id it reported, or that it ran and named none —
|
|
142
137
|
// see jxModelFields in jx-lanes.mjs.
|
|
143
138
|
function ledgerRow(runDir, row) {
|
|
144
|
-
try { appendFileSync(
|
|
139
|
+
try { appendFileSync(paths(runDir).jxCompletions, JSON.stringify(row) + "\n"); } catch { /* receipts best-effort */ }
|
|
145
140
|
}
|
|
146
141
|
|
|
147
142
|
const runPrefix = (run) => `clearance-${run?.slug ?? "run"}-${run?.codename ?? "local"}-`;
|
|
@@ -160,7 +155,7 @@ export function resolveSerpExecutor(opts, { mark, lane }) {
|
|
|
160
155
|
exec: async ({ term, platform }) => {
|
|
161
156
|
try {
|
|
162
157
|
if (!table) {
|
|
163
|
-
const parsed =
|
|
158
|
+
const parsed = readJson(join(fixDir, `${kebab(mark)}.${lane}.serp.json`));
|
|
164
159
|
table = {};
|
|
165
160
|
for (const c of parsed?.cells ?? []) table[`${canonicalTerm(c.term)}|${c.platform}`] = Array.isArray(c.hits) ? c.hits : [];
|
|
166
161
|
dflt = Array.isArray(parsed?.default?.hits) ? parsed.default.hits : undefined;
|
|
@@ -175,7 +170,7 @@ export function resolveSerpExecutor(opts, { mark, lane }) {
|
|
|
175
170
|
return { source: "serpapi", exec: (args) => SERP_PROVIDERS.serpapi.search(args) };
|
|
176
171
|
}
|
|
177
172
|
|
|
178
|
-
export function resolveJudge(opts, { mark, lane }) {
|
|
173
|
+
export function resolveJudge(opts, { mark, lane, runDir = null }) {
|
|
179
174
|
if (typeof opts?.jxJudge === "function") return { exec: opts.jxJudge, source: "injected" };
|
|
180
175
|
const fixDir = process.env.CLEAROTRON_JX_FIXTURES;
|
|
181
176
|
if (fixDir) {
|
|
@@ -183,17 +178,17 @@ export function resolveJudge(opts, { mark, lane }) {
|
|
|
183
178
|
source: `fixtures:${fixDir}`,
|
|
184
179
|
exec: async ({ hits }) => {
|
|
185
180
|
try {
|
|
186
|
-
const parsed =
|
|
181
|
+
const parsed = readJson(join(fixDir, `${kebab(mark)}.${lane}.judge.json`));
|
|
187
182
|
const byId = new Map((parsed?.judgments ?? []).map((j) => [j.id, j]));
|
|
188
183
|
return { ok: true, judgments: hits.map((h) => byId.get(h.id)).filter(Boolean), tookMs: 0 };
|
|
189
184
|
} catch (e) { return { ok: false, cause: `judge fixture missing/corrupt: ${abbrev(String(e.message), 120)}` }; }
|
|
190
185
|
},
|
|
191
186
|
};
|
|
192
187
|
}
|
|
193
|
-
return { source: "engine", exec: (args) => JX_PROVIDERS.judge.judge(args) };
|
|
188
|
+
return { source: "engine", exec: (args) => JX_PROVIDERS.judge.judge({ ...args, runDir }) };
|
|
194
189
|
}
|
|
195
190
|
|
|
196
|
-
export function resolveNativeread(opts, { mark, lane }) {
|
|
191
|
+
export function resolveNativeread(opts, { mark, lane, runDir = null }) {
|
|
197
192
|
if (typeof opts?.nativereadExecutor === "function") return { exec: opts.nativereadExecutor, source: "injected" };
|
|
198
193
|
const fixDir = process.env.CLEAROTRON_JX_FIXTURES;
|
|
199
194
|
if (fixDir) {
|
|
@@ -201,13 +196,13 @@ export function resolveNativeread(opts, { mark, lane }) {
|
|
|
201
196
|
source: `fixtures:${fixDir}`,
|
|
202
197
|
exec: async () => {
|
|
203
198
|
try {
|
|
204
|
-
const parsed =
|
|
199
|
+
const parsed = readJson(join(fixDir, `${kebab(mark)}.${lane}.read.json`));
|
|
205
200
|
return { ok: true, items: Array.isArray(parsed?.items) ? parsed.items : [], tookMs: 0 };
|
|
206
201
|
} catch (e) { return { ok: false, cause: `nativeread fixture missing/corrupt: ${abbrev(String(e.message), 120)}` }; }
|
|
207
202
|
},
|
|
208
203
|
};
|
|
209
204
|
}
|
|
210
|
-
return { source: "engine", exec: (args) => JX_PROVIDERS.nativeread.read(args) };
|
|
205
|
+
return { source: "engine", exec: (args) => JX_PROVIDERS.nativeread.read({ ...args, runDir }) };
|
|
211
206
|
}
|
|
212
207
|
|
|
213
208
|
// Bounded local pool (runBatched is pipeline-local; 10 lines beat an export churn).
|
|
@@ -227,9 +222,8 @@ export async function runJxSerpGrid(ctx, job, opts = {}, { runLog = () => {}, no
|
|
|
227
222
|
try {
|
|
228
223
|
// item 8 — CLEAROTRON_JX_SERP_GRID is gone. It was a default-OFF arm on a unit that has run in
|
|
229
224
|
// production since 2026-08-04, so it hid a live path behind a switch nobody outside this box could
|
|
230
|
-
// find. What remains are the conditions a run DISCLOSES:
|
|
231
|
-
//
|
|
232
|
-
if (!laneEnvOn(lane)) return { ran: false, cause: `CLEAROTRON_NATIVE_LANGUAGE_${lane.toUpperCase()} off` };
|
|
225
|
+
// find. What remains are the conditions a run DISCLOSES: a frozen lane decision and a SERP capability
|
|
226
|
+
// entry. Each already returns a cause that reaches the slice statement.
|
|
233
227
|
const laneDecision = ctx.jxLanes?.lanes?.[lane];
|
|
234
228
|
if (!laneDecision) return { ran: false, cause: "no frozen zh lane decision (jurisdictions/policy)" };
|
|
235
229
|
const serpSpec = SERP_LANES[lane];
|
|
@@ -244,7 +238,7 @@ export async function runJxSerpGrid(ctx, job, opts = {}, { runLog = () => {}, no
|
|
|
244
238
|
// Dictation — frozen on first write (a resume re-USES the spec; re-dictating after a variant regen
|
|
245
239
|
// would re-key the join and re-bill settled cells).
|
|
246
240
|
let spec = null;
|
|
247
|
-
try { spec =
|
|
241
|
+
try { spec = readJson(specPath); } catch { /* cold — dictate below */ }
|
|
248
242
|
if (!spec && foldRetryable(ctx, lane))
|
|
249
243
|
return { ran: false, cause: "slice-1 fold degraded but retryable — deferring grid dictation to a resume (the candidates are the lane's point; no attempt burned)" };
|
|
250
244
|
if (!spec) {
|
|
@@ -383,7 +377,7 @@ export async function runJxSerpGrid(ctx, job, opts = {}, { runLog = () => {}, no
|
|
|
383
377
|
});
|
|
384
378
|
|
|
385
379
|
// The judge — classification only, chunked, degrade-to-unjudged (the grid + receipts stand).
|
|
386
|
-
const { exec: judgeExec, source: judgeSource } = resolveJudge(opts, { mark: markName, lane });
|
|
380
|
+
const { exec: judgeExec, source: judgeSource } = resolveJudge(opts, { mark: markName, lane, runDir: run.runDir });
|
|
387
381
|
const judged = [];
|
|
388
382
|
let judgeDegraded = null;
|
|
389
383
|
for (let at = 0; at < judgeable.length && !judgeDegraded; at += 40) {
|
|
@@ -438,6 +432,12 @@ export async function runJxSerpGrid(ctx, job, opts = {}, { runLog = () => {}, no
|
|
|
438
432
|
const URI_RE = /https?:\/\/[^\s|)\]"'<>]+/g;
|
|
439
433
|
const normUri = (u) => String(u).replace(/[.,;:!?]+$/, "");
|
|
440
434
|
|
|
435
|
+
// The rows the cap keeps. The grid is in cell order, which says nothing about relevance, so use a reader could flag sat
|
|
436
|
+
// past the cap on most saved runs (measured in testing, 2026-11-09). The judge's own classes come first, then anything
|
|
437
|
+
// it could not judge, then the rest; within a class the grid's order stands.
|
|
438
|
+
const GRID_ROW_RANK = new Map([["use-evidence", 0], ["listing-candidate", 1], ["unjudged", 2]]);
|
|
439
|
+
const gridRowRank = (f) => GRID_ROW_RANK.get(f?.classification) ?? 3;
|
|
440
|
+
|
|
441
441
|
/** Assemble the code-inlined zh evidence slice + the fetched-URI set it carries (pure over inputs). */
|
|
442
442
|
export function buildNativereadPayload({ registerSliceText = "", candidates = [], cnipaSubgroups = [], gridFindings = [] }) {
|
|
443
443
|
const sections = [];
|
|
@@ -452,7 +452,7 @@ export function buildNativereadPayload({ registerSliceText = "", candidates = []
|
|
|
452
452
|
}
|
|
453
453
|
let gridRowsDropped = 0;
|
|
454
454
|
if (gridFindings.length) {
|
|
455
|
-
const rows = gridFindings.slice(0, NATIVEREAD_GRID_ROWS_CAP);
|
|
455
|
+
const rows = [...gridFindings].sort((a, b) => gridRowRank(a) - gridRowRank(b)).slice(0, NATIVEREAD_GRID_ROWS_CAP);
|
|
456
456
|
gridRowsDropped = gridFindings.length - rows.length;
|
|
457
457
|
sections.push("## Platform grid findings (judged)\n"
|
|
458
458
|
+ rows.map((f) => `- [${f.classification}] "${f.title}" — ${f.url} (term ${f.term} on ${f.platform})${f.note ? ` — ${f.note}` : ""}`).join("\n")
|
|
@@ -488,7 +488,6 @@ export async function runJxNativeread(ctx, job, opts = {}, { runLog = () => {},
|
|
|
488
488
|
const key = `nativeread:${lane}`;
|
|
489
489
|
try {
|
|
490
490
|
// item 8 — CLEAROTRON_JX_NATIVEREAD is gone, same reasoning as the grid above.
|
|
491
|
-
if (!laneEnvOn(lane)) return { ran: false, cause: `CLEAROTRON_NATIVE_LANGUAGE_${lane.toUpperCase()} off` };
|
|
492
491
|
if (!ctx.jxLanes?.lanes?.[lane]) return { ran: false, cause: "no frozen zh lane decision (jurisdictions/policy)" };
|
|
493
492
|
const st = unitState(run.runDir, key);
|
|
494
493
|
if (st.skip) return { ran: false, cause: st.cause };
|
|
@@ -514,12 +513,12 @@ export async function runJxNativeread(ctx, job, opts = {}, { runLog = () => {},
|
|
|
514
513
|
try { registerSliceText = readFileSync(join(run.runDir, "register-units", "transliteration-numeric.md"), "utf8"); } catch { /* unit may not exist */ }
|
|
515
514
|
const fold = ctx.jxLanes?.fold?.lanes?.[lane] ?? {};
|
|
516
515
|
let gridFindings = [];
|
|
517
|
-
try { gridFindings =
|
|
516
|
+
try { gridFindings = readJson(join(jxDir(run.runDir), `${lane}-grid-findings.json`))?.findings ?? []; } catch { /* grid unit may be off */ }
|
|
518
517
|
const { payload, uris, sections, gridRowsDropped } = buildNativereadPayload({
|
|
519
518
|
registerSliceText, candidates: fold.accepted ?? [], cnipaSubgroups: fold.cnipaSubgroups ?? [], gridFindings });
|
|
520
519
|
if (!sections) return { ran: false, cause: "no zh evidence to read (no register slice, candidates or grid findings)" };
|
|
521
520
|
|
|
522
|
-
const { exec, source } = resolveNativeread(opts, { mark: markName, lane });
|
|
521
|
+
const { exec, source } = resolveNativeread(opts, { mark: markName, lane, runDir: run.runDir });
|
|
523
522
|
const started = Date.now();
|
|
524
523
|
let r;
|
|
525
524
|
try { r = await exec({ mark: markName, lane, payload }); }
|
|
@@ -573,15 +572,10 @@ export async function runJxNativeread(ctx, job, opts = {}, { runLog = () => {},
|
|
|
573
572
|
* production since 2026-08-04, which is the definition of a dark switch: the shipped default described
|
|
574
573
|
* a configuration nobody ran.
|
|
575
574
|
*
|
|
576
|
-
*
|
|
577
|
-
* was retired 2026-07-27 and the reason this leg was kept still holds: an incident kill must also
|
|
578
|
-
* silence a STALE artifact from an earlier run, not merely stop the next one. That is a switch someone
|
|
579
|
-
* WOULD use, once, in an incident — the opposite of a dark one — so item 12's remedy applies instead of
|
|
580
|
-
* item 8's: it is DECLARED rather than deleted. */
|
|
575
|
+
* The per-language off switch that once silenced this too is retired (2026-11-11): no deployment set it. */
|
|
581
576
|
export function jxAimForSynthesis(runDir) {
|
|
582
|
-
if (!laneEnvOn("zh")) return null;
|
|
583
577
|
try {
|
|
584
|
-
const a =
|
|
578
|
+
const a = readJson(join(jxDir(runDir), "aim-attention.json"));
|
|
585
579
|
const n = (a?.items ?? []).length;
|
|
586
580
|
return n ? { count: n } : null;
|
|
587
581
|
} catch { return null; }
|
package/driver/jx.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2026 Cordillera Sàrl. Additional terms under section 7 of the AGPL-3.0 apply — see ADDITIONAL-TERMS.md
|
|
3
3
|
// jx.mjs — the Stage-1.5 jx orchestration (Phase 2b slice 1): the frozen lane decision, the
|
|
4
4
|
// candidate-generation executor chain, and the register-plan fold. Called from ONE never-kill block
|
|
5
|
-
// in
|
|
5
|
+
// in the intake step (`steps/intake.mjs`, after attachRegisterPlan, before decideAxes) — everything here degrades and
|
|
6
6
|
// logs; only the pipeline's own plan-write is load-bearing.
|
|
7
7
|
//
|
|
8
8
|
// The fold contract (the pattern the recall probes used until the recall store was removed):
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
// zero new wiring. What they carry is the ROMANISATION, not the characters — see jxPlanEntries.
|
|
15
15
|
import { readFileSync, writeFileSync, renameSync, appendFileSync } from "node:fs";
|
|
16
16
|
import { join } from "node:path";
|
|
17
|
-
import { driverDir } from "../shared/driver-dir.mjs"; //
|
|
18
17
|
import { decideJxLanes, candidateRefusal, canonicalTerm, romanizationSpellings, LANGUAGE_LANES, jxBillingStamp, jxModelFields } from "./jx-lanes.mjs";
|
|
19
18
|
import { cnipaSubgroupsForClasses, cnipaEditionLabel } from "./jx-subclass.mjs"; // — replaces the hand-written seed table
|
|
20
19
|
import { kebab } from "./search-policy.mjs";
|
|
@@ -70,70 +69,53 @@ export const jxFoldLaneRecord = ({ cause = null, ...rest } = {}) => ({
|
|
|
70
69
|
// FIVE STATES, NOT THREE, AND THE TWO EXTRA ONES ARE THE HONEST ONES.
|
|
71
70
|
// ran a durable record says it completed (units[k].done === true / lane not degraded)
|
|
72
71
|
// gapped a durable record says it degraded (carries degradedCause and attempts)
|
|
73
|
-
// not-armed the env switch that gates it is off
|
|
74
72
|
// refused armed, no durable record, and a captured cause says why it declined structurally
|
|
75
73
|
// not-established none of the above settles it — an absence, stated as one, never defaulted to a pass
|
|
76
74
|
//
|
|
77
|
-
//
|
|
78
|
-
//
|
|
79
|
-
//
|
|
80
|
-
// them. Arming is still read from the ENV — CLEAROTRON_NATIVE_LANGUAGE_<code>, the one switch that survives — never from
|
|
81
|
-
// the presence of an event; the event supplies the `why` and nothing else.
|
|
75
|
+
// No switch arms or silences a lane. The per-language off switch was the last one, and it is retired
|
|
76
|
+
// (2026-11-11): a lane in the frozen lane decision runs, and what it did is read from durable state; an
|
|
77
|
+
// event supplies the `why` and nothing else.
|
|
82
78
|
export const JX_SLICES = [
|
|
83
79
|
{ name: "candidates", slice: 1, unit: null },
|
|
84
80
|
{ name: "serp-grid", slice: 2, unit: "serp-grid:zh", lane: "zh" },
|
|
85
81
|
{ name: "nativeread", slice: 3, unit: "nativeread:zh", lane: "zh" },
|
|
86
82
|
];
|
|
87
83
|
|
|
88
|
-
import {
|
|
84
|
+
import { driverDir, paths, readJson } from "./run-record.mjs";
|
|
89
85
|
|
|
90
86
|
/**
|
|
91
87
|
* Derive the run's slice statement from durable state. PURE — no clock, no fs; `sidecar` is the parsed
|
|
92
88
|
* jx-lanes.json, `units` the parsed _driver/jx/units.json (or null), `causes` a {sliceName: string} map
|
|
93
89
|
* of skip reasons lifted from run.jsonl for DECORATION only.
|
|
94
90
|
*/
|
|
95
|
-
export function deriveJxSliceStatement({ sidecar, units = null,
|
|
91
|
+
export function deriveJxSliceStatement({ sidecar, units = null, causes = {} } = {}) {
|
|
96
92
|
const unitRows = (units && typeof units === "object" ? units.units : null) ?? {};
|
|
97
93
|
const declaredLanes = Object.keys(sidecar?.lanes ?? {});
|
|
98
94
|
const foldLanes = sidecar?.fold?.lanes ?? {};
|
|
99
95
|
const slices = {};
|
|
100
96
|
for (const s of JX_SLICES) {
|
|
101
97
|
if (s.slice === 1) {
|
|
102
|
-
// Slice 1 is the only multi-lane slice, so it rolls up — and it never overstates: EVERY
|
|
98
|
+
// Slice 1 is the only multi-lane slice, so it rolls up — and it never overstates: EVERY lane
|
|
103
99
|
// must be present and healthy for "ran". One gapped lane makes the whole slice gapped.
|
|
104
100
|
const lanes = {};
|
|
105
101
|
for (const l of declaredLanes) {
|
|
106
|
-
// — laneArmed, NOT envOn: envOn is the default-OFF opt-in reader, and reading a
|
|
107
|
-
// fail-open lane switch through it made every unset lane read "not-armed" on a run where
|
|
108
|
-
// the executor had armed it and dispatched.
|
|
109
|
-
if (!laneArmed(l, env)) { lanes[l] = "not-armed"; continue; }
|
|
110
102
|
const rec = foldLanes[l];
|
|
111
103
|
lanes[l] = rec == null ? "not-established" : rec.degraded === true ? "gapped" : "ran";
|
|
112
104
|
}
|
|
113
|
-
const live = Object.values(lanes)
|
|
105
|
+
const live = Object.values(lanes);
|
|
114
106
|
const state = !declaredLanes.length ? "not-established"
|
|
115
|
-
: !live.length ? "not-armed"
|
|
116
107
|
: live.includes("not-established") ? "not-established"
|
|
117
108
|
: live.includes("gapped") ? "gapped" : "ran";
|
|
118
109
|
const gapped = Object.entries(lanes).filter(([, v]) => v === "gapped").map(([l]) => l);
|
|
119
110
|
slices[s.name] = { slice: 1, state, lanes, basis: "_driver/jx-lanes.json:fold.lanes",
|
|
120
|
-
why: state === "ran" ? `every
|
|
121
|
-
: state === "not-armed" ? "no lane is armed in this run's own environment"
|
|
111
|
+
why: state === "ran" ? `every lane (${live.length}) carries a fold record stating degraded:false`
|
|
122
112
|
: state === "gapped" ? `lane(s) ${gapped.join(", ")} degraded — see fold.lanes[].degradedCause`
|
|
123
|
-
: "
|
|
113
|
+
: "a lane carries no fold record at all — the receipt was never written" };
|
|
124
114
|
continue;
|
|
125
115
|
}
|
|
126
|
-
// item 8 — the per-slice CLEAROTRON_JX_* arms are gone, so "armed" is now the ONE condition that
|
|
127
|
-
// survives: the lane not killed. That warning still applies to how it is read — laneArmed is the
|
|
128
|
-
// fail-open reader, and reading it through the old default-OFF `envOn` made every unset lane report
|
|
129
|
-
// not-armed on a run that had dispatched.
|
|
130
|
-
const armed = laneArmed(s.lane, env);
|
|
131
116
|
const rec = unitRows[s.unit];
|
|
132
117
|
const base = { slice: s.slice, lane: s.lane, unit: s.unit };
|
|
133
|
-
if (
|
|
134
|
-
slices[s.name] = { ...base, state: "not-armed", basis: `env CLEAROTRON_NATIVE_LANGUAGE_${String(s.lane).toUpperCase()}`,
|
|
135
|
-
why: `CLEAROTRON_NATIVE_LANGUAGE_${String(s.lane).toUpperCase()} off in this run's own environment when the statement was minted — the lane was killed, not merely idle` };
|
|
136
|
-
} else if (rec && rec.degraded === true) {
|
|
118
|
+
if (rec && rec.degraded === true) {
|
|
137
119
|
slices[s.name] = { ...base, state: "gapped", attempts: rec.attempts ?? null,
|
|
138
120
|
basis: `_driver/jx/units.json:units["${s.unit}"]`, why: String(rec.degradedCause ?? "degraded, cause not recorded").slice(0, 300) };
|
|
139
121
|
} else if (rec && rec.done === true) {
|
|
@@ -175,10 +157,10 @@ export function deriveJxSliceStatement({ sidecar, units = null, env = process.en
|
|
|
175
157
|
//
|
|
176
158
|
// The deep slices are zh-ONLY by construction: JX_SLICES pins `lane: "zh"` on both slice 2 and slice 3,
|
|
177
159
|
// and SERP_LANES has a single row. So `laneDepth.ja = "full"` asks for something THIS BUILD DOES NOT
|
|
178
|
-
// HAVE, which no environment can arm; `laneDepth.zh = "full"`
|
|
179
|
-
//
|
|
180
|
-
//
|
|
181
|
-
//
|
|
160
|
+
// HAVE, which no environment can arm; `laneDepth.zh = "full"` whose deep slices did not run asks for
|
|
161
|
+
// something the build has and the run did not deliver. Same printed shortfall, opposite remedies — one
|
|
162
|
+
// is "buy/build the slice", the other is "find out why it did not run" — so they are separate causes and
|
|
163
|
+
// never one token.
|
|
182
164
|
//
|
|
183
165
|
// ZERO IS NOT A PASS, in the shape this file already uses everywhere else: a lane whose slices settle to
|
|
184
166
|
// nothing readable reports `ran: null` and the flag still fires. "Could not establish that full ran" is
|
|
@@ -215,9 +197,9 @@ export function deriveLaneDepthVerdicts({ sidecar, slices } = {}) {
|
|
|
215
197
|
// that ran nothing is not established, whatever this build carries for it.
|
|
216
198
|
if (!deep.length && ran === "candidates") {
|
|
217
199
|
cause = "not-built-for-lane";
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
+ `
|
|
200
|
+
// THE CLIENT READS THIS UNDER "LEFT OPEN": the owner's sentence (2026-11-11), said only where the candidates ran.
|
|
201
|
+
why = `The requested full-depth ${languageOfLane(lane)}-language search is not available in this version. `
|
|
202
|
+
+ `Only the candidate search ran; the deeper web search and native-language review were not performed.`;
|
|
221
203
|
} else if (ran === null) {
|
|
222
204
|
cause = "not-established";
|
|
223
205
|
why = `${deep.length ? `the deep slice(s) ${deepStates.map((d) => `${d.name}=${d.state ?? "no record"}`).join(", ")} did not state that they ran, and ` : ""}`
|
|
@@ -225,8 +207,7 @@ export function deriveLaneDepthVerdicts({ sidecar, slices } = {}) {
|
|
|
225
207
|
+ `this run's own record. Not reported as candidates: that would be a claim no artifact supports.`;
|
|
226
208
|
} else {
|
|
227
209
|
cause = "requested-full-ran-candidates";
|
|
228
|
-
why = `asked for full and ran candidates only — ${deepStates.map((d) => `${d.name} ${d.state ?? "no record"}`).join(", ")}
|
|
229
|
-
+ `${deepStates.some((d) => d.state === "not-armed") ? " (an env arm is off on this deployment, not a fault in the run)" : ""}`;
|
|
210
|
+
why = `asked for full and ran candidates only — ${deepStates.map((d) => `${d.name} ${d.state ?? "no record"}`).join(", ")}`;
|
|
230
211
|
}
|
|
231
212
|
}
|
|
232
213
|
out[lane] = { asked, ran, shortfall, cause, why,
|
|
@@ -250,19 +231,18 @@ export function deriveLaneDepthVerdicts({ sidecar, slices } = {}) {
|
|
|
250
231
|
* @param {object|null} sidecar parsed _driver/jx-lanes.json
|
|
251
232
|
* @param {object|null} units parsed _driver/jx/units.json, or null
|
|
252
233
|
*/
|
|
253
|
-
export function laneDepthOfRun({ sidecar, units = null
|
|
234
|
+
export function laneDepthOfRun({ sidecar, units = null } = {}) {
|
|
254
235
|
const stamped = sidecar?.fold?.depth;
|
|
255
236
|
if (stamped && typeof stamped === "object" && !Array.isArray(stamped)) return stamped;
|
|
256
|
-
return deriveLaneDepthVerdicts({ sidecar, slices: deriveJxSliceStatement({ sidecar, units
|
|
237
|
+
return deriveLaneDepthVerdicts({ sidecar, slices: deriveJxSliceStatement({ sidecar, units }) });
|
|
257
238
|
}
|
|
258
239
|
|
|
259
240
|
const flag = (name) => ["1", "true", "yes", "on"].includes(String(process.env[name] ?? "").trim().toLowerCase());
|
|
260
|
-
// — the private copy is gone; laneArmed (driver.config.mjs) is the one reader.
|
|
261
241
|
|
|
262
242
|
// ── The frozen lane decision: minted once (cold), read verbatim forever (a resume NEVER re-decides —
|
|
263
243
|
// the freezeProfile doctrine). Plain-clearotron runs never reach this (the caller gates on the component).
|
|
264
244
|
export function attachJxLanes(ctx) {
|
|
265
|
-
const sidecarPath =
|
|
245
|
+
const sidecarPath = paths(ctx.run.runDir).jxLanes;
|
|
266
246
|
let raw = null;
|
|
267
247
|
try { raw = readFileSync(sidecarPath, "utf8"); } catch { /* ENOENT — cold start */ }
|
|
268
248
|
if (raw != null) {
|
|
@@ -284,7 +264,7 @@ export function attachJxLanes(ctx) {
|
|
|
284
264
|
|
|
285
265
|
// ── Executor chain (the knockout resolveSweepExecutor idiom): injected (tests) → CLEAROTRON_JX_FIXTURES
|
|
286
266
|
// (the $0 dev seam: <mark-kebab>.<lane>.json {candidates:[…]}) → the live JX_PROVIDERS completions.
|
|
287
|
-
export function resolveJxExecutor(opts) {
|
|
267
|
+
export function resolveJxExecutor(opts, { runDir = null } = {}) {
|
|
288
268
|
if (typeof opts?.jxExecutor === "function") return { exec: opts.jxExecutor, source: "injected" };
|
|
289
269
|
const fixDir = process.env.CLEAROTRON_JX_FIXTURES;
|
|
290
270
|
if (fixDir) {
|
|
@@ -299,7 +279,7 @@ export function resolveJxExecutor(opts) {
|
|
|
299
279
|
},
|
|
300
280
|
};
|
|
301
281
|
}
|
|
302
|
-
return { source: "engine", exec: (args) => JX_PROVIDERS.completions.generate(args) };
|
|
282
|
+
return { source: "engine", exec: (args) => JX_PROVIDERS.completions.generate({ ...args, runDir }) };
|
|
303
283
|
}
|
|
304
284
|
|
|
305
285
|
/** Pure: candidates → validated plan entries for the lane. Refusals are RETURNED (the caller logs
|
|
@@ -354,7 +334,7 @@ export function jxPlanEntries({ lane, laneDecision, candidates, inScopeClasses,
|
|
|
354
334
|
}
|
|
355
335
|
|
|
356
336
|
/**
|
|
357
|
-
* The whole slice, one never-kill call from
|
|
337
|
+
* The whole slice, one never-kill call from the intake step (`steps/intake.mjs`). Requires ctx.registerPlan + the jxLanes
|
|
358
338
|
* component on the frozen policy (the caller checks the component; this checks env + lanes + resume
|
|
359
339
|
* state). Returns { folded, cause? } for the pipeline's log line — it NEVER throws.
|
|
360
340
|
*/
|
|
@@ -365,15 +345,15 @@ export function jxPlanEntries({ lane, laneDecision, candidates, inScopeClasses,
|
|
|
365
345
|
*
|
|
366
346
|
* READS THE SIDECAR FROM DISK, never ctx.jxLanes — the same reason injectScriptScopeCoverage gives: at
|
|
367
347
|
* delivery on a resume the fold block may never have re-attached it. Deriving from durable state alone
|
|
368
|
-
* (units.json + the frozen sidecar
|
|
348
|
+
* (units.json + the frozen sidecar) makes this a pure function of the disk, callable from any late
|
|
369
349
|
* point without having to prove every resume path traverses the jx blocks.
|
|
370
350
|
*
|
|
371
351
|
* NEVER re-derives `lanes` or `scope`: attachJxLanes freezes those and throws on a corrupt sidecar, so an
|
|
372
352
|
* unreadable one here NOTES AND RETURNS WITHOUT WRITING rather than minting a second opinion.
|
|
373
353
|
*/
|
|
374
|
-
export function stateJxSlices(runDir, {
|
|
354
|
+
export function stateJxSlices(runDir, { note = () => {}, runLog = () => {} } = {}) {
|
|
375
355
|
try {
|
|
376
|
-
const sidecarPath =
|
|
356
|
+
const sidecarPath = paths(runDir).jxLanes;
|
|
377
357
|
// ABSENT AND UNPARSEABLE ARE NOT THE SAME FACT, and the first cut printed one sentence for both.
|
|
378
358
|
// A run with no jx lane has no sidecar, and that is normal — saying "NOT writing one" there reads as
|
|
379
359
|
// a withheld action. A sidecar that EXISTS and does not parse is a real defect in a driver-written
|
|
@@ -385,20 +365,20 @@ export function stateJxSlices(runDir, { env = process.env, note = () => {}, runL
|
|
|
385
365
|
try { sidecar = JSON.parse(raw); }
|
|
386
366
|
catch (e) { note(`jx slice statement: _driver/jx-lanes.json EXISTS and does not parse (${String(e?.message ?? e).slice(0, 80)}) — NOT writing one; the lane decision is frozen and is not this writer's to re-derive`); return { stated: false, reason: "unparseable" }; }
|
|
387
367
|
let units = null;
|
|
388
|
-
try { units =
|
|
368
|
+
try { units = readJson(driverDir(runDir, "jx", "units.json")); } catch { /* no retrieval slices ran — absence is read below, never as a pass */ }
|
|
389
369
|
const causes = {};
|
|
390
370
|
try {
|
|
391
|
-
for (const line of readFileSync(
|
|
371
|
+
for (const line of readFileSync(paths(runDir).run, "utf8").split("\n")) {
|
|
392
372
|
if (!line.includes("-skipped")) continue;
|
|
393
373
|
let row; try { row = JSON.parse(line); } catch { continue; }
|
|
394
374
|
if (row?.event === "jx-serp-grid-skipped" && row.cause) causes["serp-grid"] = row.cause;
|
|
395
375
|
if (row?.event === "jx-nativeread-skipped" && row.cause) causes.nativeread = row.cause;
|
|
396
376
|
}
|
|
397
377
|
} catch { /* decoration only — a missing journal changes no STATE, only a `why` */ }
|
|
398
|
-
const { executes, slices } = deriveJxSliceStatement({ sidecar, units,
|
|
378
|
+
const { executes, slices } = deriveJxSliceStatement({ sidecar, units, causes });
|
|
399
379
|
// — the per-lane ask-vs-got verdict, minted HERE and not at the scorer, for the reason the whole
|
|
400
|
-
// seam exists: a reader that derives it on the fly can only speak for the box it is run on
|
|
401
|
-
//
|
|
380
|
+
// seam exists: a reader that derives it on the fly can only speak for the box it is run on. Stated at
|
|
381
|
+
// delivery, it becomes a fact of the run.
|
|
402
382
|
const depth = deriveLaneDepthVerdicts({ sidecar, slices });
|
|
403
383
|
// Idempotent: a delivered-then-resumed run leaves the artifact byte-identical rather than restamping.
|
|
404
384
|
// `depth` JOINS the comparison rather than riding along: without it a run stamped before has a
|
|
@@ -427,14 +407,14 @@ export function stateJxSlices(runDir, { env = process.env, note = () => {}, runL
|
|
|
427
407
|
export async function runJxCandidateFold(ctx, job, opts = {}, { runLog = () => {}, note = () => {}, inScopeClasses = [] } = {}) {
|
|
428
408
|
const { run } = ctx;
|
|
429
409
|
try {
|
|
430
|
-
// (the CLEAROTRON_JX_LANES master leg was retired 2026-07-27
|
|
431
|
-
// per-
|
|
410
|
+
// (the frozen lane decision below is the control: the CLEAROTRON_JX_LANES master leg was retired 2026-07-27 and the
|
|
411
|
+
// per-language off switch 2026-11-11; availability is settled before we get here)
|
|
432
412
|
const { minted } = attachJxLanes(ctx);
|
|
433
413
|
const lanes = ctx.jxLanes?.lanes ?? {};
|
|
434
|
-
const laneKeys = Object.keys(lanes).filter((l) => LANGUAGE_LANES[l]
|
|
414
|
+
const laneKeys = Object.keys(lanes).filter((l) => LANGUAGE_LANES[l]);
|
|
435
415
|
if (!laneKeys.length) return { folded: 0, cause: minted ? "no lanes in scope (jurisdictions/policy)" : "frozen decision has no lanes" };
|
|
436
416
|
|
|
437
|
-
const receiptPath =
|
|
417
|
+
const receiptPath = paths(run.runDir).jxLanes;
|
|
438
418
|
const prior = ctx.jxLanes;
|
|
439
419
|
// an empty class scope can only fold entries parseRegisterPlan would REJECT on the next resume
|
|
440
420
|
// (register_plan_classes_missing — the run bricks). Degrade the whole fold instead (review 2026-07-18).
|
|
@@ -496,8 +476,8 @@ export async function runJxCandidateFold(ctx, job, opts = {}, { runLog = () => {
|
|
|
496
476
|
}
|
|
497
477
|
const repairedFold = repairReceipt();
|
|
498
478
|
|
|
499
|
-
const { exec, source } = resolveJxExecutor(opts);
|
|
500
|
-
const ledgerPath =
|
|
479
|
+
const { exec, source } = resolveJxExecutor(opts, { runDir: run.runDir });
|
|
480
|
+
const ledgerPath = paths(run.runDir).jxCompletions;
|
|
501
481
|
const markName = job.markName ?? job.name;
|
|
502
482
|
const productContext = String(job.goods ?? ctx.profile?.industry ?? "").slice(0, 300);
|
|
503
483
|
// — spread the PRIOR fold FIRST. `executes`/`slices` are minted at delivery, after this
|
|
@@ -616,3 +596,8 @@ export async function runJxCandidateFold(ctx, job, opts = {}, { runLog = () => {
|
|
|
616
596
|
return { folded: 0, cause: String(e?.message ?? e).slice(0, 200) };
|
|
617
597
|
}
|
|
618
598
|
}
|
|
599
|
+
|
|
600
|
+
/** A lane's language as a client reads it ("Japanese"), from the lane's own label ("Japanese-script deepening"). PURE. */
|
|
601
|
+
function languageOfLane(lane) {
|
|
602
|
+
return String(LANGUAGE_LANES[lane]?.label ?? "").replace(/-script deepening$/, "") || lane;
|
|
603
|
+
}
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
// CHECK membership. Derive identity FROM the marks and the membership guard becomes the decision: a seat
|
|
60
60
|
// that rates the wrong marks no longer fails a check — it writes to a different chunk file and passes.
|
|
61
61
|
// That is the guard and the thing it guards collapsing into each other.
|
|
62
|
-
import { existsSync,
|
|
62
|
+
import { existsSync, writeFileSync, readFileSync } from "node:fs";
|
|
63
63
|
import { captureCall, stampVerdict } from "./call-capture.mjs";
|
|
64
64
|
import { join } from "node:path";
|
|
65
|
-
import { driverDir } from "../shared/driver-dir.mjs";
|
|
66
65
|
import { refuseUndeclared as refuseUndeclaredShared, keepIfAbsent, lastAccepted, acceptedEnvelope } from "./preserve-merge.mjs";
|
|
67
66
|
// THE VALIDATOR'S OWN PREDICATE, imported rather than restated. Two spellings of one closed set is how
|
|
68
67
|
// the call and the stage come to disagree about what is legal, which is the defect this check closes.
|
|
69
68
|
import { normalizeKnockoutQualifier, KNOCKOUT_RATING_QUALIFIERS, heldCitationsOnly, classGroupsDefect, frozenLadder, validators } from "./verify-knockout.mjs";
|
|
70
69
|
// A FINDING'S KEYS, likewise: the validator's one list, so a key the call records is a key the stage accepts.
|
|
71
70
|
import { KNOCKOUT_FINDING_KEYS } from "./findings-model.mjs";
|
|
71
|
+
import { driverDir, readJson } from "./run-record.mjs";
|
|
72
72
|
|
|
73
73
|
const SCHEMA_VERSION = 1;
|
|
74
74
|
|
|
@@ -423,7 +423,7 @@ const sourceDefectsPath = (runDir, chunkNo) => join(knockoutAssessCallPaths(Stri
|
|
|
423
423
|
* correction. A row never leaves on its own account: the claim may survive a finding dropped or renamed, and only an accepted read settles it.
|
|
424
424
|
*/
|
|
425
425
|
export function knockoutAssessSourceDefects(runDir, chunkNo) {
|
|
426
|
-
try { return
|
|
426
|
+
try { return readJson(sourceDefectsPath(runDir, chunkNo)); } catch { return []; }
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
// CODE DOES NOT JUDGE THE CLAIM. It reads whether the finding changed, and leaves whether that answers the problem to the check.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright 2026 Cordillera Sàrl. Additional terms under section 7 of the AGPL-3.0 apply — see ADDITIONAL-TERMS.md
|
|
3
|
+
// knockout-caveats.mjs — the sentences a knockout's engine appends itself, and how to tell them from the rater's.
|
|
4
|
+
import { CAPABILITY_SKIPPED_NOTE } from "./search-policy.mjs";
|
|
5
|
+
|
|
6
|
+
export const SURVIVOR_BOUNDARY_RE = /not knocked out at this screen's depth/i;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Is this caveat the ENGINE'S OWN WORDS rather than the rater's?
|
|
10
|
+
*
|
|
11
|
+
* The engine appends two, both stated in code because the assessing model cannot see the facts behind
|
|
12
|
+
* them: the survivor boundary, and the capability-skipped note. Neither is something "the rater
|
|
13
|
+
* supplied", and telling them apart is the whole of — the standing-caveat lint asked
|
|
14
|
+
* "did the rater supply caveats?" of an array the engine had already written into, so from the moment
|
|
15
|
+
* the survivor sentence was appended the answer was always yes and the check could never fire again.
|
|
16
|
+
*/
|
|
17
|
+
export function isEngineAppendedCaveat(text) {
|
|
18
|
+
const t = String(text ?? "");
|
|
19
|
+
if (SURVIVOR_BOUNDARY_RE.test(t)) return true;
|
|
20
|
+
return Object.values(CAPABILITY_SKIPPED_NOTE).some((note) => t.trim() === String(note).trim());
|
|
21
|
+
}
|