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.
- package/CONTRIBUTING.md +2 -2
- package/INSTALL.md +334 -302
- package/QUICKSTART.md +12 -4
- package/README.md +12 -7
- package/THIRD-PARTY-NOTICES.md +4 -4
- package/bin/README.md +14 -11
- package/bin/clearotron.mjs +1 -1
- package/bin/connect.mjs +73 -25
- package/bin/example.mjs +4 -2
- package/bin/onboard.mjs +562 -336
- package/bin/start.mjs +184 -36
- package/bin/update.mjs +26 -13
- package/build-info.json +2 -2
- package/docs/PORTAL.md +2 -2
- package/docs/architecture/02-architecture.md +3 -3
- package/docs/architecture/04-configuration-reference.md +1 -2
- package/docs/architecture/05-config-governance.md +1 -1
- package/docs/architecture/06-operations-runbook.md +1 -1
- package/driver/CHANGELOG.md +77 -0
- package/driver/README.md +2 -2
- package/driver/config-inventory.mjs +20 -11
- package/driver/contract-e3-backlog.mjs +27 -27
- package/driver/contract-e3-baseline.json +2 -2
- package/driver/contract-vocabulary.mjs +1 -1
- package/driver/degraded-parts.mjs +67 -3
- package/driver/dev-portal.mjs +1 -1
- package/driver/digest-queue.mjs +5 -5
- package/driver/driver.config.mjs +9 -9
- package/driver/engine/CONTRACT.md +1 -1
- package/driver/engine/anthropic-agent.mjs +4 -2
- package/driver/engine/mcp/band-server.mjs +1 -21
- package/driver/engine/mcp/clarivate-propose-tool.mjs +26 -0
- package/driver/engine/mcp/clarivate-server.mjs +2 -18
- package/driver/engine/mcp/fixture-register-server.mjs +33 -0
- package/driver/engine/mcp/gather-config.mjs +48 -7
- package/driver/engine/mcp/recording-server.mjs +206 -14
- package/driver/engine/mcp/supplemental.mjs +4 -2
- package/driver/engine/openai-agent.mjs +3 -1
- package/driver/engine/probe.mjs +10 -0
- package/driver/filing-goods.mjs +95 -0
- package/driver/findings-model.mjs +3 -0
- package/driver/gateway.mjs +42 -40
- package/driver/knockout-assess-record.mjs +54 -4
- package/driver/knockout-correction-record.mjs +342 -0
- package/driver/knockout-frame-record.mjs +4 -2
- package/driver/knockout-register-read.mjs +705 -0
- package/driver/knockout-register-record.mjs +222 -0
- package/driver/knockout-review-record.mjs +96 -25
- package/driver/narrative-refutation-record.mjs +87 -1
- package/driver/order-tables.mjs +23 -0
- package/driver/owner-use-check.mjs +5 -2
- package/driver/package.json +1 -1
- package/driver/partial-payload-baseline.json +8 -0
- package/driver/pipeline-knockout.mjs +506 -313
- package/driver/pipeline.mjs +179 -86
- package/driver/portal-local-auth.mjs +7 -1
- package/driver/portal-service.mjs +62 -6
- package/driver/progress.mjs +2 -2
- package/driver/publish/index.mjs +18 -21
- package/driver/publish/knockout.mjs +40 -18
- package/driver/publish/render-knockout.mjs +40 -27
- package/driver/publish/report-dates.mjs +43 -0
- package/driver/recall-reconciliation.mjs +2 -2
- package/driver/record-goods.mjs +50 -9
- package/driver/register-count.mjs +12 -59
- package/driver/register-fixture-marker.mjs +22 -0
- package/driver/register-plan.mjs +48 -0
- package/driver/register-records.mjs +84 -266
- package/driver/register-taint.mjs +2 -2
- package/driver/repair-composers.mjs +15 -8
- package/driver/result-noun-fields.mjs +6 -2
- package/driver/run-requirements.mjs +54 -4
- package/driver/runner.mjs +4 -13
- package/driver/skills/clearance-register/providers/clarivate.md +2 -2
- package/driver/skills/knockout-assess/SKILL.md +101 -100
- package/driver/skills/knockout-frame/SKILL.md +3 -1
- package/driver/skills/knockout-register-read/SKILL.md +77 -0
- package/driver/stages-knockout.mjs +159 -98
- package/driver/stages.mjs +4 -2
- package/driver/suite-census.json +389 -71
- package/driver/systemd/README.md +2 -2
- package/driver/verify-knockout.mjs +175 -39
- package/driver/verify.mjs +10 -9
- package/mcp-server/CHANGELOG.md +4 -0
- package/mcp-server/CONNECT.md +4 -0
- package/mcp-server/demo-mode.mjs +6 -0
- package/mcp-server/lib/demo-texts.mjs +38 -0
- package/mcp-server/lib/http-handler.mjs +7 -1
- package/mcp-server/lib/knockout.mjs +3 -2
- package/mcp-server/lib/options.mjs +3 -1
- package/mcp-server/lib/plan.mjs +6 -1
- package/mcp-server/mint-token.mjs +1 -1
- package/mcp-server/package.json +1 -1
- package/mcp-server/serve.mjs +11 -0
- package/mcp-server/server.mjs +13 -5
- package/package.json +1 -1
- package/portal-ui/dist/assets/{index-D2wrw9cH.css → index-AtB9ZpDH.css} +29 -0
- package/portal-ui/dist/assets/{index-DcLbvFmQ.js → index-C1oE78Wk.js} +161 -195
- package/portal-ui/dist/index.html +2 -2
- package/portal-ui/package.json +4 -4
- package/providers/README.md +4 -4
- package/providers/_shared/execute-plan.mjs +45 -1
- package/providers/_shared/term-shape.mjs +1 -1
- package/providers/clarivate/src/capabilities.js +7 -6
- package/providers/clarivate/src/core.js +11 -7
- package/providers/clarivate/src/wider-list.js +104 -0
- package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/providers/signa/src/capabilities.js +0 -9
- package/scripts/e2e-first-time.mjs +8 -7
- package/scripts/freeze-example-run.mjs +2 -2
- package/scripts/settings-render-check.mjs +5 -3
- package/scripts/test-run.mjs +8 -2
- package/shared/client-door.mjs +11 -8
- package/shared/connect-clients.mjs +10 -4
- package/shared/demo-connection.mjs +43 -0
- package/shared/demo-start-args.mjs +7 -2
- package/shared/invocation.mjs +18 -3
- package/shared/permanent-install.mjs +14 -0
- package/shared/scope.mjs +8 -1
- package/shared/stdio-connect.mjs +43 -21
- package/shared/trigger-lane.mjs +7 -0
- package/shared/tty-style.mjs +21 -5
package/driver/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
# clearotron-driver
|
|
2
2
|
|
|
3
|
+
## 0.5.1-beta.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed: The README and the quickstart now give the beta's own install and demo commands, and the README no longer says `npx` asks only once before downloading.
|
|
8
|
+
- Fixed: For the Legal Data Hunter case-law source, `clearotron doctor` no longer says to ask whoever provisioned it; it says the source is optional and a Full country search runs without it.
|
|
9
|
+
- Fixed: Before the first `clearotron start`, `clearotron doctor` no longer says the install did not finish; it says `clearotron start` starts the client connector and `clearotron start --background` sets it up as a service.
|
|
10
|
+
- Fixed: When a report's correction fixes a wrong statement about what was searched, it now keeps the true results that shared that passage.
|
|
11
|
+
- Fixed: An assistant connected to a demo can read and explain its sample reports and can no longer start work. The connection has its own name, uses only that demo's folder, and stops working when the folder is gone.
|
|
12
|
+
- New: A demo now names the command that connects an assistant other than Claude Code. Run it in a second terminal and pick the assistant.
|
|
13
|
+
- Fixed: A demo started after `demo --once` or `demo --keep` now keeps the folder and reports those left, and says how to remove it, instead of deleting them when it closes.
|
|
14
|
+
- Fixed: In a demo, the free preview no longer tells a connected assistant to start the search, which a demo cannot do.
|
|
15
|
+
|
|
16
|
+
Fixed: On a machine without Claude Code, the demo now says so before its connect line, which needs it.
|
|
17
|
+
- Fixed: In a demo, the descriptions and guidance a connected assistant reads no longer tell it to start a search, which a demo cannot do.
|
|
18
|
+
- Fixed: A demo's first screen no longer lists its services' startup details. They go to a file in the demo's folder, which the screen names. Warnings and failures still show.
|
|
19
|
+
- Fixed: A knockout search now reads the client's own request and the goods of each filing it fetched when it rates a name.
|
|
20
|
+
- Fixed: A Knockout search now reads the register the way a clearance does, instead of taking an equal share of 100 filings in the register's order. It looks at each name's counts and reads each list it selects in full. It narrows a crowd by the client's goods, classes and markets. It chooses near spellings, wider searches and sound-alike searches from what it read. An independent check can now send a material defect back to the rating step, and reads the corrected record again. The report lists a name's filings before its web use, and can give different risk bands to different groups of classes where the evidence divides.
|
|
21
|
+
- Fixed: A Knockout started before a register is chosen now stops at once and names the setting it needs, instead of waiting to retry on its own.
|
|
22
|
+
- Fixed: Setup no longer tells an install from npm to take updates with `git pull`, and the settings file it writes names the command that wrote it.
|
|
23
|
+
- Fixed: A port chosen with `clearotron start --port` is now refused when it is busy, as a port set by its variable is, instead of being moved.
|
|
24
|
+
- Fixed: A report now prints the search and issue dates from its own record. Republishing a report, or opening a demo's example, no longer shows today as the day it was searched or issued.
|
|
25
|
+
- Fixed: A running search's second and third steps now read "Searching registers and common law" and "Investigating and exploring findings".
|
|
26
|
+
- Fixed: A `clearotron start` that fails after starting its doors now stops them, instead of leaving them running.
|
|
27
|
+
- Fixed: A run that stops now prints a `clearotron run` command to resume it, and one that waits names `clearotron run-queue --watch`, in place of a `node` path.
|
|
28
|
+
- Fixed: A name containing AND, OR or NOT is now searched on Clarivate instead of being set aside, by searching its words in order.
|
|
29
|
+
- Fixed: After `clearotron start --background`, `clearotron doctor` no longer warns about an unset deployment name; it says that only Clearotron's own servers set one.
|
|
30
|
+
- Fixed: Right after setup, `clearotron doctor` no longer warns that the key revocation list cannot be read or that portal saves are refused; it says the first `clearotron start` sets both up.
|
|
31
|
+
- Fixed: On a machine with background services, `clearotron doctor` now reports the AI, the program and the billing those services use, not what your shell happens to set.
|
|
32
|
+
- Fixed: `clearotron doctor` now opens with whether a search can run and what stops one. Before, that answer came about halfway down its output.
|
|
33
|
+
- Fixed: `clearotron doctor` and `clearotron start` now say that a revocation list the client door cannot read makes it refuse every key; they said the opposite.
|
|
34
|
+
- Fixed: Setup and `doctor` no longer tell you to set a register on the Installation settings page, which shows each setting but cannot change one. They tell you to re-run setup.
|
|
35
|
+
|
|
36
|
+
Fixed: Setup's opening now says that a paid register key is written on your word, because checking it would cost you. It also says that your organisation's name is the one answer you cannot skip. With no register chosen, setup's closing lines no longer suggest a first real clearance that would be refused.
|
|
37
|
+
|
|
38
|
+
Fixed: After `doctor --probe-engine` runs a test turn, its last line no longer says that nothing was written: the AI program keeps its own files from that turn.
|
|
39
|
+
- Fixed: Setup's figure for the disk space the AI's program takes now matches what it installs.
|
|
40
|
+
- Fixed: After a declined or failed test turn, setup now asks whether to go on without an AI. If you go back to the AI question instead, the AI you picked is the default.
|
|
41
|
+
- Fixed: Setup's messages now name the AI as Claude or Codex, and the portal's pages by the names the portal uses, instead of the program's internal names.
|
|
42
|
+
- Fixed: On an npm install, setup's refusal of a configuration folder inside the program no longer speaks of a checkout and `git pull`.
|
|
43
|
+
- Fixed: Setup and the portal's settings list now say what the SerpAPI key is for: the Chinese marketplace search.
|
|
44
|
+
- Fixed: Before its test turn, setup now says the AI is saved only once the turn works, and that the turn costs nothing while the AI is not signed in.
|
|
45
|
+
|
|
46
|
+
Fixed: Setup's sign-in steps now say to use a second terminal and which question to answer yes to, and a missing Codex sign-in is reported in plain words.
|
|
47
|
+
- Fixed: Setup's test turn now names your AI and says how the turn is paid for, in the words of the question before it.
|
|
48
|
+
- Fixed: `clearotron --help` and setup's closing screen now name the four processes `clearotron start` runs.
|
|
49
|
+
- Fixed: `clearotron start` no longer says that ordering starts a search when the install cannot run one yet. It says what is missing and the command that sets it up.
|
|
50
|
+
- Fixed: The audit workbook now lists a part as not completed when the run could not add a coverage row. It does the same when the run could not finish a machine check, or its check of the official records behind the cards. Before, the report shipped without that part and nothing said so.
|
|
51
|
+
- Fixed: When setup installed Claude itself, the line `clearotron start` prints to connect an assistant now names that copy by its full path, so the command is found.
|
|
52
|
+
- Fixed: The portal's connect page and `clearotron connect` now name the Claude program setup installed, so the command they give runs on a machine with no other copy.
|
|
53
|
+
- Fixed: Installing with `npx` no longer ends with a false warning that a different `clearotron` comes earlier on the PATH.
|
|
54
|
+
- Fixed: The demo no longer reads a pasted brief with the AI engine and no longer runs queued searches, so its portal makes no paid call; its closing lines no longer say an order commits money.
|
|
55
|
+
- Fixed: Setup's closing summary now names the AI, and when no AI or register is chosen it no longer says that nothing needs running again.
|
|
56
|
+
- Fixed: With no AI chosen, `clearotron doctor` no longer names a default AI; it says a search is refused until one is chosen, as its search check already did.
|
|
57
|
+
- Fixed: The install guide now says, where it offers the free US register, that downloading it needs a free USPTO.gov account with ID.me identity verification.
|
|
58
|
+
- Fixed: The install guide now gives an npm install its own commands to update, resume a run and connect an assistant, and marks the steps meant only for the source code.
|
|
59
|
+
- Fixed: The install guide's removal list now names the folder a tarball install creates, npm's download cache and Claude Code's own cache.
|
|
60
|
+
|
|
61
|
+
Fixed: The install guide now lists an AI among the settings a search requires, and no longer calls one AI the default.
|
|
62
|
+
- Fixed: The install guide now takes a new reader from install and setup through the free demo to the portal, where they order their first search.
|
|
63
|
+
- Fixed: The install guide now gives how long the sample runs in the demo took, about an hour for each clearance, instead of a figure from an older sample.
|
|
64
|
+
- Fixed: The install guide now says that `clearotron start` runs the portal, the engine door, the client door and the worker, and that Ctrl-C stops all of them.
|
|
65
|
+
- Fixed: The install guide now names all three ports `clearotron start` opens, says that `--port` moves all three, and says when a port in use is moved rather than refused; the README says which ports the demo opens.
|
|
66
|
+
- Fixed: The install guide now says a demo can be signed in to and ordered from, and the README says what a demo leaves: npm's own copy of the package, and any folder `--once` or `--keep` kept.
|
|
67
|
+
- Fixed: The README, the quickstart and the install guide now say what the SerpAPI key is for: it searches Chinese marketplaces for the native-language investigation of China, Hong Kong, Taiwan or Macau.
|
|
68
|
+
- Fixed: The README, the quickstart and the install guide now agree that a Knockout search runs without a Perplexity key, and that the three clearance searches need one.
|
|
69
|
+
- Fixed: Starting Clearotron or the demo no longer logs the portal's own check of the engine connection as a rejected request.
|
|
70
|
+
- Fixed: On a first start in a terminal, the log no longer says the passphrase is not printed just above the box that prints it.
|
|
71
|
+
- Fixed: An install that cannot run a search yet now says so on Home and on New clearance, before a search is filled in. The person who runs the install is told what is missing and the command that sets it up.
|
|
72
|
+
|
|
73
|
+
Fixed: The Installation settings page now shows an AI that was never chosen as not set, instead of showing the default as configured.
|
|
74
|
+
- Fixed: The quickstart's link to the four searches now leads to a page that describes them.
|
|
75
|
+
- Fixed: The install guide's removal list now names the folder setup installs the AI program into, the files that program keeps for itself, and the copy `npx` keeps; it no longer says the demo leaves the program behind.
|
|
76
|
+
- Fixed: The install guide's sample settings now select Signa, the register the guide recommends, and list each register's key once.
|
|
77
|
+
- Fixed: While a search stops, its card and the stop dialog no longer put the step's name inside a sentence. The dialog names the current step on a line of its own.
|
|
78
|
+
- Fixed: On an npm install, `clearotron update` now says what it does there and no longer speaks of `git pull` and `npm ci`. Where it names an npm command, a beta install stays on the beta.
|
|
79
|
+
|
|
3
80
|
## 0.5.0
|
|
4
81
|
|
|
5
82
|
### Minor Changes
|
package/driver/README.md
CHANGED
|
@@ -95,8 +95,8 @@ kind of thing a module is before you open it.
|
|
|
95
95
|
- Retries never re-dispatch the same second an attempt failed: every retry waits
|
|
96
96
|
`CLEAROTRON_RETRY_BACKOFF_MS` first (default 20000; attempt 1 never waits; the wait holds no turn
|
|
97
97
|
slot). Anthropic 529/overload failures are classified `status_overloaded` and stop the same-model
|
|
98
|
-
ladder after ONE attempt — the
|
|
99
|
-
|
|
98
|
+
ladder after ONE attempt — the recovery park (`.postponed` + escalating backoff) owns the
|
|
99
|
+
re-attempt, on the same model: there is no model cascade.
|
|
100
100
|
|
|
101
101
|
## Run it ($0 first, then live)
|
|
102
102
|
|
|
@@ -130,7 +130,11 @@ export function engineInventory(env = process.env) {
|
|
|
130
130
|
// `vendor`, NOT `label`. The label in that table is the mechanism — "each stage runs as a headless
|
|
131
131
|
// `claude -p` turn" — which is exactly the back-end detail took off this page. The id travels
|
|
132
132
|
// beside it because it is what an operator types into an environment file.
|
|
133
|
-
|
|
133
|
+
// WHETHER ANY AI IS CHOSEN, by the order wall's own test (run-requirements.mjs, the ENGINE_ENV row: set, once
|
|
134
|
+
// trimmed). With none chosen, `id` above is the code's default, which nobody saved, and every search is refused
|
|
135
|
+
// at the order; the page drew that default as a configured, green engine.
|
|
136
|
+
const selected = String(env.CLEAROTRON_AI ?? "").trim() !== "";
|
|
137
|
+
return { id, vendor: spec?.vendor ?? null, known: Boolean(spec), billing, binaryPresent, selected };
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
/**
|
|
@@ -279,7 +283,7 @@ export function providerInventory(env = process.env) {
|
|
|
279
283
|
|
|
280
284
|
for (const [group, label, table] of [
|
|
281
285
|
["research", "Common-law and marketplace research", RESEARCH_PROVIDERS],
|
|
282
|
-
["web", "
|
|
286
|
+
["web", "Chinese marketplace search", SERP_PROVIDERS],
|
|
283
287
|
]) {
|
|
284
288
|
// Looped rather than named, so a second research or search adapter appears here the day it is
|
|
285
289
|
// wired instead of the day somebody remembers this file.
|
|
@@ -341,9 +345,9 @@ const CASELAW_LABELS = Object.freeze({
|
|
|
341
345
|
* this repository — not as a URL, not as a bare domain, in any of the eleven places the source is named
|
|
342
346
|
* (measured 2026-09-05). Writing a plausible one here would be worse than the silence it replaces: the
|
|
343
347
|
* reader would follow it, and an invented domain in a shipping document is a defect nobody can see. So
|
|
344
|
-
* the row says what is true — this build does not record where to enrol — and the remedy
|
|
345
|
-
*
|
|
346
|
-
* to fill in.
|
|
348
|
+
* the row says what is true — this build does not record where to enrol — and the remedy says the
|
|
349
|
+
* source is optional rather than sending them to a search engine. That is a finding to raise, not a
|
|
350
|
+
* blank to fill in.
|
|
347
351
|
*/
|
|
348
352
|
const CASELAW_SITES = Object.freeze({
|
|
349
353
|
courtlistener: "https://www.courtlistener.com/",
|
|
@@ -477,14 +481,19 @@ export function caseLawInventory(env = process.env) {
|
|
|
477
481
|
? `Could not be checked: ${credential.why}. The file is ${tokenFile}. This is not a report that `
|
|
478
482
|
+ `the source is missing and not that it works — fix the permissions or the disk error and `
|
|
479
483
|
+ `run this again.`
|
|
480
|
-
:
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
: `this build records no site to create an account at — ask whoever provisioned the `
|
|
484
|
-
+ `bridge for it rather than searching, then follow `)
|
|
484
|
+
: CASELAW_SITES[id]
|
|
485
|
+
? `Not set up. It is a one-time OAuth sign-in rather than a variable to set: `
|
|
486
|
+
+ `create an account at ${CASELAW_SITES[id]}, then follow `
|
|
485
487
|
+ `providers/oauth-mcp-bridge/README.md, which ends by writing ${tokenFile}. Until then a `
|
|
486
488
|
+ `Full country search still runs, and its report discloses the case-law gap instead of `
|
|
487
|
-
+ `reporting no adverse case law
|
|
489
|
+
+ `reporting no adverse case law.`
|
|
490
|
+
// NOBODY TO ASK, SO SAY WHAT IS TRUE INSTEAD: the source is optional. This sent the reader to
|
|
491
|
+
// "whoever provisioned the bridge", and an install of one's own has nobody in that role (measured on
|
|
492
|
+
// a fresh install of a beta, 2026-11-04). Without it a Full country search runs and discloses the gap.
|
|
493
|
+
: `Optional, and not set up. This build records no site to create an account at. A Full country `
|
|
494
|
+
+ `search runs without it, and its report discloses the case-law gap instead of reporting no `
|
|
495
|
+
+ `adverse case law. With an account, follow providers/oauth-mcp-bridge/README.md, which ends by `
|
|
496
|
+
+ `writing ${tokenFile}.`,
|
|
488
497
|
};
|
|
489
498
|
});
|
|
490
499
|
|
|
@@ -171,7 +171,7 @@ export const E3_BACKLOG = [
|
|
|
171
171
|
{
|
|
172
172
|
stage: "common-law",
|
|
173
173
|
kind: "dictated-line-shape",
|
|
174
|
-
where: "driver/stages.mjs:
|
|
174
|
+
where: "driver/stages.mjs:1135 (emitted at 1918, 1947, 2127, 2347)",
|
|
175
175
|
surface: "stage-message",
|
|
176
176
|
evidence: "CROSS-CHECK HAND-OFF: … record it on its OWN line in EXACTLY the form \"CROSS-CHECK REQUIRED: <what> — <why>\" (that exact prefix; an em-dash between what and why; name the mark in CAPS in <what>). The driver parses ONLY this exact line shape…",
|
|
177
177
|
reparsedBy: "driver/doubt-ledger.mjs:183 CROSS_CHECK_RE = /^(?:[-*]\\s+)?CROSS-CHECK REQUIRED:\\s*(.+?)\\s+—\\s+(.+?)\\s*$/ → mintCrossCheckDoubts",
|
|
@@ -256,7 +256,7 @@ export const E3_BACKLOG = [
|
|
|
256
256
|
{
|
|
257
257
|
stage: "register-unit",
|
|
258
258
|
kind: "literal-json-skeleton",
|
|
259
|
-
where: "driver/stages.mjs:
|
|
259
|
+
where: "driver/stages.mjs:2338 (the non-supplemental-lane branch)",
|
|
260
260
|
surface: "stage-message",
|
|
261
261
|
evidence: "BAND ARTIFACT (MANDATORY): ALSO write the COMPLETE NAMED BAND for this axis to <path> — a JSON ARRAY, one block per register_enumerate / count-probe call, in the named-band contract: {\"state\":\"enumerated\",\"query\":\"<what was searched>\",\"total_hits\":N,\"records\":[{record_id, mark_text, classes, status,",
|
|
262
262
|
reparsedBy: "driver/named-band.mjs parseNamedBand / bandRecords / bandCrowds / mergeNamedBands (named in driver/skills/clearance-register/unit.md:60-62); validators.registerUnit",
|
|
@@ -265,7 +265,7 @@ export const E3_BACKLOG = [
|
|
|
265
265
|
{
|
|
266
266
|
stage: "register-unit",
|
|
267
267
|
kind: "exactly-these-keys",
|
|
268
|
-
where: "driver/stages.mjs:
|
|
268
|
+
where: "driver/stages.mjs:2303",
|
|
269
269
|
surface: "stage-message",
|
|
270
270
|
evidence: "Every block you append MUST carry \"state\":\"enumerated\" (ONLY if you paged it to has_more:false) or \"state\":\"incomplete\" — EXACTLY those two strings; there is no \"verified\"/\"checked\"/\"complete\"/\"clean\" state, and any other value fails the stage.",
|
|
271
271
|
reparsedBy: "driver/named-band.mjs parseNamedBand (off-enum state fails validators.registerUnit)",
|
|
@@ -283,7 +283,7 @@ export const E3_BACKLOG = [
|
|
|
283
283
|
{
|
|
284
284
|
stage: "register-unit",
|
|
285
285
|
kind: "exactly-these-keys",
|
|
286
|
-
where: "driver/stages.mjs:
|
|
286
|
+
where: "driver/stages.mjs:4309 (the frame-reopen / scoped-retry message builder). A second number stood here and had been stale for some time: it pointed at a contract-element description rather than a builder, at its old line and at every mechanical shift of it. Two candidate builders sit beside 4164 and picking one would be a guess, so the wrong pointer is removed rather than moved a third time — one accurate citation beats one accurate and one invented.",
|
|
287
287
|
surface: "stage-message",
|
|
288
288
|
evidence: "Every block you append MUST carry \"state\":\"enumerated\" (ONLY if paged to has_more:false) or \"state\":\"incomplete\" — EXACTLY those two strings … (re-dispatch builders, which REPLACE def.message)",
|
|
289
289
|
reparsedBy: "driver/named-band.mjs parseNamedBand. Scope warning: these builders replace def.message on every escalation / envelope-close / frame-reopen dispatch, so an E3 lint that walks STAGES[*].message only never sees them",
|
|
@@ -301,7 +301,7 @@ export const E3_BACKLOG = [
|
|
|
301
301
|
{
|
|
302
302
|
stage: "placement-inquiry",
|
|
303
303
|
kind: "exactly-these-keys",
|
|
304
|
-
where: "driver/stages.mjs:
|
|
304
|
+
where: "driver/stages.mjs:2499",
|
|
305
305
|
surface: "stage-message",
|
|
306
306
|
evidence: "· tier EXACTLY one of headline-candidate / sheet-2 / watchlist-annex / out-of-scope-filtered.",
|
|
307
307
|
reparsedBy: "driver/placement-form.mjs / driver/placement-model.mjs via validators.placement",
|
|
@@ -347,7 +347,7 @@ export const E3_BACKLOG = [
|
|
|
347
347
|
// (coverage-form.mjs coverageFormBrief) and the tool schema, with every row receiver-validated at
|
|
348
348
|
// call time. Same dictated vocabulary, same authored site, new route — this row's evidence follows
|
|
349
349
|
// the dictation so the row keeps describing something that exists.
|
|
350
|
-
where: "driver/stages.mjs:
|
|
350
|
+
where: "driver/stages.mjs:2710 (the digest message) + driver/coverage-form.mjs (coverageFormBrief — the dispatch block carrying the enum and the row shape)",
|
|
351
351
|
surface: "stage-message",
|
|
352
352
|
evidence: "Record a \"status\" and a \"reason\" on EVERY row ONLY by calling the … tool — the driver validates each row as it arrives, holds the record itself, and renders both the ## Coverage ledger table and the coverage JSON from it",
|
|
353
353
|
reparsedBy: "driver/coverage-call.mjs validateCoverageCall (receiver-validated at call time, the same predicates the gate judges with) + driver/coverage-form.mjs rowIsSettled via validators.registerFindings over the _driver/ accumulator",
|
|
@@ -430,7 +430,7 @@ export const E3_BACKLOG = [
|
|
|
430
430
|
{
|
|
431
431
|
stage: "frame-diff",
|
|
432
432
|
kind: "exactly-these-keys",
|
|
433
|
-
where: "driver/stages.mjs:
|
|
433
|
+
where: "driver/stages.mjs:2878",
|
|
434
434
|
surface: "stage-message",
|
|
435
435
|
evidence: "For each blind-model variant / field / source the run did NOT scope or search, emit one directive {layer, item, observation, severity} … severity = dominant-element (the omission is ON the spine) | material (a real omission worth a targeted sweep) | minor (already covered, or presentation only).",
|
|
436
436
|
reparsedBy: "driver/verify.mjs validators.frameDiff + driver/pipeline.mjs runSupplementalSweeps (the parser REFUSES a firing variant directive that dictates nothing dispatchable)",
|
|
@@ -454,7 +454,7 @@ export const E3_BACKLOG = [
|
|
|
454
454
|
{
|
|
455
455
|
stage: "synthesis",
|
|
456
456
|
kind: "literal-json-skeleton",
|
|
457
|
-
where: "driver/stages.mjs:
|
|
457
|
+
where: "driver/stages.mjs:3259",
|
|
458
458
|
surface: "stage-message",
|
|
459
459
|
evidence: "MACHINE FINDINGS (MANDATORY): … a JSON OBJECT {\"schema_version\":<FINDINGS_SCHEMA_VERSION>,\"rated_under_framework\":\"…\",\"findings\":[...],\"coverage\":[...],\"context_notes\":[...],\"actions\":[...],\"ask_answers\":[...]} … Each finding object has EXACTLY these keys: {\"ordinal\",\"mark\",\"owner\",\"band\",\"net\",\"bor",
|
|
460
460
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson via validators.narrative",
|
|
@@ -468,7 +468,7 @@ export const E3_BACKLOG = [
|
|
|
468
468
|
{
|
|
469
469
|
stage: "synthesis",
|
|
470
470
|
kind: "exactly-these-keys",
|
|
471
|
-
where: "driver/stages.mjs:
|
|
471
|
+
where: "driver/stages.mjs:3292",
|
|
472
472
|
surface: "stage-message",
|
|
473
473
|
evidence: "- off_field_ground (MANDATORY on every off-field finding, FORBIDDEN on every other disposition): EXACTLY one bare token of: ${OFF_FIELD_GROUNDS.join(\" / \")}",
|
|
474
474
|
reparsedBy: "driver/findings-model.mjs validateOffFieldGround — the enum is imported from findings-model.mjs and interpolated back into the prompt, so code already holds the list it asks the model to type",
|
|
@@ -477,7 +477,7 @@ export const E3_BACKLOG = [
|
|
|
477
477
|
{
|
|
478
478
|
stage: "synthesis",
|
|
479
479
|
kind: "literal-json-skeleton",
|
|
480
|
-
where: "driver/stages.mjs:
|
|
480
|
+
where: "driver/stages.mjs:3293",
|
|
481
481
|
surface: "stage-message",
|
|
482
482
|
evidence: "- manageable …: {\"category\":\"<EXACTLY one of large-competitor / commercial-partner / troll / well-known-enforcer>\",\"reason\":\"<one-two lines…>\"}",
|
|
483
483
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
|
|
@@ -486,7 +486,7 @@ export const E3_BACKLOG = [
|
|
|
486
486
|
{
|
|
487
487
|
stage: "synthesis",
|
|
488
488
|
kind: "literal-json-skeleton",
|
|
489
|
-
where: "driver/stages.mjs:
|
|
489
|
+
where: "driver/stages.mjs:3309",
|
|
490
490
|
surface: "stage-message",
|
|
491
491
|
evidence: "- meters: {\"mark_similarity\":{...},\"goods_proximity\":{...},\"use\":{...},\"enforcer\":{...}} — all four present, each {\"token\",\"basis\",\"source\"}. … mark_similarity = high | medium | low. goods_proximity = high | medium | low. enforcer = high | medium | low | unknown. use = confirmed | not-confirmed | un",
|
|
492
492
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; driver/verify.mjs:1181 checkFindingsSibling gates meters.*.source; finding_basis_source_missing",
|
|
@@ -495,7 +495,7 @@ export const E3_BACKLOG = [
|
|
|
495
495
|
{
|
|
496
496
|
stage: "synthesis",
|
|
497
497
|
kind: "literal-json-skeleton",
|
|
498
|
-
where: "driver/stages.mjs:
|
|
498
|
+
where: "driver/stages.mjs:3310",
|
|
499
499
|
surface: "stage-message",
|
|
500
500
|
evidence: "- quadrant: {\"x\",\"y\"} numbers in [0,1]. x = goods/services proximity (0 = distant, 1 = identical). y = mark similarity (0 = distinct, 1 = identical).",
|
|
501
501
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
|
|
@@ -504,7 +504,7 @@ export const E3_BACKLOG = [
|
|
|
504
504
|
{
|
|
505
505
|
stage: "synthesis",
|
|
506
506
|
kind: "literal-json-skeleton",
|
|
507
|
-
where: "driver/stages.mjs:
|
|
507
|
+
where: "driver/stages.mjs:3311",
|
|
508
508
|
surface: "stage-message",
|
|
509
509
|
evidence: "- source: {\"source_type\",\"resolved_link\"}. source_type EXACTLY one of: register-vendor / register-euipo / common-law-marketplace / common-law-web / case-law",
|
|
510
510
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
|
|
@@ -513,7 +513,7 @@ export const E3_BACKLOG = [
|
|
|
513
513
|
{
|
|
514
514
|
stage: "synthesis",
|
|
515
515
|
kind: "exactly-these-keys",
|
|
516
|
-
where: "driver/stages.mjs:
|
|
516
|
+
where: "driver/stages.mjs:3312",
|
|
517
517
|
surface: "stage-message",
|
|
518
518
|
evidence: "coverage[]: ONE object per coverage AREA, EXACTLY {\"area\",\"state\",\"note\"}. … state EXACTLY one of: confirmed-clean / coverage-limited / open / not-searched / note.",
|
|
519
519
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; the render owns the coverage panel from these typed states",
|
|
@@ -522,7 +522,7 @@ export const E3_BACKLOG = [
|
|
|
522
522
|
{
|
|
523
523
|
stage: "synthesis",
|
|
524
524
|
kind: "literal-json-skeleton",
|
|
525
|
-
where: "driver/stages.mjs:
|
|
525
|
+
where: "driver/stages.mjs:3321",
|
|
526
526
|
surface: "stage-message",
|
|
527
527
|
evidence: "use_check = {\"source\",\"quality\",\"question\"}: … quality: OPTIONAL, EXACTLY one of owner-site / independent / register-mirror … own_rights = {\"source\"}",
|
|
528
528
|
reparsedBy: "driver/verify.mjs checkFindingsSibling (finding_use_check_missing); driver/own-rights.mjs:19-22",
|
|
@@ -531,7 +531,7 @@ export const E3_BACKLOG = [
|
|
|
531
531
|
{
|
|
532
532
|
stage: "synthesis",
|
|
533
533
|
kind: "literal-json-skeleton",
|
|
534
|
-
where: "driver/stages.mjs:
|
|
534
|
+
where: "driver/stages.mjs:3378",
|
|
535
535
|
surface: "stage-message",
|
|
536
536
|
evidence: "MARK ASSESSMENT … STRUCTURED FORM …: either field may instead be an OBJECT {\"read\":\"…\",\"spectrum\":\"…\",\"per_class\":[{\"class\":\"5\",\"note\":\"…\"}],\"per_market\":[{\"market\":\"CN\",\"note\":\"…\"}],\"counter_registrations\":[{\"mark\":\"…\",\"uri\":\"/mark/…\",\"note\":\"…\"}],\"acquired\":\"<optional>\",\"note\":\"<optional residual>",
|
|
537
537
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson; the report collapses the rows behind toggles and the audit workbook renders them",
|
|
@@ -540,7 +540,7 @@ export const E3_BACKLOG = [
|
|
|
540
540
|
{
|
|
541
541
|
stage: "synthesis",
|
|
542
542
|
kind: "literal-json-skeleton",
|
|
543
|
-
where: "driver/stages.mjs:
|
|
543
|
+
where: "driver/stages.mjs:3384",
|
|
544
544
|
surface: "stage-message",
|
|
545
545
|
evidence: "FOUR ANSWERS …: \"four_answers\": {\"third_party_rights\":{...},\"objection_likelihood\":{...},\"registrability\":{...},\"client_enforceability\":{...}} … Each answer … is {\"read\":\"…\",\"token\":\"…\",\"basis\":\"…\",\"ordinals\":[…]}. Tokens (closed enums …): third_party_rights = strong|moderate|weak; objection_likelih",
|
|
546
546
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
|
|
@@ -558,7 +558,7 @@ export const E3_BACKLOG = [
|
|
|
558
558
|
{
|
|
559
559
|
stage: "synthesis",
|
|
560
560
|
kind: "exactly-these-keys",
|
|
561
|
-
where: "driver/stages.mjs:
|
|
561
|
+
where: "driver/stages.mjs:3391",
|
|
562
562
|
surface: "stage-message",
|
|
563
563
|
evidence: "COVERAGE JUDGMENT …: emit \"coverage_judgment\": {\"sufficient\":<bool>, \"reason\":\"<one line…>\"} — EXACTLY those two keys. Do NOT emit \"rows\": the driver writes that register itself … anything you type there is replaced wholesale.",
|
|
564
564
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson. The \"Do NOT emit rows\" clause is the purest E3 case in the tree — the prompt names a field, dictates its shape and states in the same breath that code overwrites it",
|
|
@@ -567,7 +567,7 @@ export const E3_BACKLOG = [
|
|
|
567
567
|
{
|
|
568
568
|
stage: "synthesis",
|
|
569
569
|
kind: "literal-json-skeleton",
|
|
570
|
-
where: "driver/stages.mjs:
|
|
570
|
+
where: "driver/stages.mjs:3237",
|
|
571
571
|
surface: "stage-message",
|
|
572
572
|
// RE-QUOTED, NOT PARKED. The writer's conversion reworded this dictation — the
|
|
573
573
|
// ask answers ride the findings RECORD now and the driver renders the labelled line into both the
|
|
@@ -591,7 +591,7 @@ export const E3_BACKLOG = [
|
|
|
591
591
|
{
|
|
592
592
|
stage: "synthesis",
|
|
593
593
|
kind: "dictated-line-shape",
|
|
594
|
-
where: "driver/stages.mjs:
|
|
594
|
+
where: "driver/stages.mjs:3155 (restated at driver/skills/clearance-search/synthesis-rules.md:426)",
|
|
595
595
|
surface: "stage-message",
|
|
596
596
|
evidence: "END that finding's actual-use line with a literal \"- **Use-check source:** <result URL | \"perplexity_research — no result\">\" line",
|
|
597
597
|
reparsedBy: "driver/verify.mjs validators.narrative (spec-11 hard reject); the repair hint re-dictates the literal in correctionHint() in gateway.mjs",
|
|
@@ -600,7 +600,7 @@ export const E3_BACKLOG = [
|
|
|
600
600
|
{
|
|
601
601
|
stage: "synthesis",
|
|
602
602
|
kind: "dictated-line-shape",
|
|
603
|
-
where: "driver/stages.mjs:
|
|
603
|
+
where: "driver/stages.mjs:3168 (restated at driver/skills/clearance-search/synthesis-rules.md:473)",
|
|
604
604
|
surface: "stage-message",
|
|
605
605
|
evidence: "END that finding's reasoning with a literal \"- **Own-rights source:** <record URI(s) | \"no applicant-owned registrations in the searched register material\">\" line",
|
|
606
606
|
reparsedBy: "driver/own-rights.mjs, in its header — \"This module only requires the 'Own-rights source:' line to exist\"; repair hint in correctionHint() in gateway.mjs (the `own_rights_missing` branch; re-verified 2026-08-29 — the old :1736 predated this branch and pointed into the A4 repeat-signature block)",
|
|
@@ -609,7 +609,7 @@ export const E3_BACKLOG = [
|
|
|
609
609
|
{
|
|
610
610
|
stage: "synthesis",
|
|
611
611
|
kind: "exactly-these-keys",
|
|
612
|
-
where: "driver/stages.mjs:
|
|
612
|
+
where: "driver/stages.mjs:3370",
|
|
613
613
|
surface: "stage-message",
|
|
614
614
|
evidence: "add it to the top-level \"context_notes\" array — each object EXACTLY {\"type\":\"famous-neighbour-ungrounded\",\"mark\",\"owner\",\"context\"}",
|
|
615
615
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson",
|
|
@@ -618,7 +618,7 @@ export const E3_BACKLOG = [
|
|
|
618
618
|
{
|
|
619
619
|
stage: "synthesis",
|
|
620
620
|
kind: "literal-json-skeleton",
|
|
621
|
-
where: "driver/stages.mjs:
|
|
621
|
+
where: "driver/stages.mjs:3261",
|
|
622
622
|
surface: "stage-message",
|
|
623
623
|
evidence: "- owner: {\"name\",\"country\",\"registrations\":[...]}. … Each registration: {\"uri\", optionally \"classes\":[\"9\",\"41\"],\"status\",\"filed\",\"expiry\",\"jurisdiction\"}. The \"uri\" is the ONLY field that matters: the driver BINDS classes/status/filed/expiry/jurisdiction AND the owner name from the FETCHED record ke",
|
|
624
624
|
reparsedBy: "driver/findings-model.mjs:848 parseFindingsJson + the record-binding join. Six of the seven keys are stated in the prompt and overwritten by code in the same sentence",
|
|
@@ -627,7 +627,7 @@ export const E3_BACKLOG = [
|
|
|
627
627
|
{
|
|
628
628
|
stage: "case-law",
|
|
629
629
|
kind: "literal-json-skeleton",
|
|
630
|
-
where: "driver/stages.mjs:
|
|
630
|
+
where: "driver/stages.mjs:3548",
|
|
631
631
|
surface: "stage-message",
|
|
632
632
|
evidence: "ALSO write the RETRIEVAL RECORD to <path> — a JSON OBJECT with EXACTLY these keys: {\"schema_version\":2,\"queries\":[{\"query\":\"<the search you dispatched, verbatim>\",\"jurisdiction\":\"…\",\"results\":<how many hits it returned, or null when the query never reached a source — never 0 for a query you could not send>}, …],\"citations\":[{\"proceeding\":\"…\",\"forum\":\"…\",\"jurisdiction\":\"…\",\"decided\":\"…\"",
|
|
633
633
|
reparsedBy: "driver/verify.mjs validators.caseLaw — the ledger arm, armed by the stage-contract marker `citations` (the case-law stage's `contract: { citations: 1 }` in stages.mjs)",
|
|
@@ -636,7 +636,7 @@ export const E3_BACKLOG = [
|
|
|
636
636
|
{
|
|
637
637
|
stage: "case-law",
|
|
638
638
|
kind: "dictated-line-shape",
|
|
639
|
-
where: "driver/stages.mjs:
|
|
639
|
+
where: "driver/stages.mjs:3556",
|
|
640
640
|
surface: "stage-message",
|
|
641
641
|
evidence: "EVERY \"Grounded profile\" section MUST start its body with the line \"- ord: <N>\" naming which finding it grounds (use the ordinal from this list; a profile that grounds no listed finding omits the line)",
|
|
642
642
|
reparsedBy: "driver/publish/parse.mjs:339, parseCaseLawProfiles() in parse.mjs (\"the optional '- ord: <N>' first body line … gives an EXACT join\"); driver/findings-model.mjs:274 /^-\\s*ord:\\s*(\\d+)\\s*$/m; driver/publish/index.mjs publishReport (joinCaseLawProfiles)",
|
|
@@ -670,7 +670,7 @@ export const E3_BACKLOG = [
|
|
|
670
670
|
{
|
|
671
671
|
stage: "narrative-refutation",
|
|
672
672
|
kind: "dictated-line-shape",
|
|
673
|
-
where: "driver/stages.mjs:
|
|
673
|
+
where: "driver/stages.mjs:4893",
|
|
674
674
|
surface: "stage-message",
|
|
675
675
|
// RE-QUOTED BY CONVERSION 9. The LINE-TOKEN half is gone — no "anywhere on the line", no "[kind: …]
|
|
676
676
|
// token", no "a line with no token is treated as fact", because a kind is a typed field now and an
|
|
@@ -770,7 +770,7 @@ export const E3_BACKLOG = [
|
|
|
770
770
|
{
|
|
771
771
|
stage: "report-card",
|
|
772
772
|
kind: "literal-json-skeleton",
|
|
773
|
-
where: "driver/stages.mjs:
|
|
773
|
+
where: "driver/stages.mjs:3997",
|
|
774
774
|
surface: "stage-message",
|
|
775
775
|
evidence: "The finding's OWN record — the ONLY source for this card …:\\n```json\\n<JSON.stringify(finding, null, 2)>\\n```",
|
|
776
776
|
reparsedBy: "none — this is the INPUT side, and that is why it belongs in the survey: a full JSON object rendered into the prompt is exactly the mechanism #850 proves produced R-RECEIPT (the model pattern-matches a shown shape). E3's clause 1 as written (\"a code fence or inline example showing the exact object shape the model must emit\") does not reach an injected record, so the lint needs an explicit rule for shown-but-not-owed structure",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"stages-knockout.mjs": {
|
|
91
91
|
"literal-json-skeleton": 0,
|
|
92
92
|
"exactly-these-keys": 0,
|
|
93
|
-
"dictated-line-shape":
|
|
93
|
+
"dictated-line-shape": 0
|
|
94
94
|
},
|
|
95
95
|
"skills/matter-frame/SKILL.md": {
|
|
96
96
|
"literal-json-skeleton": 0,
|
|
@@ -190,6 +190,6 @@
|
|
|
190
190
|
},
|
|
191
191
|
"totals": {
|
|
192
192
|
"stages": 43,
|
|
193
|
-
"files":
|
|
193
|
+
"files": 62
|
|
194
194
|
}
|
|
195
195
|
}
|
|
@@ -425,7 +425,7 @@ export const TRIPWIRE_OUT_OF_SCOPE = [
|
|
|
425
425
|
},
|
|
426
426
|
{
|
|
427
427
|
prefix: "knockout_",
|
|
428
|
-
site: "driver/findings-model.mjs:
|
|
428
|
+
site: "driver/findings-model.mjs:2341 validateKnockoutFinding, for `knockout_finding_*` and `knockout_findings_*`",
|
|
429
429
|
reason: "The knockout lane's parser. knockout-frame and knockout-assess live in driver/stages-knockout.mjs, not in STAGES, so they carry no E1 declaration and are outside this partition. RECORDED AS A GAP: #850 audits both stages, and an E1 declaration for the knockout lane is not in this scaffolding.",
|
|
430
430
|
},
|
|
431
431
|
{
|
|
@@ -64,6 +64,18 @@ export const NOT_COMPLETED = "unfinished"; // → the row's fallback:
|
|
|
64
64
|
|
|
65
65
|
export const DEGRADED_PARTS_FILE = "degraded-parts.json";
|
|
66
66
|
|
|
67
|
+
// The run-log events of the coverage rows the driver adds once synthesis has settled (pipeline.mjs, the seam):
|
|
68
|
+
// one at the start of each pass, and one for each adder that failed in it. Each adder catches its own failure
|
|
69
|
+
// and the run goes on, so the event is the only trace that the row it exists to add is missing. The pipeline writes
|
|
70
|
+
// these names as literals, because the run log's names are read from the source and classed (scripts/e2e-first-time.mjs).
|
|
71
|
+
export const COVERAGE_ROWS_PASS = "coverage-rows-pass";
|
|
72
|
+
export const COVERAGE_ROW_NOT_ADDED = "coverage-row-not-added";
|
|
73
|
+
|
|
74
|
+
// The run-log events of the verdict's floors (pipeline.mjs, applyCoverageFloor): one at each entry, the floor being
|
|
75
|
+
// re-entered whenever the verdict can move, and one for each floor that threw in it. Written as literals, as above.
|
|
76
|
+
export const VERDICT_FLOORS_PASS = "verdict-floors-pass";
|
|
77
|
+
export const VERDICT_FLOOR_FAILED = "verdict-floor-failed";
|
|
78
|
+
|
|
67
79
|
const readJsonl = (p) => {
|
|
68
80
|
try {
|
|
69
81
|
return readFileSync(p, "utf8").split("\n").filter((l) => l.trim())
|
|
@@ -91,6 +103,12 @@ const lastEvent = (log, names) => {
|
|
|
91
103
|
return null;
|
|
92
104
|
};
|
|
93
105
|
|
|
106
|
+
/** The events after the last `marker`, or the whole log when it holds none. */
|
|
107
|
+
const sinceLast = (log, marker) => {
|
|
108
|
+
for (let i = log.length - 1; i >= 0; i--) if (log[i]?.event === marker) return log.slice(i + 1);
|
|
109
|
+
return log;
|
|
110
|
+
};
|
|
111
|
+
|
|
94
112
|
const reasonFor = (fail) => (/timeout|timed out/i.test(String(fail ?? "")) ? TIMED_OUT : NOT_COMPLETED);
|
|
95
113
|
|
|
96
114
|
// ── The checks. Each returns null, or {part, name, reason, cause}: `cause` is the raw fact for the run's
|
|
@@ -224,11 +242,25 @@ function checks(runDir, log) {
|
|
|
224
242
|
// A re-check that read ok and saved no review verified nothing: the correction stands unreviewed. A later receipt,
|
|
225
243
|
// which only a re-check that saved a review writes, clears it on a resume.
|
|
226
244
|
const unread = failedStep(log, "corrective-cycle-receipt", "verdict-recheck-unread");
|
|
227
|
-
if (unread && !reviewOpen && !recheck) failed.push(["the review's re-check",
|
|
245
|
+
if (unread && !reviewOpen && !recheck) failed.push(["the review's re-check", String(unread.fail ?? "").startsWith("file-save-refused:")
|
|
246
|
+
? `the review it saved as a file was refused (${unread.fail.slice("file-save-refused:".length)}), so the correction was not verified`
|
|
247
|
+
: "it saved no review, so the correction was not verified"]);
|
|
228
248
|
const rollback = failedStep(log, "corrective-cycle-receipt", "corrective-rollback");
|
|
229
249
|
if (rollback) failed.push(["the corrective pass, rolled back", rollback.reason]);
|
|
230
250
|
const crowd = failedStep(log, "crowd-context", "crowd-context-failed");
|
|
231
251
|
if (crowd) failed.push(["the crowd counts", crowd.fail]);
|
|
252
|
+
// The floor duty: whether every live identical or near-identical register record came back on the placement form.
|
|
253
|
+
// A derivation that threw checked nothing. One that could not be computed writes its own `floor-duty` event, which
|
|
254
|
+
// reads as the step's last word here; whether that state is itself a missing part is not settled by this check.
|
|
255
|
+
const floorDuty = failedStep(log, "floor-duty", "floor-duty-failed");
|
|
256
|
+
if (floorDuty) failed.push(["the floor duty", floorDuty.fail]);
|
|
257
|
+
// The comparison after a corrective pass of the record before and after it, which sends a stamp the pass promoted
|
|
258
|
+
// without a register call to the review. One that threw compared nothing.
|
|
259
|
+
const claims = lastEvent(log, ["evidence-claim-invariant"]);
|
|
260
|
+
if (claims?.ok === false) failed.push(["the check of a correction's evidence stamps", claims.why]);
|
|
261
|
+
// A floor of the verdict that threw on its last entry, which could not clamp what it exists to clamp.
|
|
262
|
+
for (const f of sinceLast(log, VERDICT_FLOORS_PASS).filter((e) => e?.event === VERDICT_FLOOR_FAILED))
|
|
263
|
+
failed.push([`the ${f.floor ?? "verdict"} floor`, f.fail]);
|
|
232
264
|
if (!failed.length) return null;
|
|
233
265
|
return { part: "checks", name: PART_NAMES.machineQc, reason: reasonFor(failed.map(([, why]) => why).join("; ")),
|
|
234
266
|
cause: failed.map(([what, why]) => `${what}: ${why ?? "no cause recorded"}`).join("; ") };
|
|
@@ -273,7 +305,36 @@ function officialRecords(runDir, log) {
|
|
|
273
305
|
cause: `the fetch ledger could not be read: ${last.ledgerError}` };
|
|
274
306
|
}
|
|
275
307
|
|
|
276
|
-
|
|
308
|
+
// The coverage rows the driver adds to the report and the workbook once synthesis has settled: the follow-ups left
|
|
309
|
+
// open, the native-language scope, a lane short of its depth, the marks the screen gate left unexamined, the meaning
|
|
310
|
+
// searches that did not complete, and the coverage judgment's own rows. An adder that failed left its row out and
|
|
311
|
+
// the run went on. Only the last pass counts, because a pass follows each rewrite of findings.json and adds the rows
|
|
312
|
+
// again: a later pass in which every adder succeeded clears an earlier failure, and a failure in the last pass stands
|
|
313
|
+
// when no pass came after it.
|
|
314
|
+
function coverageRows(runDir, log) {
|
|
315
|
+
const failed = sinceLast(log, COVERAGE_ROWS_PASS).filter((e) => e?.event === COVERAGE_ROW_NOT_ADDED);
|
|
316
|
+
if (!failed.length) return null;
|
|
317
|
+
return { part: "coverage-rows", name: PART_NAMES.coverage, reason: reasonFor(failed.map((e) => e.fail).join("; ")),
|
|
318
|
+
cause: failed.map((e) => `${e.adder ?? "an adder"}: ${e.fail ?? "no cause recorded"}`).join("; ") };
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// The evidence stamps on the cards. At each seam the driver demotes a "verified from record" stamp that the reading
|
|
322
|
+
// log cannot back. A demotion it could not write leaves that stamp standing, and its record says how many; a
|
|
323
|
+
// derivation that threw checked none of them. Both leave the cards claiming records they cannot show, so they are
|
|
324
|
+
// the official records' line. A later derivation that wrote every demotion clears both.
|
|
325
|
+
function evidenceStamps(runDir, log) {
|
|
326
|
+
const threw = failedStep(log, "basis-derivation", "basis-derivation-failed");
|
|
327
|
+
let record = null;
|
|
328
|
+
try { record = JSON.parse(readFileSync(driverDir(runDir, "basis-derivation.json"), "utf8")); } catch { record = null; }
|
|
329
|
+
const standing = threw ? 0 : Number(record?.unwritable) || 0;
|
|
330
|
+
if (!threw && !standing) return null;
|
|
331
|
+
return { part: "evidence-stamps", name: RULED_WORDS.officialRecords, reason: NOT_COMPLETED,
|
|
332
|
+
cause: threw ? `the check of the cards' evidence stamps failed: ${threw.fail ?? "no cause recorded"}`
|
|
333
|
+
: `${standing} verified-from-record stamp(s) the reading log cannot back could not be demoted` };
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const CHECKS = [assessment, overview, courtDecisions, searchLog, register, localLanguage, findingCards, checks, officialRecords,
|
|
337
|
+
coverageRows, evidenceStamps];
|
|
277
338
|
|
|
278
339
|
/**
|
|
279
340
|
* Every part of this clearance run that failed and still ships, read from the run directory as it stands
|
|
@@ -417,7 +478,7 @@ export function mergeDegradedRows(...lists) {
|
|
|
417
478
|
// The listing of filings and the owner lookups each end in one run-log event, a success or a failure, and
|
|
418
479
|
// the last of the pair is the step's state at delivery, so a resume that succeeded clears it. The
|
|
419
480
|
// plain-language review logs its outcome; the three that ship the rater's wording unreviewed are failures.
|
|
420
|
-
const REVIEW_FAILED = ["stage-failed", "artifact-unreadable", "rewrite-refused-by-the-merged-gate"];
|
|
481
|
+
const REVIEW_FAILED = ["stage-failed", "artifact-unreadable", "rewrite-refused-by-the-merged-gate", "correction-failed", "correction-refused-by-the-merged-gate", "correction-moved-what-no-defect-named", "recheck-failed"];
|
|
421
482
|
|
|
422
483
|
/** Which of the knockout's whole steps ended failed, each with its raw cause for the run's record. */
|
|
423
484
|
export function knockoutStepFailures(runDir) {
|
|
@@ -425,10 +486,13 @@ export function knockoutStepFailures(runDir) {
|
|
|
425
486
|
const listing = lastEvent(log, ["knockout-register-records", "knockout-register-records-refused", "knockout-register-records-failed"]);
|
|
426
487
|
const owners = failedStep(log, "knockout-owner-checks", "knockout-owner-checks-failed");
|
|
427
488
|
const review = lastEvent(log, ["knockout-review"]);
|
|
489
|
+
const reading = lastEvent(log, ["knockout-register-read", "knockout-register-read-failed"]);
|
|
428
490
|
const cause = (e) => String(e?.cause ?? e?.reason ?? e?.outcome ?? e?.event ?? "no cause recorded");
|
|
429
491
|
return {
|
|
430
492
|
listing: listing?.event === "knockout-register-records-failed" ? { reason: reasonFor(cause(listing)), cause: cause(listing) } : null,
|
|
431
493
|
ownerChecks: owners ? { reason: reasonFor(cause(owners)), cause: cause(owners) } : null,
|
|
494
|
+
// The reading step failed and the run carried what it held: the questions it had not asked never ran.
|
|
495
|
+
reading: reading?.event === "knockout-register-read-failed" ? { reason: reasonFor(cause(reading)), cause: cause(reading) } : null,
|
|
432
496
|
review: REVIEW_FAILED.includes(review?.outcome) ? { reason: reasonFor(cause(review)), cause: `${review.outcome}: ${cause({ reason: review.reason })}` } : null,
|
|
433
497
|
};
|
|
434
498
|
}
|
package/driver/dev-portal.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// dev-portal.mjs — the DEV-INSTANCE UI portal (docs/E2E.md Tier 1).
|
|
4
4
|
//
|
|
5
5
|
// THIS IS NOT THE PRODUCT, AND IT IS NOT HOW YOU START IT. If you arrived here looking for the way to
|
|
6
|
-
// run this system on one machine, the answer is `npm start` (bin/start.mjs, INSTALL.md §
|
|
6
|
+
// run this system on one machine, the answer is `npm start` (bin/start.mjs, INSTALL.md §5): the real
|
|
7
7
|
// portal with a real sign-in, and a Start button that works. This file is a loopback pool browser and
|
|
8
8
|
// dev cockpit for people working ON the engine — its name is accurate and its security note below is
|
|
9
9
|
// meant literally.
|
package/driver/digest-queue.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// the stage-freshness staleness contract, so the cascade multiplies.
|
|
12
12
|
//
|
|
13
13
|
// THE DESIGN (owner-approved): the queue is the ONLY path to a non-fresh re-digest. Mechanisms keep
|
|
14
|
-
// their own cheap unit-level work (
|
|
14
|
+
// their own cheap unit-level work (unit followups, driver code-fetches) but stop calling the
|
|
15
15
|
// digest themselves — they MINT durable queue items instead, and the digest reconciles queued items
|
|
16
16
|
// at defined settlement points: ONCE before synthesis, plus at most one bounded late flush for
|
|
17
17
|
// post-synthesis triggers. Receipts survive resume: an item's receiptKey is minted at most once for
|
|
@@ -119,9 +119,9 @@ export function markFlushed(queue, ids, flushedAt) {
|
|
|
119
119
|
// it. Today the correction fires late; queued, it would never fire at all. `markFlushed` receipts
|
|
120
120
|
// only the items captured BEFORE the pass, so the orphan would sit pending and silent.
|
|
121
121
|
// 2. IT IS NOT THE COST THE FUNNEL BOUNDS. The funnel exists to stop N cold opus passes each
|
|
122
|
-
// invalidating the back half. Reconcile sends a
|
|
123
|
-
// (`sessionKey: r.sessionKey`)
|
|
124
|
-
// exempts for escalation/envelope/screen-gate, not the
|
|
122
|
+
// invalidating the back half. Reconcile sends a followup on the digest's own key
|
|
123
|
+
// (`sessionKey: r.sessionKey`), a fresh session doing scoped unit-level work: the same class the header
|
|
124
|
+
// already exempts for escalation/envelope/screen-gate, not the full pass it forbids.
|
|
125
125
|
// 3. ITS DURABILITY IS SOLVED ELSEWHERE, NOT MISSING. A queued item survives a crash; so does this,
|
|
126
126
|
// by a different mechanism — the followup receipt rides the recall-reconciliation artifact
|
|
127
127
|
// (`carryRecallFollowup`), bounded per unended-set signature by RECALL_FOLLOWUP_MAX, and the
|
|
@@ -153,7 +153,7 @@ export const DIGEST_OWN_PASS_EXEMPTIONS = Object.freeze([
|
|
|
153
153
|
|
|
154
154
|
// ── the consolidated settlement followup ───────────────────────────────────────────────────────────
|
|
155
155
|
|
|
156
|
-
// The standard digest
|
|
156
|
+
// The standard digest preamble every re-digest followup opens with (verbatim from the legacy
|
|
157
157
|
// escalation/envelope/frame-reopen followups — shared so the OFF path stays byte-identical).
|
|
158
158
|
export const DIGEST_RESUME_PREAMBLE =
|
|
159
159
|
"This is a fresh session: your earlier register-digest work is not in your context, and the unit files are among the inputs listed below. Your prior digest is the findings file named below. Do NOT redo it from scratch.";
|