@nac3/runtime 2.6.0 → 2.9.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
@@ -1,5 +1,943 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.9.0 -- 2026-11-27
4
+
5
+ A MINOR release, additive, and the one this project found by measuring
6
+ **itself**. Three things: the **document vocabulary** (five roles), a
7
+ static validator that follows a `<script src>` reference, and -- added
8
+ on the same day, by owner decisions D-30 and D-31 -- a **fourth package
9
+ entry** and the first mention of `declareVirtual` in the normative text.
10
+
11
+ ### A fourth entry: `@nac3/runtime/mcp-interop` (D-31)
12
+
13
+ Cross-app navigation ships. `js/nac-mcp-interop.js` had been in `main`
14
+ with a header that said *"v2.3 PREVIEW. Lives in branch
15
+ feat/nac-interop-mcp"*, while the build emitted three bundles -- so
16
+ `npm install @nac3/runtime` brought none of it, and the tree insinuated
17
+ a capability that no door delivered (`PND-137`).
18
+
19
+ ```js
20
+ import '@nac3/runtime'; // first: the runtime
21
+ import '@nac3/runtime/mcp-interop'; // then: this
22
+ ```
23
+
24
+ It adds four members to `window.NAC` -- `export_tree`,
25
+ `import_remote_tree`, `list_remote_apps`, `disconnect_remote` -- and
26
+ teaches the ordinary primitives the `remote:<namespace>:<peer_id>` id
27
+ form, so a second application becomes addressable **by name** from the
28
+ first. Its specification is `docs/NAC_INTEROP_MCP.md`.
29
+
30
+ It is **optional**: nothing in `SPEC.md` requires it and no conformance
31
+ level mentions it. Publishing it surfaced two real defects, both
32
+ measured before they were written:
33
+
34
+ * the file ended in `})(window);` -- the only one of the four published
35
+ sources that demanded a browser global, so the ESM and CJS bundles
36
+ could not have been loaded outside one. It now carries the same
37
+ `typeof window !== 'undefined'` guard its three siblings carry.
38
+ * the three functions that report through DOM events died with
39
+ `ReferenceError` in a process with no document. They now refuse by
40
+ name with `no_document`, which is the rule **D-26** wrote for the
41
+ core primitives in 2.8.0. `list_remote_apps()` reads state only and
42
+ works anywhere.
43
+
44
+ ### `declareVirtual` is named in 15.12.1 for the first time (D-30)
45
+
46
+ A behaviour clarification, not a code change. Section 15.12.1 (2.7.0)
47
+ sent virtualised collections to the extension contract of section 15,
48
+ and `NAC.declareVirtual(spec)` -- in the extensions module since 2.0 --
49
+ answers the same surface through the DOM door, returning `null` for
50
+ BOTH failures where rule 3 of that section requires two distinct codes.
51
+ The owner blessed the 15.12.1 door: a virtualised collection enters
52
+ through the extension contract, and `declareVirtual` is **the path that
53
+ came before it and keeps working**. It is neither removed nor deprecated
54
+ into a warning (promise 7 of section 12), and the text now says what it
55
+ cannot do, so the choice between the two stops looking like taste.
56
+
57
+ ### The five roles, and why the measurement was in the tens of thousands
58
+
59
+ The 2.8.0 vocabulary closed the gap between what the normative text
60
+ declared and what this tree USED -- in manifests and in scripts. It did
61
+ not close the one in the **markup the site serves**. Measured with the
62
+ published validator over the whole tree on 2026-11-27:
63
+
64
+ | What | Before | After |
65
+ |---|---|---|
66
+ | Roles section 1 declares | 65 | **70** |
67
+ | Roles with no completion event (6.4) | 41 | **46** |
68
+ | Elements on served pages carrying an undeclared role | **45 677** | 0 |
69
+ | Pages affected | 526 | 0 |
70
+ | Registries the role gate confronts | 7 | **9** |
71
+
72
+ Those 45 677 elements were not hand-written markup: a single producer
73
+ emits them -- the generator that renders this specification as a NAC3
74
+ page. So the document that declares the vocabulary was being served
75
+ marked up in words it did not declare, 354 times per page, and the only
76
+ thing that could see it was the published validator at severity `warn`,
77
+ which nobody was running over the whole tree.
78
+
79
+ The five are `heading`, `list-item`, `code`, `code-inline` and `note`
80
+ (SPEC.md 1.2, **Document**). All read-only; all in the no-completion-event
81
+ list of 6.4, never in the click family map -- putting a read-only role in
82
+ that map would make `click()` promise a completion nobody emits.
83
+ `list` and `paragraph` were already declared, so `list-item` and `heading`
84
+ being absent was half a family, which is why the count was what it was.
85
+
86
+ Two new registries in `check-role-registries.mjs`: the **markup the site
87
+ serves** (the one nothing was reading) and the **prose list of 6.4** (a
88
+ hand-written count nobody compared with the runtime).
89
+
90
+ ### The lint follows a reference
91
+
92
+ Until this release a `NAC.register_role()` call living in the file a page
93
+ names with `<script src>` was invisible to the static lint: it reads one
94
+ file at a time and did not follow the reference. An adopter who puts the
95
+ plugin in its own file -- the normal thing to do -- had no lock in either
96
+ direction: a real asymmetry went unreported, and a legitimate
97
+ `nac3.roles.json` was reported as `role_registration_orphan` because the
98
+ only call using it was in a file nobody read.
99
+
100
+ The lint now reads a reference that is **relative**, resolves **inside**
101
+ the linted root and **exists**. A remote URL, a root-absolute path (whose
102
+ meaning depends on a mount the lint does not know) and a path that climbs
103
+ out of the root are still not read -- and when not reading one could
104
+ change the verdict on a page, the lint now SAYS so (new `script_not_read`,
105
+ severity `warn`) instead of going quiet. The finding is attributed to the
106
+ file that contains the call and names the page that loads it.
107
+
108
+ ### Compatibility
109
+
110
+ Additive throughout. No canonical role changed meaning, no published event
111
+ was renamed, no spelling that worked stopped working, and a manifest
112
+ written against 2.6.0 registers and runs unmodified.
113
+
114
+ ## 2.8.0 -- 2026-11-25
115
+
116
+ A MINOR release, and the largest addition of surface the protocol has
117
+ had: **the vocabulary**. Additive throughout -- no canonical role
118
+ changed meaning, no event was renamed, and every spelling that worked
119
+ before still works.
120
+
121
+ ### Why this release exists, measured
122
+
123
+ Counted on the tree, not read off a document:
124
+
125
+ | What | Before | After |
126
+ |---|---|---|
127
+ | Roles the normative text declares | 20 | 65 |
128
+ | Distinct roles in use in the tree | 67 | 67 |
129
+ | In use and declared **nowhere** | **52** | **0** |
130
+ | Events the runtime emits | 121 | 121 |
131
+ | Events the normative text names | 16 | **121** |
132
+ | Gates confronting the role registries | 0 | 2 |
133
+ | What `nac3 validate <dir>` said about a role invented at random | `Total findings: 0` | reports it |
134
+
135
+ The 52 undeclared roles were not cosmetic. `NAC.click()` picks the
136
+ event it waits for from the role on the target, and a role it does not
137
+ know falls back to the `action` family -- so a click on a widget that
138
+ answers with `nac:map:marker_selected` waited five seconds for
139
+ `nac:action:succeeded`, timed out, and reported that **the widget** had
140
+ not acknowledged. The project had already paid that bill twice, for
141
+ `field` in 1.6.4 and for `sort-control` in 1.6.6, and both times fixed
142
+ the one role instead of the class. This release fixes the class.
143
+
144
+ ### Added
145
+
146
+ - **45 surface roles** (SPEC.md 1.2): maps (3), charts (3), calendar
147
+ (2), tree (3), timeline (2), carousel (2), live regions (6),
148
+ overlays (3), value-bearing controls (4), the containers whose
149
+ controls were already declared (6), identity and interface state
150
+ (4), and structure (7). Grouped by family, each with what it means
151
+ and what it emits.
152
+ - **The complete event vocabulary** (SPEC.md 6.4): all 121 events the
153
+ reference runtime emits, with what each one means, in 23 families.
154
+ Four duplicate pairs are resolved -- one spelling marked canonical,
155
+ the other kept emitted -- and the distinction between a *completion*
156
+ and a *state* is stated once and applied throughout
157
+ (`nac:carousel:advanced` is a verb finishing;
158
+ `nac:carousel:slide_changed` is the view moving, which it does on its
159
+ own when autoplay runs).
160
+ - **12 click completion families** for the clickable surface roles,
161
+ and **33 more roles declared as having no completion event** (41 in
162
+ total now) -- the absence is part of the contract, so the timeout
163
+ message can say which of the two happened instead of blaming the
164
+ widget. The two maps partition the 65 canonical roles exactly: 24
165
+ with a completion event, 41 declared without one, nothing in both
166
+ and nothing in neither, and a gate that refuses any other state.
167
+ - `tab` gained its failure event. `nac:tab:activation_failed` had been
168
+ emitted since 2.2 and was not in the map, so a click on a tab whose
169
+ activation was *refused* waited out the full timeout instead of
170
+ rejecting at once.
171
+ - **`NAC.register_role(name, spec)`** (SPEC.md 1.4) -- the vocabulary
172
+ becomes extensible from outside the repository, which is the hole
173
+ the 52 undeclared roles came through. A host declares a role and its
174
+ completion events; from then on the manifest validator accepts it,
175
+ `click()` waits for *its* events, and `NAC.roles()` reports where it
176
+ came from. It refuses to redefine a canonical role or a declared
177
+ alias, and refuses a second, different definition of the same name.
178
+ - **`NAC.roles()`** and **`NAC.canonical_role(role)`** -- the
179
+ vocabulary published as data, with the provenance of every word.
180
+ - **The static half of the registry**: `nac3.roles.json`, which
181
+ `nac3 validate <dir>` reads so a role declared in JavaScript is not
182
+ reported as unknown by a validator that cannot execute the page.
183
+ Kept honest in both directions by `role_registration_undeclared`
184
+ (error) and `role_registration_orphan` (warn).
185
+ - **Two new gates with their red proofs**:
186
+ `scripts/check-role-registries.mjs` confronts the five places the
187
+ role vocabulary lives, and `scripts/check-event-vocabulary.mjs`
188
+ confronts the events the runtime emits against the ones section 6.4
189
+ names, in both directions.
190
+
191
+ ### Changed
192
+
193
+ - **7 declared aliases** (SPEC.md 1.5): `treenode`, `timeline-entry`,
194
+ `input`, `textbox`, `panel`, `fab` and `dropzone` resolve to their
195
+ canonical roles instead of being treated as unknown. The runtime
196
+ resolves an alias before anything else looks at a role, so a page
197
+ written before 2.8 gets the *right* completion event rather than the
198
+ action fallback.
199
+ - The static lint separates `dom_role_unknown` (this word does not
200
+ exist) from `dom_role_legacy_spelling` (this word has a canonical
201
+ form, and here it is). The same split on the manifest side gives
202
+ `manifest_role_legacy_spelling`.
203
+ - The canonical role table and the alias table are both DERIVED from
204
+ SPEC.md by `scripts/spec-levels.mjs`. Neither is typed twice.
205
+
206
+ ### Fixed -- two places where the document and the code disagreed
207
+
208
+ Both are rule 10 of `docs/WORKING_AGREEMENT.md` applied as written: the
209
+ current behaviour IS the specification, so the text is what moved.
210
+
211
+ - **`subscribe` is synchronous, and section 15.2 said it was not**
212
+ (PND-131). The published signature already returned a
213
+ `SubscriptionHandle` and `js/nac.js` already declared
214
+ `function subscribe(...)` -- not `async` -- throwing a `NacError` on
215
+ every failure path. One sentence of prose said the opposite, and
216
+ three more inherited the mistake by lumping `subscribe` in with
217
+ `call` and `read` (the fail-closed rule of 15.4 and the error list of
218
+ 15.9 both said "reject"). All four corrected.
219
+
220
+ Why it was not a typo: a consumer that believed the prose writes
221
+ `await NAC.subscribe(...)` -- which happens to work, since awaiting a
222
+ non-Promise is free -- and then guards it with `.catch()`, which does
223
+ not. The throw escapes uncaught and the page loses the very error the
224
+ protocol named for it.
225
+
226
+ - **The READ surface was published and never declared** (PND-129).
227
+ Section 5.2 listed four introspection verbs; the runtime's own
228
+ `/* read */` export group holds eight. `NAC.find` -- the resolver
229
+ every other verb is built on -- appeared in this document exactly
230
+ once, in the sentence the audit added the day it was found. `list`
231
+ and `snapshot_state` were in the same state. Section 5.2 now declares
232
+ the whole group, including the three v2.8 additions, and says what
233
+ `find` is for: checking a precondition without touching the page.
234
+
235
+ ### Added -- a THIRD mode for `nac validate`: decide in Node what does not need a browser
236
+
237
+ The CLI had two modes and the gap between them was the size of a
238
+ feature. Pointed at a URL it reports a conformance level; pointed at a
239
+ directory it answered
240
+
241
+ Conformance level: NOT DECIDABLE IN THIS MODE
242
+ A static lint reads files; every requirement of SPEC.md section 8
243
+ is about what the RUNTIME registered and what the page DOES.
244
+
245
+ The reasoning is right and the conclusion is too strong. Between
246
+ reading bytes and driving Chromium there is a rung this project
247
+ already built eighteen times -- the runtime mounted in Node over a
248
+ synthesised document -- and "the page registers at least one manifest"
249
+ never needed a browser.
250
+
251
+ `nac validate <page> --harness` is that rung. It parses the markup into
252
+ the synthesised document, loads the runtime, **runs the page's own
253
+ scripts** in a sandbox with no network, and asks the runtime the same
254
+ questions the browser mode asks -- with the **same observer and the
255
+ same decider table**, exported from `cli-url.mjs` rather than copied,
256
+ because two rungs with two opinions about what the contract says would
257
+ be worse than one rung.
258
+
259
+ **It decides five of the eleven requirements and declares the other
260
+ six, each with the reason it cannot.** That ratio is the deliverable,
261
+ not a shortfall:
262
+
263
+ - three are a human judgement no tool makes;
264
+ - two are behavioural -- the completion event comes from the page's
265
+ handler, so they need the page driven;
266
+ - and one is `validate_global({probe: true})`, which asks the document
267
+ whether an element is REACHABLE. A synthesised document answers
268
+ whatever its stub decides, so deciding it here would be measuring
269
+ the stub. The published contract calls that requirement `static`
270
+ because in a browser no driving is needed; in Node it is not, and
271
+ this mode says so instead of inheriting the word.
272
+
273
+ A mode that decided eleven of eleven would be lying about at least one,
274
+ and the one it would lie about is `isTrusted`: in a synthesised
275
+ document the fixture writes that flag, so a harness can only ever
276
+ check that the code LOOKS at it.
277
+
278
+ **And what it decides, it decides in both directions.** An id a
279
+ manifest advertises that nothing paints makes "`NAC.click(id)` works
280
+ for every advertised id" **false** without driving anything -- the
281
+ negative half of a requirement whose positive half is undecidable
282
+ here. Three fixtures are the controls: a page with no manifest (level 1
283
+ REFUSED, naming `L1-bb23d963`), a page advertising a ghost id (level 1
284
+ REFUSED, naming `L1-1f78457d`), and a page that satisfies everything
285
+ decidable -- which still reaches **no level**, and that is the honest
286
+ outcome.
287
+
288
+ `--requirements` prints all eleven with the verdict and the reason,
289
+ because a level without the list of what nobody measured reads as a
290
+ certificate. Exit 1 only when a level 1 requirement was decided to
291
+ fail: a mode whose normal answer is "not asserted" must not exit
292
+ non-zero for it, or the honest declaration costs the exit code.
293
+
294
+ Two structural changes came with it, both of them about having ONE
295
+ implementation:
296
+
297
+ - `runtime/test/lib/dom-harness.mjs` moved to
298
+ `runtime/src/dom-harness.mjs` and is now **published** as
299
+ `dist/dom-harness.mjs`; the old path is a re-export, so the eighteen
300
+ suites that import it keep working byte for byte. A second document
301
+ stub written for the CLI would have been a second answer to "what
302
+ does this runtime need from a document", and the two would have
303
+ drifted the first time the runtime touched a new DOM API.
304
+ - `loadRuntime()` gained `runtimeSource` / `extensionsSource`: the
305
+ battery reads `js/nac.js`, the installed CLI reads `dist/nac.cjs`,
306
+ and neither guesses.
307
+
308
+ Receipt: `runtime/test/cli-harness.mjs`, 45 assertions with five
309
+ in-memory mutations -- the declarations removed so the mode claims all
310
+ eleven, the page scripts not run so the manifest is never seen, the
311
+ unresolved-id failure turned off, the runtime mounted twice, and the
312
+ markup not parsed. Five planted, five caught.
313
+
314
+ ### Added -- the demo register_role shipped without, and the defect it found
315
+
316
+ `NAC.register_role()` (section 1.4) shipped in 2.8.0 with 68 assertions
317
+ over a stub DOM and 13 red mutations, and with **no demo exercising it
318
+ on a page** -- the only one of the twenty pieces of the vocabulary
319
+ release that was half delivered (PND-132).
320
+
321
+ `demos/v28-register-role/` is a Gantt widget whose role the protocol
322
+ does not have, declaring its own vocabulary, and
323
+ `scripts/run-demo-v28-register-role.mjs` drives it in Chromium: **32
324
+ assertions, no network**, in the chain. Three of its claims are the
325
+ ones a stub cannot answer:
326
+
327
+ - **`click()` waits for THIS role's completion event.** That is the
328
+ entire cost of the 52 undeclared roles: an unknown role falls back
329
+ to the `action` family, waits five seconds for an event the widget
330
+ never sends, and reports that *the widget* did not confirm. The
331
+ three bars are driven one by one, each confirms with
332
+ `nac:gantt:bar_moved` in milliseconds, and the application's own
333
+ state moves with it. With `expected_plugin_version` passed, because
334
+ turning `STRICT_VERSIONING` off would have made the demo exercise
335
+ less than it claims.
336
+ - **The two declarations agree** -- the runtime one and the
337
+ `nac3.roles.json` the static validator reads. The runner executes
338
+ the built CLI over the demo directory, then copies it **without**
339
+ the JSON and asserts the validator refuses: a pass that cannot fail
340
+ is not a receipt.
341
+ - **The five refusals refuse in a browser**: a canonical role, a
342
+ declared alias, an illegal name, a completion event outside this
343
+ protocol, and a second definition of a role already registered --
344
+ while an identical re-registration stays idempotent.
345
+
346
+ **And writing it measured a defect in the shipped validator.** The
347
+ lint looked for `nac3.roles.json` at exactly one path, the lint root,
348
+ while section 1.4 says the declaration goes *next to the markup*. The
349
+ two agree while an adopter lints the directory their page lives in and
350
+ disagree the moment anyone lints a PARENT -- which is what the runtime
351
+ battery does when it runs `nac validate demos`. Every `register_role`
352
+ call in a tree came back as `role_registration_undeclared`, at
353
+ `error`, over a registry sitting right beside the page: the validator
354
+ reporting a page as wrong for doing what the specification asks.
355
+
356
+ A file's registry is now every `nac3.roles.json` on the path from the
357
+ lint root down to its own directory, nearest one winning; a root
358
+ registry still covers everything under it. `role_registration_orphan`
359
+ is reported against the registry that carries the declaration instead
360
+ of a path at the root that may not exist. Six cases in
361
+ `runtime/test/lint-rules.mjs` section 9, including the one that
362
+ matters in the other direction: a `register_role` with no registry
363
+ anywhere above it is **still** an error.
364
+
365
+ Three mutations planted, three caught: the root-only lookup (four reds
366
+ in the lint suite, one in the demo, and `nac validate demos` going red
367
+ in the battery), the JSON removed (three reds in the demo), and the
368
+ runtime registration removed -- which does not even reach an assertion,
369
+ because the strict runtime then refuses the manifest and the page never
370
+ finishes booting. That last one is the asymmetry this release exists
371
+ about, arriving as a boot failure.
372
+
373
+ ### Fixed -- the one receipt against a library we do not control was not reproducible
374
+
375
+ `scripts/run-demo-v26-leaflet-plugin.mjs` gave **2 green runs out of 8**
376
+ on 2026-11-25 and 5 of 8 on 2026-11-27. It is the only receipt this
377
+ project has against a third-party library, the landing and section
378
+ 15.12.3 cite its score, and PND-130 said its three failing assertions
379
+ were rAF timing plus a missing network. Both halves of that diagnosis
380
+ were wrong, and the measurement is worth more than the fix:
381
+
382
+ - **Leaflet drops a `setView` issued while it is animating a zoom --
383
+ silently, reporting success.** `_tryAnimatedZoom()` opens with
384
+ `if (this._animatingZoom) { return true; }`, and `setView` takes
385
+ that `true` for "moved". Instrumented on this tree: the map reached
386
+ the E-5 step with the previous step's animation still running (the
387
+ step confirms with `NAC.expect` on the zoom VALUE, which is correct
388
+ -- the library sets it early and keeps animating), the move never
389
+ happened, and the three assertions reported a **protocol** failure
390
+ for a viewport that had never changed. The runner now waits for the
391
+ library to go quiet on its own public events -- not on
392
+ `_animatingZoom`, because a test that reads a private field of its
393
+ subject breaks on the subject's next patch release and tells nobody
394
+ why -- and the **38th assertion is that precondition**: that the map
395
+ really moved. A red run now says which of the two failed.
396
+ - **The machine was never offline.** unpkg answers and the library
397
+ under test really loads; what fails is `tile.openstreetmap.org`, 16
398
+ requests a run. The runner **serves every tile itself** from a 1x1
399
+ PNG in its own bytes. So this demo needs a network for the
400
+ **library** -- by design: a local copy of Leaflet would be a
401
+ different claim -- and not for the map. The published page keeps the
402
+ real tile layer, because that page is what an adopter copies.
403
+
404
+ **38/38, ten runs in a row**, and it runs **in the chain** now, which
405
+ is the lesson of PND-124: the receipt nobody runs stops being a
406
+ receipt. Measured which half of the fix carries the weight, because a
407
+ fix with two parts and one reason is a fix with a part nobody tested:
408
+ with either wait in place the demo is green three runs of three; with
409
+ **both** removed, red three of three. `animate:false` on the move is
410
+ defence, not a lock -- removing it alone changes nothing, and this
411
+ entry says so rather than implying three locks where there is one.
412
+
413
+ ### Fixed -- the brownfield path planted four roles the protocol does not declare
414
+
415
+ Measured 2026-11-26 against an ERP with 920 interface modules -- the
416
+ exact case `NAC.autoRegister` and `NAC.adopt` exist for -- and fixed on
417
+ 2026-11-27 (PND-135).
418
+
419
+ `_deriveRole()` in `js/nac-v2-extensions.js` returned four words no
420
+ registry of this protocol declares, and the three registration paths
421
+ WROTE the word onto the adopter's element:
422
+
423
+ | It derived | For | Now |
424
+ |---|---|---|
425
+ | `link` | `<a href>` | `action` |
426
+ | `toggle` | a checkbox or radio | `option` |
427
+ | `select` | a `<select>` | `combobox` (`listbox` when `multiple`) |
428
+ | `interactive` | anything else | **nothing**, and the refusal is reported |
429
+
430
+ None of the four is in the normative table of section 1, none is one
431
+ of the seven declared aliases of 1.5, and none is in the runtime's own
432
+ known-role set. That is not a tidiness complaint: section 1.3 says a
433
+ NAC-strict runtime SHOULD refuse an unknown role at register time and
434
+ strict has been the default since 2.3, so the path this project opened
435
+ in 2.0 to adopt a legacy tree produced exactly what the adopter's own
436
+ runtime rejects. It is the asymmetry 2.8.0 closed for the 52 roles the
437
+ tree used and the text did not declare, arriving from the other side.
438
+
439
+ **`interactive` was not mapped, because it is not a role -- it is the
440
+ absence of one.** Declaring the four as new vocabulary was the wrong
441
+ half of the fork: a vocabulary that grows every time a derivation
442
+ cannot decide is a vocabulary that means nothing. When nothing can be
443
+ derived, the element is still registered (its id and its label do not
444
+ depend on the vocabulary) and a new event says so:
445
+ `nac:autoregister_role_underivable`, carrying the slug, the tag, the
446
+ ARIA role it saw, and the three ways the adopter can answer it.
447
+
448
+ **The derivation now ASKS instead of asserting.** Every word it is
449
+ about to return goes through `NAC.canonical_role` + `NAC.roles()`, so
450
+ a legacy spelling arrives resolved (`panel` -> `region`), a role the
451
+ page declared with `NAC.register_role()` -- the door 2.8.0 opened --
452
+ is honoured here too, and a word a table gets wrong is refused at
453
+ runtime instead of planted. A host-supplied `derive.role` goes through
454
+ the same check, for the same reason.
455
+
456
+ **Changed behaviour, named because it is a behaviour change.** The
457
+ role is written to `data-nac-role`; it is no longer written into the
458
+ ARIA `role` attribute. Those are two different vocabularies and the
459
+ old code treated them as one string. For `button` and `link` it wrote
460
+ the element's own implicit ARIA role back onto it (no effect); for
461
+ `toggle`, `select`, `field` and `interactive` it wrote tokens WAI-ARIA
462
+ does not define -- verified in Chromium through CDP: the computed role
463
+ of a `<div role="interactive">` is **not** `interactive`, the user
464
+ agent ignores the token -- so no assistive technology ever saw any of
465
+ it, while `data-nac-role`, the attribute both the runtime and the
466
+ static lint read, was left empty. An attribute the page itself wrote
467
+ is still never overwritten.
468
+
469
+ Added with it: `nac:autoregister_role_underivable` in section 6.4 and
470
+ in the nine translations (132 events named, both directions), and a
471
+ SIXTH registry in `scripts/check-role-registries.mjs` -- the two
472
+ derivation tables, confronted against the normative role table, with
473
+ six new cases in its red.
474
+
475
+ Receipt: `runtime/test/autoregister-roles.mjs`, 52 assertions with 7
476
+ in-memory mutations, and `e2e/brownfield-adoption-check.mjs`, a legacy
477
+ page adopted in a real browser -- 16 elements adopted, 12 with a
478
+ declared role, **all 10 drivable ones clicked**, each confirming with
479
+ the event its own role declares (which is the mechanism the undeclared
480
+ words broke: an unknown role fell back to the `action` family and
481
+ waited five seconds for an event the widget never sent). It runs in
482
+ the chain, because the lesson of PND-124 is that a receipt nobody runs
483
+ stops being a receipt. Five mutations planted, five caught.
484
+
485
+ ### Fixed -- the validator was blind to two of the three ways markup is written today
486
+
487
+ Measured 2026-11-26 while evaluating an ERP whose interface is 983
488
+ ASP.NET Razor views, and fixed on 2026-11-27 (PND-134). Both halves of
489
+ this entry are about the same sentence: `Total findings: 0`.
490
+
491
+ - **`nac validate <dir>` read three extensions and said nothing about
492
+ the rest.** The walk accepted `.html`, `.htm` and `.php` -- in both
493
+ of its call sites, as the same typed literal. An adopter whose
494
+ markup lives in `.cshtml`, `.jsx`/`.tsx` (and this repository ships
495
+ a React demo) or `.vue` got no files walked, no findings, and
496
+ `Total findings: 0` -- which is the line a conforming tree prints.
497
+ A false green: the adopter stops looking. The walk now accepts 28
498
+ markup and template extensions, matched case-insensitively, as one
499
+ exported list (`LINT_EXTENSIONS`) that `validate` and `plugins`
500
+ share, so the two commands cannot come to disagree about what a tree
501
+ contains.
502
+
503
+ - **And the list is only half of it, because a list of extensions is
504
+ always one framework behind.** The lint now reports **how many files
505
+ it read** (`Files read: N` in prose, `files_read` / `files` /
506
+ `extensions` in `--json`) and **refuses** when it read none, with a
507
+ new finding code `no_lintable_files` at `error`, so the exit code
508
+ fails with it. `nac plugins` makes the same refusal: its old wording
509
+ ("that is a fact about the tree, not an error") is false when it
510
+ opened nothing. The way out is named in the refusal itself:
511
+ `--ext=.foo,.bar`, which **adds** to the default list and never
512
+ replaces it.
513
+
514
+ Not `.js` or `.ts` by default, and that is a decision rather than an
515
+ omission: JSX in a plain `.js` file is real, but the same extension
516
+ holds every build script and bundle in a tree, and a validator that
517
+ reports findings about code nobody serves is one that gets switched
518
+ off. An adopter whose components live there says `--ext=.js`, and
519
+ the refusal is what tells them so.
520
+
521
+ Receipt: `runtime/test/lint-rules.mjs` section 8 (27 assertions over
522
+ three new fixtures -- a Razor view, a React view and a directory with
523
+ nothing readable) plus seven process-level assertions in
524
+ `runtime/test/smoke.mjs` that read the exit code, which is the only
525
+ place the false green was visible. Six mutations, six caught: the
526
+ three-extension walk, the removed refusal, the refusal demoted to
527
+ `warn`, `--ext` replacing instead of adding, the dropped file count,
528
+ and a case-sensitive match.
529
+
530
+ ### Fixed -- on Windows the harness mode ran a SECOND runtime and lost the
531
+ registration
532
+
533
+ The third mode skips a `<script>` the page loads when that script IS the
534
+ runtime this mode already mounted. Otherwise a second NAC installs over the
535
+ first and the report describes an instance that registered nothing -- not a
536
+ crash, a quieter thing. The check has two belts: the resolved path, and the
537
+ NAME, which is the only one that catches a page loading a DIFFERENT file
538
+ called `nac.js` (a vendored copy, a bundle, a stub). The name was matched
539
+ with a character class holding the POSIX separator alone, so on Windows the
540
+ second belt never fired. Measured, with a fixture that loads a local
541
+ `nac.js` that is not the runtime: the impostor ran inside the sandbox and
542
+ the mode answered `the observation failed inside the harness: N.manifest is`
543
+ `not a function` -- the second script had replaced the NAC the page had just
544
+ registered against.
545
+
546
+ Found by the deploy of this very release, on a Linux runner, and how it was
547
+ found is the half worth keeping. The red case at the bottom of the suite
548
+ prefixed `false &&` to the FIRST clause of an OR, which under JavaScript
549
+ precedence reads `(false && A) || B`. On Windows the second belt did not
550
+ match, so the mutation looked red and the case passed while proving nothing;
551
+ on Linux it did match, so the script was still skipped and the case FAILED.
552
+ The same mutation, two platforms, two wrong answers, and the suite was green
553
+ on the machine it was written on. It now disables the whole condition, both
554
+ belts, with a slice instead of a pattern that would have to restate the name
555
+ regex.
556
+
557
+ Receipt: `runtime/test/cli-harness.mjs` -- **48 checks** (45 before), green on
558
+ Windows and green on Linux in a `node:22-slim` container. The three new
559
+ assertions over `fixtures/harness/vendored-runtime-name/` were red on Windows
560
+ before the fix, with the clobbered-NAC error quoted above as their detail.
561
+
562
+ ### Kept, deliberately
563
+
564
+ - `feedback` is a role, not an alias of `status`. It looked like a
565
+ second word for the same thing until measurement found
566
+ `NAC.read_feedback()` -- published since 1.3 -- filtering on it. The
567
+ same measurement kept `label`, `row`, `toast`, `toast-region` and
568
+ `banner`, each of which this runtime queries by selector. A role the
569
+ implementation reads is part of the contract whether the document
570
+ said so or not.
571
+ - `breadcrumb` and `pagination-control` are **containers**, not rival
572
+ spellings of `breadcrumb-item` and `pagination-item`. That was
573
+ measured, not assumed: in this tree `breadcrumb` sits on a `<nav>`
574
+ and `pagination-control` on the pager's own element.
575
+ - `canvas` is declared as a role **and** declared insufficient: its
576
+ interior is not in the DOM, so it is reached through the section 15
577
+ extension contract, which is the door 15.12 assigned to that
578
+ surface.
579
+
580
+
581
+ ### Measured again at the cut (2026-11-27)
582
+
583
+ The table above was measured on 2026-11-25, the day the vocabulary landed.
584
+ Between that day and the publication the tree kept moving -- the validator
585
+ stopped reporting a false green on a project it could not read, the
586
+ brownfield adoption path stopped planting four words the protocol does not
587
+ declare, and the CLI learned to decide five conformance requirements with no
588
+ browser. Re-measured on the published cut, with the command that produces
589
+ each number:
590
+
591
+ | What | At the cut | Command |
592
+ |---|---|---|
593
+ | Canonical roles declared | **65** | `node scripts/check-role-registries.mjs` |
594
+ | Declared aliases | **7** | same |
595
+ | Registries confronted for roles | **7** | same |
596
+ | Events emitted, and named by 6.4 | **132**, both directions | `node scripts/check-event-vocabulary.mjs` |
597
+ | Release chain | **51 gates, EXIT 0** | `npm run check:release` |
598
+
599
+ **2.7.0 was never published to npm.** It was cut in this tree on 2026-11-25
600
+ and its changes reach adopters inside 2.8.0, so an install coming from 2.6.0
601
+ receives both minors at once. Both are additive: a manifest written against
602
+ 2.6.0 registers and runs unmodified.
603
+
604
+ ## 2.7.0 -- 2026-11-25
605
+
606
+ A MINOR release, and it carries the work that was staged as 2.6.1 on
607
+ 2026-11-24. **2.6.1 was never published**: the renumbering happened
608
+ before any `npm publish`, and the reason is written here rather than
609
+ left to be inferred.
610
+
611
+ Why it is a minor. The 2.6.1 work was all correction, and a patch was
612
+ right for it. The release then grew three things a patch may not carry:
613
+ two NEW `validate_global` finding codes -- and section 10.1 says in
614
+ print that finding codes are stable across patch releases and new ones
615
+ arrive only in minor bumps -- plus six new runtime functions, plus
616
+ normative text in SPEC.md (sections 4.3, 10.1, 13, 15.9). The spec
617
+ version moves with it, **2.6 -> 2.7**, because this repository aligns
618
+ the runtime minor with the spec minor instead of inventing a second
619
+ convention. The 2.6.1 entry stays in the contract chain at
620
+ `api/v/2.6.1/`: the chain is append-only against git HEAD and a
621
+ published entry is never purged, so the chain reads 2.6.0 -> 2.6.1 ->
622
+ 2.7.0 and 2.6.1 is an entry nobody could have installed.
623
+
624
+ **A manifest written against 2.6.0 registers and runs unmodified**, and
625
+ every addition below is off until a host asks for it. The one change in
626
+ observable behaviour is that `NAC.register` now REFUSES a manifest
627
+ whose `provenance.signature` does not verify -- which can only happen
628
+ to a host that both registered a tenant secret and signed its manifest,
629
+ neither of which was possible before this release.
630
+
631
+ ### Added
632
+
633
+ - **HMAC-verified manifests (SPEC.md section 7.2), nine releases after
634
+ the section was written.** 7.2 has published a worked example since
635
+ 1.9 -- set the tenant secret, pass a `provenance` block, "the runtime
636
+ computes the expected HMAC ... and rejects manifests whose signature
637
+ does not match" -- and none of it existed. `sign_provenance` /
638
+ `verify_provenance` sign an EVENT's `detail.source` and have never
639
+ looked at a manifest. Now: `NAC.set_manifest_secret(secret|secret[])`,
640
+ `NAC.sign_manifest(m, secret?)`, `NAC.verify_manifest(m, secret?)`,
641
+ and `NAC.manifest_provenance(slug)` for what `register()` could
642
+ actually tell. `NAC.set_provenance_secret` (extensions) forwards to
643
+ the core, so the example in 7.2 works exactly as written.
644
+ Verification is SYNCHRONOUS -- a hand-written SHA-256 / HMAC, tested
645
+ against the FIPS 180-4 and RFC 4231 vectors and against node's own
646
+ `crypto` -- because `register()` is synchronous: built on
647
+ `crypto.subtle` it could only have rejected a manifest AFTER making
648
+ it live, which is silent damage with extra steps.
649
+ Adopter safety: with no secret registered nothing is verified and
650
+ nothing changes, and `manifest_provenance()` reports `verified: null`,
651
+ which means NOBODY COULD TELL and is not a synonym for false. Closes
652
+ audit N-36 / PND-045: a tool can now decide the first requirement of
653
+ conformance level 3 instead of reporting it unverified forever.
654
+ - **`NAC.set_source(src)` / `NAC.get_source()` (SPEC.md section
655
+ 15.7).** 15.7 has told hosts since 2.5 that `source` defaults to
656
+ `'agent'` and that they "MAY override via the existing
657
+ `NAC.set_source(...)` mechanism". There were zero occurrences of
658
+ `set_source` in `js/`, so a dispatch a HUMAN pressed was sealed
659
+ `source: 'agent', trusted: false` and no auditor could tell the two
660
+ apart (discrepancy D-09, now closed). It is an attestation BY THE
661
+ HOST, not a measurement -- the threat model of 7.3 already says an
662
+ agent with user-level access can do anything the user can -- so every
663
+ change of the claim emits `nac:source_changed` and the override is
664
+ itself in the log. The default is untouched.
665
+ - **`validate_global(opts)` honours `probe` (SPEC.md sections 5.2 and
666
+ 10.1).** The published signature has carried
667
+ `opts?: {probe?: boolean}` since 2.5 and the function took no
668
+ arguments at all, so `{probe: true}` was accepted and ignored and the
669
+ level 3 check of section 8 was the level 2 check with a stricter
670
+ threshold (audit N-35). `probe` is now DEFINED and implemented: two
671
+ new buckets, `ambiguous` (code `nac_id_ambiguous_in_dom`, error --
672
+ the same id on 2+ DOM nodes, so `find()` resolves it by document
673
+ order and re-ordering the markup changes what an agent does) and
674
+ `unreachable` (code `nac_id_declared_not_reachable`, warn -- mounted
675
+ but behind `aria-hidden="true"`, behind `inert`, or not displayed,
676
+ which is exactly what `click()` refuses with `NacError('hidden')`).
677
+ Both buckets are always present and empty unless probing, so a 2.5
678
+ consumer reads the same report, plus `probed` echoing the argument.
679
+ The two codes are the first new finding codes since 2.5.0 and the
680
+ reason this release is a minor.
681
+
682
+ - **`undrivable_until`: a gated surface, declared (SPEC.md 4.2).** The
683
+ probe above was pointed at this project's own landing page and
684
+ reported seven `nac_id_declared_not_reachable` findings -- the chat
685
+ panel's ids, behind `aria-hidden` until somebody opens it. Correct,
686
+ and useless to both parties: an agent read seven addressable ids,
687
+ called `click()`, got `NacError('hidden')` and had nothing to do
688
+ about it, while the author's only routes to level 3 were to stop
689
+ declaring the surface (worse for the agent) or to stop painting it
690
+ until opened (a rewrite of a published widget). An `elements[]`
691
+ entry may now carry `undrivable_until: '<nac_id>'`, the id that has
692
+ to be operated first. `click()` STILL REFUSES the hidden element --
693
+ a field that unlocked it would be the silent damage this protocol
694
+ exists to remove -- but the rejection carries `.gate` and names it,
695
+ in the thrown `NacError` and in `nac:command:rejected`. The probe
696
+ files it in a new `gated` bucket (`nac_id_undrivable_until_gate`,
697
+ severity `info`) which is NOT a findings bucket: it is excluded
698
+ from `ok`, from `has_errors` and from the zero-findings threshold
699
+ of level 3, because declaring a gated surface is keeping the
700
+ contract. And the declaration is CHECKED: a gate that no manifest
701
+ declares, that is not mounted, or that is itself unreachable is
702
+ reported as `nac_id_undrivable_gate_unusable` at severity **error**
703
+ -- harder than the warn it replaces, because a promised way in that
704
+ does not open is worse than no promise. Absent the field nothing
705
+ changes. Four finding codes in this release now, not two.
706
+
707
+ - **The headless profile: the manifest as the surface, where there is
708
+ no document at all (SPEC.md section 19, owner decision D-26).** The
709
+ seventh surface of 15.12 -- a voice-only interface, a web IVR, a
710
+ device with no screen -- enters here, and the answer is that the
711
+ extension contract already WAS a capability interface: a plugin whose
712
+ every binding is DOM-free is operable with no page. What was missing
713
+ was the declaration and two defects. New API, all four synchronous:
714
+ `NAC.profile(slug)` measures from the bindings whether a plugin needs
715
+ a document (`{declared_headless, headless, dom_required}`);
716
+ `NAC.setEventSink(fn)` / `NAC.eventSink()` carry the `nac:plugin:*`
717
+ family over a bus that is not the DOM, with the SAME type names and
718
+ detail shapes; `NAC.provenanceStatus()` reports which buses are live
719
+ and counts every row that reached neither. New OPTIONAL manifest field
720
+ `headless: true`, which is the only way into the profile -- it is
721
+ never inferred -- and which `registerPlugin` then CHECKS against every
722
+ binding, the whole state chain and not its first link, refusing with
723
+ `invalid` and naming what needs a page. `plugins()` and
724
+ `describePlugin()` carry `headless` so discovery can answer the
725
+ question too. Two codes join the closed list of 15.9, taking it from
726
+ ten to twelve: `no_document` and `provenance_unobservable`. Receipt:
727
+ `demos/v27-headless-voice/` books an appointment end to end in a
728
+ process with no `document` and no `window` -- 35 of 35 assertions, no
729
+ browser, no network -- plus `runtime/test/headless-profile.mjs`, 74
730
+ assertions of which 13 are red mutations.
731
+
732
+ ### Changed
733
+
734
+ - **BEHAVIOUR: a DOM primitive called where there is no document now
735
+ REFUSES by name instead of crashing (SPEC.md 19.3).** `find`,
736
+ `click`, `fill`, `describe`, `narrate`, `tree`, `context` and
737
+ `validate_global` threw a raw `ReferenceError: document is not
738
+ defined` from whichever line happened to touch it first, which is not
739
+ a code a caller can branch on. They now raise
740
+ `NacError('no_document')` naming the way in that does exist. The worst
741
+ of the eight was `validate_global()`, which returned `{ok: true}` for
742
+ a tree that does not exist -- a false green a build step could have
743
+ reported as a conformant page. Importing the runtime with no document
744
+ is still supported and still silent, as it has been since 2.2.1; only
745
+ CALLING one of those primitives refuses.
746
+
747
+ - **BEHAVIOUR: a provenance row that reaches nobody is now COUNTED.**
748
+ Through 2.6 the `nac:plugin:*` emit did `document.dispatchEvent`
749
+ inside a bare `try/catch`, so with no document every row vanished and
750
+ the call still reported success -- the silent damage section 7 exists
751
+ to remove, committed by the runtime itself. The drop now lands in
752
+ `provenanceStatus().dropped`, and a row lost to a sink that throws in
753
+ `sink_errors`. The call itself is unchanged OUTSIDE the headless
754
+ profile: counting is the floor, and refusing for everybody would have
755
+ made an upgrade break every adopter running the runtime server-side.
756
+ INSIDE the profile (a manifest that declares `headless: true`) a call
757
+ with neither bus available is refused BEFORE the effect with
758
+ `provenance_unobservable`.
759
+
760
+ - **BEHAVIOUR: `click()` now refuses a target hidden by an ANCESTOR,
761
+ not only by itself.** Found on 2026-11-25 by the suite written for
762
+ `undrivable_until`. The two checks in `click()` read the element
763
+ itself -- its own `aria-hidden`, its own zero-size rect -- while
764
+ `validate_global`'s probe reads `closest('[aria-hidden="true"]')`,
765
+ `closest('[inert]')` and the computed style. So the two disagreed
766
+ about a button inside a hidden PANEL, which is the commonest shape
767
+ there is, and section 10.1 published the agreement as a fact: the
768
+ unreachable bucket is "exactly what `NAC.click()` refuses with
769
+ `NacError('hidden')`". It was not. The probe called the seven chat
770
+ ids of this project's own landing page unreachable and `click()`
771
+ would have fired into the closed panel, where no host handler runs
772
+ and the agent waits out the five-second completion timeout for a
773
+ click nobody could see -- the silent damage, arriving as a timeout
774
+ instead of as a reason. `_probeUnreachable` is THE definition now,
775
+ for the verb and for the validator, so a disagreement between them
776
+ is not expressible. A page that deliberately expects agents to click
777
+ inside an `aria-hidden` container is the one that changes, and that
778
+ page was already unreachable for assistive technology and already
779
+ failing the sentence the spec published.
780
+
781
+ - **Section 8 stops asking for things that cannot be given, and two
782
+ conformance levels become reachable.** Both sentences were measured
783
+ against reality and both lost:
784
+ - Level 2 required `tabs[]` / `fields[]` / `actions[]` -- the LEGACY
785
+ manifest shape -- so a page written the way section 4 documents
786
+ (`elements[]` with a role per entry) failed level 2 AS WORDED,
787
+ including this project's own landing page. The sentence accepts
788
+ either published shape now, and the decider reads both; what it
789
+ still fails is a manifest that declares neither and leaves the
790
+ surface to be inferred. Renamed `manifest_declares_groups` ->
791
+ `manifest_declares_surface`, because it no longer checks three
792
+ groups (audit N-37, closed).
793
+ - Level 1 required every `data-nac-role="action"` element to fire
794
+ `nac:action:succeeded` AFTER its side effect. When the side effect
795
+ is a navigation there is no after: nothing survives the unload to
796
+ emit it or to hear it. 31 of the 39 actions of this project's own
797
+ landing are plain links, so the requirement had no outcome a tool
798
+ could record and level 1 was unassertable for most of the web. The
799
+ sentence exempts navigation now, and the same hole in the
800
+ neighbouring requirement (`NAC.click(id)` works for every
801
+ advertised id) is closed with it -- fixing one and not the other
802
+ would have left level 1 blocked anyway. What did NOT get relaxed:
803
+ an exemption that measured nothing is reported `unverified`, never
804
+ `pass` (audit N-38, closed).
805
+ - Measured consequence, on the one page nobody can accuse of being a
806
+ convenient fixture: **this project's own landing page now reports
807
+ NAC3 Conformance Level 2** through `npx nac3 validate <url>
808
+ --drive`. Before these two sentences changed it reported level 1
809
+ with the level-2 requirement failing.
810
+ - **The CLI makes the call section 8 actually asks for.** Level 2 keys
811
+ on `validate_global({probe: false})` and level 3 on
812
+ `{probe: true}`; the validator made ONE call and reported it twice.
813
+ It makes both now, and the level-3 verdict reads the probed report --
814
+ two buckets deeper. Against a page serving a runtime older than
815
+ 2.7.0 the old caveat still prints, because there the argument really
816
+ is being ignored.
817
+ - **Two removal promises are withdrawn, in writing.** `HARD_DEDUP` and
818
+ `STRICT_VERSIONING` each documented "removed in v2.6" while running
819
+ inside 2.6, consulted in eight places. The removals are withdrawn
820
+ (decision D-13): a host that set either one false to get through a
821
+ migration would start throwing on upgrade with no change of its own.
822
+ Both escape hatches are PERMANENT; both defaults stay `true`.
823
+ - **The legacy event-field warning stops promising a removal it cannot
824
+ keep.** Six fields (`from_nac_id`, `over_nac_id`, `target_nac_id`,
825
+ `nac_id`, `id`, `step_id`) told every adopter's console "Will be
826
+ removed in v2.0" through five releases past v2.0. They are frozen
827
+ instead (decision D-12), and the reason no document had noticed: the
828
+ event matcher READS them as resolution keys, so removing them would
829
+ have broken `wait_for()` and `assert_event_fired()` for any host that
830
+ emits only the alias.
831
+ - **`payload_schema` is settled: it stays informational.** The open,
832
+ undated question of section 13 is closed as DECIDED-no (D-15), and
833
+ section 5 no longer points at it as open. Nothing in the runtime
834
+ changes -- the field was never read and still is not.
835
+ - **The published state-read timeout matches the code.** Section 15.9
836
+ said "default 5000 for verbs, 1000 for state reads"; no release ever
837
+ implemented the 1000 and all three backend paths read
838
+ `binding.timeout_ms || 5000`. The TEXT is corrected (D-16): cutting a
839
+ read's default would make a backend that answers in 1.4 s start
840
+ timing out on upgrade with nothing changed in the adopter's code.
841
+ - **The `label_i18n` fallback chain is normative instead of folklore.**
842
+ Section 4.3 now publishes what the runtime has resolved since 2.0 --
843
+ requested locale, then `es`, then `en`, then the first locale the map
844
+ carries -- and the order is kept rather than changed (D-14.1 / D-14),
845
+ because flipping it would change the visible string for any adopter
846
+ with a Spanish-authored catalogue and an incomplete map.
847
+
848
+ ### Fixed
849
+
850
+ - **The static lint no longer reports a conforming page as wrong.**
851
+ `nac validate <dir>` emitted
852
+ `[ERROR] manifest_role_unknown ... role="draggable"` and the same for
853
+ `drop-target` -- two of the twenty canonical roles that SPEC.md
854
+ section 1 has declared since 1.6.2. The cause was a hand-typed copy
855
+ of eighteen of the twenty inside the generator. The role set is now
856
+ DERIVED from the normative table, through the same module that
857
+ already gives the build its conformance levels and its locales, so
858
+ the two cannot drift again. SPEC.md:1291 promises in writing that the
859
+ canonical set will not shrink; now the lint reads the promise instead
860
+ of a transcription of it.
861
+
862
+ - **The chat client no longer writes to the host console uninvited.**
863
+ `nac-chat-client` carried five unconditional `console.log` calls, and
864
+ three of them printed CONTENT rather than control flow: the language
865
+ model's reply to the user, and -- twice, in the speech path -- the
866
+ text the microphone had just transcribed. Any page embedding the
867
+ client put dictated text in the browser console on every utterance,
868
+ with no switch and nothing in the documentation saying so.
869
+ `nac-mcp-interop` printed an install banner on every load. Both are
870
+ now behind a switch that is OFF by default. `console.warn` and
871
+ `console.error` are untouched: an adopter has to be able to see that
872
+ something broke.
873
+
874
+ - **`narrate()` can resolve the plugin root itself.** The scoped
875
+ lookup used `querySelector`, which searches DESCENDANTS, so a root
876
+ carrying both `data-nac-plugin` and `data-nac-id` -- the usual shape
877
+ -- could not narrate itself. It surfaced through `context()`, whose
878
+ breadcrumb walks up to and including the root and labels each entry
879
+ with `narrate()`: the FIRST entry of every breadcrumb came back as
880
+ `label: null`, so an assistive consumer reading the breadcrumb aloud
881
+ started with nothing. Found by the first test either verb has ever
882
+ had.
883
+
884
+ - **`expect()` no longer throws out of its own timeout path.** The
885
+ rejection message rendered the last observed value with a bare
886
+ `JSON.stringify`, and that value is whatever the host's state
887
+ binding returned -- a `dom-mirror` binding with no `extract`
888
+ resolves the ELEMENT itself, and application state can hold a
889
+ reference cycle. On either, `expect()` threw
890
+ `TypeError: Converting circular structure to JSON` instead of
891
+ rejecting with the timeout it promises. An error path that can
892
+ itself throw is worse than a vague message. The value is now
893
+ rendered defensively, and a DOM element is named as one, with the
894
+ likely cause: the binding has no extractor.
895
+
896
+ - **`conformance_tier` says, where the value is, that a tier is not a
897
+ level.** The published catalogue has carried that distinction in
898
+ machine-readable form since 2.5.0 (audit N-29), but the runtime
899
+ export itself said nothing, leaving the clarification only where a
900
+ human reading the code would not find it. The default tier also
901
+ existed as two separate string literals; it is now declared once and
902
+ read in both places.
903
+
904
+ ### Added
905
+
906
+ - **`NacChat.debug`** (and `window.NAC_CHAT_DEBUG`, for the
907
+ diagnostics that happen during `init` before anyone holds the
908
+ object). Additive, documented in the file header, and the only new
909
+ public surface in this release. `window.NAC_INTEROP_DEBUG` does the
910
+ same for the interop layer's install banner.
911
+
912
+ ### Changed -- in the repository, not in the package
913
+
914
+ - The published pages stopped asking a third party for webfonts, the
915
+ dead `audio:` control was removed from the 260 pages that carried it,
916
+ the prose links of the SPEC pages stopped claiming a role the
917
+ specification does not declare, and the tester form stopped posting
918
+ to a development sandbox on another domain with a personal address
919
+ compiled into it. None of that is in the tarball; it is listed here
920
+ because it shipped in the same commit range.
921
+
922
+ - The runtime battery went from 453 to 918 assertions across 30 suites.
923
+ The first 112 of that came without a single new behaviour test being
924
+ written: five suites (96 assertions) were on disk and named by
925
+ nothing. `runtime/test/battery-coverage.mjs` now refuses a sixth
926
+ orphan, and every suite has its own npm shortcut.
927
+
928
+ - Thirteen surfaces that had no witness anywhere now have one:
929
+ the twenty canonical roles driven one at a time, `drag_drop`,
930
+ `reorder`, `set_options_resolver`, `registerCatalog`/`t`/`setAutoRTL`,
931
+ the thirteen `dt_*` verbs and their transaction, `narrate`,
932
+ `context`, `expect`, `diff`, the provenance signing trio,
933
+ `describe_v2` and the level-3 attestation. Four of those were
934
+ previously untestable rather than untested: no test harness in the
935
+ repository had `activeElement`, `nextSibling` or real text nodes, so
936
+ `context()`, `reorder()` and `narrate()`'s second precedence tier
937
+ could not be driven at all. `runtime/test/lib/dom-harness.mjs` is
938
+ the one harness that has them; the eighteen existing ones are
939
+ untouched.
940
+
3
941
  ## 2.6.0 -- 2026-11-11
4
942
 
5
943
  A MINOR release: the plugin extension contract of section 15 grows the