clearotron 0.6.0 → 0.7.0-beta.1
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/INSTALL.md +7 -4
- package/QUICKSTART.md +1 -0
- package/README.md +5 -2
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/bin/clearotron.mjs +4 -2
- package/bin/onboard.mjs +158 -29
- package/build-info.json +2 -2
- package/docs/CLIENT-MCP.md +3 -1
- package/docs/DELIVERY.md +6 -3
- package/docs/architecture/02-architecture.md +1 -1
- package/docs/architecture/04-configuration-reference.md +105 -8
- package/docs/branding.md +4 -4
- package/docs/report-data/clearance-1.schema.json +320 -0
- package/docs/report-data/knockout-1.schema.json +268 -0
- package/driver/CHANGELOG.md +77 -0
- package/driver/cancel.mjs +19 -0
- package/driver/connotation-search.mjs +1 -1
- package/driver/contract-e3-backlog.mjs +41 -41
- package/driver/contract-vocabulary.mjs +1 -1
- package/driver/coverage-ledger.mjs +18 -2
- package/driver/deferral-row.mjs +1 -1
- package/driver/degraded-parts.mjs +1 -0
- package/driver/driver.config.mjs +5 -5
- package/driver/effective-scope.mjs +3 -1
- package/driver/engagement-receipt.mjs +3 -3
- package/driver/engine/anthropic-agent.mjs +15 -1
- package/driver/engine/common.mjs +7 -0
- package/driver/engine/mcp/band-server.mjs +7 -16
- package/driver/engine/mcp/codex-config.mjs +3 -0
- package/driver/engine/mcp/recording-server.mjs +45 -34
- package/driver/engine/openai-agent.mjs +74 -7
- package/driver/engine/session-record.mjs +44 -2
- package/driver/findings-model.mjs +14 -2
- package/driver/follow-up-twins.mjs +86 -0
- package/driver/gateway.mjs +77 -12
- package/driver/jx-units.mjs +3 -1
- package/driver/jx.mjs +13 -5
- package/driver/manuals-inline.mjs +98 -0
- package/driver/manuals-seen.mjs +134 -0
- package/driver/mark-logos.mjs +174 -0
- package/driver/methodology-witness.mjs +2 -1
- package/driver/owner-use-check.mjs +8 -4
- package/driver/package.json +1 -1
- package/driver/pipeline-knockout.mjs +23 -4
- package/driver/pipeline.mjs +128 -15
- package/driver/portal-local-auth.mjs +6 -2
- package/driver/portal-report.mjs +45 -14
- package/driver/portal-routes/me.mjs +4 -1
- package/driver/portal-runs.mjs +19 -16
- package/driver/predelivery-lint.mjs +7 -5
- package/driver/profiles.mjs +4 -4
- package/driver/publish/README.md +9 -7
- package/driver/publish/email-conditions.mjs +22 -5
- package/driver/publish/evidence-words.mjs +21 -0
- package/driver/publish/index.mjs +304 -211
- package/driver/publish/knockout.mjs +297 -247
- package/driver/publish/office-record-links.mjs +11 -9
- package/driver/publish/page-shell.mjs +98 -0
- package/driver/publish/pool-admin.mjs +2 -2
- package/driver/publish/publish-inputs.mjs +4 -0
- package/driver/publish/regions.mjs +28 -3
- package/driver/publish/register-record-html.mjs +105 -0
- package/driver/publish/register-record.mjs +165 -0
- package/driver/publish/render-knockout.mjs +299 -671
- package/driver/publish/render.mjs +561 -492
- package/driver/publish/report-data.mjs +226 -13
- package/driver/publish/report-document.mjs +353 -0
- package/driver/publish/search-depth.mjs +88 -7
- package/driver/publish/shell.mjs +41 -1
- package/driver/publish/strings.mjs +810 -0
- package/driver/publish/templates/clearance-print.css +23 -0
- package/driver/publish/templates/knockout.css +224 -0
- package/driver/publish/templates/report.css +112 -53
- package/driver/publish/xlsx.mjs +158 -139
- package/driver/record-goods.mjs +42 -0
- package/driver/reference-score.mjs +4 -1
- package/driver/register-count.mjs +5 -1
- package/driver/register-reach.mjs +39 -0
- package/driver/registry-fidelity.mjs +155 -37
- package/driver/repair-composers.mjs +7 -3
- package/driver/repair-targets.mjs +4 -1
- package/driver/replay-archive.mjs +4 -3
- package/driver/run-delivered.mjs +14 -8
- package/driver/run-record.mjs +1 -0
- package/driver/runner.mjs +73 -29
- package/driver/scope-facts.mjs +27 -6
- package/driver/search-policy.mjs +9 -4
- package/driver/skills/clearance-search/report-prose.md +3 -0
- package/driver/skills/knockout-assess/SKILL.md +8 -0
- package/driver/stage-freshness.mjs +8 -5
- package/driver/stages.mjs +69 -43
- package/driver/steps/delivery.mjs +9 -5
- package/driver/steps/overview-and-cards.mjs +54 -15
- package/driver/steps/register-sweep.mjs +5 -4
- package/driver/steps/skeptic-and-follow-up.mjs +3 -2
- package/driver/steps/verdict-gate.mjs +35 -14
- package/driver/suite-census.json +579 -87
- package/driver/synthesis-record.mjs +4 -3
- package/driver/terminal-clamp.mjs +6 -1
- package/driver/withdrawn-rating.mjs +72 -0
- package/mcp-server/CHANGELOG.md +8 -0
- package/mcp-server/lib/audit-view.mjs +5 -2
- package/mcp-server/lib/brief.mjs +6 -2
- package/mcp-server/lib/evidence.mjs +94 -23
- package/mcp-server/lib/findings.mjs +19 -2
- package/mcp-server/lib/knockout.mjs +13 -4
- package/mcp-server/lib/scrub.mjs +1 -1
- package/mcp-server/package.json +1 -1
- package/mcp-server/server.mjs +22 -3
- package/package.json +4 -1
- package/portal-ui/dist/assets/{index-CYaO2ygd.js → index-BBlN4CYq.js} +238 -80
- package/portal-ui/dist/assets/{index-izLa9apq.css → index-CxAkJXIT.css} +25 -5
- package/portal-ui/dist/index.html +2 -2
- package/portal-ui/package.json +3 -3
- package/providers/_shared/ledger.mjs +30 -2
- package/providers/_shared/record-uri.mjs +15 -0
- package/providers/clarivate/src/adapter.js +11 -0
- package/providers/clarivate/src/core.js +17 -1
- package/providers/jx/src/core.js +4 -4
- package/providers/jx/src/judge.js +1 -3
- package/providers/jx/src/nativeread.js +1 -3
- package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/scripts/README.md +147 -3
- package/scripts/added-reference-check.mjs +35 -7
- package/scripts/e2e-first-time.mjs +4 -4
- package/scripts/env-audit.mjs +16 -9
- package/scripts/freeze-example-run.mjs +3 -3
- package/scripts/mint-public-residue.mjs +3 -3
- package/scripts/mint-search-level-tags.mjs +61 -0
- package/scripts/mint-source-pin-census.mjs +89 -0
- package/scripts/release-note-required.mjs +65 -6
- package/scripts/test-durations-reporter.mjs +25 -0
- package/scripts/test-full.mjs +72 -18
- package/scripts/test-run.mjs +18 -1
- package/shared/brand.mjs +93 -6
- package/shared/inline-markdown.mjs +53 -0
- package/shared/names-in-force.mjs +0 -1
- package/shared/portal-tokens.mjs +2 -1
- package/shared/reference-guard-classes.mjs +43 -2
- package/shared/register-selection.mjs +8 -3
- package/shared/search-level-tags.json +25 -0
- package/shared/source-spans.mjs +91 -0
- package/shared/tools/derive-band-pairs.mjs +10 -0
- package/driver/own-rights.mjs +0 -83
- package/driver/use-check.mjs +0 -85
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
// <meta charset>. It rendered as a grey spreadsheet beside a clearance report, and its curly quotes and
|
|
9
9
|
// middots turned to mojibake wherever a reader's browser guessed latin-1.
|
|
10
10
|
//
|
|
11
|
-
// This module is a SIBLING of render.mjs, not an extension of it.
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
11
|
+
// This module is a SIBLING of render.mjs, not an extension of it. render.mjs is single-mark shaped and
|
|
12
|
+
// built around a parsed report.md; a knockout is batch-shaped (`marks[]`, one row per name, no report.md at
|
|
13
|
+
// all). It takes two pieces from that file, the demo banner and the served-models line, so the two reports
|
|
14
|
+
// say those in one wording.
|
|
15
15
|
//
|
|
16
|
-
// Visual consistency does not come from sharing the renderer. It comes from sharing the DESIGN SYSTEM
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
16
|
+
// Visual consistency does not come from sharing the renderer. It comes from sharing the DESIGN SYSTEM:
|
|
17
|
+
// shared/brand.mjs owns the tokens, the dark blocks, the theme init and the lockup; templates/report.css owns
|
|
18
|
+
// the layout vocabulary; page-shell.mjs owns the document both pages sit in. This file emits the same class
|
|
19
|
+
// names — .rep-stickyhead, .topbar, .wrap, .hero/.conf/.mark/.sub, .sec/.num/.note, .panel, footer — so the
|
|
20
|
+
// two reports track each other for free when either is restyled. The shell used to be ~60 lines duplicated
|
|
21
|
+
// here, because exporting it out of the hash-frozen clearance renderer cost more than the copy; the freeze
|
|
22
|
+
// is gone and the shell is shared.
|
|
23
23
|
//
|
|
24
24
|
// ONE report. There is no client variant and no internal variant, and that is
|
|
25
25
|
// still the rule — it is what removes the whole class of "the wrong link got sent".
|
|
@@ -39,24 +39,24 @@ import { readFileSync } from 'node:fs';
|
|
|
39
39
|
import { join, dirname } from 'node:path';
|
|
40
40
|
import { fileURLToPath } from 'node:url';
|
|
41
41
|
import {
|
|
42
|
-
|
|
43
|
-
THEME_BTN_CSS, CHROME_CSS, FAVICON_LINK, logoLockup, BRAND, confPosture, sectionStrip,
|
|
42
|
+
themeButton, THEME_BTN_CSS, CHROME_CSS, logoLockup, confPosture, sectionStrip,
|
|
44
43
|
} from '../../shared/brand.mjs';
|
|
45
|
-
import {
|
|
44
|
+
import { pageShell } from './page-shell.mjs'; // the document shell, shared with the clearance template
|
|
45
|
+
import { inlineMarkdown } from '../../shared/inline-markdown.mjs'; // the inline-markdown dialect, shared with the clearance template
|
|
46
46
|
import { SUMMARY_BLOCK_LINE, parseSummaryBlocks } from '../../shared/summary-blocks.mjs';
|
|
47
47
|
|
|
48
48
|
// THIS BOARD'S FOUR ENTRIES, in its order. Its third reads "Also considered" and resolves at the filings
|
|
49
49
|
// section, which is what that section is; the rule that filters them against the finished document lives
|
|
50
50
|
// in shared/brand.mjs, beside the clearance report's own five.
|
|
51
51
|
const STRIP = Object.freeze([
|
|
52
|
-
['summary',
|
|
52
|
+
['summary', K.strip.summary], ['findings', K.strip.findings], ['filings', K.strip.filings], ['next', K.strip.next],
|
|
53
53
|
]);
|
|
54
54
|
import { COUNT_BASIS, COUNT_PREDICATES, countsForMark, countLine, variantFormsLine, disclosedFloor, moreThan, countNote } from '../register-count.mjs';
|
|
55
55
|
import { recordBasisOf, readByJudgment, noneCarriedForward, NONE_CARRIED_FORWARD, recordsForMark, recordsLine } from '../register-records.mjs';
|
|
56
|
-
import { officeLinkSentences } from './office-record-links.mjs';
|
|
56
|
+
import { officeLinkSentences, officeRecordLink } from './office-record-links.mjs';
|
|
57
57
|
import { knockoutFindingViews, splitKnockoutNotes, KNOCKOUT_CARD_ORDER } from '../findings-model.mjs';
|
|
58
58
|
import { inputsLine } from '../framework-method.mjs';
|
|
59
|
-
import { demoBannerHtml, servedModelsLine } from './render.mjs'; // — the SAME banner the clearance template renders, not a second wording
|
|
59
|
+
import { demoBannerHtml, servedModelsLine, coverageGrid } from './render.mjs'; // — the SAME banner the clearance template renders, not a second wording
|
|
60
60
|
import { EXPORT_TOGGLE, exportPopover, EXPORT_MENU_JS } from './report-topbar.mjs'; // — the export menu's shell and behaviour, shared with the clearance template // — the SAME banner the clearance template renders, not a second wording
|
|
61
61
|
// — the two facts the register card is allowed to read off a raw record, and NEITHER is minted
|
|
62
62
|
// here. `makeClassifyStatus` and `isAllClass` are the screening lane's own, already shipped, already
|
|
@@ -64,9 +64,14 @@ import { EXPORT_TOGGLE, exportPopover, EXPORT_MENU_JS } from './report-topbar.mj
|
|
|
64
64
|
// which is the thing providers/_shared/screen.mjs exists to prevent.
|
|
65
65
|
import { makeClassifyStatus, isAllClass } from '../../providers/_shared/screen.mjs';
|
|
66
66
|
import { saysSomethingNew } from '../../shared/says-something-new.mjs';
|
|
67
|
-
import { isNextStepHeading } from '../knockout-next-step.mjs';
|
|
68
67
|
import OFFERED from '../../shared/offered-territories.json' with { type: 'json' }; // the order form's own territory names
|
|
69
68
|
import { normalizeTerritory } from '../../providers/_shared/territory-codes.mjs'; // a territory as written → its code
|
|
69
|
+
import { KNOCKOUT_PAGE as K } from './strings.mjs';
|
|
70
|
+
import { plainDeferralReason } from '../deferral-row.mjs'; // the reader's words for a search left open
|
|
71
|
+
import { PART_NAMES } from '../degraded-parts.mjs'; // the parts' reader names
|
|
72
|
+
import { recordEntryHtml, logoFigureHtml } from './register-record-html.mjs'; // a record entry and a logo, drawn once for both report pages
|
|
73
|
+
import { RECORD_LABELS } from './register-record.mjs';
|
|
74
|
+
import { REC, ownerDisplayName, normalizeRecordUri } from '../registry-fidelity.mjs';
|
|
70
75
|
|
|
71
76
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
72
77
|
|
|
@@ -97,20 +102,18 @@ const linkOrText = (u) => (isHttpUrl(u) ? `<a href="${escAttr(u)}" target="_blan
|
|
|
97
102
|
// publish sets `officeLink` from the filing's own numbers (office-record-links.mjs). The label is the
|
|
98
103
|
// office and the number, linked where the office has a page. The handle names the vendor's record, not
|
|
99
104
|
// the office's, and a reader can look it up nowhere. A filing with no number shows `fallback`, as before.
|
|
100
|
-
const officeRecordCell = (r, fallback) => {
|
|
105
|
+
const officeRecordCell = (r, fallback, label = null) => { // `label` prints in place of the office's own, escaped like it
|
|
101
106
|
const l = r?.officeLink;
|
|
102
107
|
if (!l?.label) return fallback;
|
|
103
|
-
return l.href ? `<a href="${escAttr(l.href)}" target="_blank" rel="noopener noreferrer">${esc(l.label)}</a>` : esc(l.label);
|
|
108
|
+
return l.href ? `<a href="${escAttr(l.href)}" target="_blank" rel="noopener noreferrer">${esc(label ?? l.label)}</a>` : esc(label ?? l.label);
|
|
104
109
|
};
|
|
105
110
|
|
|
106
111
|
// Minimal inline markdown, escaped FIRST. The old renderer ran esc() and nothing else, so a batch
|
|
107
112
|
// summary reading `BRIMSTONE rates **High (Classes 9, 28, 41)**.` rendered its asterisks verbatim —
|
|
108
113
|
// the model writes markdown because every other surface it feeds renders markdown.
|
|
114
|
+
// The dialect is the one the clearance reads too (shared/inline-markdown.mjs), links included.
|
|
109
115
|
export function inlineMd(s) {
|
|
110
|
-
return esc(String(s ?? ''))
|
|
111
|
-
.replace(/\*\*([^*]+)\*\*/g, '<b>$1</b>')
|
|
112
|
-
.replace(/(^|[^*])\*([^*]+)\*/g, '$1<i>$2</i>')
|
|
113
|
-
.replace(/`([^`]+)`/g, '<span class="mono">$1</span>');
|
|
116
|
+
return inlineMarkdown(esc(String(s ?? '')));
|
|
114
117
|
}
|
|
115
118
|
// BLOCKS, NOT ONLY PARAGRAPHS.
|
|
116
119
|
//
|
|
@@ -151,7 +154,7 @@ function bandStop(framework, band) {
|
|
|
151
154
|
return STOP_VAR[STOP_BY_TONE[tone] ?? 2];
|
|
152
155
|
}
|
|
153
156
|
|
|
154
|
-
const DEGRADED_NOTE =
|
|
157
|
+
export const DEGRADED_NOTE = K.degradedNote;
|
|
155
158
|
|
|
156
159
|
// THE QUALIFIER, IN WORDS. It rendered as a bare grey token under the band chip — `low`, no
|
|
157
160
|
// label, no border, nothing on the page saying what it qualified. A reader met one word of a private
|
|
@@ -165,225 +168,23 @@ const DEGRADED_NOTE = 'Automated research for this name was unavailable — manu
|
|
|
165
168
|
// An unrecognised word keeps its own text and gains the frame. The validator closes the set for a run
|
|
166
169
|
// published TODAY, and an archived run re-renders as what it was — dropping a word this build does not
|
|
167
170
|
// know would be a renderer editing a delivered rating.
|
|
168
|
-
const QUALIFIER_WORDS =
|
|
171
|
+
const QUALIFIER_WORDS = K.qualifier;
|
|
169
172
|
function qualifierHtml(q) {
|
|
170
173
|
const word = String(q ?? '').trim();
|
|
171
174
|
if (!word) return '';
|
|
172
|
-
const said = QUALIFIER_WORDS[word.toLowerCase()] ??
|
|
175
|
+
const said = QUALIFIER_WORDS[word.toLowerCase()] ?? K.qualifierOther(word);
|
|
173
176
|
return `<span class="ko-qual">${esc(said)}</span>`;
|
|
174
177
|
}
|
|
175
178
|
|
|
176
|
-
// The layout this report adds on top of report.css. Additive and `ko-`prefixed:
|
|
177
|
-
// the
|
|
178
|
-
const KO_CSS =
|
|
179
|
-
|
|
180
|
-
than written here. Four entries; the third reads "Also considered" and resolves at the filings
|
|
181
|
-
section. Marked not to print, because the board marks it so: a strip that follows the reader down
|
|
182
|
-
the page is a control, and paper has nothing for it to follow.
|
|
183
|
-
NO BACKTICK BELOW, and none in this comment — one closes the template literal this sits inside, and
|
|
184
|
-
it has cost this file two silent breakages already.
|
|
185
|
-
The number span is drawn and then hidden, which is the board's own doing: it emits the span on every
|
|
186
|
-
section and sets it to none further down its own stylesheet. Carried so the delivered document holds
|
|
187
|
-
the same elements as the approved one; no pixel moves. */
|
|
188
|
-
/* THE BREADCRUMB IS A ROW OF THE HEADER, not a bar under it (owner, 2026-09-18).
|
|
189
|
-
It used to be a SIBLING of .rep-stickyhead, pinned on its own at top:var(--tb-h,52px) — and
|
|
190
|
-
--tb-h is set nowhere in this product, so the fallback was a guess at a bar that measures ~46px:
|
|
191
|
-
content showed through the slit between the two, and z-index:20 put the strip UNDER the header's
|
|
192
|
-
100 whenever the guess was wrong. The strip is now emitted inside .rep-stickyhead, so the header
|
|
193
|
-
and the breadcrumb are one sticky surface that pins and unpins together and can never gap or
|
|
194
|
-
overlap, whatever the bar measures or how it wraps.
|
|
195
|
-
No background and no bottom hairline of its own: the wrapper carries the blurred surface and the
|
|
196
|
-
single edge, and the border-top here is the divider between the two rows. It is on .strip rather
|
|
197
|
-
than on any wrapper because sectionStrip() emits NOTHING when fewer than two of its sections are
|
|
198
|
-
live — a wrapper would leave a stray line on those reports.
|
|
199
|
-
The gutter matches the topbar's, so the first entry lines up under the back button. */
|
|
200
|
-
.strip{display:flex;gap:4px;align-items:center;padding:4px max(26px,calc((100% - 1120px)/2)) 6px;
|
|
201
|
-
border-top:1px solid var(--line);font:600 12px/1 'Plus Jakarta Sans','Helvetica Neue',Arial,sans-serif;
|
|
202
|
-
letter-spacing:.04em;overflow-x:auto;scrollbar-width:none}
|
|
203
|
-
.strip::-webkit-scrollbar{display:none}
|
|
204
|
-
.strip a{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;color:#6b5d50;text-decoration:none;white-space:nowrap}
|
|
205
|
-
.strip a i{width:8px;height:8px;border-radius:50%;border:1.5px solid currentColor;box-sizing:border-box}
|
|
206
|
-
.strip a.done{color:#4c7a4c}
|
|
207
|
-
.strip a.done i{background:#4c7a4c;border-color:#4c7a4c}
|
|
208
|
-
.strip a.now{color:#250902;background:rgba(0,0,0,.06)}
|
|
209
|
-
.strip a.now i{border-color:#860F09;border-width:3px}
|
|
210
|
-
.sec .num{display:none}
|
|
211
|
-
.sec .note{display:inline;margin-left:10px;font-size:12px;color:var(--faint)}
|
|
212
|
-
.ko-glance{padding:6px 0 2px}
|
|
213
|
-
/* — framework attribution, captioning the rows. Same gutter and hairline as.ko-row so it reads
|
|
214
|
-
as the table's head, not a floating note. */
|
|
215
|
-
.ko-legend{padding:11px 24px 12px;border-bottom:1px solid var(--line);font-size:11.5px;color:var(--faint)}
|
|
216
|
-
.ko-row{display:grid;grid-template-columns:minmax(140px,.34fr) 1fr;gap:18px;align-items:start;
|
|
217
|
-
padding:15px 24px;border-bottom:1px solid var(--line)}
|
|
218
|
-
.ko-row:last-child{border-bottom:0}
|
|
219
|
-
.ko-name{font-weight:800;font-size:17px;letter-spacing:-.01em;margin:0 0 7px;word-break:break-word}
|
|
220
|
-
.ko-band{display:inline-block;font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
|
|
221
|
-
color:#fff;padding:4px 11px;border-radius:30px}
|
|
222
|
-
.ko-qual{display:block;margin-top:5px;font-size:11.5px;color:var(--faint)}
|
|
223
|
-
.ko-classes{font-size:12px;color:var(--faint);margin:6px 0 0}
|
|
224
|
-
.ko-bul{margin:0;padding-left:18px;font-size:14px;color:var(--slate);line-height:1.6}
|
|
225
|
-
/* / — the summary's own sub-headers and bullets. The summary is the report's entry point and
|
|
226
|
-
the owner's complaint was that it read as one block; these are what make it scannable. Sized BELOW
|
|
227
|
-
.ko-name so a sub-header inside the summary never competes with a mark's own name. */
|
|
228
|
-
.ko-sumh{font-weight:800;font-size:13.5px;letter-spacing:.01em;margin:15px 0 6px;color:var(--slate)}
|
|
229
|
-
.ko-sumh:first-child{margin-top:0}
|
|
230
|
-
.ko-sumbul{margin:0 0 8px}
|
|
231
|
-
.ko-bul li{margin:0 0 5px}
|
|
232
|
-
.ko-bul li:last-child{margin-bottom:0}
|
|
233
|
-
/* — one conflict, one block: the reference a reader carries to the workbook, the name, its band,
|
|
234
|
-
the conclusion sentence, the ground under it, and the evidence it opens to. */
|
|
235
|
-
/* ko-find is a LOCATOR now, not a look: the block wears .card as well and report.css draws it. The
|
|
236
|
-
dashed rule and the top margin this used to carry would fight the card's own border and radius. */
|
|
237
|
-
.ko-find.card{margin:14px 0 0}
|
|
238
|
-
.ko-find.card:first-child{margin-top:0}
|
|
239
|
-
.ko-findband{display:inline-block;font-size:9.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
|
|
240
|
-
color:#fff;padding:2px 8px;border-radius:30px;margin-left:7px;vertical-align:1px}
|
|
241
|
-
.ko-findmeta{margin:0 0 5px;font-size:12px;color:var(--faint)}
|
|
242
|
-
.ko-findnet{margin:0 0 5px;font-size:14px;color:var(--slate);line-height:1.6}
|
|
243
|
-
.ko-findbasis{margin:0 0 5px;font-size:13.5px;color:var(--slate);line-height:1.6}
|
|
244
|
-
.ko-findev{margin:0;font-size:12.5px;line-height:1.6;word-break:break-word}
|
|
245
|
-
.ko-count{font-family:var(--mono);font-size:13px;color:var(--ink);margin:0}
|
|
246
|
-
.ko-degraded{font-size:13px;color:var(--med-tx,#82550A);margin:8px 0 0;font-style:italic}
|
|
247
|
-
/* The reviewer-notes legend. NOT .ko-legend — that name is taken by the framework attribution row
|
|
248
|
-
above, and reusing it would restyle the caption. It names the purple convention report.css already
|
|
249
|
-
draws for .internal, so the colour is stated once and never re-specified. */
|
|
250
|
-
/* The notes sit inside a mark's column, so the shared .internal block's bullets keep the column's
|
|
251
|
-
own list indent and do not fight the paragraph above them. */
|
|
252
|
-
.ko-row .internal .ko-bul{margin:0 0 4px}
|
|
253
|
-
.ko-row .internal .ko-bul:last-child{margin-bottom:0}
|
|
254
|
-
.ko-counts table{width:100%;border-collapse:collapse;font-size:14px}
|
|
255
|
-
.ko-counts th{text-align:left;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);
|
|
256
|
-
font-weight:700;padding:14px 24px 8px;border-bottom:1px solid var(--line)}
|
|
257
|
-
.ko-counts td{padding:13px 24px;border-bottom:1px solid var(--line);vertical-align:top}
|
|
258
|
-
.ko-counts tr:last-child td{border-bottom:0}
|
|
259
|
-
.ko-counts td.num{font-family:var(--mono);font-size:15px;font-weight:600;color:var(--ink)}
|
|
260
|
-
.ko-counts td.na{font-family:var(--mono);font-size:12.5px;color:var(--faint)}
|
|
261
|
-
.ko-counts tr.ko-forms td{font-size:12px;color:var(--faint);line-height:1.55;padding:0 24px 13px;
|
|
262
|
-
font-family:var(--mono);word-break:break-word}
|
|
263
|
-
.ko-tier{font-size:13.5px;color:var(--slate);line-height:1.65;margin:0;padding:18px 24px}
|
|
264
|
-
/* — the read, as structure. The chip and classes are the head; basis leads; factors are a tight
|
|
265
|
-
list; the two qualifying blocks are visually distinct so a scan separates "why this band" from
|
|
266
|
-
"what would move it"; the register line is code-owned and always last. */
|
|
267
|
-
.ko-basisline{margin:0 0 8px;font-size:14.5px;color:var(--ink);line-height:1.5;font-weight:600}
|
|
268
|
-
.ko-lbl{display:block;font-size:9.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
|
|
269
|
-
color:var(--faint);margin:0 0 4px}
|
|
270
|
-
.ko-counter{margin:10px 0 0;padding:9px 0 0;border-top:1px dashed var(--line)}
|
|
271
|
-
.ko-mitig{margin:10px 0 0;padding:9px 12px;border-left:2px solid var(--line);background:var(--sunken,transparent)}
|
|
272
|
-
.ko-mitig p{margin:0;font-size:13.5px;color:var(--slate);line-height:1.6}
|
|
273
|
-
.ko-full{margin:10px 0 0;font-size:13px;color:var(--slate)}
|
|
274
|
-
.ko-full summary{cursor:pointer;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--faint);font-weight:700}
|
|
275
|
-
.ko-full ul{margin-top:7px}
|
|
276
|
-
/* NOTHING IS DISCARDED — including on paper. A collapsed <details> prints collapsed, so a report
|
|
277
|
-
saved to PDF would drop the narrative this block exists to preserve. The beforeprint handler below
|
|
278
|
-
opens them; this hides the now-pointless toggle in print. */
|
|
279
|
-
@media print{.ko-full summary{display:none}}
|
|
280
|
-
/* THE LABELS THE READER ACTUALLY READS. ko-lbl above is 9.5px uppercase grey — the owner's
|
|
281
|
-
"what holds what?" was asked of a label in that style, so a new word in the same style is the
|
|
282
|
-
same defect with different letters. These are body size and body colour, and they carry the
|
|
283
|
-
band's own word ("Why High"), which is what makes them answerable without a legend. */
|
|
284
|
-
.ko-lbl2{display:block;font-size:14px;font-weight:700;color:var(--ink);margin:0 0 5px;letter-spacing:0}
|
|
285
|
-
/* The card's fold. ko-full rides with it so openAll() and the beforeprint handler reach it —
|
|
286
|
-
what folds on screen still prints, which is the rule this template already states for the
|
|
287
|
-
narrative fold. ko-why carries only the spacing a card needs inside its own body. */
|
|
288
|
-
.ko-why{margin:6px 0 5px}
|
|
289
|
-
.ko-why summary{font-size:12px;text-transform:none;letter-spacing:0;color:var(--rose,var(--faint));font-weight:600}
|
|
290
|
-
/* "About this request" — what was asked, and any flag on the asking. It sits in the hero because a
|
|
291
|
-
mis-scoped request makes every number below it answer the wrong question. */
|
|
292
|
-
.ko-req{margin:14px 0 0;padding:13px 16px;border:1px solid var(--line);border-radius:3px}
|
|
293
|
-
.ko-req .ko-lbl2{margin-bottom:6px}
|
|
294
|
-
.ko-req p{margin:0 0 6px;font-size:13.5px;color:var(--slate);line-height:1.6}
|
|
295
|
-
.ko-req p:last-child{margin-bottom:0}
|
|
296
|
-
.ko-reqflag{border-left:3px solid var(--rose,var(--line));padding-left:11px;margin-top:9px}
|
|
297
|
-
/* THE PURPLE NOTES COME OFF THE EXPORT, exactly as the clearance page removes its internal notes
|
|
298
|
-
("Internal (review-only) notes are removed on export"). The knockout's export is window.print()
|
|
299
|
-
via exportPDF(), so print is the whole export path and this rule is the whole strip. Without it
|
|
300
|
-
a knockout PDF forwarded to a client carries the reviewing lawyer's notes. */
|
|
301
|
-
@media print{.internal{display:none !important}}
|
|
302
|
-
.ko-reg{margin:11px 0 0;padding:8px 0 0;border-top:1px solid var(--line);
|
|
303
|
-
font-family:var(--mono);font-size:12px;color:var(--faint);line-height:1.5}
|
|
304
|
-
.ko-filings{padding:14px 0 2px;border-bottom:1px solid var(--line)}
|
|
305
|
-
.ko-filings:last-of-type{border-bottom:0}
|
|
306
|
-
.ko-filings .ko-name{padding:0 24px}
|
|
307
|
-
.ko-filings td{font-size:13px}
|
|
308
|
-
.ko-basis{font-size:12.5px;color:var(--slate);line-height:1.6;margin:0;padding:15px 24px 17px;border-top:1px solid var(--line)}
|
|
309
|
-
.ko-scope{font-size:13.5px;color:var(--slate);line-height:1.65;margin:0;padding:18px 24px}
|
|
310
|
-
.ko-scope b{color:var(--ink)}
|
|
311
|
-
/* A wide counts table must scroll inside its own panel, never push the page sideways. */
|
|
312
|
-
/* AND IT SHOWS THAT IT SCROLLS. A panel that continues off its right edge and says nothing leaves a
|
|
313
|
-
reader who never drags it believing they have seen the whole table; the columns past the edge are
|
|
314
|
-
reachable and invisible at the same time. Ruled 2026-09-17: a scrollbar, always visible, and no text.
|
|
315
|
-
The -webkit-appearance:none is the part that does the work — without it the platform draws an OVERLAY
|
|
316
|
-
scrollbar that appears only once a scroll is already under way, which is the state this rule ends.
|
|
317
|
-
scrollbar-width and scrollbar-color are the same instruction for the engines that take the standard
|
|
318
|
-
properties. (NO BACKTICK IN THIS COMMENT: it sits inside the stylesheet's own template literal, and
|
|
319
|
-
one closes it. That is written above the export menu block too, and I still did it — so it is here
|
|
320
|
-
as well, beside the second rule anyone adds.) The colours are tokens, not fixed values, for the reason the ladder below this block
|
|
321
|
-
records: a fixed colour here reads on one ground and goes invisible on the other. */
|
|
322
|
-
.ko-scroll{overflow-x:auto}
|
|
323
|
-
.ko-scroll::-webkit-scrollbar{height:9px;-webkit-appearance:none}
|
|
324
|
-
.ko-scroll::-webkit-scrollbar-track{background:transparent}
|
|
325
|
-
.ko-scroll::-webkit-scrollbar-thumb{background:var(--faint);border-radius:5px}
|
|
326
|
-
/* THE TWO INSTRUCTIONS CANNOT SIT TOGETHER, and this was measured rather than reasoned. Setting the
|
|
327
|
-
standard scrollbar-width alongside the pseudo-elements makes the engine take the standard path and
|
|
328
|
-
ignore them, and on this one the standard path draws an overlay bar with no layout height at all.
|
|
329
|
-
Driven three ways on a delivered report at 390px, reading the height the bar takes out of the panel:
|
|
330
|
-
both together 0px, the pseudo-elements alone 9px, the standard properties alone 0px. So the standard
|
|
331
|
-
ones go behind a support query that the engines carrying the pseudo-elements never enter, which
|
|
332
|
-
leaves each engine exactly one instruction. */
|
|
333
|
-
@supports not selector(::-webkit-scrollbar){
|
|
334
|
-
.ko-scroll{scrollbar-width:thin;scrollbar-color:var(--faint) transparent}}
|
|
335
|
-
/* A finding's bullets carry bare source URLs, and a URL offers a line no place to break. On a phone
|
|
336
|
-
that unbreakable run becomes the minimum width of the grid item, so the single column floors at
|
|
337
|
-
443px inside a 360px viewport and the whole page scrolls sideways -- 135px of it, measured
|
|
338
|
-
2026-09-17. Only the value "anywhere" lowers that minimum: "break-word" breaks the line but
|
|
339
|
-
leaves the minimum where it was, which is why the blocks beside this one that already set
|
|
340
|
-
word-break were never the cause. Phone widths only: nothing at or above 700px changes.
|
|
341
|
-
NO BACKTICK IN THIS COMMENT -- it sits inside the stylesheet's own template literal. */
|
|
342
|
-
@media(max-width:700px){.ko-row{grid-template-columns:1fr;gap:10px}
|
|
343
|
-
.ko-bul{overflow-wrap:anywhere}}
|
|
344
|
-
|
|
345
|
-
/* The band ladder, the territories fold and the run's own caveats (the 2026-09-16 report redesign). Ported from
|
|
346
|
-
the design's stylesheet with its fixed colours replaced by this page's tokens, so the ladder reads
|
|
347
|
-
in both themes: the tick row was #a89a8a on white and the fold's summary and prose a brown pair,
|
|
348
|
-
all three of which go invisible on the dark ground this report also renders on. */
|
|
349
|
-
/* THE BAND PILL HANGS ABOVE THE BAR, so the space above the bar is what keeps it off the heading.
|
|
350
|
-
NO BACKTICK IN THIS COMMENT — it sits inside the stylesheet's own template literal.
|
|
351
|
-
.kmarker sits at top:-30px and the pill is ~23px tall (5+5 padding on a 13px line), so it starts
|
|
352
|
-
30px above the bar and ends 7px above it. At the LEFTMOST band the pill is also drawn flush left
|
|
353
|
-
(translateX(-12px) at left:0%) — directly under the left-aligned "Overall risk" — so that is the
|
|
354
|
-
rung where the two touch, and the house ladder's leftmost rung is Low.
|
|
355
|
-
THE ROOM IS ONE MARGIN, NOT TWO, and that is what made the arithmetic wrong twice. This margin and
|
|
356
|
-
.gauge .label's 18px bottom margin are ADJACENT SIBLINGS, so they collapse to the larger of the two
|
|
357
|
-
rather than adding: 10px here gave 18px of room against a pill that needs 30, and the first attempt
|
|
358
|
-
at 24 still left 6. Measured in a browser at every rung (scripts/report-header-render-check.mjs),
|
|
359
|
-
not reasoned: 44 gives 14px of daylight under the heading at every band. */
|
|
360
|
-
.kscale{position:relative;margin:44px 8px 34px}
|
|
361
|
-
.kbar{position:relative;height:8px;border-radius:4px}
|
|
362
|
-
.kmarker{position:absolute;top:-30px;text-align:center}
|
|
363
|
-
.kpill{display:inline-block;padding:5px 12px;border-radius:999px;color:#fff;
|
|
364
|
-
font:700 13px/1 'Plus Jakarta Sans','Helvetica Neue',Arial,sans-serif;white-space:nowrap}
|
|
365
|
-
.kneedle{width:3px;height:14px;margin:4px auto 0;border-radius:2px}
|
|
366
|
-
.kticks{position:relative;height:16px;margin-top:8px}
|
|
367
|
-
.kticks span{position:absolute;transform:translateX(-50%);color:var(--faint);white-space:nowrap;
|
|
368
|
-
font:700 10.5px/1 'Plus Jakarta Sans','Helvetica Neue',Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase}
|
|
369
|
-
.kticks span.on{font-weight:800}
|
|
370
|
-
.terr{margin-top:4px}
|
|
371
|
-
.terr summary{cursor:pointer;color:var(--rose,var(--faint));font-size:12px;font-weight:600;list-style:none}
|
|
372
|
-
.terr summary::-webkit-details-marker{display:none}
|
|
373
|
-
.terr p{margin:4px 0 0;font-size:12px;line-height:1.6;color:var(--slate)}
|
|
374
|
-
.ko-caveats{padding:16px 24px;margin:14px 0 8px}
|
|
375
|
-
.ko-caveats p{margin:0 0 7px;font-size:12px;line-height:1.6;color:var(--faint)}
|
|
376
|
-
.ko-caveats p:last-child{margin-bottom:0}
|
|
377
|
-
`;
|
|
378
|
-
|
|
379
|
-
const REPORT_BASE = REPORT_ROOT + '\n' + readFileSync(join(HERE, 'templates', 'report.css'), 'utf8');
|
|
380
|
-
// Print renders light whatever the toggle says — re-assert the light tokens under [data-theme=dark].
|
|
381
|
-
const PRINT_LIGHT = '\n@media print{' + REPORT_ROOT.replace(':root{', ':root[data-theme="dark"]{color-scheme:light;') + '}';
|
|
179
|
+
// The layout this report adds on top of report.css, kept in templates/knockout.css. Additive and `ko-`prefixed:
|
|
180
|
+
// report.css is shared with the clearance renderer, and a selector that is inert there cannot regress it.
|
|
181
|
+
const KO_CSS = '\n' + readFileSync(join(HERE, 'templates', 'knockout.css'), 'utf8'); // the file's text, after the line break the sheet always began with
|
|
182
|
+
|
|
382
183
|
|
|
383
184
|
/** The batch's display title: the mark itself when a screen covered one name, else the count. */
|
|
384
185
|
function batchTitle(marks) {
|
|
385
186
|
if (marks.length === 1) return marks[0].name ?? '';
|
|
386
|
-
return
|
|
187
|
+
return K.names(marks.length);
|
|
387
188
|
}
|
|
388
189
|
|
|
389
190
|
// Spine mapping (spec 2026-07-30 §3, charter ruling 1: renames ruled OK): the per-name verdict rows
|
|
@@ -395,9 +196,9 @@ function batchTitle(marks) {
|
|
|
395
196
|
// group, in the order the merged gate left them, highest first. The same chip and the same line either way, so no
|
|
396
197
|
// words are added. A mark with no groups, which is every archived run, keeps its markup byte for byte.
|
|
397
198
|
function bandColumn(m, framework) {
|
|
398
|
-
const chip = (band, qualifier, classes) => `<span class="ko-band" style="background:var(${bandStop(framework, band)})">${esc(band ?? '—')}</span>
|
|
199
|
+
const chip = (band, qualifier, classes) => `<span class="ko-band" style="background:var(${bandStop(framework, band)});color:var(${bandStop(framework, band)}-on)">${esc(band ?? '—')}</span>
|
|
399
200
|
${qualifierHtml(qualifier)}
|
|
400
|
-
${classes?.length ? `<p class="ko-classes"
|
|
201
|
+
${classes?.length ? `<p class="ko-classes">${esc(K.classes(classes.join(', ')))}</p>` : ''}`;
|
|
401
202
|
if (!Array.isArray(m.classGroups) || !m.classGroups.length) return chip(m.rating, m.ratingQualifier, m.classesSearched);
|
|
402
203
|
return m.classGroups.map((g) => chip(g.band, g.ratingQualifier, g.classes)).join('\n ');
|
|
403
204
|
}
|
|
@@ -465,15 +266,7 @@ function glanceSection(marks, framework, registerCounts) {
|
|
|
465
266
|
// TWO FORMS PER REGISTER, because English needs both: "Counted in the United States" takes the article
|
|
466
267
|
// and "United States application" refuses it. One map with one form produced "the United States
|
|
467
268
|
// application (pending)" on a card, which is why they are separate fields rather than a regex over one.
|
|
468
|
-
const REGISTER_NAMES =
|
|
469
|
-
EM: { bare: 'European Union', phrase: 'the European Union' },
|
|
470
|
-
EU: { bare: 'European Union', phrase: 'the European Union' },
|
|
471
|
-
WO: { bare: 'international', phrase: 'the WIPO register' },
|
|
472
|
-
US: { bare: 'United States', phrase: 'the United States' },
|
|
473
|
-
GB: { bare: 'United Kingdom', phrase: 'the United Kingdom' },
|
|
474
|
-
UK: { bare: 'United Kingdom', phrase: 'the United Kingdom' },
|
|
475
|
-
CH: { bare: 'Swiss', phrase: 'Switzerland' },
|
|
476
|
-
});
|
|
269
|
+
const REGISTER_NAMES = K.registerNames;
|
|
477
270
|
|
|
478
271
|
/**
|
|
479
272
|
* A register code as a reader's words, or '' when this build cannot name it. NEVER returns a code.
|
|
@@ -516,7 +309,7 @@ const orderCode = (t) => {
|
|
|
516
309
|
function listWords(items) {
|
|
517
310
|
const xs = (items ?? []).filter(Boolean);
|
|
518
311
|
if (xs.length <= 1) return xs[0] ?? '';
|
|
519
|
-
return
|
|
312
|
+
return K.listEnd(xs.slice(0, -1).join(', '), xs[xs.length - 1]);
|
|
520
313
|
}
|
|
521
314
|
|
|
522
315
|
/**
|
|
@@ -531,20 +324,20 @@ function listWords(items) {
|
|
|
531
324
|
*/
|
|
532
325
|
const TERRITORY_NAME_CAP = 6;
|
|
533
326
|
function territoriesLine(registerCounts) {
|
|
534
|
-
const provider = registerCounts?.providerLabel ?? registerCounts?.provider ??
|
|
327
|
+
const provider = registerCounts?.providerLabel ?? registerCounts?.provider ?? K.counted.theRegister;
|
|
535
328
|
const regions = (registerCounts?.scope?.regions ?? []).filter(Boolean);
|
|
536
329
|
const worldwide = registerCounts?.scope?.worldwide === true || regions.length === 0;
|
|
537
330
|
if (worldwide) {
|
|
538
331
|
const n = regions.length;
|
|
539
332
|
return n
|
|
540
|
-
?
|
|
541
|
-
:
|
|
333
|
+
? K.counted.worldwideOn(n, provider)
|
|
334
|
+
: K.counted.worldwide(provider);
|
|
542
335
|
}
|
|
543
336
|
const named = regions.map(territoryName).filter(Boolean);
|
|
544
337
|
if (named.length && named.length <= TERRITORY_NAME_CAP) {
|
|
545
|
-
return
|
|
338
|
+
return K.counted.named(listWords(named), provider);
|
|
546
339
|
}
|
|
547
|
-
return
|
|
340
|
+
return K.counted.listed(regions.length, provider);
|
|
548
341
|
}
|
|
549
342
|
|
|
550
343
|
// The reader line that used to sit under the counts table ("a count is not a conflict…") is off the page:
|
|
@@ -566,9 +359,9 @@ function countsSection(marks, registerCounts, positions = '') {
|
|
|
566
359
|
? ((countsForMark(registerCounts, single)?.counts?.close?.forms ?? []).map((f) => String(f?.form ?? '').trim()).filter(Boolean))
|
|
567
360
|
: [];
|
|
568
361
|
const headLabel = (pk) => {
|
|
569
|
-
if (pk === 'identical') return single ?
|
|
570
|
-
if (pk === 'containing') return single ?
|
|
571
|
-
return forms.length ?
|
|
362
|
+
if (pk === 'identical') return single ? K.counts.exactly(single) : K.counts.exactlyTheName;
|
|
363
|
+
if (pk === 'containing') return single ? K.counts.contains(single) : K.counts.containsTheName;
|
|
364
|
+
return forms.length ? K.counts.nearSpellingsOf(forms.join(', ')) : K.counts.nearSpellings;
|
|
572
365
|
};
|
|
573
366
|
const head = COUNT_PREDICATES.map((p) => `<th>${esc(headLabel(p.key))}</th>`).join('');
|
|
574
367
|
const rows = marks.map((m) => {
|
|
@@ -582,29 +375,30 @@ function countsSection(marks, registerCounts, positions = '') {
|
|
|
582
375
|
// column did not exist when it was counted, and "no count recorded" would read as a defect in a
|
|
583
376
|
// report that has none. The hover says which.
|
|
584
377
|
const why = countNote(c) ?? (c
|
|
585
|
-
?
|
|
586
|
-
:
|
|
378
|
+
? K.counts.noCountRecorded
|
|
379
|
+
: K.counts.notCountedThisRun);
|
|
587
380
|
if (Number.isFinite(c?.total)) return `<td class="num">${esc(String(c.total))}</td>`;
|
|
588
381
|
// The register answered with its own floor: that is a figure, and it is printed as one.
|
|
589
382
|
if (disclosedFloor(c) !== null) return `<td class="num">${esc(moreThan(disclosedFloor(c)))}</td>`;
|
|
590
|
-
return `<td class="na" title="${escAttr(why)}"
|
|
383
|
+
return `<td class="na" title="${escAttr(why)}">${K.counts.notAvailable}</td>`;
|
|
591
384
|
}).join('');
|
|
592
385
|
const scoped = e?.classScope !== 'all-classes' && (e?.classes?.length > 0);
|
|
593
386
|
const scope = scoped
|
|
594
|
-
?
|
|
595
|
-
:
|
|
387
|
+
? K.counts.inClasses(e.classes.join(', '))
|
|
388
|
+
: K.counts.allClasses;
|
|
596
389
|
// The forms the close column was counted over. A number whose forms are not on the page cannot be
|
|
597
390
|
// checked by the reader it was written for, which makes it a claim rather than a measurement.
|
|
598
391
|
const forms = variantFormsLine(e);
|
|
599
392
|
return `<tr><td><b>${esc(m.name)}</b><br><span class="ko-classes">${esc(scope)}</span></td>${cells}</tr>`
|
|
600
|
-
|
|
393
|
+
// The line sits in a block of its own so a phone can hold it to the card's visible width (knockout.css).
|
|
394
|
+
+ (forms ? `<tr class="ko-forms"><td colspan="${COUNT_PREDICATES.length + 1}"><div class="ko-formsline">${esc(forms)}</div></td></tr>` : '');
|
|
601
395
|
}).join('');
|
|
602
396
|
// COUNT_BASIS IS OFF THE PAGE, NOT OUT OF THE RECORD. It is still written to
|
|
603
397
|
// report-data.json (knockoutReportData -> registerCountBasis) and still on the workbook, which is where
|
|
604
398
|
// 331 says it belongs; what it stops doing is printing twice on a page whose headers now say the same
|
|
605
399
|
// thing in three words each.
|
|
606
400
|
return `<div class="panel">
|
|
607
|
-
<div class="ko-counts ko-scroll"><table><thead><tr><th
|
|
401
|
+
<div class="ko-counts ko-scroll"><table><thead><tr><th>${K.counts.name}</th>${head}</tr></thead><tbody>${rows}</tbody></table></div>
|
|
608
402
|
<p class="ko-basis">${esc(territoriesLine(registerCounts))}${
|
|
609
403
|
positions ? `<br>${esc(positions)}` : ''}</p>
|
|
610
404
|
</div>`;
|
|
@@ -727,7 +521,33 @@ export function rankByMateriality(records, entry, mark) {
|
|
|
727
521
|
}
|
|
728
522
|
|
|
729
523
|
const APPENDIX_ROWS = 8;
|
|
730
|
-
|
|
524
|
+
// EACH LISTED FILING OPENS ITS REGISTER RECORD (owner, 2026-11-18; the approved board). A filing whose record the
|
|
525
|
+
// run saved gets a closed drop-down in a row under its table row, the same entry a clearance card draws, and its
|
|
526
|
+
// logo, where the run saved one, on a line of its own under the mark name, uncaptioned because the Territory
|
|
527
|
+
// column names the register. A filing with no saved record keeps its single row, so a run that saved none renders
|
|
528
|
+
// as it did.
|
|
529
|
+
function filingRows(r, { filingRecords, logos }) {
|
|
530
|
+
const key = normalizeRecordUri(r.recordId);
|
|
531
|
+
const rec = key ? filingRecords.get(key) : null;
|
|
532
|
+
const cell = officeRecordCell(r, r.url ? linkOrText(r.url) : esc(r.recordId ?? '—'));
|
|
533
|
+
const logo = rec ? logoFigureHtml(rec, { uri: key, logo: logos.get(key), href: r.officeLink?.href ? escAttr(r.officeLink.href) : null, caption: false }) : null;
|
|
534
|
+
const row = `<tr${rec ? ' class="rr-has"' : ''}>
|
|
535
|
+
<td>${esc(r.mark ?? '—')}${r.matchedBasis === 'close' ? `<br><span class="ko-classes">${esc(K.filings.foundAs(r.matchedForm))}</span>` : ''}${logo ? `<div class="rr-logos rr-ko">${logo}</div>` : ''}</td>
|
|
536
|
+
<td>${esc(r.owner ?? '—')}</td>
|
|
537
|
+
<td>${esc(r.status ?? '—')}</td>
|
|
538
|
+
<td>${esc((r.classes ?? []).join(', ') || '—')}</td>
|
|
539
|
+
<td>${esc(r.territory ?? '—')}</td>
|
|
540
|
+
<td class="ko-findev">${cell}</td>
|
|
541
|
+
</tr>`;
|
|
542
|
+
if (!rec) return row;
|
|
543
|
+
const ownerName = ownerDisplayName({ raw: REC.owner(rec), native: REC.ownerNative(rec), resolved: r.owner });
|
|
544
|
+
const fallback = r.url ? linkOrText(r.url) : esc(r.recordId ?? '—');
|
|
545
|
+
const number = { label: r.officeLink?.label ?? null, fallbackText: r.url ?? r.recordId ?? '', cell: (label) => officeRecordCell(r, fallback, label) };
|
|
546
|
+
const entry = recordEntryHtml(rec, { uri: key, jurisdiction: r.territory, number, ownerName });
|
|
547
|
+
return `${row}<tr class="rr-krow"><td colspan="6"><details class="drill rr-drill"><summary>${esc(RECORD_LABELS.title)}</summary><div class="drillbody">${entry}</div></details></td></tr>`;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
function filingsSection(marks, registerRecords, records = { filingRecords: new Map(), logos: new Map() }) {
|
|
731
551
|
// The provider refused the whole lane (clarivate's per-record bill). One sentence, once — not the
|
|
732
552
|
// same refusal repeated under every mark.
|
|
733
553
|
if (registerRecords.unavailable) {
|
|
@@ -738,7 +558,7 @@ function filingsSection(marks, registerRecords) {
|
|
|
738
558
|
const line = recordsLine(e);
|
|
739
559
|
if (!e || !(e.records ?? []).length) {
|
|
740
560
|
return `<div class="ko-row"><div><p class="ko-name">${esc(m.name)}</p></div>
|
|
741
|
-
<div><p class="ko-bul">${esc(line ??
|
|
561
|
+
<div><p class="ko-bul">${esc(line ?? K.filings.noListing)}</p></div></div>`;
|
|
742
562
|
}
|
|
743
563
|
// RANKED, AND DELIBERATELY NOT FILTERED. This table is the evidence behind a
|
|
744
564
|
// COUNT: dropping a cancelled or out-of-class row would leave a reader unable to reconcile the table
|
|
@@ -746,26 +566,16 @@ function filingsSection(marks, registerRecords) {
|
|
|
746
566
|
// not material". The cards promote and therefore filter; the appendix evidences and therefore ranks.
|
|
747
567
|
const ranked = rankByMateriality(e.records, e, m);
|
|
748
568
|
const shown = ranked.slice(0, APPENDIX_ROWS);
|
|
749
|
-
const rows = shown.map((r) =>
|
|
750
|
-
<td>${esc(r.mark ?? '—')}${r.matchedBasis === 'close' ? `<br><span class="ko-classes">found as ${esc(r.matchedForm)}</span>` : ''}</td>
|
|
751
|
-
<td>${esc(r.owner ?? '—')}</td>
|
|
752
|
-
<td>${esc(r.status ?? '—')}</td>
|
|
753
|
-
<td>${esc((r.classes ?? []).join(', ') || '—')}</td>
|
|
754
|
-
<td>${esc(r.territory ?? '—')}</td>
|
|
755
|
-
<td class="ko-findev">${officeRecordCell(r, r.url ? linkOrText(r.url) : esc(r.recordId ?? '—'))}</td>
|
|
756
|
-
</tr>`).join('');
|
|
569
|
+
const rows = shown.map((r) => filingRows(r, records)).join('');
|
|
757
570
|
// "First N" WAS TRUE AND IS NOT ANY MORE, and saying it of a ranked table would be worse than the
|
|
758
571
|
// cap: it invites the reader to take the sample for the top of the provider's list. Say the count
|
|
759
572
|
// that exists, say what decided the order, and say where the rest is.
|
|
760
573
|
const more = e.records.length > shown.length
|
|
761
|
-
?
|
|
762
|
-
|
|
763
|
-
+ ` in the searched classes before outside them, the name itself before ${readByJudgment(registerRecords) ? 'other searches' : 'its close variations'}.`
|
|
764
|
-
+ ` The full list is in the audit workbook's Register Filings sheet.`
|
|
765
|
-
: ' The same rows are in the audit workbook\'s Register Filings sheet, most material first.';
|
|
574
|
+
? K.filings.showing(shown.length, e.records.length, readByJudgment(registerRecords) ? K.filings.otherSearches : K.filings.closeVariations)
|
|
575
|
+
: K.filings.sameRows;
|
|
766
576
|
return `<div class="ko-filings">
|
|
767
577
|
<p class="ko-name">${esc(m.name)}</p>
|
|
768
|
-
<div class="ko-counts ko-scroll"><table><thead><tr><th
|
|
578
|
+
<div class="ko-counts ko-scroll"><table><thead><tr><th>${K.filings.head.trademark}</th><th>${K.filings.head.owner}</th><th>${K.filings.head.status}</th><th>${K.filings.head.classes}</th><th>${K.filings.head.territory}</th><th>${K.filings.head.record}</th></tr></thead><tbody>${rows}</tbody></table></div>
|
|
769
579
|
<p class="ko-basis">${esc(line ?? '')}${esc(more)}</p>
|
|
770
580
|
</div>`;
|
|
771
581
|
}).join('');
|
|
@@ -795,8 +605,8 @@ function officeLinkNote(registerRecords) {
|
|
|
795
605
|
function tierAbsenceLine(registerCounts, probeRan) {
|
|
796
606
|
if (registerCounts?.marks?.length) return null;
|
|
797
607
|
return probeRan
|
|
798
|
-
?
|
|
799
|
-
:
|
|
608
|
+
? K.tierAbsence.probeRan
|
|
609
|
+
: K.tierAbsence.notInTier;
|
|
800
610
|
}
|
|
801
611
|
|
|
802
612
|
// ONE conflict, rendered from the typed record. The reference comes first because it is what a
|
|
@@ -837,7 +647,7 @@ function whyBandFold(inner) {
|
|
|
837
647
|
}
|
|
838
648
|
|
|
839
649
|
/** The card fold's own word. Stated once so the renderer and its tests read the same string. */
|
|
840
|
-
const WHY_BAND_LABEL = '
|
|
650
|
+
const WHY_BAND_LABEL = K.riskAssessment; // the clearance's word for the reasoning (owner, 2026-11-18)
|
|
841
651
|
|
|
842
652
|
/**
|
|
843
653
|
* The band chip's text. A framework that states a method shows its inputs beside the band, in its own
|
|
@@ -850,9 +660,35 @@ function bandChipText(band, method, inputs) {
|
|
|
850
660
|
return line ? `${esc(band)} · ${esc(line)}` : esc(band);
|
|
851
661
|
}
|
|
852
662
|
|
|
853
|
-
|
|
663
|
+
// A CARD CITES A FILING THE WAY THE FILINGS TABLE DOES. A conflict card's evidence held the register vendor's record
|
|
664
|
+
// path (/mark/em/…), which opens nothing and no register accepts, while the filings table on the same page printed the
|
|
665
|
+
// same filing by office and number, linked where the office has a page. An entry naming a filing the run holds now
|
|
666
|
+
// prints that table cell. An entry naming one it does not hold is read only where the run's register puts the office's
|
|
667
|
+
// own number in the path: the EUIPO's application number and the USPTO's serial. Clarivate and Signa put their own
|
|
668
|
+
// record id there and Corsearch its own id with a class suffix, and a vendor id printed as the office's number would be
|
|
669
|
+
// a citation no office can find, so those print as before. A web address stays a link.
|
|
670
|
+
const OWN_NUMBER_OFFICE = Object.freeze({ euipo: 'eu', 'uspto-local': 'us' });
|
|
671
|
+
export function filingsByHandle(registerRecords) {
|
|
672
|
+
const byHandle = new Map();
|
|
673
|
+
for (const r of (registerRecords?.marks ?? []).flatMap((m) => m?.records ?? [])) {
|
|
674
|
+
if (r && typeof r === 'object' && r.recordId) byHandle.set(String(r.recordId).trim().toLowerCase(), r);
|
|
675
|
+
}
|
|
676
|
+
return byHandle;
|
|
677
|
+
}
|
|
678
|
+
function evidenceCell(u, { filings = null, provider = null } = {}) {
|
|
679
|
+
if (isHttpUrl(u)) return linkOrText(u);
|
|
680
|
+
const handle = String(u ?? '').trim();
|
|
681
|
+
const r = filings?.get(handle.toLowerCase());
|
|
682
|
+
if (r) return officeRecordCell(r, r.url ? linkOrText(r.url) : esc(r.recordId ?? handle));
|
|
683
|
+
const office = OWN_NUMBER_OFFICE[provider];
|
|
684
|
+
const own = office ? new RegExp(`^/mark/${office}/([A-Za-z0-9]+)$`, 'i').exec(handle) : null;
|
|
685
|
+
const link = own ? officeRecordLink({ office, applicationNumber: own[1] }) : null;
|
|
686
|
+
return link?.label ? officeRecordCell({ officeLink: link }, esc(handle)) : esc(handle);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
function findingBlock(v, framework, markIndex, method = null, cite = {}) {
|
|
854
690
|
const meta = [v.type, v.owner].filter(Boolean).map((s) => esc(s)).join(' · ');
|
|
855
|
-
const ev = v.evidence.map((u) =>
|
|
691
|
+
const ev = v.evidence.map((u) => evidenceCell(u, cite)).join(' · ');
|
|
856
692
|
// THE CLEARANCE REPORT'S CARD, AND THE KNOCKOUT'S LOCATOR — both classes, deliberately. report.css
|
|
857
693
|
// is already inlined here and already defines .card, .top, .rail, .cardhead,
|
|
858
694
|
// .fnum and .who; this uses them rather than a parallel set, so a client who has read one report
|
|
@@ -877,17 +713,17 @@ function findingBlock(v, framework, markIndex, method = null) {
|
|
|
877
713
|
<div class="rail" style="background:var(${stop})"></div>
|
|
878
714
|
<div class="body">
|
|
879
715
|
<div class="cardhead">
|
|
880
|
-
<span class="fnum">${esc(v.ref)}</span><
|
|
881
|
-
v.band ? `<span class="ko-findband" style="background:var(${stop})">${bandChipText(v.band, method, v.inputs)}</span>` : ''}${sourceChips(v)}
|
|
882
|
-
<button class="ask-fi no-print"
|
|
716
|
+
<span class="fnum">${esc(v.ref)}</span><h3 class="who">${esc(v.name ?? K.finding.unnamed)}</h3>${
|
|
717
|
+
v.band ? `<span class="ko-findband" style="background:var(${stop});color:var(${stop}-on)">${bandChipText(v.band, method, v.inputs)}</span>` : ''}${sourceChips(v)}
|
|
718
|
+
<button class="ask-fi no-print">${K.finding.askAi}</button>
|
|
883
719
|
</div>
|
|
884
720
|
${meta ? `<p class="ko-findmeta">${meta}</p>` : ''}
|
|
885
721
|
${v.lead ? `<p class="ko-findnet">${inlineMd(v.lead)}</p>` : ''}
|
|
886
722
|
${/* The 2026-09-16 report redesign — head, meta and the one-line read stay visible; the rest folds, as on
|
|
887
723
|
a clearance card, so a screen of many names reads as a screen. */''}
|
|
888
|
-
${(v.detail || ev) ? `<details class="drill"><summary
|
|
724
|
+
${(v.detail || ev) ? `<details class="drill"><summary>${K.finding.fullDetail}</summary><div class="drillbody">${
|
|
889
725
|
whyBandFold(v.detail ? `<p class="ko-findbasis">${inlineMd(v.detail)}</p>` : '')}${
|
|
890
|
-
ev ? `<p class="ko-findev"
|
|
726
|
+
ev ? `<p class="ko-findev">${K.finding.sources}${ev}</p>` : ''}</div></details>` : ''}
|
|
891
727
|
</div>
|
|
892
728
|
</div>
|
|
893
729
|
</div>`;
|
|
@@ -974,7 +810,7 @@ const REGISTER_ORDINAL_FLOOR = 900;
|
|
|
974
810
|
// SHOWING THE RATER'S ACTUAL READ IS THE OTHER HALF, and it cannot be done here: it needs the assess
|
|
975
811
|
// seat to emit which filings it weighed. Deriving it from the assessment's prose would be a regex over
|
|
976
812
|
// rendered prose, which is the thing this lane's structure-at-source rule exists to prevent.
|
|
977
|
-
export const NOT_WEIGHED_LINE =
|
|
813
|
+
export const NOT_WEIGHED_LINE = K.filingCard.notWeighed;
|
|
978
814
|
const NOT_WEIGHED = NOT_WEIGHED_LINE;
|
|
979
815
|
|
|
980
816
|
/**
|
|
@@ -1067,21 +903,21 @@ function registerRightPhrase(r) {
|
|
|
1067
903
|
const echoes = (kind === 'registration' && REGISTRATION_WORDS.test(status))
|
|
1068
904
|
|| (kind === 'application' && /^(?:appl|filed?)/i.test(status));
|
|
1069
905
|
const bracket = status && !echoes ? ` (${status.toLowerCase()})` : '';
|
|
1070
|
-
return `${where}${kind}${bracket}`.trim();
|
|
906
|
+
return `${where}${kind === 'registration' ? K.filingCard.registration : K.filingCard.application}${bracket}`.trim();
|
|
1071
907
|
}
|
|
1072
908
|
|
|
1073
909
|
function registerStatement(r, provider) {
|
|
1074
910
|
const name = String(r?.mark ?? r?.name ?? '').trim();
|
|
1075
911
|
const classes = (Array.isArray(r.classes) ? r.classes : []).filter((n) => Number.isFinite(Number(n)));
|
|
1076
912
|
const lead = [name, registerRightPhrase(r)].filter(Boolean).join(', ');
|
|
1077
|
-
const owner = r.owner ?
|
|
913
|
+
const owner = r.owner ? K.filingCard.by(r.owner) : K.filingCard.ownerNotStated;
|
|
1078
914
|
const cls = classes.length
|
|
1079
|
-
?
|
|
1080
|
-
:
|
|
915
|
+
? K.filingCard.classes(classes.length, classes.join(', '))
|
|
916
|
+
: K.filingCard.classesNotStated;
|
|
1081
917
|
// A close-variation card says WHICH near-form matched, because the name at the head of the sentence is
|
|
1082
918
|
// then not the name the client asked about and a reader must not have to guess which it is. A filing the reading
|
|
1083
919
|
// step found names its question, and that question may be a wider search, which is no close variation.
|
|
1084
|
-
const via = r.matchedBasis === 'close' && r.matchedForm ? (r.question ?
|
|
920
|
+
const via = r.matchedBasis === 'close' && r.matchedForm ? (r.question ? K.filingCard.foundBySearch(r.matchedForm) : K.filingCard.foundUnderVariation(r.matchedForm)) : '';
|
|
1085
921
|
return `${lead} ${owner}, ${cls}.${via}`;
|
|
1086
922
|
}
|
|
1087
923
|
|
|
@@ -1164,7 +1000,7 @@ function readBandFor(mark, recordId) {
|
|
|
1164
1000
|
return String(row?.band ?? '').trim() || null;
|
|
1165
1001
|
}
|
|
1166
1002
|
|
|
1167
|
-
function registerCardViews(mark, framework, registerRecords) {
|
|
1003
|
+
export function registerCardViews(mark, framework, registerRecords) {
|
|
1168
1004
|
if (!registerRecords || registerRecords.unavailable) return { cards: [], entry: null, promoted: 0 };
|
|
1169
1005
|
const entry = recordsForMark(registerRecords, mark?.name);
|
|
1170
1006
|
if (!entry) return { cards: [], entry: null, promoted: 0 };
|
|
@@ -1172,7 +1008,7 @@ function registerCardViews(mark, framework, registerRecords) {
|
|
|
1172
1008
|
const typed = knockoutFindingViews(mark, { manifest: framework });
|
|
1173
1009
|
const floor = Math.max(REGISTER_ORDINAL_FLOOR, ...typed.map((v) => Number(v.ordinal) || 0));
|
|
1174
1010
|
const markName = String(mark?.name ?? '').trim();
|
|
1175
|
-
const provider = registerRecords.providerLabel ?? registerRecords.provider ??
|
|
1011
|
+
const provider = registerRecords.providerLabel ?? registerRecords.provider ?? K.counted.theRegister;
|
|
1176
1012
|
// RANKED BEFORE THE CAP. promotableRecords decides WHETHER a filing may be
|
|
1177
1013
|
// pointed at; this decides WHICH of the ones that may get the three slots. Without it the three cards
|
|
1178
1014
|
// were the first three the provider happened to return.
|
|
@@ -1227,7 +1063,7 @@ function registerCardViews(mark, framework, registerRecords) {
|
|
|
1227
1063
|
function sourceChips(v) {
|
|
1228
1064
|
const register = Array.isArray(v?.weighedFilings) && v.weighedFilings.length > 0;
|
|
1229
1065
|
const commonLaw = (Array.isArray(v?.evidence) && v.evidence.length > 0) || !register;
|
|
1230
|
-
return `${commonLaw ?
|
|
1066
|
+
return `${commonLaw ? `<span class="src cl">${K.chips.commonLaw}</span>` : ''}${register ? `<span class="src reg">${K.chips.register}</span>` : ''}`;
|
|
1231
1067
|
}
|
|
1232
1068
|
|
|
1233
1069
|
// ── THE REVIEWER'S NOTES, ON THE REPORT ─────────────────────────────────────────────────
|
|
@@ -1245,15 +1081,15 @@ function sourceChips(v) {
|
|
|
1245
1081
|
|
|
1246
1082
|
// The clearance lane's own label, copied rather than re-worded. One spelling across
|
|
1247
1083
|
// both products is the point: a reader who has seen it on a clearance report knows what it means here.
|
|
1248
|
-
const USE_CHECK_LABEL =
|
|
1084
|
+
const USE_CHECK_LABEL = K.filingCard.useCheckLabel;
|
|
1249
1085
|
|
|
1250
1086
|
// WHAT THE CARD SAYS OF AN OWNER LOOKUP, read from the lookup's own outcome (owner-use-check.mjs), never from a marker:
|
|
1251
1087
|
// a lookup that failed or was refused, and a completed answer that carries no link, used to print the same "no result"
|
|
1252
1088
|
// literal, and neither shows a search that found nothing. The words are the owner's (approved 2026-10-28). A lookup's
|
|
1253
1089
|
// row with a link cites it. A completed search that found nothing keeps the existing no-result line, and no lookup
|
|
1254
1090
|
// today gives a sign of one beyond a missing link, which alone does not establish it.
|
|
1255
|
-
export const USE_CHECK_UNAVAILABLE =
|
|
1256
|
-
export const USE_CHECK_LINK_UNAVAILABLE =
|
|
1091
|
+
export const USE_CHECK_UNAVAILABLE = K.filingCard.useCheckUnavailable;
|
|
1092
|
+
export const USE_CHECK_LINK_UNAVAILABLE = K.filingCard.useCheckLinkUnavailable;
|
|
1257
1093
|
/** A lookup's outcome: "linked" with its link, "no-link", or "unavailable". `null` when no lookup was owed. PURE. */
|
|
1258
1094
|
export function ownerCheckOutcome(row) {
|
|
1259
1095
|
if (!row) return null;
|
|
@@ -1265,7 +1101,7 @@ export const ownerCheckText = (o) => !o ? null : o.kind === 'unavailable' ? USE_
|
|
|
1265
1101
|
: o.kind === 'linked' ? o.url : USE_CHECK_LINK_UNAVAILABLE;
|
|
1266
1102
|
|
|
1267
1103
|
/** The owner lookup covering a filing, joined by recordId. `null` when this run owed that filing none. */
|
|
1268
|
-
function ownerCheckFor(ownerChecks, recordId) {
|
|
1104
|
+
export function ownerCheckFor(ownerChecks, recordId) {
|
|
1269
1105
|
const id = String(recordId ?? '').trim();
|
|
1270
1106
|
if (!id) return null;
|
|
1271
1107
|
return (Array.isArray(ownerChecks) ? ownerChecks : [])
|
|
@@ -1315,7 +1151,7 @@ function aboutRequestBlock(scope, requestNotes, depthNote = '', productContext =
|
|
|
1315
1151
|
// is not listed here; it is disclosed where deferrals are. A territory the form's list cannot name, or an
|
|
1316
1152
|
// office this install could not reach, falls back to the count rather than printing a code or claiming
|
|
1317
1153
|
// a territory nothing was counted in.
|
|
1318
|
-
const on = provider ?
|
|
1154
|
+
const on = provider ? K.about.on(provider) : '';
|
|
1319
1155
|
const sc = registerCounts?.scope ?? {};
|
|
1320
1156
|
const deferred = new Set((sc.deferredJurisdictions ?? []).map(orderCode));
|
|
1321
1157
|
const ordered = [...new Set((sc.jurisdictions ?? [])
|
|
@@ -1324,8 +1160,8 @@ function aboutRequestBlock(scope, requestNotes, depthNote = '', productContext =
|
|
|
1324
1160
|
&& ordered.length > 0 && ordered.every(Boolean);
|
|
1325
1161
|
const counted = namesTheOrder ? `${listWords(ordered)}${on}.`
|
|
1326
1162
|
: regions.length
|
|
1327
|
-
? `${
|
|
1328
|
-
: (registerCounts ?
|
|
1163
|
+
? `${K.about.registers(regions.length)}${on}.`
|
|
1164
|
+
: (registerCounts ? `${K.about.countedWorldwide}${on}` : '');
|
|
1329
1165
|
if (!asked && !where && !classLine && !stage && !context && !counted) return '';
|
|
1330
1166
|
// ONE PANEL, THE SAME ON BOTH REPORTS (the 2026-09-16 report redesign). The rows carry what was asked for; the
|
|
1331
1167
|
// counts row says what was counted and hides the territory list behind a fold rather than running a
|
|
@@ -1333,13 +1169,13 @@ function aboutRequestBlock(scope, requestNotes, depthNote = '', productContext =
|
|
|
1333
1169
|
const row = (k, v, extra = '') => v ? `<div class="row"><span class="k">${esc(k)}</span><span class="v">${esc(v)}${extra}</span></div>` : '';
|
|
1334
1170
|
return `<div class="panel about">
|
|
1335
1171
|
<div class="label">About this request</div>
|
|
1336
|
-
${row(
|
|
1337
|
-
${row(
|
|
1338
|
-
${row(
|
|
1339
|
-
${row(
|
|
1340
|
-
${row(
|
|
1341
|
-
${row(
|
|
1342
|
-
${row(
|
|
1172
|
+
${row(K.about.typeOfSearch, stage)}
|
|
1173
|
+
${row(K.about.instructedUse, asked)}
|
|
1174
|
+
${row(K.about.classes, classLine)}
|
|
1175
|
+
${row(K.about.whereSearched, where)}
|
|
1176
|
+
${row(K.about.context, context)}
|
|
1177
|
+
${row(K.about.registersCounted, counted)}
|
|
1178
|
+
${row(K.about.searchedOn, searched)}
|
|
1343
1179
|
${/* item 18 — a note for the reviewing lawyer does not reach the delivered page */''}
|
|
1344
1180
|
</div>`;
|
|
1345
1181
|
}
|
|
@@ -1380,27 +1216,27 @@ function registerFindingBlock(v, markIndex, reads = null, framework = null, owne
|
|
|
1380
1216
|
const useCheckLine = !useCheck ? ''
|
|
1381
1217
|
: useCheck.kind === 'unavailable' ? esc(USE_CHECK_UNAVAILABLE)
|
|
1382
1218
|
: `${esc(USE_CHECK_LABEL)} ${useCheck.kind === 'linked' ? linkOrText(useCheck.url) : esc(USE_CHECK_LINK_UNAVAILABLE)}`;
|
|
1383
|
-
const meta = [r.owner ? esc(r.owner) :
|
|
1219
|
+
const meta = [r.owner ? esc(r.owner) : K.filingCard.proprietorNotStated, r.territory ? esc(r.territory) : null]
|
|
1384
1220
|
.filter(Boolean).join(' · ');
|
|
1385
|
-
const receipt = officeRecordCell(r, isHttpUrl(r.url) ? linkOrText(r.url) : esc(r.recordId ??
|
|
1221
|
+
const receipt = officeRecordCell(r, isHttpUrl(r.url) ? linkOrText(r.url) : esc(r.recordId ?? K.filingCard.noRecordAddress));
|
|
1386
1222
|
return `<div class="card ko-find" data-ko-mark="${Number(markIndex)}" data-ko-ord="${Number(v.ordinal)}">
|
|
1387
1223
|
<div class="top">
|
|
1388
1224
|
<div class="rail" style="background:var(${stop ?? '--faint'})"></div>
|
|
1389
1225
|
<div class="body">
|
|
1390
1226
|
<div class="cardhead">
|
|
1391
|
-
<span class="fnum">${esc(v.ref)}</span><
|
|
1392
|
-
band ? `<span class="ko-findband" style="background:var(${stop})">${bandChipText(band, method, row?.inputs)}</span>` : ''}<span class="src reg"
|
|
1393
|
-
<button class="ask-fi no-print"
|
|
1227
|
+
<span class="fnum">${esc(v.ref)}</span><h3 class="who">${esc(r.mark ?? K.filingCard.unnamed)}</h3>${
|
|
1228
|
+
band ? `<span class="ko-findband" style="background:var(${stop});color:var(${stop}-on)">${bandChipText(band, method, row?.inputs)}</span>` : ''}<span class="src reg">${K.chips.register}</span>
|
|
1229
|
+
<button class="ask-fi no-print">${K.finding.askAi}</button>
|
|
1394
1230
|
</div>
|
|
1395
1231
|
<p class="ko-findmeta">${meta}</p>
|
|
1396
1232
|
<p class="ko-findnet">${esc(v.statement)}</p>
|
|
1397
1233
|
${/* The 2026-09-16 report redesign — the head, the meta line and the one-line read stay visible; the rest
|
|
1398
1234
|
sits behind a fold, as it does on a clearance card, so a screen of many names reads as a
|
|
1399
1235
|
screen rather than as a wall. */''}
|
|
1400
|
-
<details class="drill"><summary
|
|
1236
|
+
<details class="drill"><summary>${K.finding.fullDetail}</summary><div class="drillbody">
|
|
1401
1237
|
${basisLine(band, read)}
|
|
1402
1238
|
${useCheckLine ? `<p class="ko-findev">${useCheckLine}</p>` : ''}
|
|
1403
|
-
<p class="ko-findev"
|
|
1239
|
+
<p class="ko-findev">${K.filingCard.registerRecord}${receipt}</p>
|
|
1404
1240
|
</div></details>
|
|
1405
1241
|
</div>
|
|
1406
1242
|
</div>
|
|
@@ -1417,29 +1253,26 @@ function firstRef(marks, framework) {
|
|
|
1417
1253
|
return '';
|
|
1418
1254
|
}
|
|
1419
1255
|
|
|
1420
|
-
// — THE REGISTER SENTENCE IS THE RENDERER'S, and it is the whole reason the
|
|
1256
|
+
// — THE REGISTER SENTENCE IS THE RENDERER'S, and it is the whole reason the clause below exists.
|
|
1421
1257
|
//
|
|
1422
1258
|
// A live run printed "the register overlay has not been run" in model prose directly under a table of
|
|
1423
1259
|
// register counts the same run had taken. The model was not lying: it cannot see the count lane, it is
|
|
1424
1260
|
// deliberately never shown the figures (register-count.mjs rule 1), and it filled the gap with the only
|
|
1425
1261
|
// thing it had. The fix is not a better prompt — it is that nobody who cannot see the machinery gets to
|
|
1426
|
-
// describe it. The validator forbids the model from saying anything about register coverage;
|
|
1427
|
-
//
|
|
1428
|
-
//
|
|
1429
|
-
// They read the SIDECARS, never the prose: the counts entry for this mark, and whether the product bought
|
|
1430
|
-
// the probe at all. Four states, four sentences, and none of them is a judgment.
|
|
1262
|
+
// describe it. The validator forbids the model from saying anything about register coverage; this
|
|
1263
|
+
// clause says it, from the artifacts.
|
|
1431
1264
|
//
|
|
1432
|
-
// —
|
|
1433
|
-
//
|
|
1434
|
-
//
|
|
1435
|
-
//
|
|
1436
|
-
//
|
|
1265
|
+
// — IT STATES THE POSITION, NOT ONLY THE COVERAGE. Coverage alone ("hit-counts were taken for this
|
|
1266
|
+
// name") answers a question nobody asked; the question a reader holds is whether anything STANDS on the
|
|
1267
|
+
// register for this name. registerPositionClause says that in every state, including the state where the
|
|
1268
|
+
// answer is "nothing does": an absence is a finding and must be said out loud, never left as a silence
|
|
1269
|
+
// over a table of numbers.
|
|
1437
1270
|
//
|
|
1438
|
-
// THE FUNCTION THAT COMPOSED THE PAIR
|
|
1439
|
-
//
|
|
1440
|
-
//
|
|
1441
|
-
//
|
|
1442
|
-
// `renderKnockoutHtml`, which passes it
|
|
1271
|
+
// THE COVERAGE CLAUSE AND THE FUNCTION THAT COMPOSED THE PAIR ARE GONE. Neither was called from anywhere
|
|
1272
|
+
// in the tree. The composer's call to `registerPositionClause` was the one that did NOT pass the
|
|
1273
|
+
// unreadable-sidecar flag, so anybody reviving it would have revived exactly the defect that flag closes,
|
|
1274
|
+
// silently, with nothing at the call site to say so. The live composition is inline in
|
|
1275
|
+
// `renderKnockoutHtml`, which passes it; whether counts were taken at all is said once, by tierAbsenceLine.
|
|
1443
1276
|
|
|
1444
1277
|
/**
|
|
1445
1278
|
* Where the name STANDS on the register that was searched. Six states, and they are six because
|
|
@@ -1466,31 +1299,29 @@ function firstRef(marks, framework) {
|
|
|
1466
1299
|
// The one sentence for a listing whose answer this run cannot state, whether the lister refused or the
|
|
1467
1300
|
// sidecar itself would not parse. Held once so the two callers below cannot drift: they are the same fact
|
|
1468
1301
|
// to a reader, and two copies of a sentence are two sentences waiting to differ.
|
|
1469
|
-
const FILINGS_NOT_LISTED =
|
|
1302
|
+
const FILINGS_NOT_LISTED = K.read.filingsNotListed;
|
|
1470
1303
|
|
|
1471
|
-
function registerPositionClause(mark, registerCounts, registerRecords, cards = [], where =
|
|
1304
|
+
function registerPositionClause(mark, registerCounts, registerRecords, cards = [], where = K.read.above, recordsUnreadable = false) {
|
|
1472
1305
|
if (!registerRecords) {
|
|
1473
1306
|
// AN UNREADABLE SIDECAR IS NOT AN ABSENT ONE. Absent means the listing was never taken, and the page
|
|
1474
1307
|
// says so. Unreadable means it WAS taken and this run cannot say what it found. The second sentence
|
|
1475
1308
|
// was already written, for the lister's own refusal, and was simply unreachable from a republish:
|
|
1476
1309
|
// a file that would not parse arrived as null, and null reads here as absent.
|
|
1477
1310
|
if (recordsUnreadable) return FILINGS_NOT_LISTED;
|
|
1478
|
-
return registerCounts ?
|
|
1311
|
+
return registerCounts ? K.read.countsNotListed : '';
|
|
1479
1312
|
}
|
|
1480
1313
|
if (registerRecords.unavailable) {
|
|
1481
1314
|
return FILINGS_NOT_LISTED;
|
|
1482
1315
|
}
|
|
1483
1316
|
const entry = recordsForMark(registerRecords, mark?.name);
|
|
1484
|
-
const provider = registerRecords.providerLabel ?? registerRecords.provider ??
|
|
1485
|
-
if (!entry) return
|
|
1317
|
+
const provider = registerRecords.providerLabel ?? registerRecords.provider ?? K.read.theRegister;
|
|
1318
|
+
if (!entry) return K.read.noListing;
|
|
1486
1319
|
if (cards.length) {
|
|
1487
1320
|
const classes = [...new Set(cards.flatMap((c) => (c.record.classes ?? []).map(Number).filter(Number.isFinite)))]
|
|
1488
1321
|
.sort((a, b) => a - b);
|
|
1489
|
-
const classWhere = classes.length ?
|
|
1490
|
-
const one = cards.length === 1;
|
|
1322
|
+
const classWhere = classes.length ? K.read.inClasses(classes.length, classes.join(', ')) : '';
|
|
1491
1323
|
const refs = cards.map((c) => c.ref).join(', ');
|
|
1492
|
-
return
|
|
1493
|
-
+ `stand${one ? 's' : ''} on ${provider}${classWhere} — ${refs} ${where}.`;
|
|
1324
|
+
return K.read.filingsStand(cards.length, readByJudgment(registerRecords) ? K.read.nameNear : K.read.closeVariation, provider, classWhere, refs, where);
|
|
1494
1325
|
}
|
|
1495
1326
|
const records = entry.records ?? [];
|
|
1496
1327
|
if (!records.length) {
|
|
@@ -1503,33 +1334,11 @@ function registerPositionClause(mark, registerCounts, registerRecords, cards = [
|
|
|
1503
1334
|
const terms = entry.terms ?? [];
|
|
1504
1335
|
const ranAndAnswered = terms.length > 0 && terms.every((t) => t.ok && !t.setAside);
|
|
1505
1336
|
return ranAndAnswered
|
|
1506
|
-
?
|
|
1337
|
+
? K.read.noneStands(provider)
|
|
1507
1338
|
: noneCarriedForward(entry) ? NONE_CARRIED_FORWARD
|
|
1508
|
-
:
|
|
1339
|
+
: K.read.listingIncomplete;
|
|
1509
1340
|
}
|
|
1510
|
-
return
|
|
1511
|
-
+ `none is carried up as a conflict — each is either shown dead on the register or outside the classes counted.`;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
function coverageClause(mark, registerCounts, probeRan) {
|
|
1515
|
-
const entry = registerCounts ? countsForMark(registerCounts, mark.name) : null;
|
|
1516
|
-
if (!entry?.counts) {
|
|
1517
|
-
return probeRan
|
|
1518
|
-
? 'Register: hit-counts are part of this search and none could be taken for this name — the reason is in the audit workbook.'
|
|
1519
|
-
: 'Register: not included in this product tier — no register was counted for this name.';
|
|
1520
|
-
}
|
|
1521
|
-
// A floor the register disclosed is a figure it gave, so a name counted only that way was counted.
|
|
1522
|
-
const anyFigure = COUNT_PREDICATES.some((p) => Number.isFinite(entry.counts[p.key]?.total) || disclosedFloor(entry.counts[p.key]) !== null);
|
|
1523
|
-
if (!anyFigure) return 'Register: no count could be taken for this name — the reason is in the audit workbook.';
|
|
1524
|
-
// COVERAGE, NOT THE FIGURES. asks the renderer to own the register-tier caveat, and the numbers
|
|
1525
|
-
// are already on this page twice — in the glance line at the top and in the counts table above this
|
|
1526
|
-
// section. A third rendering of "3 identical, 41 containing" at the foot of every card is noise, and
|
|
1527
|
-
// noise is what a reader stops reading. What the card owes is the fact the model cannot supply: that
|
|
1528
|
-
// the lane ran for THIS name, and where its output is.
|
|
1529
|
-
const scope = entry.classScope === 'all-classes' || !(entry.classes ?? []).length
|
|
1530
|
-
? 'across all classes'
|
|
1531
|
-
: `in class${entry.classes.length === 1 ? '' : 'es'} ${entry.classes.join(', ')}`;
|
|
1532
|
-
return `Register: hit-counts were taken for this name ${scope} — the figures are in the counts table above.`;
|
|
1341
|
+
return K.read.listedBelow(records.length);
|
|
1533
1342
|
}
|
|
1534
1343
|
|
|
1535
1344
|
// — the per-mark read, rendered as STRUCTURE because it was emitted as structure.
|
|
@@ -1566,9 +1375,9 @@ function coverageClause(mark, registerCounts, probeRan) {
|
|
|
1566
1375
|
// It read "Why not <the rung above>", which asked the reader to hold a ladder they had not been given
|
|
1567
1376
|
// and, at the top rung, had no band to name and asked a different question instead. The engine's
|
|
1568
1377
|
// bullets are unchanged; only the label is, and it no longer varies with the band.
|
|
1569
|
-
const COUNTER_LABEL =
|
|
1378
|
+
const COUNTER_LABEL = K.read.remainingUncertainties;
|
|
1570
1379
|
|
|
1571
|
-
const ASSESSMENT_FOLD_LABEL =
|
|
1380
|
+
const ASSESSMENT_FOLD_LABEL = K.read.readFullAssessment;
|
|
1572
1381
|
|
|
1573
1382
|
/** The scope block's own words, as one string, so the caveat filter reads exactly what the page prints. */
|
|
1574
1383
|
const SCOPE_BLOCK_TEXT = 'What this is. A fast screen for obvious blockers to using each name, from '
|
|
@@ -1594,75 +1403,47 @@ function koScale(framework, band) {
|
|
|
1594
1403
|
const n = ladder.length;
|
|
1595
1404
|
const idx = Math.max(0, ladder.findIndex((b) => b.toLowerCase() === String(band ?? '').trim().toLowerCase()));
|
|
1596
1405
|
const pct = (k) => (n > 1 ? (k / (n - 1)) * 100 : 50);
|
|
1597
|
-
const
|
|
1598
|
-
const
|
|
1406
|
+
const STOPS = ['--clear', '--low', '--med', '--high', '--severe'];
|
|
1407
|
+
const stopAt = (k) => STOPS[Math.round((k / Math.max(1, n - 1)) * (STOPS.length - 1))];
|
|
1408
|
+
const tone = (k) => `var(${stopAt(k)})`;
|
|
1599
1409
|
const shift = (k) => (k === 0 ? '0' : k === n - 1 ? '-100%' : '-50%');
|
|
1600
1410
|
return `<div class="kscale"><div class="kbar" style="background:linear-gradient(90deg,${
|
|
1601
1411
|
ladder.map((b, k) => `${tone(k)} ${pct(k)}%`).join(',')})"><div class="kmarker" style="left:${pct(idx)}%;transform:translateX(${
|
|
1602
|
-
idx === 0 ? '-12px' : idx === n - 1 ? 'calc(-100% + 12px)' : '-50%'})"><div class="kpill" style="background:${tone(idx)}">${
|
|
1412
|
+
idx === 0 ? '-12px' : idx === n - 1 ? 'calc(-100% + 12px)' : '-50%'})"><div class="kpill" style="background:${tone(idx)};color:var(${stopAt(idx)}-on)">${
|
|
1603
1413
|
esc(ladder[idx] || band || '')}</div><div class="kneedle" style="background:${tone(idx)}"></div></div></div><div class="kticks">${
|
|
1604
1414
|
ladder.map((b, k) => `<span class="${k === idx ? 'on' : ''}" style="left:${pct(k)}%;transform:translateX(${shift(k)})${
|
|
1605
1415
|
k === idx ? `;color:${tone(k)}` : ''}">${esc(b)}</span>`).join('')}</div></div>`;
|
|
1606
1416
|
}
|
|
1607
1417
|
|
|
1608
|
-
// WHAT HAPPENS NEXT
|
|
1609
|
-
//
|
|
1610
|
-
//
|
|
1611
|
-
//
|
|
1612
|
-
//
|
|
1613
|
-
//
|
|
1614
|
-
// that remainder, so the words appear once.
|
|
1615
|
-
//
|
|
1616
|
-
// A RECORD WRITTEN SINCE 2026-09-19 NEVER REACHES THIS WITH ONE: the pipeline removes a next-step section
|
|
1617
|
-
// before it writes the record (`knockout-next-step.mjs`), and the heading test below is that module's, so
|
|
1618
|
-
// the two cannot come to disagree about what a next step is. What still draws the section is a record
|
|
1619
|
-
// written before then, re-rendered.
|
|
1620
|
-
//
|
|
1621
|
-
// THE HEADING IS THE MODEL'S OWN, so this hoists only the LAST block of the assessment. The assessing
|
|
1622
|
-
// skill fixes no heading vocabulary — it asks for sub-headers "where the content divides", and the
|
|
1623
|
-
// wording is written fresh each run. Matching a list of phrases anywhere in the document would let a
|
|
1624
|
-
// mark whose read happens to argue under "Recommendation" in the MIDDLE have that middle lifted to the
|
|
1625
|
-
// bottom, handing the client the engine's argument in an order the engine did not write, with nothing
|
|
1626
|
-
// going red. A trailing block is the one position where a move cannot reorder what is left. So the
|
|
1627
|
-
// phrase list only decides whether the last block is the outcome; anything earlier stays where it was
|
|
1628
|
-
// written, and the page renders the assessment whole.
|
|
1629
|
-
export function splitOutcome(assessment) {
|
|
1630
|
-
const whole = String(assessment ?? '').trim();
|
|
1631
|
-
const lines = whole.split('\n');
|
|
1632
|
-
const heads = lines.map((l, i) => [l.trim(), i]).filter(([l]) => /^#{1,6}\s/.test(l));
|
|
1633
|
-
const last = heads[heads.length - 1];
|
|
1634
|
-
if (!last || !isNextStepHeading(last[0])) return { body: whole, outcome: '' };
|
|
1635
|
-
const outcome = lines.slice(last[1] + 1).join('\n').trim();
|
|
1636
|
-
if (!outcome) return { body: whole, outcome: '' };
|
|
1637
|
-
return { body: lines.slice(0, last[1]).join('\n').trim(), outcome };
|
|
1638
|
-
}
|
|
1639
|
-
function markOutcomes(marks) {
|
|
1640
|
-
return (marks ?? [])
|
|
1641
|
-
.map((m) => ({ name: String(m?.name ?? '').trim(), text: splitOutcome(m?.assessment).outcome }))
|
|
1642
|
-
.filter((o) => o.text);
|
|
1643
|
-
}
|
|
1418
|
+
// NO "WHAT HAPPENS NEXT" (design's rule, approved by the owner 2026-11-18). The section hoisted a next-step block out of
|
|
1419
|
+
// each name's assessment and drew it under its own heading. Since 2026-09-19 the pipeline takes that block off before it
|
|
1420
|
+
// writes the record (`knockout-next-step.mjs`), so no record written since carries one, and a Knockout leads to the
|
|
1421
|
+
// lawyer's choice of which names go on to a clearance, which each name's rating already states. The section and its
|
|
1422
|
+
// hoist are gone: an assessment renders whole, as written. A page delivered earlier keeps what it was delivered with;
|
|
1423
|
+
// the cross-build refusal guards it.
|
|
1644
1424
|
|
|
1645
|
-
function readBlock(m, framework) {
|
|
1425
|
+
function readBlock(m, framework, { opening = '' } = {}) {
|
|
1646
1426
|
const factors = (m.factors ?? []).filter((s) => typeof s === 'string' && s.trim());
|
|
1647
1427
|
const counter = (m.counterFactors ?? []).filter((s) => typeof s === 'string' && s.trim());
|
|
1648
1428
|
const structured = Boolean(m.basis || factors.length || counter.length || m.mitigation);
|
|
1649
1429
|
const bullets = (m.bullets ?? []).map((b) => `<li>${inlineMd(b)}</li>`).join('');
|
|
1650
1430
|
if (!structured) return bullets ? `<ul class="ko-bul">${bullets}</ul>` : '';
|
|
1651
|
-
const assessment =
|
|
1431
|
+
const assessment = String(m.assessment ?? '').trim();
|
|
1652
1432
|
const band = String(m.rating ?? '').trim();
|
|
1653
1433
|
const card = [
|
|
1654
|
-
|
|
1434
|
+
framework?.title
|
|
1435
|
+
? `<div class="gauge-head"><div class="label">${K.readCard.overallRisk}</div><div class="gauge-fw">${esc(framework.title)}</div></div>`
|
|
1436
|
+
: `<div class="label">${K.readCard.overallRisk}</div>`,
|
|
1655
1437
|
koScale(framework, band),
|
|
1656
1438
|
m.basis ? `<p class="ko-basisline">${inlineMd(m.basis)}</p>` : '',
|
|
1657
|
-
factors.length ? `<div class="gwhy">${band ? `<div class="label"
|
|
1439
|
+
factors.length ? `<div class="gwhy">${band ? `<div class="label">${esc(K.readCard.why(band))}</div>` : ''}<ul class="ko-bul">${
|
|
1658
1440
|
factors.map((f) => `<li>${inlineMd(f)}</li>`).join('')}</ul></div>` : '',
|
|
1659
|
-
framework?.title ? `<div class="gframe">Rated on the ${esc(framework.title)}</div>` : '',
|
|
1660
1441
|
].filter(Boolean).join('');
|
|
1661
1442
|
return [
|
|
1662
1443
|
card ? `<div class="panel gauge ko-gauge">${card}</div>` : '',
|
|
1663
1444
|
counter.length ? `<div class="ko-counter"><span class="ko-lbl2">${esc(COUNTER_LABEL)}</span><ul class="ko-bul">${
|
|
1664
1445
|
counter.map((f) => `<li>${inlineMd(f)}</li>`).join('')}</ul></div>` : '',
|
|
1665
|
-
m.mitigation ? `<div class="ko-mitig"><span class="ko-lbl2"
|
|
1446
|
+
m.mitigation ? `<div class="ko-mitig"><span class="ko-lbl2">${K.readCard.whatWouldChange}</span><p>${inlineMd(m.mitigation)}</p></div>` : '',
|
|
1666
1447
|
// ── THE ASSESSMENT REPLACES THE "FULL NARRATIVE" FOLD ────────────────────────────────────────────
|
|
1667
1448
|
//
|
|
1668
1449
|
// The model writes both. `bullets` (five) say in other words what `factors` (four) already say
|
|
@@ -1677,15 +1458,20 @@ function readBlock(m, framework) {
|
|
|
1677
1458
|
//
|
|
1678
1459
|
// CLAUSE F. An archived run carries bullets and no assessment: it keeps the fold it was delivered
|
|
1679
1460
|
// with, under its own old label. The fallback is the old block, never an empty new one.
|
|
1680
|
-
|
|
1461
|
+
// A PER-NAME PAGE OF A MULTI-NAME BATCH OPENS WITH THIS VERY ASSESSMENT (the publisher sets it as the page's
|
|
1462
|
+
// opening), so the fold would print it a second time: 10 to 26% of each such page repeated. There the fold is
|
|
1463
|
+
// not drawn (owner, 2026-11-18). A single-name page opens with the batch paragraph, which is other text, and keeps it.
|
|
1464
|
+
assessment && String(opening ?? '').trim() === String(m.assessment ?? '').trim() ? ''
|
|
1465
|
+
: assessment
|
|
1681
1466
|
? `<details class="ko-full"><summary>${esc(ASSESSMENT_FOLD_LABEL)}</summary><div class="ko-assess">${mdParagraphs(assessment)}</div></details>`
|
|
1682
|
-
: (bullets ? `<details class="ko-full"><summary
|
|
1467
|
+
: (bullets ? `<details class="ko-full"><summary>${K.readCard.fullNarrative}</summary><ul class="ko-bul">${bullets}</ul></details>` : ''),
|
|
1683
1468
|
].filter(Boolean).join('');
|
|
1684
1469
|
}
|
|
1685
1470
|
|
|
1686
|
-
function analysisSection(marks, framework, { registerCounts = null, probeRan = false, registerRecords = null, ownerChecks = [], frameworkMethod = null, cardOrder = null } = {}) {
|
|
1471
|
+
function analysisSection(marks, framework, { registerCounts = null, probeRan = false, registerRecords = null, ownerChecks = [], frameworkMethod = null, cardOrder = null, opening = '' } = {}) {
|
|
1472
|
+
const cite = { filings: filingsByHandle(registerRecords), provider: registerRecords?.provider ?? null };
|
|
1687
1473
|
const cards = marks.map((m, markIndex) => {
|
|
1688
|
-
const bullets = readBlock(m, framework);
|
|
1474
|
+
const bullets = readBlock(m, framework, { opening });
|
|
1689
1475
|
// — the promoted register filings, in the SAME list as the common-law conflicts. A name's filing evidence
|
|
1690
1476
|
// leads and its web use follows, the order a lawyer's report takes: first the findings that weigh a filing,
|
|
1691
1477
|
// then the filing cards, then the findings resting on use alone. Each keeps its own order, so the
|
|
@@ -1699,7 +1485,7 @@ function analysisSection(marks, framework, { registerCounts = null, probeRan = f
|
|
|
1699
1485
|
// are the same fact: further filings for this name, all of them listed below.
|
|
1700
1486
|
const held = reg.promoted - drawn.length;
|
|
1701
1487
|
const overflow = held > 0
|
|
1702
|
-
? `<p class="ko-bul">${esc(
|
|
1488
|
+
? `<p class="ko-bul">${esc(K.furtherFilings(held))}</p>`
|
|
1703
1489
|
: '';
|
|
1704
1490
|
// THE DEFECT THIS CLOSES. This line was `(m.findings ??).filter((f) => f?.url)`, and a
|
|
1705
1491
|
// typed finding has no `url` — so every conflict was dropped from the page and a mark whose findings
|
|
@@ -1708,7 +1494,7 @@ function analysisSection(marks, framework, { registerCounts = null, probeRan = f
|
|
|
1708
1494
|
// nothing anywhere saying so. findings-model.mjs's view reads both shapes and drops nothing.
|
|
1709
1495
|
const views = knockoutFindingViews(m, { manifest: framework });
|
|
1710
1496
|
const weighsAFiling = (v) => Array.isArray(v?.weighedFilings) && v.weighedFilings.length > 0;
|
|
1711
|
-
const findsOf = (list) => list.map((v) => findingBlock(v, framework, markIndex, frameworkMethod)).join('');
|
|
1497
|
+
const findsOf = (list) => list.map((v) => findingBlock(v, framework, markIndex, frameworkMethod, cite)).join('');
|
|
1712
1498
|
// — THE REGISTER CARDS ARE INSIDE `body`, and that is the fall-through guard. A mark whose only
|
|
1713
1499
|
// conflict is a filing on the register used to reach the sentence below and be published as clean.
|
|
1714
1500
|
// The guard is deliberately TIGHT: a listed filing that is dead or out of the counted classes does
|
|
@@ -1726,15 +1512,16 @@ function analysisSection(marks, framework, { registerCounts = null, probeRan = f
|
|
|
1726
1512
|
// mark says "no adverse signals recorded" — a mark with nothing against it — so anything added to it
|
|
1727
1513
|
// silently retires that sentence. Named ONCE: the read above carries it where it drew a card, and
|
|
1728
1514
|
// the test for that reads the markup this same function just produced.
|
|
1729
|
-
|
|
1730
|
-
|
|
1515
|
+
// The rating line reads as the clearance's does, "Overall risk" and the framework's name (owner, 2026-11-18).
|
|
1516
|
+
const frameworkLine = !body.includes('class="gauge-fw"') && framework?.title && String(m.rating ?? '').trim()
|
|
1517
|
+
? `<div class="ko-fwline"><div class="label">${K.readCard.overallRisk}</div><div class="gauge-fw">${esc(framework.title)}</div></div>` : '';
|
|
1731
1518
|
return `<div class="ko-row">
|
|
1732
1519
|
<div>
|
|
1733
1520
|
<p class="ko-name">${esc(m.name)}</p>
|
|
1734
1521
|
${bandColumn(m, framework)}
|
|
1735
1522
|
</div>
|
|
1736
1523
|
<div>
|
|
1737
|
-
${body ||
|
|
1524
|
+
${body || `<p class="ko-bul">${K.readCard.noAdverseSignals}</p>`}
|
|
1738
1525
|
${frameworkLine}
|
|
1739
1526
|
${m.degraded ? `<p class="ko-degraded">${esc(DEGRADED_NOTE)}</p>` : ''}
|
|
1740
1527
|
${reviewerNotesBlock(m)}
|
|
@@ -1807,7 +1594,7 @@ function depthStrip(note) {
|
|
|
1807
1594
|
// section above them was removed, and the first restoration drew them as bare paragraphs — dropping this
|
|
1808
1595
|
// sentence, which is the whole of what the ruling asked for. One paragraph, the lead-in first, the
|
|
1809
1596
|
// caveats verbatim after it; only where it sits on the page has changed.
|
|
1810
|
-
const CAVEAT_LEAD =
|
|
1597
|
+
const CAVEAT_LEAD = K.caveatLead;
|
|
1811
1598
|
|
|
1812
1599
|
|
|
1813
1600
|
/**
|
|
@@ -1827,6 +1614,54 @@ const CAVEAT_LEAD = 'This screen also carries the following limits:';
|
|
|
1827
1614
|
* hardcoded product name — and, worse, the name of a RETIRED row, so a knockout whose level the registry
|
|
1828
1615
|
* had forgotten asserted it was the one product it provably was not.
|
|
1829
1616
|
*/
|
|
1617
|
+
/**
|
|
1618
|
+
* WHAT A KNOCKOUT LEFT OPEN, from the run's own record (design's rule, approved by the owner 2026-11-18). PURE.
|
|
1619
|
+
*
|
|
1620
|
+
* A register step that failed is a row under the report's "Register" name: the listing that never came back is not
|
|
1621
|
+
* searched, and a reading that stopped part-way is partly covered. A name whose automated research was unavailable is a
|
|
1622
|
+
* row under its own name, not searched. The notes are the shipped lines, the deferral row's for a step and the page's
|
|
1623
|
+
* own for a name, so nothing here is a new sentence and nothing comes from model prose. A refused listing is not a
|
|
1624
|
+
* search that failed (the run never offered it), and a run with nothing left open returns no rows.
|
|
1625
|
+
*/
|
|
1626
|
+
export function knockoutLeftOpen(steps, marks = []) {
|
|
1627
|
+
return [
|
|
1628
|
+
...(steps?.listing ? [{ area: PART_NAMES.register, state: 'not-searched', note: plainDeferralReason(steps.listing.reason) }] : []),
|
|
1629
|
+
...(steps?.reading ? [{ area: PART_NAMES.register, state: 'coverage-limited', note: plainDeferralReason(steps.reading.reason) }] : []),
|
|
1630
|
+
...(Array.isArray(marks) ? marks : []).filter((m) => m?.degraded === true && String(m?.name ?? '').trim())
|
|
1631
|
+
.map((m) => ({ area: String(m.name).trim(), state: 'not-searched', note: DEGRADED_NOTE })),
|
|
1632
|
+
];
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
// ONE NAME'S KNOCKOUT PAGE FROM THE RUN'S REPORT DOCUMENT (C14). The run's report document (publish/report-document.mjs,
|
|
1636
|
+
// `_driver/report-document.json`) holds every fact a Knockout page prints. This reads it, as written, for the name at
|
|
1637
|
+
// `at`, and hands the page the arguments publish handed it: the name's own slice of the findings record, opening with
|
|
1638
|
+
// that name's own assessment on a batch, and the band its report carries. What the document does not hold is the page's
|
|
1639
|
+
// surface (the workbook's portal address, the confidentiality posture, the demo flag) and the two sets it holds by
|
|
1640
|
+
// reference (each filing's saved record and each saved logo), which publish resolves from the run. PURE given its inputs.
|
|
1641
|
+
export function renderKnockoutDocument(doc, at, { filingRecords = new Map(), logos = new Map(), auditHref = null, delivery = null, demoData = false } = {}) {
|
|
1642
|
+
const run = doc?.run ?? {}, scope = doc?.scope ?? {}, client = doc?.client ?? {}, framework = doc?.framework ?? {};
|
|
1643
|
+
const findings = client.findings ?? {};
|
|
1644
|
+
const m = (findings.marks ?? [])[at];
|
|
1645
|
+
// A NAME'S PAGE OPENS WITH ITS OWN ASSESSMENT. On a batch the batch's paragraph names every name in it, and a reader
|
|
1646
|
+
// who ordered one name must not be handed a summary about other clients' names, so each name's page takes that name's
|
|
1647
|
+
// own paragraph in its place; a one-name run keeps its own. An archived name with no assessment opens blank, as
|
|
1648
|
+
// delivered. The batch's paragraph itself stays whole in the record.
|
|
1649
|
+
const one = { ...findings, marks: [m], batch: { ...(findings.batch ?? {}), ...(run.single ? {} : { executiveSummary: String(m?.assessment ?? '').trim() }) } };
|
|
1650
|
+
const steps = scope.steps ?? {};
|
|
1651
|
+
const registerRecords = client.registerRecords ?? null;
|
|
1652
|
+
const product = run.product ?? {};
|
|
1653
|
+
return renderKnockoutHtml(one, framework.manifest ?? null, {
|
|
1654
|
+
runId: run.runId, overall: run.reports?.[at]?.band ?? null, issued: run.issued, searched: run.searched, auditFile: run.auditFile,
|
|
1655
|
+
probeRan: scope.probeRan, registerCounts: client.registerCounts ?? null, registerRecords, ownerChecks: client.ownerChecks ?? [],
|
|
1656
|
+
instructedScope: scope.instructedScope ?? null,
|
|
1657
|
+
identity: { identity: product.name ?? null, stageLabel: product.stageLabel ?? null, template: product.template ?? null, banner: product.banner ?? null },
|
|
1658
|
+
matter: run.runId, auditHref,
|
|
1659
|
+
leftOpen: knockoutLeftOpen({ listing: registerRecords ? null : steps.listing, reading: steps.reading }, one.marks),
|
|
1660
|
+
registerRecordsUnreadable: client.registerRecordsUnreadable, filingRecords, logos, demoData, depthNote: product.depthNote ?? null,
|
|
1661
|
+
searchPolicy: scope.policy ?? null, delivery, servedModels: client.servedModels, frameworkMethod: framework.method,
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1830
1665
|
export function renderKnockoutHtml(findings, framework, {
|
|
1831
1666
|
runId, overall, issued = null, searched = null, auditFile = null, probeRan = false, registerCounts = null,
|
|
1832
1667
|
registerRecords = null,
|
|
@@ -1835,10 +1670,14 @@ export function renderKnockoutHtml(findings, framework, {
|
|
|
1835
1670
|
// is its own value rather than a marker on `registerRecords`, because three sites PRINT
|
|
1836
1671
|
// `registerRecords.unavailable` and anything invented for it would become client-facing wording.
|
|
1837
1672
|
registerRecordsUnreadable = false,
|
|
1673
|
+
// Each listed filing's saved record and logo, by its normalised record id; empty draws the table as before.
|
|
1674
|
+
filingRecords = new Map(), logos = new Map(),
|
|
1675
|
+
// The searches this run did not complete, as Left open rows ({area, state, note}); empty draws no section.
|
|
1676
|
+
leftOpen = [],
|
|
1838
1677
|
// The driver's own record of the owner lookups it ran. Defaults to [] so an
|
|
1839
1678
|
// archived run that predates the lane renders exactly as it was delivered.
|
|
1840
1679
|
ownerChecks = [],
|
|
1841
|
-
identity = null, matter = null, homeHref = null, chromeHref = null, depthNote = null,
|
|
1680
|
+
identity = null, matter = null, homeHref = null, chromeHref = null, depthNote = null, auditHref = null,
|
|
1842
1681
|
// — the run's FROZEN policy, so the scope section states what this run was
|
|
1843
1682
|
// instructed to do rather than what its artifacts happen to show. Defaults to null, and an archived
|
|
1844
1683
|
// run that carries none keeps the artifact-derived sentence it was delivered with.
|
|
@@ -1913,7 +1752,7 @@ export function renderKnockoutHtml(findings, framework, {
|
|
|
1913
1752
|
// promoted, and the clause would name refs no card carries.
|
|
1914
1753
|
const cardsByMark = new Map(marks.map((m) => [m?.name, registerCardViews(m, framework, registerRecords).cards]));
|
|
1915
1754
|
const positions = marks.map((m) => {
|
|
1916
|
-
const clause = registerPositionClause(m, registerCounts, registerRecords, cardsByMark.get(m?.name) ?? [],
|
|
1755
|
+
const clause = registerPositionClause(m, registerCounts, registerRecords, cardsByMark.get(m?.name) ?? [], K.read.below, registerRecordsUnreadable);
|
|
1917
1756
|
if (!clause) return '';
|
|
1918
1757
|
return marks.length > 1 && m?.name ? `${m.name}: ${clause}` : clause;
|
|
1919
1758
|
}).filter(Boolean).join(' ');
|
|
@@ -1933,13 +1772,13 @@ export function renderKnockoutHtml(findings, framework, {
|
|
|
1933
1772
|
// a disclosure, which is the one failure that would matter on a client-facing page. A similarity score
|
|
1934
1773
|
// could; that is why there isn't one.
|
|
1935
1774
|
const newCaveats = caveats.filter((c) => saysSomethingNew(c, SCOPE_BLOCK_TEXT));
|
|
1936
|
-
const analysis = analysisSection(marks, framework, { registerCounts, probeRan, registerRecords, ownerChecks, frameworkMethod, cardOrder: findings?.cardOrder });
|
|
1775
|
+
const analysis = analysisSection(marks, framework, { registerCounts, probeRan, registerRecords, ownerChecks, frameworkMethod, cardOrder: findings?.cardOrder, opening: findings?.batch?.executiveSummary });
|
|
1937
1776
|
// The request-level notes, gathered across every mark on the document and rendered ONCE at the top.
|
|
1938
1777
|
// They are about the asking, not about a name, so a batch repeating them per mark would be the same
|
|
1939
1778
|
// sentence three times. reviewerNotesBlock renders the rest, under that mark's own cards.
|
|
1940
1779
|
const requestNotes = marks.flatMap((m) => splitKnockoutNotes(m).request);
|
|
1941
1780
|
const aboutRequest = aboutRequestBlock(instructedScope, requestNotes, depthNote, productContext, searched, registerCounts);
|
|
1942
|
-
const provider = hasCounts ? (registerCounts.providerLabel ?? registerCounts.provider ??
|
|
1781
|
+
const provider = hasCounts ? (registerCounts.providerLabel ?? registerCounts.provider ?? K.counted.theRegister) : null;
|
|
1943
1782
|
// The filings appendix renders only when the run produced a listing artifact — never on its absence,
|
|
1944
1783
|
// and never as an empty table. A knockout with no sidecar publishes exactly the counts-only document.
|
|
1945
1784
|
// — THE DRILL-THROUGH CLAIM IS NARROWED TO WHAT IT IS TRUE OF. The workbook line below said "the
|
|
@@ -1954,12 +1793,19 @@ export function renderKnockoutHtml(findings, framework, {
|
|
|
1954
1793
|
const registerCardCount = marks.reduce((n, m) =>
|
|
1955
1794
|
n + registerCardsOnPage(registerCardViews(m, framework, registerRecords).cards, m, framework).length, 0);
|
|
1956
1795
|
const hasRecords = Boolean(registerRecords && (registerRecords.marks?.length || registerRecords.unavailable));
|
|
1957
|
-
const filings = hasRecords ? filingsSection(marks, registerRecords) : '';
|
|
1958
|
-
const onFieldSec = `<div class="sec" id="findings"><span class="num"></span><h2
|
|
1796
|
+
const filings = hasRecords ? filingsSection(marks, registerRecords, { filingRecords, logos }) : '';
|
|
1797
|
+
const onFieldSec = `<div class="sec" id="findings"><span class="num"></span><h2>${K.sections.conflicts}</h2></div>
|
|
1959
1798
|
${counts}
|
|
1960
1799
|
${analysis}`;
|
|
1800
|
+
// WHAT THIS KNOCKOUT LEFT OPEN (design's rule, approved by the owner 2026-11-18). A name whose register search failed read
|
|
1801
|
+
// as a clean name, where a clearance in the same place says so. The rows are the run's own record of searches that did
|
|
1802
|
+
// not complete, built from the run's record by knockoutLeftOpen (above), in the clearance's grid and state words; none
|
|
1803
|
+
// is model prose. A Knockout with nothing left open draws nothing, byte for byte. No scope narration returns.
|
|
1804
|
+
const leftOpenSec = Array.isArray(leftOpen) && leftOpen.length
|
|
1805
|
+
? `\n\n <div class="sec" id="open"><span class="num"></span><h2>${K.sections.leftOpen}</h2></div>\n <div class="panel"><div class="openrows">${coverageGrid(leftOpen, { verdict: false })}</div></div>`
|
|
1806
|
+
: '';
|
|
1961
1807
|
const filingsSec = filings
|
|
1962
|
-
? `<div class="sec" id="filings"><span class="num"></span><h2
|
|
1808
|
+
? `<div class="sec" id="filings"><span class="num"></span><h2>${K.sections.alsoConsidered}</h2><span class="note">${K.sections.alsoConsideredNote}</span></div>
|
|
1963
1809
|
${filings}`
|
|
1964
1810
|
: '';
|
|
1965
1811
|
|
|
@@ -1968,19 +1814,15 @@ ${filings}`
|
|
|
1968
1814
|
// falls back to its intrinsic 500px and overflows the body box by ~440px, which the height bridge then
|
|
1969
1815
|
// posts as the frame height. That is invisible to a string test and obvious to a browser: the page
|
|
1970
1816
|
// renders correctly and sits in a frame with 450px of dead space under it. Caught by render-check.
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
<title>${productName ? `${esc(productName)} — ` : ''}${esc(title)} · ${esc(BRAND.name)}</title>
|
|
1977
|
-
${REPORT_FONT_STYLE}${FAVICON_LINK}${THEME_INIT_EXPLICIT}
|
|
1978
|
-
<style>${cssInline}${REPORT_ROOT_DARK_EXPLICIT}${PRINT_LIGHT}</style>${chromeLinkTag}</head><body class="has-glow">
|
|
1979
|
-
<div class="rep-stickyhead no-print">
|
|
1817
|
+
const doc = pageShell({
|
|
1818
|
+
title: `${productName ? `${esc(productName)} — ` : ''}${esc(title)}`,
|
|
1819
|
+
css: CHROME_CSS + '\n' + THEME_BTN_CSS + '\n' + KO_CSS,
|
|
1820
|
+
chromeHref,
|
|
1821
|
+
body: `<div class="rep-stickyhead no-print" data-report-chrome>
|
|
1980
1822
|
<div class="topbar no-print">
|
|
1981
|
-
${homeHref ? `<a class="homebtn tb-back no-print" href="${escAttr(homeHref)}" title="
|
|
1823
|
+
${homeHref ? `<a class="homebtn tb-back no-print" href="${escAttr(homeHref)}" title="${K.topbar.allReports}"><span aria-hidden="true">←</span> <span class="tb-back-lbl">${K.topbar.allReports}</span></a>` : ''}
|
|
1982
1824
|
${logoLockup({ mark: 20, tag: '' })}<span class="sp"></span>
|
|
1983
|
-
<span class="tb-risk" style="background:var(${overallStop})">${esc(overall ?? '—')}</span>
|
|
1825
|
+
<span class="tb-risk" style="background:var(${overallStop});color:var(${overallStop}-on)">${esc(overall ?? '—')}</span>
|
|
1984
1826
|
${/* THE IDENTITY LINE NAMES THE MARK AND THE SEARCH, NOT THE RUN. It printed `matter || runId`,
|
|
1985
1827
|
and the caller passes the runId AS the matter, so what a client read was the engine's own run
|
|
1986
1828
|
identifier — on a real run a temporary-directory name carrying a capture suffix. It is ours, it
|
|
@@ -1990,9 +1832,9 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${THEME_INIT_EXPLICIT}
|
|
|
1990
1832
|
neither the line does not render. A run whose registry identity is missing is exactly the case
|
|
1991
1833
|
that used to print the raw name, so falling back would keep the defect for the runs that have
|
|
1992
1834
|
it. */''}
|
|
1993
|
-
${title || productName ? `<span class="mono tb-matter" style="font-size:11px;color:var(--
|
|
1835
|
+
${title || productName ? `<span class="mono tb-matter" style="font-size:11px;color:var(--slate)">${
|
|
1994
1836
|
[title, productName].filter(Boolean).map(esc).join(' / ')}</span>` : ''}
|
|
1995
|
-
${issuedDate ? `<span class="mono tb-issued"><span aria-hidden="true">🗓 </span
|
|
1837
|
+
${issuedDate ? `<span class="mono tb-issued"><span aria-hidden="true">🗓 </span>${esc(K.topbar.issuedOn(issuedDate))}</span>` : ''}
|
|
1996
1838
|
${/* THE EXPORT CONTROL, which this template had never emitted. The approved header carries it and the
|
|
1997
1839
|
clearance report has it; the knockout offered a reader who opens the file no route to a PDF at
|
|
1998
1840
|
all, while its own stylesheet still described the utility buttons as "used by the topbar Export
|
|
@@ -2011,18 +1853,21 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${THEME_INIT_EXPLICIT}
|
|
|
2011
1853
|
own change with its own byte-comparison against a real archived run. Filed as a follow-up. The
|
|
2012
1854
|
class names are the shared vocabulary this file already emits, so report.css styles both. */''}
|
|
2013
1855
|
<div class="tb-menu">
|
|
2014
|
-
<button type="button" class="tbbtn tb-ask no-print">\u2726 <span class="tb-lbl"
|
|
1856
|
+
<button type="button" class="tbbtn tb-ask no-print">\u2726 <span class="tb-lbl">${K.topbar.askAi}</span></button>
|
|
2015
1857
|
${EXPORT_TOGGLE}
|
|
2016
1858
|
${exportPopover(`
|
|
2017
|
-
<button class="util primary" onclick="exportPDF()">\u2b07
|
|
1859
|
+
<button class="util primary" onclick="exportPDF()">\u2b07 ${K.topbar.exportPdf}</button>
|
|
1860
|
+
${/* THE CLEARANCE'S OWN WORKBOOK CONTROL (owner, 2026-11-18). The page cites "the audit workbook" and gave no way to
|
|
1861
|
+
open it; the control links the portal's audit route the publisher hands in, and is absent when there is none. */''}${
|
|
1862
|
+
isHttpUrl(auditHref) ? `<a class="util" href="${escAttr(auditHref)}" download>\u2b07 ${K.topbar.downloadAudit}</a>` : ''}
|
|
2018
1863
|
<div class="tb-sep"></div>
|
|
2019
|
-
<div class="tb-row"><button class="util" onclick="openAll(true)"
|
|
1864
|
+
<div class="tb-row"><button class="util" onclick="openAll(true)">${K.topbar.expandAll}</button><button class="util" onclick="openAll(false)">${K.topbar.collapseAll}</button></div>
|
|
2020
1865
|
`)}
|
|
2021
1866
|
</div>
|
|
2022
1867
|
</div>
|
|
2023
1868
|
<!--SECTION-STRIP-->
|
|
2024
1869
|
</div>
|
|
2025
|
-
<div class="fab-stack">${themeButton()}</div>
|
|
1870
|
+
<div class="fab-stack" data-report-chrome>${themeButton()}</div>
|
|
2026
1871
|
<script>
|
|
2027
1872
|
/* THE DOCUMENT'S OWN CONTROLS, and they are GLOBAL on purpose.
|
|
2028
1873
|
The portal frames this document and drives it by postMessage. The bridge injected at serve time looks
|
|
@@ -2045,6 +1890,7 @@ window.addEventListener('beforeprint',o);})();
|
|
|
2045
1890
|
the clearance template carries, for the same markup; they move together when the top bar is shared. */
|
|
2046
1891
|
${EXPORT_MENU_JS}</script>
|
|
2047
1892
|
<div class="wrap">
|
|
1893
|
+
<main>
|
|
2048
1894
|
<header class="hero" id="summary">
|
|
2049
1895
|
${demoBannerHtml(demoData === true)}
|
|
2050
1896
|
${confLineHtml(delivery, productName)}
|
|
@@ -2055,16 +1901,8 @@ ${EXPORT_MENU_JS}</script>
|
|
|
2055
1901
|
|
|
2056
1902
|
${glance}
|
|
2057
1903
|
${onFieldSec}
|
|
2058
|
-
${filingsSec}
|
|
1904
|
+
${filingsSec}${leftOpenSec}
|
|
2059
1905
|
|
|
2060
|
-
${(() => {
|
|
2061
|
-
const outs = markOutcomes(marks);
|
|
2062
|
-
if (!outs.length) return '';
|
|
2063
|
-
const label = outs.length > 1;
|
|
2064
|
-
const body = outs.map((o) => (label && o.name ? `<h3>${esc(o.name)}</h3>` : '') + mdParagraphs(o.text)).join('');
|
|
2065
|
-
return `<div class="sec" id="next"><span class="num"></span><h2>What happens next</h2></div>
|
|
2066
|
-
<div class="panel actions"><div class="actgrp act-you">${body}</div></div>`;
|
|
2067
|
-
})()}
|
|
2068
1906
|
|
|
2069
1907
|
${/* The 2026-09-16 report redesign — the scope section and its fold are off the page: what a screen is and
|
|
2070
1908
|
what it did not search is the narration the owner ruled out. */''}
|
|
@@ -2081,6 +1919,7 @@ ${EXPORT_MENU_JS}</script>
|
|
|
2081
1919
|
is kept. Both of the demo run's survive. */''}
|
|
2082
1920
|
${newCaveats.length ? `<div class="panel ko-caveats"><p class="ko-scope">${CAVEAT_LEAD}<br>${
|
|
2083
1921
|
newCaveats.map((c) => inlineMd(c)).join('<br>')}</p></div>` : ''}
|
|
1922
|
+
</main>
|
|
2084
1923
|
|
|
2085
1924
|
<footer>
|
|
2086
1925
|
${/* THE FOOTER NAMES THE SAME THREE THINGS THE HEADER DOES. It read "<product>. / Matter
|
|
@@ -2093,222 +1932,11 @@ ${EXPORT_MENU_JS}</script>
|
|
|
2093
1932
|
off this page; the line is provenance rather than the narration that was ruled out, so it moved
|
|
2094
1933
|
here. Owner ruling, 2026-09-17. Adjacent on purpose, as on the clearance side. -->${servedModelsLine(servedModels)}
|
|
2095
1934
|
<span>${[title, productName].filter(Boolean).map(esc).join(' \u00b7 ')}${
|
|
2096
|
-
issuedDate ? `${title || productName ? ' \u00b7 ' : ''}
|
|
1935
|
+
issuedDate ? `${title || productName ? ' \u00b7 ' : ''}${esc(K.issuedOn(issuedDate))}` : ''}${
|
|
2097
1936
|
title || productName || issuedDate ? '.' : ''}</span>
|
|
2098
1937
|
${logoLockup({ mark: 16 })}
|
|
2099
1938
|
</footer>
|
|
2100
|
-
</div
|
|
2101
|
-
|
|
1939
|
+
</div>`,
|
|
1940
|
+
});
|
|
2102
1941
|
return doc.replace('<!--SECTION-STRIP-->', sectionStrip(doc, STRIP));
|
|
2103
1942
|
}
|
|
2104
|
-
|
|
2105
|
-
/**
|
|
2106
|
-
* report-data.json — the run, as data.
|
|
2107
|
-
*
|
|
2108
|
-
* Two readers, one file. The assistant drafts a client-facing email from it (which is why the retired
|
|
2109
|
-
* per-customer email template does not need to come back as config: formatting is judgement, and this is
|
|
2110
|
-
* the input judgement works from). And it is the shape the portal's unbuilt native-render path has been
|
|
2111
|
-
* looking for since before it had a writer — same filename, so building that path later is a read, not a
|
|
2112
|
-
* migration.
|
|
2113
|
-
*
|
|
2114
|
-
* It carries what the REPORT says, plus the level identity, and nothing internal: the audit workbook is
|
|
2115
|
-
* where the working notes live, and a data file that quietly re-admitted them would reopen exactly the
|
|
2116
|
-
* leak this series closed.
|
|
2117
|
-
*/
|
|
2118
|
-
export function knockoutReportData(findings, framework, { runId, codename, overall, issued, identity, registerCounts, registerRecords = null, ownerChecks = [], url, auditFile, customerKey, matter, servedModels = null }) {
|
|
2119
|
-
const marks = findings?.marks ?? [];
|
|
2120
|
-
return {
|
|
2121
|
-
schema: 'report-data/1',
|
|
2122
|
-
runId,
|
|
2123
|
-
codename: codename || null,
|
|
2124
|
-
matter: matter || runId,
|
|
2125
|
-
customerKey: customerKey || 'generic',
|
|
2126
|
-
issued: issued || null,
|
|
2127
|
-
url: url || null,
|
|
2128
|
-
auditFile: auditFile || null,
|
|
2129
|
-
// The models that served the run, in first-use order, as tokens.mjs servedModels names them for a
|
|
2130
|
-
// client: a deployment's own name never, its tier instead. null when nothing was read.
|
|
2131
|
-
servedModels: Array.isArray(servedModels) ? servedModels : null,
|
|
2132
|
-
level: {
|
|
2133
|
-
searchLevel: identity?.level ?? null,
|
|
2134
|
-
stageLabel: identity?.stageLabel ?? null,
|
|
2135
|
-
identity: identity?.identity ?? null,
|
|
2136
|
-
// `banner` is NOT projected. It is stageLabel joined to identity, so on a retired row it carries a
|
|
2137
|
-
// depth rung — and report-data.json is a CLIENT surface (the portal's native render and the MCP
|
|
2138
|
-
// brief read it). The two fields it is made of are both here already; a consumer that wants the
|
|
2139
|
-
// internal face takes `stageLabel`, and nothing gets a pre-joined string that leaks one.
|
|
2140
|
-
},
|
|
2141
|
-
framework: framework ? { key: framework.framework_key, title: framework.title, bands: framework.bands.map((b) => ({ label: b.label, tone: b.tone })) } : null,
|
|
2142
|
-
overall: overall ?? null,
|
|
2143
|
-
summary: findings?.batch?.executiveSummary ?? null,
|
|
2144
|
-
productContext: findings?.batch?.productContext ?? null,
|
|
2145
|
-
caveats: findings?.batch?.standardCaveats ?? [],
|
|
2146
|
-
marks: marks.map((m) => {
|
|
2147
|
-
const counted = registerCounts ? countsForMark(registerCounts, m.name) : null;
|
|
2148
|
-
return {
|
|
2149
|
-
name: m.name,
|
|
2150
|
-
band: m.rating ?? null,
|
|
2151
|
-
qualifier: m.ratingQualifier ?? null,
|
|
2152
|
-
// WHAT THIS NAME IS FOR. Per MARK, not per batch — a character name and a
|
|
2153
|
-
// franchise title can sit at different bands on identical evidence, and the manner-of-use
|
|
2154
|
-
// calibration in the firm-wide reasoning turns on exactly this. It reached the plan and the
|
|
2155
|
-
// rater and stopped there: this projection is an explicit whitelist, so a field nobody adds is
|
|
2156
|
-
// a field the assistant drafting client mail never sees, however faithfully the rater carried
|
|
2157
|
-
// it. Null on an archived run that predates the frame carrying it.
|
|
2158
|
-
contextFraming: m.contextFraming ?? null,
|
|
2159
|
-
classesSearched: m.classesSearched ?? [],
|
|
2160
|
-
classesDriving: m.classesDriving ?? [],
|
|
2161
|
-
...(Array.isArray(m.classGroups) && m.classGroups.length ? { classGroups: m.classGroups } : {}),
|
|
2162
|
-
degraded: Boolean(m.degraded),
|
|
2163
|
-
points: m.bullets ?? [],
|
|
2164
|
-
// ── THE ASSESSMENT THE RUN ALREADY WROTE ──────────────────────────────────────────────────
|
|
2165
|
-
//
|
|
2166
|
-
// Seven keys the assess stage writes into knockout-findings.json reached this file as nothing.
|
|
2167
|
-
// They were not withheld by a rule — no code decided against them; this projection is an explicit
|
|
2168
|
-
// whitelist and nobody had added them, so an assistant drafting from this file could not see the
|
|
2169
|
-
// reasoning behind a rating it was drafting about.
|
|
2170
|
-
//
|
|
2171
|
-
// `assessment` is the sharpest case: publish substitutes it into `batch.executiveSummary` ONLY on
|
|
2172
|
-
// a multi-mark batch, so on a single-mark run — the common knockout — the mark's own opening read
|
|
2173
|
-
// was written, validated, and then dropped by both surfaces at once.
|
|
2174
|
-
//
|
|
2175
|
-
// `purpleNotes` is the reviewer's notes, and it is here by the owner's ruling of 2026-09-07: one
|
|
2176
|
-
// report, read by the person who ran Clearotron, because keeping material off it "just adds
|
|
2177
|
-
// confusion for where data is lost". They are LABELLED on the page rather than merged into the
|
|
2178
|
-
// client-voiced body — see reviewerNotesBlock — so a reader can tell whose voice they are in.
|
|
2179
|
-
assessment: (() => { const t = String(m.assessment ?? '').trim(); return t || null; })(),
|
|
2180
|
-
counterFactors: m.counterFactors ?? [],
|
|
2181
|
-
mitigation: (() => { const t = String(m.mitigation ?? '').trim(); return t || null; })(),
|
|
2182
|
-
// `null`, not `false`, when the rater said nothing: a crowded field is a mitigant the reasoning
|
|
2183
|
-
// turns on, and an unstated one must not read as a stated "no".
|
|
2184
|
-
crowdedField: typeof m.crowdedField === 'boolean' ? m.crowdedField : null,
|
|
2185
|
-
reviewerNotes: m.purpleNotes ?? [],
|
|
2186
|
-
// The proof-of-search rows — the same defensibility record list_searches answers from.
|
|
2187
|
-
negatives: (m.negatives ?? []).map((n) => ({
|
|
2188
|
-
term: n?.term ?? null, source: n?.source ?? null, note: n?.note ?? null,
|
|
2189
|
-
})),
|
|
2190
|
-
// The rater's read of a filing it weighed, keyed by the record id the card prints, so a consumer
|
|
2191
|
-
// can join a read to its filing without matching on prose.
|
|
2192
|
-
registerReads: (m.registerReads ?? []).map((x) => ({
|
|
2193
|
-
recordId: x?.recordId ?? null,
|
|
2194
|
-
read: x?.read ?? null,
|
|
2195
|
-
band: String(x?.band ?? '').trim() || null,
|
|
2196
|
-
// the framework's own inputs, where it states a method — absent otherwise, so every other run's data is unchanged
|
|
2197
|
-
...(x?.inputs ? { inputs: x.inputs } : {}),
|
|
2198
|
-
})),
|
|
2199
|
-
// — the typed finding, ranked, with the reference the report prints. The old key was
|
|
2200
|
-
// `evidence[]` and it was `(m.findings ?? []).filter((f) => f?.url)`: a typed finding has no
|
|
2201
|
-
// `url`, so this file — the one the assistant drafts client mail from — silently carried zero
|
|
2202
|
-
// conflicts for a mark that had several. `shape` says which record each row came from, so a
|
|
2203
|
-
// reader can tell a typed run from an archived prose one without guessing at the blanks.
|
|
2204
|
-
findings: [
|
|
2205
|
-
...knockoutFindingViews(m, { manifest: framework }).map((v) => ({
|
|
2206
|
-
ref: v.ref, ordinal: v.ordinal, name: v.name, owner: v.owner, band: v.band, type: v.type,
|
|
2207
|
-
net: v.lead, basis: v.detail, evidence: v.evidence, shape: v.shape,
|
|
2208
|
-
...(v.inputs ? { inputs: v.inputs } : {}),
|
|
2209
|
-
})),
|
|
2210
|
-
// — the promoted register filings, in the SAME array, from the SAME projection the page
|
|
2211
|
-
// renders from (registerCardViews). Two reasons it cannot live under its own key:
|
|
2212
|
-
//
|
|
2213
|
-
// 1. THE FLAG. portal-service.mjs resolves per-finding feedback as
|
|
2214
|
-
// `data.marks[markIndex].findings.find(f => f.ordinal === ordinal)`, against the
|
|
2215
|
-
// `data-ko-ord` the card carries. A card in the DOM with no row here resolves NOTHING and
|
|
2216
|
-
// logs `resolved:false` — the reader's correction is captured against no facts, silently.
|
|
2217
|
-
// 2. THE BRIEF. mcp-server/lib/brief.mjs walks this array to write "Each name screened".
|
|
2218
|
-
// A promoted filing the brief omitted would be the report and the brief disagreeing about
|
|
2219
|
-
// what the run found.
|
|
2220
|
-
//
|
|
2221
|
-
// `shape: 'register'` is the load-bearing field: a consumer can tell a weighed conflict from a
|
|
2222
|
-
// pointed-at filing without parsing prose.
|
|
2223
|
-
//
|
|
2224
|
-
// `band` AND `basis` NOW CARRY THE RATER'S READ WHEN IT SENT ONE. Before
|
|
2225
|
-
// this, both were constants — `band: null` and the not-weighed sentence — on every filing of
|
|
2226
|
-
// every run, including runs where the seat had written a full read of that exact filing and the
|
|
2227
|
-
// HTML card was already printing it. The page and this file disagreed, and this file is the one
|
|
2228
|
-
// the MCP brief answers from, so the surface a reader asks "what did you make of that
|
|
2229
|
-
// registration?" was the surface that had dropped the answer.
|
|
2230
|
-
//
|
|
2231
|
-
// The unmatched case is unchanged and must stay that way: no row for this recordId ⇒ `band:
|
|
2232
|
-
// null` and the not-weighed line, which describes the card and claims nothing.
|
|
2233
|
-
...registerCardViews(m, framework, registerRecords).cards.map((v) => {
|
|
2234
|
-
const row = (Array.isArray(m?.registerReads) ? m.registerReads : [])
|
|
2235
|
-
.find((x) => String(x?.recordId ?? '').trim() && String(x?.recordId ?? '').trim() === String(v.record?.recordId ?? '').trim());
|
|
2236
|
-
const read = String(row?.read ?? '').trim() || null;
|
|
2237
|
-
const band = String(row?.band ?? '').trim() || null;
|
|
2238
|
-
// The driver's own record of where this filing's proprietor was looked up, joined by
|
|
2239
|
-
// recordId. `null` where the run owed no check — the same three states the
|
|
2240
|
-
// card has, so a consumer can tell "searched and found nothing" from "never searched".
|
|
2241
|
-
const oc = ownerCheckFor(ownerChecks, v.record?.recordId);
|
|
2242
|
-
return {
|
|
2243
|
-
ref: v.ref, ordinal: v.ordinal, name: v.record.mark, owner: v.record.owner, band,
|
|
2244
|
-
...(band && row?.inputs ? { inputs: row.inputs } : {}),
|
|
2245
|
-
type: 'Register filing',
|
|
2246
|
-
net: read ? v.statement : `${v.statement} It was ${NOT_WEIGHED}.`,
|
|
2247
|
-
basis: read ?? NOT_WEIGHED,
|
|
2248
|
-
useCheckSource: ownerCheckText(ownerCheckOutcome(oc)),
|
|
2249
|
-
evidence: v.evidence, shape: 'register',
|
|
2250
|
-
};
|
|
2251
|
-
}),
|
|
2252
|
-
],
|
|
2253
|
-
registerCounts: counted?.counts
|
|
2254
|
-
? {
|
|
2255
|
-
classScope: counted.classScope ?? null,
|
|
2256
|
-
classes: counted.classes ?? [],
|
|
2257
|
-
...Object.fromEntries(COUNT_PREDICATES.map((p) => [p.key, Number.isFinite(counted.counts[p.key]?.total) ? counted.counts[p.key].total : null])),
|
|
2258
|
-
// The figure stays null for a floor — a floor is never a count to be summed — and the floor
|
|
2259
|
-
// rides beside it, so a reader of this file has the register's own figure and not only a null.
|
|
2260
|
-
...(COUNT_PREDICATES.some((p) => disclosedFloor(counted.counts[p.key]) !== null)
|
|
2261
|
-
? { floors: Object.fromEntries(COUNT_PREDICATES.filter((p) => disclosedFloor(counted.counts[p.key]) !== null)
|
|
2262
|
-
.map((p) => [p.key, disclosedFloor(counted.counts[p.key])])) }
|
|
2263
|
-
: {}),
|
|
2264
|
-
// The close column is an aggregate, so the forms under it ride with it — a consumer that
|
|
2265
|
-
// got the number and not the forms could restate the figure but never explain it, and this
|
|
2266
|
-
// file is what the assistant drafts client mail from.
|
|
2267
|
-
closeVariationForms: (counted.counts.close?.forms ?? []).map((f) => f.form),
|
|
2268
|
-
closeVariationsLine: variantFormsLine(counted),
|
|
2269
|
-
line: countLine(counted),
|
|
2270
|
-
}
|
|
2271
|
-
: null,
|
|
2272
|
-
// part 5 — the filings behind the narrow counts, as data. The assistant drafts client mail
|
|
2273
|
-
// from this file, so it gets the SAME three states the report gets: rows, an answered nothing,
|
|
2274
|
-
// or a stated reason. `records: []` with no line beside it would be read as "no filings".
|
|
2275
|
-
registerFilings: (() => {
|
|
2276
|
-
const listed = registerRecords ? recordsForMark(registerRecords, m.name) : null;
|
|
2277
|
-
if (registerRecords?.unavailable) return { available: false, line: registerRecords.unavailable, records: [] };
|
|
2278
|
-
if (!listed) return null;
|
|
2279
|
-
return {
|
|
2280
|
-
available: true,
|
|
2281
|
-
line: recordsLine(listed),
|
|
2282
|
-
fetched: listed.fetched ?? (listed.records ?? []).length,
|
|
2283
|
-
capped: Boolean(listed.capped),
|
|
2284
|
-
// THE CAP THE RUN RECORDED, beside the flag that says it bit. `capped: true` on its own cannot
|
|
2285
|
-
// tell a listing truncated at fifty from one a cap of zero stopped before it began: the first
|
|
2286
|
-
// is a register outcome and the second is a configuration, and a consumer reading the flag
|
|
2287
|
-
// alone reports them the same way. The run has always written `cap` per mark; nothing read it.
|
|
2288
|
-
//
|
|
2289
|
-
// NULL IS NOT ZERO and the two are kept apart all the way out, the way the portal's allowance
|
|
2290
|
-
// contract keeps them. Null is a sidecar that recorded no cap at all, which is every run
|
|
2291
|
-
// archived before the field existed; zero is a cap that was set to zero. Folding them together
|
|
2292
|
-
// would put an archived run and a misconfigured one on the same line.
|
|
2293
|
-
cap: Number.isFinite(listed.cap) ? listed.cap : null,
|
|
2294
|
-
records: (listed.records ?? []).map((r) => ({
|
|
2295
|
-
mark: r.mark, owner: r.owner, status: r.status, classes: r.classes ?? [],
|
|
2296
|
-
territory: r.territory, matchedForm: r.matchedForm, matchedBasis: r.matchedBasis,
|
|
2297
|
-
recordId: r.recordId, url: r.url,
|
|
2298
|
-
// The office's page for the filing, or its office and number and why it is not a link: the
|
|
2299
|
-
// report's own cell, as data. Only where the run's register has no record pages of its own.
|
|
2300
|
-
...(r.officeLink ? { officeRecord: { label: r.officeLink.label, href: r.officeLink.href, reason: r.officeLink.reason } } : {}),
|
|
2301
|
-
})),
|
|
2302
|
-
// Which searches did NOT answer, by name. A consumer that lists only `records` would report
|
|
2303
|
-
// a partial listing as a complete one. A form the cap stopped keeps its sentence; a failed
|
|
2304
|
-
// search's own text stays in the run's filings record, never in this file.
|
|
2305
|
-
unanswered: (listed.terms ?? []).filter((t) => !t.ok).map((t) => ({ form: t.term, basis: t.basis, reason: t.notAsked ? t.reason ?? null : null })),
|
|
2306
|
-
};
|
|
2307
|
-
})(),
|
|
2308
|
-
};
|
|
2309
|
-
}),
|
|
2310
|
-
registerCountBasis: registerCounts ? COUNT_BASIS : null,
|
|
2311
|
-
registerFilingsBasis: registerRecords && !registerRecords.unavailable ? recordBasisOf(registerRecords) : null,
|
|
2312
|
-
registerProvider: registerCounts ? (registerCounts.providerLabel ?? registerCounts.provider ?? null) : null,
|
|
2313
|
-
};
|
|
2314
|
-
}
|