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