@vantageos/mcp-doctor 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ All notable changes to `@vantageos/mcp-doctor` are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/).
5
5
  Unreleased changes live as one fragment per pull request in `changelog.d/`, folded in here at release time.
6
6
 
7
+ ## 0.20.0 — 2026-11-10
8
+
9
+ ### Added
10
+ - **C-40 scores tool documentation per tool and per criterion, on what the server serves.** It implements ElPi-Corp #331 (trunk v2.16, read at its merge `941156e5`). Every served tool gets one verdict on each of eight criteria: title; description; the four behaviour hints as booleans; every input field described; no input description restating its schema (an enum list, a bound, the pattern, an opening "Optional", a default value in prose); an `…Id` / `…Ids` / `…Cursor` / `…By` field naming its source, an example or its convention; an output schema; every output property described and every field listed as returned present in it. The verdict carries a per-criterion tally and one line per failing tool and criterion. On the state Manufact reviewed (vantage-peers `427e74c`) it flags 18 of the 27 input fields Manufact named, plus 22 of the same form, and exactly Manufact's 44 tools with no output schema; on the fixed live server it flags none of those input fields. It was proved on four servers it did not write (server-everything 2.2.1, server-memory 2.1.0, server-filesystem 2.2.0, vantage-peers): one injected violation per form, each landed, red and restored. The introspector now also records `idempotentHint` and `openWorldHint`. **Behaviour change:** on an MCP server tree, C-40's static run is could-not-judge, because documentation is read on the served tools/list. A publish gate must declare it in `mcp-doctor.owed.json` or read it with `--mode=both`. Documented in `analysis/manufact-rules.md` (EN, FR). Also, the upstream-request analysis (S-13, S-38, S-39) now scans each file's calls once per run instead of once per followed function name, and derives its requesting-function closure once per tree: verdicts unchanged, and mcp-doctor's own tree scans in about 7 s instead of about 30 s, which had pushed the real-repo case of `tests/skipped-dirs-report.test.ts` past its 60 s timeout under full-suite load. (README: #what-it-checks-mcp-2026-07-28)
11
+ - **Five detectors close the Manufact quality score gap: C-37, C-38, S-49, S-50, A-13.** They implement ElPi-Corp #325 (`7e5513ef`). S-49 reads the served server metadata. S-50 reads the server card and the setup page at the MCP URL. C-37 reads a listing proof for each directory host. C-38 reads Claude Code's 2 KB budget on descriptions and instructions. A-13 reads `openai/toolInvocation` on App tools. Each was proved red on Manufact's failed checks for vantage-peers (its 2026-11-08 report and the served answer, committed under `fixtures/manufact-vantage-peers-2026-11-08/`). The introspector now also records the `initialize` instructions, the tools' `_meta`, and the credential-free S-50 reads. **Behaviour change:** on an MCP server, S-49's static run is could-not-judge, because instructions and capabilities are served. A publish gate must declare it in `mcp-doctor.owed.json` or read it with `--mode=both`. The rules are documented in `analysis/manufact-rules.md` (EN, FR), linked from the README. (README: #what-it-checks-mcp-2026-07-28)
12
+
13
+ ### Changed
14
+ - **C-10 checks an `indexed-*` claim against the data layer's source, and the R-4 reader moves into the kit.** C10 reads a Convex data layer through `scanR4FilterPaths`, now exported at `@vantageos/mcp-doctor/source` (moved unchanged from backend-doctor, one copy). It is red when a filter path scans while the tool claims an indexed mechanism, as in vantage-peers `6c6ff5f2` (39 paths). It is could-not-judge, never present, when no data-layer source confirms the claim. Behaviour change: such a row now needs an owed declaration under `--gate`. `typescript` becomes a runtime dependency. (README: #c-10-reads-the-data-layer-v212)
15
+ - **C19 accepts a when-to-use clause and refuses the widening clause.** C-19 required "use this whenever … even if they don't say …", which invites a call beyond the user's request and is what C-39 refuses, so no served description could pass both. Following mcp-standard v2.17 (ElPi-Corp #339), the trigger is a when-to-use clause in one of the forms the standard names, and the widening clause is non-conforming, named. On the VantagePeers list served on 2026-11-09 (92 tools), the trigger half reds 3 tools instead of 92. (README: #c19-reads-a-when-to-use-clause-never-a-widening-clause)
16
+ - **A `--url` scan refuses an internal target.** Before any request, the target's host is resolved (A and AAAA) and the scan is refused, naming the address and its block, when an address falls in a block of the IANA special-purpose registries that is not globally reachable — loopback, private, link-local (including the cloud metadata address 169.254.169.254), unique-local (including fd00:ec2::254), carrier-grade NAT, documentation, benchmarking, local-use NAT64 (64:ff9b:1::/48), Teredo and the others — or in multicast. The refused blocks are generated from the two registries pinned in the repository (`scripts/iana-special.mjs`, `--check` refuses a stale table); the most specific block holding the address decides, and a block whose reachability the registry does not state is refused. An IPv4-mapped, NAT64 (64:ff9b::/96) or 6to4 (2002::/16) address is judged by the IPv4 address it carries, and a host that does not resolve is refused. The owner of a local or internal server passes `--allow-private-target`. The same check runs in `introspectEndpoint` and `runEventsReady` for programmatic callers. Every request already stays on the target's origin and never follows a redirect. Declared limit: the resolution is read once at scan start (DNS rebinding afterwards is not re-checked). **Behaviour change:** scanning `http://localhost` or `127.0.0.1` now needs the flag. (README: #options)
17
+ - **A `--url` scan is read-only: no `tools/call` without `--allow-tool-calls`.** Until now a remote scan called the tools the target itself declared `readOnlyHint: true` (the S-2 safe call, C-11's cursor probe), and the events probe sent its `--events-trigger` call: a hint written by the server about itself decided whether a live server was called. Now no `tools/call` reaches a live server unless its owner passes `--allow-tool-calls`; the probes that need a call are could-not-judge, naming the flag, and `--events-trigger` without it is refused (exit 1). `--allow-tool-calls` without `--url` is a usage error. **Behaviour change** for anyone scanning their own server who relied on those calls: add the flag. (README: #options)
18
+
19
+ ### Fixed
20
+ - **C-10 follow-up: the foreign probe and the evidence catch up with v2.12.** `scripts/c9-c10-c12-foreign-bite-probe.sh` expects could-not-judge for C10 on its foreign tool, which has no data layer, and asserts the reason. #137 had left that probe red on main. The real-material poles are committed as tests with their origin: vantage-peers `6c6ff5f2` is red, and the version reduced from `cf745752` is green. The README states that attribution is per tree, not per tool (Eta's corrections on #137). (README: #c-10-reads-the-data-layer-v212)
21
+ - **The foreign-probe runner pins its sibling repositories.** When it clones them, it checks out vantage-mcp-boilerplate `a772895e` and vantage-peers `a22a021c` and exports `BP_REF` / `VP_REF` to those commits, so a sibling's main moving cannot change a verdict between two runs. Each run prints the commit read, and a pin the remote does not hold exits 2. A caller-supplied repository or ref still wins (Eta on #133). (README: #c-10-reads-the-data-layer-v212)
22
+ - **A served tool list larger than a pipe buffer is read whole.** The introspector wrote its result to stdout and exited in the same tick; stdout is a pipe, so only about the first 146 KB arrived and the doctor read the rest as "non-JSON output". Every served rule then came back could-not-judge: on VantagePeers (92 tools), 22 of 22. The introspector now exits once the write has drained, writes its result once, and stops cleanly when the server cannot be spawned. On VantagePeers the same run now reads all 92 tools: 7 present, 5 non-conforming, 10 could-not-judge. (README: #options)
23
+
24
+ ## 0.19.0 — 2026-11-07
25
+
26
+ ### Added
27
+ - **`not-applicable`: a rule DECLARES its scope, and the engine decides it before running the detector.** A detector may carry an `isApplicable(tree): boolean` predicate; applicability is a property of the TARGET, decided once up front (so one static predicate governs the static, dynamic and served modes). When it returns false the engine pushes a synthetic `not-applicable` row and the detector's `run` is never called — the predicate failing IS the reason, so the row carries no `reason` and no `owedVerdict`. `not-applicable` is DECISIVE: it is not a fifth UNDECIDED state, it is not a could-not-judge (it stays out of that section), the gate treats it as clean (no violation, no undeclared, no stale), and it falls through to exit 0. `--json` gains a `byState` tally with every state as its own bin (every key present, zero stated not inferred). An `owedVerdict` on a `not-applicable` result is refused, as on any non-could-not-judge state. Proof: tests/not-applicable-state.test.ts (gate-before-run with a throwing run, no reason owed, exit 0, owedVerdict refused, out of the could-not-judge section, byState bin, gate clean) and tests/v080-owed-verdict.test.ts (the State union now ends in not-applicable; the owed field stays a field, no undecided state reopened). (README: #states-and-exit-codes)
28
+ - **A public doctor kit: the generic halves of what two downstream doctors each copied.** `deriveRuleIds` (rule ids from a vendored standard by a regex, a named error when the file is unreadable or nothing matches), `ruleCoverage`, `notCheckableResults`, `tallyRules` (one `STATE_RANK` typed over the whole `State` union, `not-applicable` included), `RegistryEntry` / `checkedRuleIds`, and `renderReport` / `writeReport`; a doctor now passes only its own constants. (README: #doctor-kit)
29
+
30
+ ### Changed
31
+ - **"Did not look" is never `absent`: eight sites now say what they measured.** Nothing measured is could-not-judge (exit 2), naming what was not measured: C21 on a static run of an MCP server (the connection load is measured live), D3 and D4 on an MCP server where nothing in the tree shapes a response, C26 when every deployment site is skipped as not npm-managed (C-26 is not npm-only). Four sites now read their rule's scope condition and quote it in the row: DServer14 and S5 (S-5, multi-tenant / multi-client: absent for a non-server or a stdio-only server, judged over HTTP with a tenancy statement, could-not-judge over HTTP with none or with no transport wired), A7 (A-7, an App or a tree that calls tools: absent when neither, an ungated App or call exposed as a site), S48 (S-48, force-installed for a member: absent for a non-server, could-not-judge for a server that signs no member in, because no tree states it). The server notion is one predicate shared by these reads (S-14's surface, SDK-first registration, tool surface, stdio transport). A static run of an MCP server therefore exits 2 until C21 (and S48 where no member signs in) is declared in the owed file for `--gate`. A11, C14, D16, C20, DAppI18n and C27 stay `absent` and are listed open in the README, pending the standard owner's decision on each rule's text. (README: #states-and-exit-codes)
32
+
33
+ ### Fixed
34
+ - **Ten detector sites no longer report "required and missing" as `absent`.** Where a rule applies and its required item is missing, the row is now non-conforming (exit 1) or, where the static read cannot decide, could-not-judge (exit 2), so the violation reaches the exit code and the publish gate: D9 and DExt8 (C-3, no `CHANGELOG.md`), DExt5 (C-1, an FR piece missing beside a manifest, as D10 already read it), D8 (C-5, tools registered and no `evals/evals.json`), D3 and D4 (S-2 / S-3, a hand-rolled builder writing neither field; could-not-judge on `@modelcontextprotocol/server` >= 2, whose served response is the one the rule reads), D6 (A-6, an App serving a `ui://` resource with no GA key), D12 (S-1, an MCP server with no transport signal is could-not-judge; D12 also reads a stdio `transport` declared in `mcp.json` / `mcp-server.json`, the surface the S-1 detector row names), DExt1 (E-1, a `defineExtension` call with no `identifier`, each call judged on its own), and D7 (its "hand-rolled builders" verdict is now decided by the hand-rolled builder reader, never asserted). Each site keeps `absent` where its rule does not govern the tree, proven per site on a plain-library fixture (exit 0). Fourteen `absent` sites still await a ruling and are named in the README. (README: #states-and-exit-codes)
35
+
7
36
  ## 0.18.0 — 2026-11-02
8
37
 
9
38
  ### Added
package/README.md CHANGED
@@ -32,11 +32,11 @@ coverage: 3 source files read (.ts/.tsx, excluding .d.ts and .test.ts); 12 regis
32
32
  item | file:line | state | verdict
33
33
  -----------------------------------------------------------------------------
34
34
  D2 stateless | - | present | stateless (no mcp-session-id session-keying)
35
- D3 resultType | server.ts:589 | absent | list/read builder returns {content} without resultType -> add via protocol-kit
36
- D4 CacheableResult | server.ts:579,595 | absent | list/read builders lack ttlMs/cacheScope -> add CacheableResult
35
+ D3 resultType | server.ts:589 | non-conforming | list/read builder returns {content} without resultType -> add via protocol-kit
36
+ D4 CacheableResult | server.ts:579,595 | non-conforming | list/read builders lack ttlMs/cacheScope -> add CacheableResult
37
37
  D5 server/discover | - | absent | no server/discover handler -> add via protocol-kit
38
- D6 mcp-apps ui-key | - | absent | no MCP Apps UI key (no _meta ui)
39
- D7 protocol-kit | package.json | absent | hand-rolled builders, protocol-kit not a dependency
38
+ D6 mcp-apps ui-key | - | absent | no MCP Apps UI key and no ui:// resource: the tree is not an App — A-6 n/a
39
+ D7 protocol-kit | package.json | absent | no hand-rolled result builder ... and protocol-kit not a dependency: nothing for the kit to replace — D7 n/a
40
40
  ```
41
41
 
42
42
  The path is the root of the MCP server sources (the folder holding `server.ts` / `transport/` /
@@ -69,6 +69,10 @@ usage: mcp-doctor <source-tree-path> [--mode=static|dynamic|both] [--backend=<co
69
69
  --bearer-env VAR send the token held in environment variable VAR as 'Authorization: Bearer'
70
70
  (the token never appears on a command line or in output)
71
71
  --header "Name: value" an extra request header (repeatable); values are never printed
72
+ --allow-private-target with --url: the owner's consent to scan a host that resolves to an address
73
+ that is not globally reachable (IANA registries); without it such a target is refused
74
+ --allow-tool-calls with --url: the server owner's consent to tools/call; without it the scan is
75
+ read-only and every check that needs a live call says could-not-judge
72
76
  --source DIR with --url: the server's source tree, for D8 eval counts and the C-25 expected
73
77
  commit (git rev-parse HEAD there)
74
78
  --expected-commit SHA with --url: the full commit id the server must serve (C-25)
@@ -106,11 +110,13 @@ exit: 0 clean, 1 a violation, 2 an abstention with no violation (including a tar
106
110
  | `present` | the standard item is satisfied | none |
107
111
  | `absent` | the detector found nothing to judge — see the caveat below | none |
108
112
  | `non-conforming` | the item is present and wrong (this includes a manifest that parses but holds a wrong value) | **exit 1** |
109
- | `could-not-judge` | the detector could not read its input and says so in the row — malformed JSON, a computed or non-literal value, no `package.json` above the root; the run completes and the row names the file | **exit 2**, unless something else is non-conforming |
113
+ | `could-not-judge` | the detector could not read its input and says so in the row — malformed JSON, a computed or non-literal value, no `package.json` above the root, a value only a live session measures, a rule's scope condition the tree does not state; the run completes and the row names what was not read | **exit 2**, unless something else is non-conforming |
114
+ | `not-applicable` | the rule DECLARES itself out of scope for this target (its `isApplicable(tree)` returned false): the engine decides applicability up front, pushes a synthetic row, and the detector's `run` is never called. It is DECISIVE — it carries no reason and no `owedVerdict` (the predicate failing is the reason), and it is NOT a could-not-judge | none |
110
115
 
111
116
  The exit code keeps three outcomes distinct, which is what makes the tool safe in CI:
112
117
 
113
- - **0** — clean.
118
+ - **0** — clean. A `not-applicable` row (0.19.0) falls through here: the rule declared itself out of
119
+ scope for this target, so it is decisive and never raises an exit code.
114
120
  - **1** — at least one violation.
115
121
  - **2** — no violation, but at least one detector abstained. **An abstention is never a pass**: it
116
122
  means part of the tree was not judged, and the row names which part and why.
@@ -135,12 +141,51 @@ A directory holding even one file is a subject and is judged, so a missing READM
135
141
  still a violation (exit 1). Inside a judged tree, a subdirectory that cannot be listed is named under
136
142
  `skipped directories`; it is never dropped in silence.
137
143
 
138
- **One known limit in 0.3.2, stated rather than hidden:**
139
-
140
- - **`absent` currently means two things.** It is used both for "this rule does not apply here" and,
141
- for some detectors, "this is required and missing". The second should move the exit code and
142
- today does not. Until that is split, read an `absent` row against the rule it names rather than
143
- treating it as harmless.
144
+ **`absent` means "this rule does not apply here" — one known limit, stated rather than hidden:**
145
+
146
+ - **Ten sites that read "required and missing" as `absent` now report it.** A rule that applies and
147
+ whose required item is missing moves the exit code: D9 and DExt8 (C-3, no `CHANGELOG.md`), DExt5
148
+ (C-1, an FR piece missing beside a manifest), D8 (C-5, tools registered and no `evals/evals.json`),
149
+ D3 and D4 (S-2 / S-3, a builder writes neither field; could-not-judge where `@modelcontextprotocol/server`
150
+ >= 2 shapes the served response), D6 (A-6, an App — a `ui://` resource is served — with no GA key),
151
+ D12 (S-1, an MCP server with no transport signal: could-not-judge), DExt1 (E-1, a `defineExtension`
152
+ call with no `identifier`), and D7 (a constructor written by hand with no kit). Each keeps `absent`
153
+ only where its rule does not govern the tree.
154
+ - **"Did not look" is never `absent`.** Eight sites that answered `absent` without reading what their
155
+ rule needs now say what they did:
156
+ - **Nothing measured — `could-not-judge`, naming what was not measured.** C21 on a static run of an
157
+ MCP server (the connection load is measured on a live session: `--mode=dynamic|both`); D3 and D4 on
158
+ an MCP server where nothing in the tree shapes a response (no builder, no SDK-first registration,
159
+ no tool surface); C26 when every deployment site is skipped as not npm-managed (the rule is not
160
+ limited to npm, so the lockfile of each was not measured). A tree that is not an MCP server at all
161
+ stays `absent` on C21, D3 and D4, and C26 stays `absent` with no deployment configuration.
162
+ - **The rule's scope condition is read — `absent` only where it is false, quoted in the row.**
163
+ DServer14 and S5 (S-5: « obligatoire pour tout serveur multi-tenant / multi-client »): `absent` for a
164
+ tree that is not an MCP server or a server served over stdio only; judged when the server is served
165
+ over HTTP and partitioned by organisation (a `tenancy: per-organisation` upstream, or an
166
+ organisation claim such as `verifiedOrg` / `orgId` / `tenantId` in code); `could-not-judge` when it
167
+ is served over HTTP and states no tenancy, or wires no transport the tree shows. A7 (A-7: « L'App/hôte
168
+ ... gate tout appel d'outil »): `absent` when the tree is neither an App (a `ui://` resource) nor
169
+ calls a tool; with no confirmation anywhere, an App or a tool call is exposed as a site for a verdict
170
+ (`could-not-judge`), as is a JSON-RPC request whose method is an expression. S48 (S-48: « A server
171
+ force-installed for a member »): `absent` for a tree that is not an MCP server; a server that signs
172
+ no member in is `could-not-judge`, because whether it is force-installed is an administrator's
173
+ choice on the host that no source tree states.
174
+ - **Consequence:** a static run of any MCP server now leaves C21 open, and S48 too when the server
175
+ signs no member in, so it exits 2. The publish gate passes such a server once those rows are
176
+ declared in its owed file (see [Publish gate](#publish-gate---gate)).
177
+ - **Six `absent` sites stay open, pending the standard owner's decision on each rule's text.** They do
178
+ not move the exit code, and none is claimed closed:
179
+ - A11 (A-11) — whether a stdio-only App is "servie à Claude", while the rule's own row names
180
+ could-not-judge when the served URL is unknown;
181
+ - C14 (C-14) — whether a package with no `mcpCatalog` block is out of the rule, which applies "à chaque
182
+ publication stable" and names no n/a outcome;
183
+ - D16 (S-7) — whether a server with neither a `server/discover` handler nor a `/health` route is
184
+ exempt or red ("version ... absente");
185
+ - C20 and DAppI18n (C-20) — whether a missing `i18n/` folder is out of the rule, while C-1 requires two
186
+ languages and the red set does not name a missing folder;
187
+ - C27 (C-27) — whether a deployable sub-package with no `tsconfig*.json` is exempt from the type-check
188
+ in isolation.
144
189
 
145
190
  By design, a detector whose own internal self-check fails stops the run — that is the instrument
146
191
  reporting that it is broken, and silencing it would hide the fault behind a normal-looking table.
@@ -224,19 +269,65 @@ material...), recorded by the walks as they skip them. `renderTable` prints it a
224
269
  through; called with two arguments, `renderTable` prints a "NOT REPORTED" line in its place.
225
270
  `runDoctor(target)` still returns the results alone.
226
271
 
272
+ ## Doctor kit
273
+
274
+ A doctor built on this engine (a second instrument that judges another standard) used to copy the same
275
+ five modules. They are now public and parameterised: the doctor keeps its own constants (the vendored
276
+ standard's path and pin, the rule-id regex, its detectors, its not-checkable entries, its severity map)
277
+ and imports the rest.
278
+
279
+ | Export | What it does |
280
+ | --- | --- |
281
+ | `deriveRuleIds(path, pattern)` | Rule ids from a vendored standard text (capture group 1, else the whole match), sorted numerically. An unreadable file throws `StandardUnreadableError`; a pattern matching nothing throws `NoRuleIdsDerivedError`. Never an empty list. |
282
+ | `ruleCoverage(ruleIds, checked, notCheckable)` / `coverageSummary` | Every derived rule sits in exactly one bucket; reports `uncovered`, `doubleCovered`, `unknown` and `ok`. |
283
+ | `notCheckableResults(bucket, anchor)` | One could-not-judge result per `{ ruleId: reason }` entry; a blank reason throws. |
284
+ | `tallyRules(results, ruleIds, pattern)` / `tallyLine` / `ruleIdOf` | Rule-level worst-state reduce over `STATE_RANK`. A derived rule with no result throws, naming it; a tallied rule outside the list throws, naming it. `pattern` here reads RESULT ids (for example `R-3 some detector`), not standard lines. |
285
+ | `STATE_RANK` / `StateRank` / `ALL_STATES` | One rank per member of the `State` union (typed `Record<State, number>`: a new state is a compile error). `not-applicable` ranks lowest, so it never outranks `non-conforming` or `could-not-judge`. |
286
+ | `RegistryEntry` / `checkedRuleIds(entries)` | `{ detector, ruleId, standardPin }` and the distinct checked ids derived from the entries. |
287
+ | `renderReport(ctx)` / `writeReport(path, ctx)` | Tally line plus `renderTable`, with doctor-specific header fields passed as `ctx.header`; the exit code is derived with `computeExitCode`. Pure: the caller supplies the date. |
288
+
289
+ ```ts
290
+ import { deriveRuleIds, tallyRules, ruleCoverage, checkedRuleIds } from "@vantageos/mcp-doctor";
291
+
292
+ const RULE = /^\*\*(R-[0-9]+)/; // reads the standard's rule lines, e.g. "**R-3 — ..."
293
+ const RESULT = /^(R-\d+)\b/; // reads result ids, e.g. "R-3 pagination"
294
+ const ids = deriveRuleIds("./fixtures/my-standard.md", RULE);
295
+ const t = tallyRules(results, ids, RESULT);
296
+ const cov = ruleCoverage(ids, checkedRuleIds(REGISTRY), Object.keys(NOT_CHECKABLE));
297
+ ```
298
+
299
+ `State` and `DetectorResult` are also exported as types.
300
+
301
+ ### Source reader (`@vantageos/mcp-doctor/source`)
302
+
303
+ The source-tree reader the doctors share is served at the subpath `@vantageos/mcp-doctor/source`: the TypeScript
304
+ AST helpers (`parseFile`, `registrations`, `indexFunctions`, `walk`, ...), the scan primitives (`Site`, `Scan`,
305
+ `emptyScan`, `isJudgeable`), the caller-taint helpers (`declaredNames`, `readsTainted`) and the R-4 filter-path scan
306
+ `scanR4FilterPaths(files)`. It moved here unchanged from backend-doctor (R-4 source half, backend-doctor PR #99), so
307
+ mcp-doctor's C-10 and backend-doctor's R-4 read a data layer with one copy of the same code. `typescript` is now a
308
+ runtime dependency of this package, because the reader parses the source at run time.
309
+
310
+ ```ts
311
+ import { scanR4FilterPaths } from "@vantageos/mcp-doctor/source";
312
+
313
+ const scan = scanR4FilterPaths(tree.files); // { conform, violate, cnj, reads }
314
+ ```
315
+
227
316
  ## What it checks (MCP 2026-07-28)
228
317
 
318
+ C-37, C-38, S-49, S-50, A-13 (Manufact score): [analysis/manufact-rules.md](analysis/manufact-rules.md) (EN, FR).
319
+
229
320
  Each detector maps one standard item and is proven **bipolar** on real material: a genuine defect
230
321
  (MUST_FLAG) and a genuine conformant site (MUST_PASS).
231
322
 
232
323
  | ID | Standard item | Verdict shape |
233
324
  |----|---------------|---------------|
234
325
  | **D2** stateless | `sessionIdGenerator: undefined`, no `Mcp-Session-Id` session-keying, no hand-rolled `initialize` gate | conforming (stateless) / non-conforming (session-keyed) |
235
- | **D3** resultType | `resultType` present on list/read result builders | present / absent |
236
- | **D4** CacheableResult | `ttlMs` / `cacheScope` on the list/read result types | present / absent |
326
+ | **D3** resultType | `resultType` present on list/read result builders | present / non-conforming (a builder, no `resultType` written) / could-not-judge (the builder's response is shaped by `@modelcontextprotocol/server` >= 2, read on the served response) / absent (not an MCP server) / could-not-judge (an MCP server with no builder, no SDK-first registration and no tool surface: unmeasured) |
327
+ | **D4** CacheableResult | `ttlMs` / `cacheScope` on the list/read result types | present / non-conforming (builders, neither field written) / could-not-judge (the builders' response is shaped by `@modelcontextprotocol/server` >= 2, read on the served response) / absent (not an MCP server) / could-not-judge (an MCP server with no builder, no SDK-first registration and no tool surface: unmeasured) |
237
328
  | **D5** server/discover | a `server/discover` handler is registered (absence-based, with a positive control) | present / absent |
238
- | **D6** mcp-apps ui-key | MCP Apps UI key is the GA nested `_meta.ui.resourceUri` — not flat `ui/resourceUri`, not community `io.modelcontextprotocol/ui` | GA-nested / flat-deprecated / community-nonGA / none |
239
- | **D7** protocol-kit | `@vantageos/mcp-protocol-kit` listed in `package.json` **and actually called** (builder invoked, not merely declared) | listed+called / listed-not-called / hand-rolled. Conformant too on `@modelcontextprotocol/server` >= 2 with no hand-rolled result builder (the kit is required only where builders are written by hand) |
329
+ | **D6** mcp-apps ui-key | MCP Apps UI key is the GA nested `_meta.ui.resourceUri` — not flat `ui/resourceUri`, not community `io.modelcontextprotocol/ui` | GA-nested / flat-deprecated / community-nonGA / non-conforming (an App — a `ui://` resource is served — with no GA key) / absent (no key and no `ui://` resource: not an App) |
330
+ | **D7** protocol-kit | `@vantageos/mcp-protocol-kit` listed in `package.json` **and actually called** (builder invoked, not merely declared) | listed+called / listed-not-called / hand-rolled (a constructor of `resultType`, `ttlMs` or `cacheScope` written by hand, read by the same reader on every path). Conformant too on `@modelcontextprotocol/server` >= 2 with no hand-rolled result builder (the kit is required only where builders are written by hand); absent where no kit, no SDK v2 and no hand-rolled builder |
240
331
  | **D15** cache-coherence | Server Rule 15 — every tool-set mutation (RegisteredTool `.enable/.disable/.update/.remove`, `unregisterTool`) is correlated with a `notifications/tools/list_changed` emission | present / absent / non-conforming / could-not-judge |
241
332
  | **D16** version-observable | Server Rule 16 — `server/discover` (or an HTTP `/health` route) exposes a `version` field sourced from `package.json`, reachable pre-auth; an SDK v2 `new McpServer({ name, version })` carrying a `package.json`-derived version counts (pre-auth reach is the dynamic half) | present / absent / non-conforming / could-not-judge |
242
333
  | **DLocalIdentity** no-local-identity | No MCP server defines its own identity primitive: resolving a caller to a tenant or agent (local JWT verify, a populated allow-list attached to a bearer), asserting org membership or role, filtering rows by caller scope (`fromAllowList`, a name allow-list, a row's `orgId` or acting-name field such as `createdBy` / `assignedTo` compared to the caller's, by `===`, `==`, `Object.is` or after `toLowerCase()`), or validating a credential (local `timingSafeEqual`, a digest of a presented value, HMAC; a hash over a static literal, or over local content — file bytes, a directory listing, a digest of them, i.e. a content fingerprint of the built tree — is not a site). A call to a binding imported from `@vantageos/cloud-identity` is not a site. Minting/signing sites (`new SignJWT`, `jwt.sign`, a private-key import) are listed as `MINTING/SIGNING` and not counted; verification and claim reads stay violations whoever issued the token (no issuer carve-out). | present (0, or EXEMPT) / non-conforming (count > ceiling, default 0) / could-not-judge |
@@ -248,15 +339,15 @@ Registered detectors that no description table above or below documents, in regi
248
339
 
249
340
  | ID | Rule | The static run reads | Verdicts |
250
341
  |----|------|----------------------|----------|
251
- | **D8** eval-suite-coverage | C-5 (the >=3-cases count half) | registered tools against the case count per tool in `evals/evals.json` | absent (no tool, or no eval file) / present / non-conforming / could-not-judge |
252
- | **D9** semver+changelog | C-3 | `package.json` `version` against strict SemVer, and `CHANGELOG.md` beside it | absent (no `CHANGELOG.md`) / present / non-conforming / could-not-judge |
342
+ | **D8** eval-suite-coverage | C-5 (the >=3-cases count half) | registered tools against the case count per tool in `evals/evals.json` | absent (no tool) / present / non-conforming (including tools registered and no eval file) / could-not-judge |
343
+ | **D9** semver+changelog | C-3 | `package.json` `version` against strict SemVer, and `CHANGELOG.md` beside it | present / non-conforming (including no `CHANGELOG.md`) / could-not-judge |
253
344
  | **D10** bilingual | C-1 | `description_fr` in `package.json` or in source, `README.fr.md`, and its listing in `files[]` | present / non-conforming / could-not-judge |
254
345
  | **D11** zod-schemas | C-4 | `z.any()` per line, and tool registrations against `outputSchema` occurrences tree-wide (not per tool) | absent (no tool) / present / non-conforming / could-not-judge |
255
- | **D12** stdio-transport | S-1 | `StdioServerTransport` or a `package.json` `bin` entry, against an HTTP/Streamable transport | absent (no transport signal) / present / non-conforming / could-not-judge (unparseable `package.json`) |
346
+ | **D12** stdio-transport | S-1 | `StdioServerTransport`, a `package.json` `bin` entry, or a stdio `transport` declared in the server manifest (`mcp.json` / `mcp-server.json`), against an HTTP/Streamable transport | absent (no transport signal and no MCP server surface) / present / non-conforming / could-not-judge (an MCP server with no transport signal, or an unparseable `package.json`) |
256
347
  | **C7** artifact-verifiable | C-7 | `README.md` / `README.fr.md`: one-command install naming a registry, version pin, two obtain channels, provenance or checksum | present / non-conforming / could-not-judge |
257
348
  | **C8** authority-declared | C-8 | each registered tool's `authRead` / `authWrite` pair in the closed 5-tier set (a folded `auth` refused) | absent (no tool) / present / non-conforming / could-not-judge |
258
349
  | **C9** verb-declared | C-9 | each registered tool's `annotations.verb` in the closed set (`rpc` refused) | absent (no tool) / present / non-conforming / could-not-judge |
259
- | **C10** mechanism-declared | C-10 | each list/search tool's `annotations.searchMechanism` in the closed set (`unindexed-scan` refused) | absent (no list/search tool) / present / non-conforming / could-not-judge |
350
+ | **C10** mechanism-declared | C-10 | each list/search tool's `annotations.searchMechanism` in the closed set (`unindexed-scan` refused); an `indexed-*` claim checked against the data layer's source on every filter path (see [C-10 reads the data layer](#c-10-reads-the-data-layer-v212)) | absent (no list/search tool) / present / non-conforming / could-not-judge |
260
351
  | **C11** pagination-declared-applied | C-11 | each list/search tool's cursor, default and finite max in its annotations or `inputSchema` | absent (no paginable tool) / present / non-conforming / could-not-judge |
261
352
  | **C12** no-duplicates | C-12 | the (verb, table, mechanism) triplet of every tool declaring verb and table | absent (no tool) / present / non-conforming / could-not-judge |
262
353
  | **C13** context-ceiling | C-13 | each tool's `tokensEstimeContexte` against the declared (global, perTool) context ceiling | absent (no tool) / present / non-conforming / could-not-judge |
@@ -267,26 +358,26 @@ Registered detectors that no description table above or below documents, in regi
267
358
  | **C18** structure-manifest | C-18 | the root `mcp.json` / `mcp-server.json` or `extension.json`: required fields and version against `package.json` | present / non-conforming / could-not-judge |
268
359
  | **C19** served-descriptions | C-19 | an inline source description on each registered tool (presence proxy; the served text is the dynamic run) | absent (no tool) / present / non-conforming / could-not-judge |
269
360
  | **C20** locales-derived | C-20 | locale files under `src/i18n/` against hardcoded locale enumerations elsewhere | absent (no `src/i18n/`) / present / non-conforming |
270
- | **C21** progressive-disclosure | C-21 | nothing: the connection load is measured only with a live session | absent (static run) |
361
+ | **C21** progressive-disclosure | C-21 | nothing: the connection load is measured only with a live session | could-not-judge (static run of an MCP server: not measured) / absent (not an MCP server) |
271
362
  | **C22** test-ratio-gate | C-22 | test/coverage ratios cited in `README.md`, `README.fr.md`, `CHANGELOG.md` and their passage identifier | absent (no ratio cited) / non-conforming / could-not-judge |
272
363
  | **C25** build-identity | C-25 | the `new McpServer(...)` / `new Server(...)` arguments and a `/health` route: a build-fed identity field beside `version` | absent (no construction) / present / non-conforming / could-not-judge |
273
- | **C26** subpackage-lockfile | C-26 | deployment configs (`railway.json`, `Dockerfile`, `fly.toml`, ...) and a frozen install of each targeted subpackage in isolation | absent (no deployment config, or no npm site) / present / non-conforming / could-not-judge |
364
+ | **C26** subpackage-lockfile | C-26 | deployment configs (`railway.json`, `Dockerfile`, `fly.toml`, ...) and a frozen install of each targeted subpackage in isolation | absent (no deployment config) / present / non-conforming / could-not-judge (also: every site skipped as not npm-managed, its lockfile not measured) |
274
365
  | **A2** declared-domains | A-2 | network and frame targets in the UI code against the `_meta.ui.csp` lists, and the single-file bundle | absent (no `ui://` resource) / present / non-conforming / could-not-judge |
275
- | **A7** consent-before-destructive | A-7 | the gate logic: event-origin approvals, `destructiveHint`-only skips, explicit confirmation requests | absent (no tool-call gate) / present / non-conforming / could-not-judge |
366
+ | **A7** consent-before-destructive | A-7 | the gate logic: event-origin approvals, `destructiveHint`-only skips, explicit confirmation requests | absent (not an App and no tool call) / present / non-conforming / could-not-judge (also: an App or a tool call with no confirmation, or a request whose method is an expression) |
276
367
  | **S12** list-pagination | S-12 | `nextCursor` in each hand-registered protocol list handler, and code that decodes a cursor | absent (no list method served) / present / non-conforming / could-not-judge |
277
368
  | **DServer2** naming | C-2 | tool names (snake_case, 64-character cap) and the `package.json` name (kebab-case) | present / non-conforming / could-not-judge |
278
369
  | **DServer6** secret-hygiene | C-6 | log calls referencing secrets, PII or internal detail, and raw error traces sent to the client | present / non-conforming / could-not-judge |
279
370
  | **DDebugOptIn** debug-opt-in | C-6 (debug half) | `.debug(...)` calls and the env/config gate around them | absent (no debug output) / present / non-conforming / could-not-judge |
280
371
  | **DServer8** ui-fallback | A-1 | each `content[]` emitting a `ui://` resource, and a sibling text/markdown entry | absent (no `ui://` emission) / present / non-conforming / could-not-judge |
281
- | **DServer14** oauth-resource-server | S-5 | the five-element OAuth 2.1 resource-server chain and the `@vantageos/cloud-identity` dependency and range | absent (no resource-server surface) / present / non-conforming / could-not-judge |
372
+ | **DServer14** oauth-resource-server | S-5 | the five-element OAuth 2.1 resource-server chain and the `@vantageos/cloud-identity` dependency and range | absent (no resource-server surface, out of S-5's scope: not an MCP server, or stdio only) / present / non-conforming (also: in scope with no surface) / could-not-judge (also: the scope unread — HTTP with no tenancy statement, or no transport wired) |
282
373
  | **DAppI18n** app-i18n | C-20 | `i18n/fr.json` keys against `i18n/en.json` | absent (no `i18n/`) / present / non-conforming / could-not-judge |
283
- | **DExt1** identifier | E-1 | the reverse-DNS `identifier` in `extension.json` and TS factories, and vendor host-key namespaces against the registry | absent (no identifier declared) / present / non-conforming / could-not-judge |
374
+ | **DExt1** identifier | E-1 | the reverse-DNS `identifier` in `extension.json` and TS factories, and vendor host-key namespaces against the registry | absent (not an extension: no manifest, no `defineExtension` call, no identifier) / present / non-conforming (including a `defineExtension` call with no `identifier`) / could-not-judge |
284
375
  | **DExt2** graceful-degradation | E-2 | `graceful_degradation` in `extension.json` and `gracefulDegradation` in `defineExtension` | absent (no flag found) / present / non-conforming / could-not-judge |
285
376
  | **DExt3** single-type | E-3 | the extension `type` in `extension.json` and `defineExtension`: exactly one known category | absent (no type declared) / present / non-conforming / could-not-judge |
286
377
  | **DExt4** lifecycle-hooks | E-4 | the manifest `lifecycle` hooks against their implementations (`hooks/` files, factory hooks) | absent (no hook declared) / present / non-conforming / could-not-judge |
287
- | **DExt5** bilingual | C-1 | `description_fr` and `README.fr.md` beside each `extension.json`, and per-tool `description_fr` | absent (no manifest, or an FR piece missing) / present / could-not-judge |
378
+ | **DExt5** bilingual | C-1 | `description_fr` and `README.fr.md` beside each `extension.json`, and per-tool `description_fr` | absent (no manifest) / present / non-conforming (an FR piece missing) / could-not-judge |
288
379
  | **DExt7** eval-coverage | C-5 | each extension's `evals/evals.json`: >=3 cases including an "extension absente" case | absent (no manifest) / present / non-conforming / could-not-judge |
289
- | **DExt8** semver+changelog | C-3 | each extension's `package.json` `version` against strict SemVer, and `CHANGELOG.md` beside it | absent (no manifest, or no `CHANGELOG.md`) / present / non-conforming / could-not-judge |
380
+ | **DExt8** semver+changelog | C-3 | each extension's `package.json` `version` against strict SemVer, and `CHANGELOG.md` beside it | absent (no manifest) / present / non-conforming (including no `CHANGELOG.md`) / could-not-judge |
290
381
  | **DExt9** hook-timeout | E-6 | each declared lifecycle hook's timeout guard (manifest `timeouts.<hook>` or in its implementation) | absent (no hook declared) / present / non-conforming / could-not-judge |
291
382
  | **S42** write-read-claims | S-42 | the verified claims each write tool forwards to its backend door against those of the read tools on the same table | absent (no backend door call) / present / non-conforming / could-not-judge |
292
383
  | **S44** closed-output | S-44 | every object of each tool's output schema closed to added fields (`.strict()`, `additionalProperties: false`, ...) | absent (no tool) / present / non-conforming / could-not-judge |
@@ -314,7 +405,7 @@ where the tree contradicts the rule, and otherwise `could-not-judge` naming the
314
405
  | **C32** host-key-additive | C-32 | `_meta` objects (followed through spreads and consts): `openai/outputTemplate` needs `ui.resourceUri`, `openai/visibility` needs `ui.visibility` | absent / non-conforming / could-not-judge (served `tools/list` owed) |
315
406
  | **C33** identity-tool | C-33 | on an authenticated server, the identity tool: no argument, `readOnlyHint: true`, an `outputSchema` that declares `id` (inline or a same-tree const) | absent / non-conforming / could-not-judge |
316
407
  | **S29**..**S34** | S-29..S-34 | the `events` capability and the three `events/*` handler literals; descriptors (`name`, bilingual description, non-empty `delivery`, `inputSchema`, `payloadSchema`); the `-32012`/`-32602`/`whsec_`, `-32015`/`verification`, five-header/`standardwebhooks`/262144-byte/410-413 evidence; `events.accessRecheckSeconds > 0` in the server manifest | absent (no events surface) / non-conforming / could-not-judge (dynamic half named) |
317
- | **S5** authz-elements (f)-(l) | S-5 (f)..(l) | PRM `resource` and its path-suffixed route, CIMD + `"none"`, `iss` flag, `/authorize` handler (auto-approval, organisation from a query parameter), jwt-bearer, OIDC discovery | absent / non-conforming / could-not-judge (sites exposed in `owedVerdict`; probes owed) |
408
+ | **S5** authz-elements (f)-(l) | S-5 (f)..(l) | PRM `resource` and its path-suffixed route, CIMD + `"none"`, `iss` flag, `/authorize` handler (auto-approval, organisation from a query parameter), jwt-bearer, OIDC discovery | absent (out of S-5's scope: not an MCP server, or stdio only) / non-conforming / could-not-judge (sites exposed in `owedVerdict`; probes owed; or the S-5 scope unread) |
318
409
  | **E7** middleware-events | E-7 | writes to `delivery`/`arguments`/`id`/`refreshBefore`/`cursor` and replacement of `ctx.output` inside an `events/*` branch of a hook | absent / present / non-conforming |
319
410
  | **E8** official-ext-declared | E-8 | `capabilities.extensions` as an object, each official key's MUST methods registered | absent / present / non-conforming / could-not-judge (unknown official extension) |
320
411
  | **E9** host-invoked-tools | E-9 | `openai/settings.readTool`, `openai/mentions.searchTool`: registered, `readOnlyHint: true`, `outputSchema`, no required input, `"app"` visibility, ResourceLink | absent / present / non-conforming |
@@ -372,7 +463,7 @@ an error message) it counts only as code or as a quoted property key.
372
463
  | **S45** origin-targets | S-45 | `mcp-server.json` `distribution.targets`, the public origin (manifest URL or `PUBLIC_BASE_URL`), the Streamable HTTP route, each declared host's verification path and where its value comes from | absent (no target declared) / present / non-conforming / could-not-judge (a development default alone) |
373
464
  | **S46** registration-redirects | S-46 | CIMD and DCR offered together, each declared host's redirect in the allow-list; served half: the registration and authorize endpoints | absent / present / non-conforming / could-not-judge |
374
465
  | **S47** webhook-delivery | S-47 | events served, the outbound call whose target is the subscriber callback, its Standard Webhooks signature headers, the callback verification | absent (no events) / present / non-conforming / could-not-judge |
375
- | **S48** per-member | S-48 | the request path of a force-installed member: no shared-credential fallback, a 401 challenge for a member without a credential | absent (no person signs in) / present / non-conforming / could-not-judge |
466
+ | **S48** per-member | S-48 | the request path of a force-installed member: no shared-credential fallback, a 401 challenge for a member without a credential | absent (not an MCP server) / present / non-conforming / could-not-judge (also: a server that signs no member in — force-installed is stated in no tree) |
376
467
  | **C34** plugin-families | C-34 | each Agent Plugins, Claude or Cursor plugin file, the script that writes it, and its `--check` drift refusal | absent (no plugin family) / present / non-conforming / could-not-judge |
377
468
  | **C35** listing-kit | C-35 | `listing/listing.json`: description, tools, test prompts and reviewer note against their sources; served half: titles and hints against the served `tools/list` | absent (not listed) / present / non-conforming / could-not-judge |
378
469
 
@@ -740,6 +831,14 @@ the browser-origin allow-list of `/mcp`, and S-22 no longer reads it as one. The
740
831
  locales JSON (`<module dir>/locales/<locale>.json`) when `t` is imported from a relative module that names those
741
832
  files. D10 accepts the French text only from the `fr` locale. Any other form is could-not-judge, naming why.
742
833
 
834
+ #### C19 reads a when-to-use clause, never a widening clause
835
+
836
+ A served description passes the trigger half of C-19 when it says when the tool applies, in a form mcp-standard
837
+ v2.17 names: `WHEN:`, `Use when`, `Use it/this/this tool when`, `Use for`, `QUAND :`, `À utiliser quand/lorsque`,
838
+ `Utiliser quand/lorsque`. The skill clause "use this whenever … even if they don't say …" (FR "même s'il ne le dit
839
+ pas", either apostrophe), in any wording of that clause (a use verb shortly followed by "whenever", "even if … do not say/mention/ask", "même si … ne le dit pas"), is non-conforming and named: it invites a call beyond the user's request, which C-39
840
+ refuses, so no description could pass both rules before.
841
+
743
842
  #### D16 credits a version served from mcp-server.json
744
843
 
745
844
  `/health` serving `manifest.version`, with `manifest` from @vantageos/mcp-boilerplate's `loadServerManifest`, reads
@@ -778,6 +877,23 @@ argument; `z.preprocess(fn, inner)` is judged by `inner`. S-42, also written at
778
877
 
779
878
  **Limit, declared.** An outbound call is recognised through `fetch`, `axios`, `got`, `ky`, `node:http(s)`, `undici` and the other HTTP-client modules named in `HTTP_CLIENT_MODULE` (`src/detectors/upstreamKit.ts`). A server that reaches its upstream only through a vendor SDK outside that list, under a name the scan does not know, reads `absent` on S36..S41: the doctor does not see the call. A tool registered from a definitions array, or a handler passed by reference, is could-not-judge naming the registration call.
780
879
 
880
+ ### C-10 reads the data layer (v2.12)
881
+
882
+ C-10 (mcp-standard v2.12, ElPi-Corp `ad7e4a11` / PR #324) treats a declared `indexed-*` mechanism as a claim that
883
+ the source must confirm. When the tree holds a Convex data layer (files under `convex/`), C10 reads every public
884
+ query door and the functions it reaches through `scanR4FilterPaths`. A read filtered in memory, on a caller
885
+ argument, over a field its index range does not bound is a scanning path, and C10 is non-conforming, quoting the
886
+ first three sites. A file that does not parse, or a path whose index range cannot be read, is could-not-judge.
887
+
888
+ **Behaviour change.** A list or search that claims an `indexed-*` mechanism with no data-layer source in the tree is
889
+ now **could-not-judge**, never present: no implementation confirms the declaration. Under `--gate`, that row is
890
+ refused until the server declares it in `mcp-doctor.owed.json` with its reason. `upstream-delegated` claims no
891
+ index and is unaffected; whether its predicate travels upstream is S-38's.
892
+
893
+ **Limits, declared.** Only a Convex data layer is read. **Attribution is per tree, not per tool:** a list whose own
894
+ path is indexed still reads red when any public query of the same tree scans, because the scan is not tied to one
895
+ tool (fail-closed). The verdict names the doors, so the reader sees which list scans. C10 applies the v2.12 text under the global pin `1c66e11c`.
896
+
781
897
  **C-10** accepts `upstream-delegated(<upstream>)`. It is red when the name is empty, a URL, or not a declared
782
898
  upstream. The standard does not fix how an upstream is declared, so the doctor reads an `upstreams` key, in a
783
899
  JSON manifest or in a TypeScript list or object. If no declaration is found, C-10 is could-not-judge.
@@ -796,6 +912,9 @@ bound or a typed error can now turn red on S-38 or S-39, where 0.8.x said nothin
796
912
  argument of each tool that takes one (`isError: true`, `structuredContent.error.code` = `invalid_cursor`).
797
913
  A tool is called only when it declares `readOnlyHint: true` and its `inputSchema.required` is well-formed and
798
914
  names nothing but `cursor`; any other tool is not called, and C-11 names why (could-not-judge for that tool).
915
+ With `--url` no tool is called at all unless the server's owner passes `--allow-tool-calls`: a `readOnlyHint` is the
916
+ target's own claim about itself, a hint and not a guarantee, so a public scan stays read-only; the probes that need a
917
+ call (S-2, C-11's tool half, the `--events-trigger` of the events probe) say so, naming the flag.
799
918
  **C-9** accepts `prepare` (a read verb). **C-13** reads the ceiling from the server manifest's
800
919
  `contextCeiling` as well as from a source constant. **S-22** resolves an `allowedOrigins` element held by a
801
920
  same-file const. **DLocalIdentity** does not count a hash over local file content. **D3 / D4** attribute a