clearotron 0.5.0-beta.8 → 0.5.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 +2 -1
- package/INSTALL.md +4 -3
- package/QUICKSTART.md +78 -0
- package/bin/onboard.mjs +9 -4
- package/build-info.json +2 -2
- package/docs/releases/0.5.0.md +77 -0
- package/driver/CHANGELOG.md +103 -0
- package/driver/contract-vocabulary.mjs +3 -3
- package/driver/corrections-delivered.mjs +7 -5
- package/driver/corrections-feedforward.mjs +89 -3
- package/driver/coverage-form.mjs +61 -2
- package/driver/degraded-parts.mjs +4 -0
- package/driver/engine/mcp/band-server.mjs +16 -6
- package/driver/engine/openai-agent.mjs +24 -1
- package/driver/engine/probe.mjs +64 -9
- package/driver/goods-evidence.mjs +33 -6
- package/driver/narrative-refutation-record.mjs +17 -2
- package/driver/package.json +1 -1
- package/driver/pipeline.mjs +373 -38
- package/driver/predelivery-lint.mjs +160 -10
- package/driver/publish/index.mjs +2 -2
- package/driver/record-fold.mjs +17 -0
- package/driver/record-goods.mjs +24 -8
- package/driver/register-plan.mjs +8 -3
- package/driver/repair-composers.mjs +61 -7
- package/driver/saved-register-pages.mjs +144 -0
- package/driver/stage-context.mjs +4 -0
- package/driver/suite-census.json +122 -14
- package/driver/terminal-clamp.mjs +21 -0
- package/driver/verify.mjs +6 -3
- package/mcp-server/CHANGELOG.md +12 -0
- package/mcp-server/package.json +1 -1
- package/package.json +2 -1
- package/portal-ui/package.json +1 -1
- package/providers/oauth-mcp-bridge/CHANGELOG.md +12 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/providers/signa/src/core.js +18 -4
- package/scripts/e2e-first-time.mjs +10 -6
- package/scripts/release-duplicate-notes.mjs +5 -0
package/.env.example
CHANGED
|
@@ -109,7 +109,8 @@ CLEAROTRON_TOOL_ANSWER_BYTES=
|
|
|
109
109
|
# Runtime-injected — do NOT set this by hand. The driver sets it to 1 in the band tool server's env for the
|
|
110
110
|
# placement step alone (driver/stages.mjs GROUP_READING_STAGES): that step is offered band_lookup's group
|
|
111
111
|
# filter and reads the band shape with the orders written for it. Every other step is served both without
|
|
112
|
-
# them.
|
|
112
|
+
# them. Leave it empty: a stage's program starts with a listed environment that does not carry this name,
|
|
113
|
+
# so a value set here reaches no tool server.
|
|
113
114
|
# effect: silent-output-change
|
|
114
115
|
# CLEAROTRON_BAND_GROUPS=
|
|
115
116
|
|
package/INSTALL.md
CHANGED
|
@@ -905,9 +905,10 @@ that proves the caller and passes the identity through. Which door runs and what
|
|
|
905
905
|
once in [docs/SECURITY.md](docs/SECURITY.md); the procedure for standing the second one up, with a
|
|
906
906
|
worked example, is [docs/PORTAL.md](docs/PORTAL.md#putting-your-own-login-provider-in-front).
|
|
907
907
|
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
`PORTAL_AUTH_MODE
|
|
908
|
+
**`clearotron start` always runs the local door,** and refuses to start if `PORTAL_AUTH_MODE` names
|
|
909
|
+
another one. Where you run the portal service yourself, without `clearotron start`, an unset
|
|
910
|
+
`PORTAL_AUTH_MODE` selects auth-proxy, and the portal refuses to start without an issuer. Set
|
|
911
|
+
`PORTAL_AUTH_MODE=local` there if you want the local door.
|
|
911
912
|
|
|
912
913
|
### It drains its own queue
|
|
913
914
|
|
package/QUICKSTART.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Quickstart
|
|
2
|
+
|
|
3
|
+
A first clearance in three commands, sized in minutes. [INSTALL.md](INSTALL.md) is the reference for
|
|
4
|
+
everything this page leaves out.
|
|
5
|
+
|
|
6
|
+
## Before you start
|
|
7
|
+
|
|
8
|
+
Three self-serve accounts. Each is yours, signed in on your own machine — this product holds no keys
|
|
9
|
+
of its own and calls nothing on your behalf.
|
|
10
|
+
|
|
11
|
+
| What | Why | Where |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| A reasoning program | Every stage runs as a headless turn of it | [Claude Code](https://claude.com/claude-code) (`claude`) or the Codex CLI (`codex`). Setup installs it if the machine has none. Sign in with the program setup installed (doctor prints its path), or with `claude` or `codex login` if the machine has its own |
|
|
14
|
+
| A register | Sets what the search reaches, and what it costs | [Signa](https://signa.so) — one key, self-serve, US + EU + WIPO and ten more offices |
|
|
15
|
+
| Web research | Covers the open web and the marketplaces | [Perplexity](https://www.perplexity.ai) |
|
|
16
|
+
|
|
17
|
+
The register is the one with a real choice in it. EUIPO and a local USPTO index cost nothing and
|
|
18
|
+
reach one office each; Signa is the recommended paid route and the fastest to a real clearance.
|
|
19
|
+
[The six, and what each reaches](providers/README.md).
|
|
20
|
+
|
|
21
|
+
**macOS, Linux or Windows.** On Windows everything runs natively in PowerShell, with no WSL2, no Git and no
|
|
22
|
+
administrator rights: `npm install --global clearotron`, then `clearotron install`, which installs the AI
|
|
23
|
+
program you choose into your own user folder. On Windows and macOS Clearotron runs in the window you start
|
|
24
|
+
it from, and closing the window stops it.
|
|
25
|
+
|
|
26
|
+
[INSTALL.md](INSTALL.md) §1 has the exact version floor and why it is one.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx clearotron install # offers to install the reasoning program if the machine has none, and shows you how to sign it in
|
|
32
|
+
clearotron doctor --probe-engine
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`install` puts the program under `~/.local` and needs no root, and every command after it here uses the
|
|
36
|
+
`clearotron` it installed. If `~/.local/bin` is not on your `PATH` yet, type `~/.local/bin/clearotron`. Installing with npm's own global form
|
|
37
|
+
instead is covered in [INSTALL.md](INSTALL.md) §2.
|
|
38
|
+
|
|
39
|
+
`doctor` is the one to read. It checks that the reasoning program is there, on `PATH` or as the copy
|
|
40
|
+
setup installed; that it is signed in, by running a turn rather than by finding the executable; and
|
|
41
|
+
that your register credential resolves. An executable that is signed out passes every other check and
|
|
42
|
+
fails at the first stage.
|
|
43
|
+
|
|
44
|
+
## Run one
|
|
45
|
+
|
|
46
|
+
Write `job.json`:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"id": "job-2026-0001",
|
|
51
|
+
"forwarder": "alex",
|
|
52
|
+
"forwarderEmail": "alex@example.com",
|
|
53
|
+
"marks": [{ "ref": "TM-0001", "name": "IRONWHISK", "classes": [9, 42] }],
|
|
54
|
+
"goods": "cloud software for weather analytics",
|
|
55
|
+
"jurisdictions": ["US"],
|
|
56
|
+
"product": "knockout-search"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
clearotron run --job job.json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Name `product`.** It orders a knockout search: the cheapest of the four and the fastest way to
|
|
65
|
+
prove the install works. Delete that line and the territories decide instead — and one country gives
|
|
66
|
+
you a full country search, the deepest of the four, with case law on. Narrowing the scope orders
|
|
67
|
+
**more** work, not less.
|
|
68
|
+
|
|
69
|
+
**A knockout search takes 5 to 10 minutes. The other three take 1.5 to 2.5 hours.** Every finished
|
|
70
|
+
stage stays on disk, so a run survives interruption and a resume re-runs only what is missing.
|
|
71
|
+
|
|
72
|
+
## Then
|
|
73
|
+
|
|
74
|
+
- See it before you buy anything: `npx clearotron demo` replays a finished clearance with no account, no
|
|
75
|
+
key and no network.
|
|
76
|
+
- The four searches, and what each reaches: [README.md](README.md).
|
|
77
|
+
- Everything else — configuration, the config store, the portal, access control:
|
|
78
|
+
[INSTALL.md](INSTALL.md).
|
package/bin/onboard.mjs
CHANGED
|
@@ -1542,17 +1542,22 @@ export async function runCheck() {
|
|
|
1542
1542
|
warn(couldNotDetermine("CLEAROTRON_BOX", unitEnv));
|
|
1543
1543
|
} else {
|
|
1544
1544
|
const raw = (boxFileEnv?.CLEAROTRON_BOX ?? "").trim();
|
|
1545
|
+
// THE ACCEPTED NAMES ARE NEVER PRINTED. They are the names of the deployments this build was made for,
|
|
1546
|
+
// and the line offered them to a newcomer to name their own machine after (measured on a fresh install
|
|
1547
|
+
// of a beta, 2026-11-03). An install without units says nothing of an unset name: nothing there reads
|
|
1548
|
+
// it. Installed units are warned, because the services read it, and `start --background` installs the
|
|
1549
|
+
// same units a hosted deployment runs, from the same renderer, so nothing here can tell the two apart.
|
|
1545
1550
|
if (!raw) {
|
|
1546
1551
|
// AN ABSENCE IS NOT A MISCONFIGURATION, and this command already separates the two — a machine
|
|
1547
1552
|
// nobody has configured yet has no box, legitimately, and `--check` on one exits 0 by contract.
|
|
1548
1553
|
// Reported at `!` so it is visible rather than silent, which is the whole requirement; raising it
|
|
1549
1554
|
// to `✗` made every unconfigured machine fail its own acceptance arm, and said "fault" about a
|
|
1550
1555
|
// state that is the normal beginning of an install.
|
|
1551
|
-
warn(`no CLEAROTRON_BOX in ${boxSource} — this deployment does not name itself, so nothing below `
|
|
1552
|
-
+
|
|
1556
|
+
if (hosted) warn(`no CLEAROTRON_BOX in ${boxSource} — this deployment does not name itself, so nothing below `
|
|
1557
|
+
+ "can be read as a statement about a particular box");
|
|
1553
1558
|
} else if (!DEPLOYMENT_BOXES.includes(raw)) {
|
|
1554
|
-
problem(`CLEAROTRON_BOX is "${raw}" in ${boxSource}, which is not a box this build knows `
|
|
1555
|
-
+ `
|
|
1559
|
+
problem(`CLEAROTRON_BOX is "${raw}" in ${boxSource}, which is not a box this build knows. `
|
|
1560
|
+
+ `An unrecognised name reads as NO box everywhere it is `
|
|
1556
1561
|
+ "consulted, which is quieter than a wrong one and just as wrong");
|
|
1557
1562
|
} else {
|
|
1558
1563
|
ok(`this box names itself "${raw}", from ${boxSource}`);
|
package/build-info.json
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
|
|
4
|
+
# 0.5.0 — what was checked before it was published
|
|
5
|
+
|
|
6
|
+
Tested on both engines: Claude, with Opus, Sonnet and Haiku 5.5, and OpenAI's Codex, with GPT-6.1 Sol,
|
|
7
|
+
GPT-6.1 Terra and GPT-6 Luna.
|
|
8
|
+
|
|
9
|
+
A stable version is published only after a beta has run a real clearance end to end and has been
|
|
10
|
+
installed from scratch by somebody who had not used the product before. This is that record for 0.5.0.
|
|
11
|
+
It names what was run and who ran it by role and date, never by name, and it carries no mark and no
|
|
12
|
+
party to a search.
|
|
13
|
+
|
|
14
|
+
## The beta it was cut from
|
|
15
|
+
|
|
16
|
+
0.5.0 was cut from 0.5.0-beta.10, which was published to the beta channel on 4 November 2026 from commit
|
|
17
|
+
`f3353125` and installed on the staging deployment before this stable was cut.
|
|
18
|
+
|
|
19
|
+
| | |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Candidate | `clearotron@0.5.0-beta.10` |
|
|
22
|
+
| Commit | `f3353125c597a723ebb03ac628c3113230408558` |
|
|
23
|
+
| Registry integrity | `sha512-QWL2n8+j0rob2jxeVF4v4EsViXerIRfrBQ+w3QMLMPqiFcNeK8fkDHOulWlUVWnKoHLvkDvtZVDcBeCUkxDluw==` |
|
|
24
|
+
|
|
25
|
+
## A real clearance, end to end
|
|
26
|
+
|
|
27
|
+
On 4 November 2026 the product's owner ran a full worldwide preliminary clearance in four classes against
|
|
28
|
+
Clarivate's live register service, on 0.5.0-beta.9 (commit `a133cbb3`), with OpenAI's Codex doing the
|
|
29
|
+
reasoning on GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna. It ran to a delivered report 54 minutes 56 seconds
|
|
30
|
+
after it started, and the owner reviewed that report as delivered.
|
|
31
|
+
|
|
32
|
+
0.5.0-beta.10 differs from beta.9 by the fixes in this version's notes. On 4 November 2026 the product's test
|
|
33
|
+
team ran a smaller live clearance on beta.10, with the same engine and register service: a knockout search of
|
|
34
|
+
two marks, in one class and one territory. It ran to a delivered report 7 minutes 42 seconds after it started.
|
|
35
|
+
|
|
36
|
+
## Installs from scratch
|
|
37
|
+
|
|
38
|
+
- **Install as a new user, on beta.9.** On 3 November 2026, on 0.5.0-beta.9, a tester with no prior
|
|
39
|
+
knowledge of the product installed the published beta as a new user on a Linux machine, following only
|
|
40
|
+
the public instructions, signed in to nothing and making no paid call. The demo, setup, `doctor` and the
|
|
41
|
+
local portal all ran. In a second fresh install, setup's test of the AI program, run before signing in,
|
|
42
|
+
spent nothing on either engine and named the command that signs the program in. The tester found
|
|
43
|
+
fourteen places where the install documents and the program disagree. Three are fixed in beta.10: the
|
|
44
|
+
quickstart guide now ships, `doctor` no longer suggests deployment names, and the install guide says
|
|
45
|
+
which sign-in `clearotron start` runs. The rest are left for 0.5.1.
|
|
46
|
+
- **Install as a new user, on beta.10.** On 4 November 2026, on 0.5.0-beta.10 (commit `f3353125`), a second
|
|
47
|
+
tester with no prior knowledge of the product repeated the install on the same Linux machine, again from
|
|
48
|
+
the public instructions only, signed in to nothing and making no paid call. The demo, setup, `doctor` and the
|
|
49
|
+
local portal all ran, and the three fixes held. Following the quickstart guide, the tester started a search
|
|
50
|
+
with no register chosen: instead of refusing, it was set aside to retry, and the reason was written only in
|
|
51
|
+
the run's own files. That is left for 0.5.1, with the remaining places where the documents and the program
|
|
52
|
+
disagree.
|
|
53
|
+
- **macOS.** An automated job packs the candidate's own bytes, installs them for a user with nothing
|
|
54
|
+
installed, and runs `doctor` and the demo. The release runs it on this stable's bytes before publishing
|
|
55
|
+
them.
|
|
56
|
+
|
|
57
|
+
## Known limits
|
|
58
|
+
|
|
59
|
+
These are known and stated, so that nothing in this record is read wider than it was checked.
|
|
60
|
+
|
|
61
|
+
- No overall gain in report quality or speed is measured for this version, and the clearance above was
|
|
62
|
+
reviewed as delivered, with no independent legal check.
|
|
63
|
+
- The fixes to the report's summary and to the goods a finding cites are proved on saved clearances only.
|
|
64
|
+
- These have not run live on this version: a full preliminary clearance in a single territory, the
|
|
65
|
+
case-law step, the reuse of saved answers, and a search Clarivate refuses.
|
|
66
|
+
- On a crowded search at Clarivate, some register records are counted without being read; the report shows
|
|
67
|
+
this only as coverage limited.
|
|
68
|
+
- At Clarivate, an exact phrase containing AND, OR or NOT is not searched, and the report says so.
|
|
69
|
+
- On one test clearance on Claude, the engine asked five times for a tool it is not given, and each
|
|
70
|
+
request was refused.
|
|
71
|
+
- The repair of a goods claim before delivery can miss other wording, and the writer can leave a finding
|
|
72
|
+
unchanged.
|
|
73
|
+
|
|
74
|
+
## Between the beta and the stable
|
|
75
|
+
|
|
76
|
+
The code is the code 0.5.0-beta.10 shipped. The commits between that beta and this stable change nothing the
|
|
77
|
+
product does: they add this record, reword 25 release notes, and set the version numbers and changelogs.
|
package/driver/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,108 @@
|
|
|
1
1
|
# clearotron-driver
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Fixed: Faults the final checks find in a finding's own summary sentence, a short entry, or a grouped line are now corrected before delivery. Before, they shipped as found.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Fixed: The delivery email for a result the review could not sign off now lists the report's "Only you can close these" items.
|
|
12
|
+
- Fixed: A clearance on the Signa register no longer loses searches to a brief rate limit; it waits as long as the register asks and searches again.
|
|
13
|
+
- Fixed: A clearance on the Claude engine no longer stops with a false "not signed in" message before the search begins, while the Claude sign-in is being renewed.
|
|
14
|
+
- Fixed: On the Codex engine, a clearance no longer sees temporary files that another clearance left on the same machine.
|
|
15
|
+
- Fixed: A report's copy for the client is no longer held back when a live finding shares its mark and owner with a finding the review withdrew.
|
|
16
|
+
- Fixed: A clearance on the Codex engine no longer stops as if signed out when the Codex sign-in fails to renew for a moment.
|
|
17
|
+
- Fixed: The engine's strongest model now decides whether a wider register search is worth running, so a conflict only a wider search finds is less likely to be skipped.
|
|
18
|
+
- Fixed: Reports no longer show "Nothing found" in "Where it stands" for a country the register could not search; that country is left out.
|
|
19
|
+
- Fixed: A search with more similar marks than can be read now narrows step by step, and stops once the lists it has read answer it.
|
|
20
|
+
- Fixed: A record whose register lookup failed or came back empty no longer counts as retrieved; the clearance fetches the record again, or says it could not.
|
|
21
|
+
- Fixed: When a register search fails, the report's coverage still lists the other crowded searches whose results were not all read, instead of leaving them out.
|
|
22
|
+
- Fixed: When a clearance fails, its chat notice now goes to the person who asked for it, with a copy to the operator.
|
|
23
|
+
- Fixed: A finding added by a late correction now appears with its own card in the delivered report.
|
|
24
|
+
- Fixed: A finding registered in several countries now shows under each of them in "Where it stands". Before, only its first country showed it, and the others could read "Nothing found".
|
|
25
|
+
- Fixed: A clearance no longer repeats a finished step because a web lookup inside it timed out.
|
|
26
|
+
- Fixed: When a report groups filings of one conflict into one finding, the final checks now ask for a wrong goods claim to be corrected in the text the finding shows.
|
|
27
|
+
- Fixed: When a repeated search re-ranks register records after the report is written, the report now says how many and makes a clear result conditional; the audit trail gives their final ranking.
|
|
28
|
+
- Fixed: A report no longer counts a main market as read in a crowded search when the narrower search by goods left that market's register out.
|
|
29
|
+
- Fixed: The audit workbook no longer calls a name an unidentified party when the report identifies it, or when it is a territory such as the UAE.
|
|
30
|
+
- Fixed: The audit workbook no longer says that a machine check on the report did not pass when no check had failed.
|
|
31
|
+
- Fixed: The audit workbook no longer records a correction as checked when the review after it did not complete, and shows that review as not completed.
|
|
32
|
+
- Fixed: The report and the audit workbook now say a record was "retrieved from the register" rather than "read". The workbook's summary explains what that means.
|
|
33
|
+
- Fixed: A search the register refused is now recorded with the register's own reason, and a search the engine itself declined to send is no longer reported as a register error.
|
|
34
|
+
- Fixed: A register record the engine decided to keep as background now appears in the report's context table, instead of being left out of it.
|
|
35
|
+
- Fixed: A clearance whose register search cannot finish, such as one that keeps timing out, now delivers its report instead of ending with none.
|
|
36
|
+
- Fixed: A clearance repaired after a failure now keeps the original order, including who sent it and their instructions, instead of rebuilding a partial one.
|
|
37
|
+
- Fixed: A clearance that resumes after a pause is now held to the same standard as one that never paused: a live registration identical or near-identical to the mark makes its result conditional, and the report says so, only when the report it delivers leaves that registration unaddressed.
|
|
38
|
+
- Fixed: A clearance resumed after an interruption now searches the territories the order named, not the account's default markets.
|
|
39
|
+
- Fixed: A search that cannot be shown to have run is now listed as not searched, and the report is still delivered.
|
|
40
|
+
- Fixed: When the search for an owner's use of a mark could not run, the report no longer says that search found nothing.
|
|
41
|
+
- Fixed: A conflict the review sends back for correction can now be reported as a finding; the correction could previously change only findings already in the report.
|
|
42
|
+
- Fixed: A register record the engine placed on the watchlist now appears in the audit trail with its reason, instead of being left out.
|
|
43
|
+
- Fixed: A wider register search is no longer set aside because a narrower search returned a short list; the engine now weighs what each waiting search could add to the advice and records the reason for each.
|
|
44
|
+
- Fixed: A citation of a finding the review withdrew, in the report's summary panel or methodology, is now sent back for correction before delivery.
|
|
45
|
+
- Fixed: A result made conditional only by legal steps that a later correction withdraws now reads clear again, once the review of that correction accepts it and nothing else is outstanding.
|
|
46
|
+
- Fixed: A result is no longer held at conditional because a wider search that was rightly withheld was asked for again; such a result can now read clear, and its goods category reads as searched.
|
|
47
|
+
- Fixed: A crowded search already answered by the lists read so far no longer appears among the report's coverage limits; its count is still recorded.
|
|
48
|
+
- Fixed: When the report's writing step is interrupted, the next attempt continues from the findings it had already finished instead of starting again.
|
|
49
|
+
- Fixed: An overview that cites a finding no longer in the report is now sent back for correction before delivery, and flagged for the reviewing lawyer if the citation remains.
|
|
50
|
+
- Fixed: Reports can set aside an identical mark registered for unrelated goods, recording the reason in the audit workbook instead of listing it as a finding.
|
|
51
|
+
- Fixed: A clearance that searched common law or the United Kingdom is no longer flagged as claiming a search it did not run.
|
|
52
|
+
- Fixed: A report's list of conditions now shows each legal step as the last correction before delivery left the step, not as first written.
|
|
53
|
+
- Fixed: `clearotron doctor` no longer suggests deployment names to copy, and no longer warns about an unset one on a machine that runs no services.
|
|
54
|
+
- Fixed: The audit workbook no longer lists the same open search twice, once in the report's words and once as a follow-up row with a shortened title.
|
|
55
|
+
- New: A clearance now stops running follow-up searches after 120, and delivers its report with what it has read.
|
|
56
|
+
- Fixed: Knockout ratings now weigh the earlier filings found for the mark itself, and a clearance's register review now follows the ranking of results made before it, so some ratings change.
|
|
57
|
+
- Fixed: Knockout reports no longer carry two standing caveats. The caveat on a conditional result stays.
|
|
58
|
+
- Fixed: A resumed clearance no longer shows the false line "A machine check on the report did not pass".
|
|
59
|
+
- Fixed: A register record that a repeated search finds after the results were ranked is now ranked and reviewed before the report is written. If that cannot be done, the report is still delivered, and it counts the record among those left open. Before, such a record could be left out of the ranking, the review, and the report.
|
|
60
|
+
- Fixed: A clearance no longer stops without a report when register records it retrieved are still unaddressed at the end; the report is delivered, states once how many remain unaddressed, and makes a clear result conditional.
|
|
61
|
+
- Fixed: The reviewing lawyer's open questions no longer say a coverage line was removed when a correction gave it the new title the review asked for.
|
|
62
|
+
- New: Searches now also use OpenAI's GPT-6.1 Terra.
|
|
63
|
+
- For operators: On the Signa register, follow-up searches now send spellings as lists, so a clearance makes fewer requests.
|
|
64
|
+
- Fixed: Searches on the Signa register now ask for each goods statement in full, so a report weighs an owner's whole goods rather than the first 280 characters.
|
|
65
|
+
- New: Searches on the Signa register now reach Spain and Mexico, so an order naming either country is searched there rather than reported as not covered.
|
|
66
|
+
- For operators: When a client door is not up, `clearotron start` now says why, and that the portal and the engine door are unaffected.
|
|
67
|
+
- Fixed: When a late correction adds, changes, or withdraws a finding, the answers in the report's summary panel are now checked against that finding and updated where they rest on it.
|
|
68
|
+
- Fixed: The Audit Trail now says in plain words why a search was not carried out.
|
|
69
|
+
- Fixed: After a late correction, the Audit Trail delivered with the report is rebuilt to match the corrected result, open questions included; if the Audit Trail cannot be rebuilt, the earlier one is withheld, and the audit workbook is still built from the current findings.
|
|
70
|
+
- Fixed: The Audit Trail now lists each register record set aside while the results were ranked, with the reason given.
|
|
71
|
+
- Fixed: The install guide now says that `clearotron start` uses the passphrase sign-in. It no longer says that the command refuses to start without a sign-in provider.
|
|
72
|
+
- Fixed: The package now includes the quickstart guide that the README and the install guide link to.
|
|
73
|
+
- Fixed: On a crowded field, the report is written from the work the clearance has already done, without reading every register record again.
|
|
74
|
+
- Fixed: The lawyer's report now says why a search was not carried out: the register refused it for the day and a later clearance can repeat it, or the register cannot run that kind of search at all.
|
|
75
|
+
- Fixed: The review now sees every conflict set aside while the report was written, with the reason given, and can send one back for correction.
|
|
76
|
+
- Fixed: When two parties use the same name without a registration, the report keeps a finding for each, instead of keeping only the last one saved.
|
|
77
|
+
- Fixed: For a European Union order, the audit workbook now names every national register that was not searched, instead of only the first few.
|
|
78
|
+
|
|
79
|
+
## 0.5.0-beta.10
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Fixed: When a report groups filings of one conflict into one finding, the final checks now ask for a wrong goods claim to be corrected in the text the finding shows.
|
|
84
|
+
- Fixed: A report no longer counts a main market as read in a crowded search when the narrower search by goods left that market's register out.
|
|
85
|
+
- Fixed: The audit workbook no longer calls a name an unidentified party when the report identifies it, or when it is a territory such as the UAE.
|
|
86
|
+
- Fixed: The audit workbook no longer says that a machine check on the report did not pass when no check had failed.
|
|
87
|
+
- Fixed: The audit workbook no longer records a correction as checked when the review after it did not complete, and shows that review as not completed.
|
|
88
|
+
- Fixed: A result made conditional only by legal steps that a later correction withdraws now reads clear again, once the review of that correction accepts it and nothing else is outstanding.
|
|
89
|
+
- Fixed: `clearotron doctor` no longer suggests deployment names to copy, and no longer warns about an unset one on a machine that runs no services.
|
|
90
|
+
- Fixed: The install guide now says that `clearotron start` uses the passphrase sign-in. It no longer says that the command refuses to start without a sign-in provider.
|
|
91
|
+
- Fixed: The package now includes the quickstart guide that the README and the install guide link to.
|
|
92
|
+
|
|
93
|
+
## 0.5.0-beta.9
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- Fixed: A clearance on the Claude engine no longer stops with a false "not signed in" message before the search begins, while the Claude sign-in is being renewed.
|
|
98
|
+
- Fixed: A clearance on the Codex engine no longer stops as if signed out when the Codex sign-in fails to renew for a moment.
|
|
99
|
+
- Fixed: A report's list of conditions now shows each legal step as the last correction before delivery left the step, not as first written.
|
|
100
|
+
- Fixed: The audit workbook no longer lists the same open search twice, once in the report's words and once as a follow-up row with a shortened title.
|
|
101
|
+
- Fixed: The reviewing lawyer's open questions no longer say a coverage line was removed when a correction gave it the new title the review asked for.
|
|
102
|
+
- Fixed: Searches on the Signa register now ask for each goods statement in full, so a report weighs an owner's whole goods rather than the first 280 characters.
|
|
103
|
+
- Fixed: When a late correction adds, changes, or withdraws a finding, the answers in the report's summary panel are now checked against that finding and updated where they rest on it.
|
|
104
|
+
- Fixed: For a European Union order, the audit workbook now names every national register that was not searched, instead of only the first few.
|
|
105
|
+
|
|
3
106
|
## 0.5.0-beta.8
|
|
4
107
|
|
|
5
108
|
### Patch Changes
|
|
@@ -530,9 +530,9 @@ export const INNER_CODES = Object.freeze([
|
|
|
530
530
|
// ONE CODE, TWO TOKENS, and the split is by `cause` rather than by code: verify.mjs peels the
|
|
531
531
|
// `axis_invalid` cause into its own family before counting the rest. A ruling naming only
|
|
532
532
|
// `coverage_no_status` would be true of most `no_status` records and false of the ones that matter most.
|
|
533
|
-
{ code: "no_status", mints: ["driver/coverage-form.mjs:
|
|
533
|
+
{ code: "no_status", mints: ["driver/coverage-form.mjs:998"], rollsUpTo: ["coverage_no_status", "coverage_form_axis_invalid"],
|
|
534
534
|
why: "Two composites, split on the record's `cause`: coverageFormFail() in verify.mjs for cause `axis_invalid`, and the same function for the rest. NOT the `@returns` annotation of findCoverageFormViolations() in coverage-form.mjs — that is the annotation, not the mint." },
|
|
535
|
-
{ code: "engine_vocabulary", mints: ["driver/coverage-form.mjs:
|
|
535
|
+
{ code: "engine_vocabulary", mints: ["driver/coverage-form.mjs:988"], rollsUpTo: ["coverage_form_engine_vocabulary"],
|
|
536
536
|
why: "#669 — the seat wrote an engine token into the `reason` sentence that reaches the reader's page. Checked on settled rows too, because a row the seat considers finished is exactly the one whose sentence gets printed. Namespaced by coverageFormFail() in verify.mjs; the bare code names a row, never a stage." },
|
|
537
537
|
|
|
538
538
|
// ── ONE CODE, TWO MODULES ────────────────────────────────────────────────────────────────────────
|
|
@@ -544,7 +544,7 @@ export const INNER_CODES = Object.freeze([
|
|
|
544
544
|
// failure tokens" already states the rule this row records: `coverage_form_damaged`, never a bare
|
|
545
545
|
// `form_damaged`.
|
|
546
546
|
{ code: "form_damaged",
|
|
547
|
-
mints: ["driver/connotation-search.mjs:2002", "driver/connotation-search.mjs:2078", "driver/coverage-form.mjs:
|
|
547
|
+
mints: ["driver/connotation-search.mjs:2002", "driver/connotation-search.mjs:2078", "driver/coverage-form.mjs:980"],
|
|
548
548
|
rollsUpTo: ["connotation_form_damaged", "coverage_form_damaged"],
|
|
549
549
|
why: "Minted in two lanes and namespaced per lane: connotationDispositionFail() in verify.mjs for the meaning sweep, coverageFormFail() in verify.mjs for the register digest. The namespacing is what keeps them apart — see verify.mjs's block headed \"the register coverage-form failure tokens\"." },
|
|
550
550
|
]);
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
// finding has a card is the assembly's choice, not the correction's fate.
|
|
30
30
|
//
|
|
31
31
|
// PURE — no node imports. The pipeline reads and writes the files.
|
|
32
|
-
import { reportLines, linesOf } from "./corrections-feedforward.mjs";
|
|
32
|
+
import { reportLines, linesOf, renamedAs } from "./corrections-feedforward.mjs";
|
|
33
33
|
|
|
34
34
|
/** The finding fields a correction can change that a report prints from the record. */
|
|
35
35
|
export const DELIVERED_FINDING_FIELDS = Object.freeze(["net", "legal_position", "practical_position"]);
|
|
@@ -55,8 +55,8 @@ export function correctionTargets(rows, preDoc, postDoc) {
|
|
|
55
55
|
const checkable = Boolean(preDoc && postDoc);
|
|
56
56
|
const preOrd = byOrdinal(preDoc), postOrd = byOrdinal(postDoc);
|
|
57
57
|
const preName = byName(preDoc), postName = byName(postDoc);
|
|
58
|
-
const preLines = reportLines(preDoc);
|
|
59
|
-
const postLines = new Map(
|
|
58
|
+
const preLines = reportLines(preDoc), postList = reportLines(postDoc);
|
|
59
|
+
const postLines = new Map(postList.map((l) => [l.key, l.text]));
|
|
60
60
|
return (Array.isArray(rows) ? rows : []).map((r) => {
|
|
61
61
|
const out = { n: r?.n ?? null, kind: r?.kind ?? null, applied: r?.outcome ?? null, changes: [] };
|
|
62
62
|
if (!checkable || r?.outcome === "not-checkable") return { ...out, why: "not-checkable" };
|
|
@@ -64,8 +64,10 @@ export function correctionTargets(rows, preDoc, postDoc) {
|
|
|
64
64
|
const add = (c, key) => { if (!seen.has(key)) { seen.add(key); out.changes.push(c); } };
|
|
65
65
|
if (r.outcome === "line-changed") {
|
|
66
66
|
for (const l of linesOf(r.text, preLines)) {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
// A line the pass renamed is looked for under its new key, as the applied table joined it.
|
|
68
|
+
const moved = postLines.has(l.key) ? null : renamedAs(l, preLines, postList);
|
|
69
|
+
const now = moved ? moved.text : postLines.get(l.key);
|
|
70
|
+
if (now !== undefined && (moved || squash(now) !== squash(l.text))) add({ line: moved?.key ?? l.key, text: now }, moved?.key ?? l.key);
|
|
69
71
|
}
|
|
70
72
|
} else if (r.outcome === "findings-changed") {
|
|
71
73
|
const declared = (Array.isArray(r.ordinals) ? r.ordinals : []).filter((o) => preOrd.has(o) || postOrd.has(o));
|
|
@@ -136,6 +136,46 @@ export function linesOf(flagText, lines) {
|
|
|
136
136
|
return (lines ?? []).filter((l) => namesLine(hay, l) || quotesLine(hay, l.text));
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* THE LINE A PASS PUT IN A GONE LINE'S PLACE: the same line, renamed. A coverage line is known by its title and an
|
|
141
|
+
* action by its id, so a flag asking for a new title, answered, left no line under the old key and the line read as
|
|
142
|
+
* deleted. The reviewing lawyer was then told "removed rather than corrected" of two coverage lines the writer had
|
|
143
|
+
* retitled as asked (two flags of one test run, 2026-11-03).
|
|
144
|
+
*
|
|
145
|
+
* CLAIMED ONLY WHERE THE RECORD SHOWS IT. Among lines of the same kind, the gone line must be the only one gone
|
|
146
|
+
* between its nearest neighbours the pass kept. Of the lines the pass added between those neighbours, exactly one
|
|
147
|
+
* must carry at least two in five of the gone line's words, title and text together. A writer can split a line,
|
|
148
|
+
* so one added line beside it is not enough; the successor is the one that keeps its words. On that run the two
|
|
149
|
+
* successors kept 0.88 and 0.55 of them, and no other line kept more than 0.18. Anything else (two gone, no
|
|
150
|
+
* successor, two candidates, the neighbours reordered) stays a removal: a deletion read as a rename would hide it
|
|
151
|
+
* from the lawyer. The mark assessment's two reads have fixed keys, so neither is ever a rename. Returns the
|
|
152
|
+
* post-pass line, or null. PURE.
|
|
153
|
+
*/
|
|
154
|
+
const RENAME_SHARE = 0.4;
|
|
155
|
+
const lineWords = (l) => new Set(norm(`${String(l.key).slice(String(l.key).indexOf(":") + 1)} ${l.text}`)
|
|
156
|
+
.split(" ").filter((w) => w.length > 2));
|
|
157
|
+
export function renamedAs(line, preLines, postLines) {
|
|
158
|
+
const kindOf = (l) => String(l?.key ?? "").slice(0, Math.max(0, String(l?.key ?? "").indexOf(":")));
|
|
159
|
+
const kind = kindOf(line);
|
|
160
|
+
if (kind !== "coverage" && kind !== "action") return null;
|
|
161
|
+
const before = (preLines ?? []).filter((l) => kindOf(l) === kind);
|
|
162
|
+
const after = (postLines ?? []).filter((l) => kindOf(l) === kind);
|
|
163
|
+
const kept = new Set(after.map((l) => l.key));
|
|
164
|
+
const had = new Set(before.map((l) => l.key));
|
|
165
|
+
const at = before.findIndex((l) => l.key === line.key);
|
|
166
|
+
if (at < 0 || kept.has(line.key)) return null;
|
|
167
|
+
let lo = at - 1; while (lo >= 0 && !kept.has(before[lo].key)) lo--;
|
|
168
|
+
let hi = at + 1; while (hi < before.length && !kept.has(before[hi].key)) hi++;
|
|
169
|
+
if (hi - lo !== 2) return null; // another line went from the same gap
|
|
170
|
+
const from = lo >= 0 ? after.findIndex((l) => l.key === before[lo].key) : -1;
|
|
171
|
+
const to = hi < before.length ? after.findIndex((l) => l.key === before[hi].key) : after.length;
|
|
172
|
+
const added = (to > from ? after.slice(from + 1, to) : []).filter((l) => !had.has(l.key));
|
|
173
|
+
const mine = lineWords(line);
|
|
174
|
+
if (!mine.size) return null;
|
|
175
|
+
const keeps = added.filter((l) => { const theirs = lineWords(l); let n = 0; for (const w of mine) if (theirs.has(w)) n++; return n / mine.size >= RENAME_SHARE; });
|
|
176
|
+
return keeps.length === 1 ? keeps[0] : null;
|
|
177
|
+
}
|
|
178
|
+
|
|
139
179
|
/** The corrective pass's own words about a line it was flagged on, from the `corrections` register. PURE. */
|
|
140
180
|
function reasonFor(hit, doc) {
|
|
141
181
|
const c = doc?.corrections;
|
|
@@ -281,7 +321,7 @@ export function buildCorrectionsApplied(rows, preDoc, postDoc, { sections = null
|
|
|
281
321
|
const known = knownEntities(preDoc, postDoc);
|
|
282
322
|
const pre = byName(preDoc), post = byName(postDoc);
|
|
283
323
|
const preOrd = byOrdinal(preDoc), postOrd = byOrdinal(postDoc);
|
|
284
|
-
const preLines = reportLines(preDoc), postLine = new Map(
|
|
324
|
+
const preLines = reportLines(preDoc), postLines = reportLines(postDoc), postLine = new Map(postLines.map((l) => [l.key, l]));
|
|
285
325
|
return (rows ?? []).map((r) => {
|
|
286
326
|
// — a DECLARED ordinal wins over the name match. `targetsOf` is a normalised prose join and it
|
|
287
327
|
// is why six of nine flags on a delivered run resolved to nothing; the declaration is the reviewer's
|
|
@@ -320,9 +360,11 @@ export function buildCorrectionsApplied(rows, preDoc, postDoc, { sections = null
|
|
|
320
360
|
else if (hit.length) {
|
|
321
361
|
// The same three answers a finding gets, asked of the line's own text. REMOVAL WINS, as it does
|
|
322
362
|
// for a finding: a line gone after the pass was answered by deletion, and that is the question.
|
|
323
|
-
|
|
363
|
+
// A line renamed in place is still there, and a new title is a change (`renamedAs`).
|
|
364
|
+
const now = (l) => postLine.get(l.key) ?? renamedAs(l, preLines, postLines);
|
|
365
|
+
const gone = hit.filter((l) => !now(l));
|
|
324
366
|
if (gone.length) { outcome = "line-removed"; removed = gone.map((l) => l.label); }
|
|
325
|
-
else outcome = hit.some((l) =>
|
|
367
|
+
else outcome = hit.some((l) => now(l).key !== l.key || squash(now(l).text) !== squash(l.text)) ? "line-changed" : "line-unchanged";
|
|
326
368
|
}
|
|
327
369
|
else if (declaredOrds.length) {
|
|
328
370
|
// The certain path. Every question below is asked of the finding the reviewer NAMED, by ordinal.
|
|
@@ -371,6 +413,50 @@ export function buildCorrectionsApplied(rows, preDoc, postDoc, { sections = null
|
|
|
371
413
|
});
|
|
372
414
|
}
|
|
373
415
|
|
|
416
|
+
/**
|
|
417
|
+
* THE ANSWERS A CORRECTION MAY HAVE LEFT BEHIND: findings the pass moved that an answer citing findings may depend on.
|
|
418
|
+
*
|
|
419
|
+
* Each of the four answers that cites findings names them by ordinal (`four_answers.<answer>.ordinals`). On a test run
|
|
420
|
+
* (2026-11-03) a correction raised a finding from Moderate to High and updated the verdict, and the third-party-rights
|
|
421
|
+
* answer kept naming findings 1 to 3. The recheck saw it, but no pass follows the recheck, so the report kept the answer.
|
|
422
|
+
*
|
|
423
|
+
* A REASON TO ASK, NEVER A REQUIRED CITATION (design, 2026-11-03). For each answer that names findings, two things
|
|
424
|
+
* suggest a missing dependency:
|
|
425
|
+
* - a live adversarial finding the pass added, re-banded or re-typed, rated at or above the lowest band among the
|
|
426
|
+
* live findings the answer names, and not named by it: a shared band is a reason to check, not a rule;
|
|
427
|
+
* - a finding the answer names that the pass withdrew.
|
|
428
|
+
* A finding the pass did not move is never listed: what the writer cited before the correction is its own judgment. An
|
|
429
|
+
* answer that names no finding is not checked here, which is not a pass, and no absent answer is invented. Current
|
|
430
|
+
* citations do not make an answer's prose current; the recheck reads that. `bands` is the framework's ladder, most
|
|
431
|
+
* severe first. Returns `[{answer, cited, floor, uncited: [{ordinal, band}], withdrawn: [ordinal]}]`, empty when none. PURE.
|
|
432
|
+
*/
|
|
433
|
+
export function answersLeftBehind(preDoc, postDoc, bands) {
|
|
434
|
+
const labels = (bands ?? []).map((b) => String(b?.label ?? b ?? "").trim());
|
|
435
|
+
const ladder = labels.map((b) => b.toLowerCase());
|
|
436
|
+
const rank = (band) => ladder.indexOf(String(band ?? "").trim().toLowerCase());
|
|
437
|
+
const answers = postDoc?.four_answers ?? postDoc?.fourAnswers;
|
|
438
|
+
if (!answers || typeof answers !== "object") return [];
|
|
439
|
+
const live = (f) => f && f.disposition !== "withdrawn";
|
|
440
|
+
const before = byOrdinal(preDoc), after = byOrdinal(postDoc);
|
|
441
|
+
const moved = (f) => { const was = before.get(f.ordinal); return !was || was.band !== f.band || was.disposition !== f.disposition; };
|
|
442
|
+
const out = [];
|
|
443
|
+
for (const [answer, a] of Object.entries(answers)) {
|
|
444
|
+
if (!a || !Array.isArray(a.ordinals) || !a.ordinals.length) continue;
|
|
445
|
+
const cited = new Set(a.ordinals.map(Number));
|
|
446
|
+
const withdrawn = [...cited].filter((o) => after.get(o)?.disposition === "withdrawn" && before.get(o)?.disposition !== "withdrawn");
|
|
447
|
+
const ranks = [...cited].map((o) => after.get(o)).filter(live).map((f) => rank(f.band)).filter((i) => i >= 0);
|
|
448
|
+
const floor = ranks.length ? Math.max(...ranks) : -1;
|
|
449
|
+
const uncited = floor < 0 ? [] : [...after.values()].filter((f) => {
|
|
450
|
+
if (cited.has(f.ordinal) || !live(f) || f.disposition !== "adversarial") return false;
|
|
451
|
+
const i = rank(f.band);
|
|
452
|
+
return i >= 0 && i <= floor && moved(f);
|
|
453
|
+
}).map((f) => ({ ordinal: f.ordinal, band: f.band }));
|
|
454
|
+
if (uncited.length || withdrawn.length)
|
|
455
|
+
out.push({ answer, cited: [...cited].sort((x, y) => x - y), floor: floor < 0 ? null : labels[floor], uncited, withdrawn });
|
|
456
|
+
}
|
|
457
|
+
return out;
|
|
458
|
+
}
|
|
459
|
+
|
|
374
460
|
/**
|
|
375
461
|
*, T3b — WHICH OF THE REVIEWER'S OBJECTIONS THE RUN COULD NOT SHOW IT CLOSED.
|
|
376
462
|
*
|
package/driver/coverage-form.mjs
CHANGED
|
@@ -33,6 +33,7 @@ import { REGISTER_AXES, COVERAGE_STATUSES, normalizeAxis, CROWD_RULING_TOKEN,
|
|
|
33
33
|
import { shortId } from "./connotation-search.mjs";
|
|
34
34
|
import { openBlocksByAxis, crowdNarrowing, blocksByQidOf, isProviderHardErrorReason, refusedSearchSentence, notSearchedSentence } from "./register-plan.mjs";
|
|
35
35
|
import { territoryLayerReport, unsearchedLayerReason } from "./binding-layers.mjs"; import { goodsTermsList } from "../providers/_shared/term-shape.mjs";
|
|
36
|
+
import OFFERED from "../shared/offered-territories.json" with { type: "json" }; // the order form's own territory names
|
|
36
37
|
|
|
37
38
|
const STATUS_SET = new Set(COVERAGE_STATUSES);
|
|
38
39
|
const DRIVER_KINDS = new Set(["axis", "block", "deferred", "family"]);
|
|
@@ -556,8 +557,7 @@ export function coverageFormRows({ skeleton = [], activeAxes = null, plan = null
|
|
|
556
557
|
axis: "primary-sweep", kind: "deferred",
|
|
557
558
|
unit: `${report.territory} — binding registers not all searched`,
|
|
558
559
|
qid: null,
|
|
559
|
-
receipt_reason: report
|
|
560
|
-
.map((u) => `${u.layer} (${u.office}): ${u.state}`).join("; "),
|
|
560
|
+
receipt_reason: layerReceipt(report),
|
|
561
561
|
open: true,
|
|
562
562
|
open_because: unsearchedLayerReason(report),
|
|
563
563
|
status: null, reason: null,
|
|
@@ -585,6 +585,65 @@ export function coverageFormRows({ skeleton = [], activeAxes = null, plan = null
|
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
587
|
|
|
588
|
+
// ── THE REGISTERS A LAYER ROW LEFT UNSEARCHED, NAMED IN FULL ────────────────────────────────────────
|
|
589
|
+
//
|
|
590
|
+
// The layer row's receipt holds every register the plan did not search: on an EU order through a provider
|
|
591
|
+
// that holds three member registers, 22 of them. The reader saw a handful. The writer's brief cuts a receipt
|
|
592
|
+
// at 160 characters, so the writer named the first five or so after "including", and the workbook's
|
|
593
|
+
// coverage-judgment row cut the writer's reason at 160 characters again, mid-word. Measured on two test
|
|
594
|
+
// runs, 2026-11-03: 5 to 7 of 22 named, on both engines.
|
|
595
|
+
//
|
|
596
|
+
// The list is the driver's to state, from the receipt, so no model retypes it and none can drop one. The
|
|
597
|
+
// receipt is written and read here, in one module, so the two cannot disagree about its shape.
|
|
598
|
+
|
|
599
|
+
/** A layer row's receipt: one `layer (OFFICE): state` entry per register the plan did not search. PURE. */
|
|
600
|
+
export function layerReceipt(report) {
|
|
601
|
+
return report.unsearched.map((u) => `${u.layer} (${u.office}): ${u.state}`).join("; ");
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
const LAYER_RECEIPT_ENTRY_RE = /^(national|regional|international) \(([A-Z]{2})\): (excludes|unestablished)$/;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* The national registers a layer row's receipt names, as office codes, in the receipt's order. null when
|
|
608
|
+
* the receipt is not one `layerReceipt` wrote, or when it names a register of another layer: an EU-wide or
|
|
609
|
+
* international gap is a different sentence, and this one does not stretch to it. PURE.
|
|
610
|
+
*/
|
|
611
|
+
export function nationalRegistersNotSearched(receipt) {
|
|
612
|
+
const entries = String(receipt ?? "").split("; ").filter(Boolean);
|
|
613
|
+
if (!entries.length) return null;
|
|
614
|
+
const offices = [];
|
|
615
|
+
for (const e of entries) {
|
|
616
|
+
const m = LAYER_RECEIPT_ENTRY_RE.exec(e);
|
|
617
|
+
if (!m || m[1] !== "national") return null;
|
|
618
|
+
offices.push(m[2]);
|
|
619
|
+
}
|
|
620
|
+
return offices;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
const ORDER_FORM_NAMES = new Map([...OFFERED.regions, ...OFFERED.countries].map((t) => [t.code, t.name]));
|
|
624
|
+
|
|
625
|
+
/** A register or territory code in the order form's words, or "" when the form has no such code. PURE. */
|
|
626
|
+
export function orderFormName(code) {
|
|
627
|
+
return ORDER_FORM_NAMES.get(String(code ?? "").trim().toUpperCase()) ?? "";
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* "the national registers of A, B, and C were not searched", every name the order form's own, sorted. null
|
|
632
|
+
* when a code has no name: a list with a gap in it is the defect this replaces, so the row stays as it was. PURE.
|
|
633
|
+
*/
|
|
634
|
+
export function nationalRegistersNote(offices) {
|
|
635
|
+
const names = (offices ?? []).map(orderFormName);
|
|
636
|
+
if (!names.length || names.some((n) => !n)) return null;
|
|
637
|
+
const sorted = [...new Set(names)].sort((a, b) => a.localeCompare(b, "en"));
|
|
638
|
+
if (sorted.length === 1) return `the national register of ${sorted[0]} was not searched`;
|
|
639
|
+
const list = sorted.length === 2 ? `${sorted[0]} and ${sorted[1]}`
|
|
640
|
+
: `${sorted.slice(0, -1).join(", ")}, and ${sorted[sorted.length - 1]}`;
|
|
641
|
+
return `the national registers of ${list} were not searched`;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/** Is this form row a binding-layer row (`buildCoverageForm`, stage 1)? PURE. */
|
|
645
|
+
export const isLayerRow = (r) => String(r?.row_id ?? "").startsWith("CL-") && r?.kind === "deferred";
|
|
646
|
+
|
|
588
647
|
// ── M6 — THE ABSENCE IS AN ARTIFACT, NOT A MISSING ONE ──────────────────────────────────────────
|
|
589
648
|
//
|
|
590
649
|
// A run whose plan apparatus is out of reach can carry no coverage ROWS: there is no frozen plan to
|
|
@@ -221,6 +221,10 @@ function checks(runDir, log) {
|
|
|
221
221
|
const reviewOpen = readPartNotCompleted(runDir, "review");
|
|
222
222
|
if (reviewOpen) failed.push(["the review, not completed", reviewOpen.reason ?? recheck?.fail]);
|
|
223
223
|
else if (recheck) failed.push(["the review's re-check", recheck.fail]);
|
|
224
|
+
// A re-check that read ok and saved no review verified nothing: the correction stands unreviewed. A later receipt,
|
|
225
|
+
// which only a re-check that saved a review writes, clears it on a resume.
|
|
226
|
+
const unread = failedStep(log, "corrective-cycle-receipt", "verdict-recheck-unread");
|
|
227
|
+
if (unread && !reviewOpen && !recheck) failed.push(["the review's re-check", "it saved no review, so the correction was not verified"]);
|
|
224
228
|
const rollback = failedStep(log, "corrective-cycle-receipt", "corrective-rollback");
|
|
225
229
|
if (rollback) failed.push(["the corrective pass, rolled back", rollback.reason]);
|
|
226
230
|
const crowd = failedStep(log, "crowd-context", "crowd-context-failed");
|