@reqvire-org/ads 0.4.3 → 0.4.5

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.
Files changed (60) hide show
  1. package/README.md +12 -9
  2. package/dist/bun-compiler.mjs +6 -5
  3. package/dist/check.mjs +3 -43
  4. package/dist/cli.mjs +1 -1
  5. package/dist/contrast-composition.mjs +6 -60
  6. package/dist/contrast-styles.mjs +88 -0
  7. package/dist/mcp/apps.mjs +7 -1
  8. package/dist/mcp/build-status.mjs +8 -3
  9. package/dist/mcp/drafts.mjs +13 -1
  10. package/dist/mcp/preview-http.bundle.js +7 -0
  11. package/dist/mcp/preview-http.mjs +148 -0
  12. package/dist/mcp/preview-widget.bundle.js +47 -47
  13. package/dist/mcp/resource-loader.js +1 -201
  14. package/dist/mcp/sandbox-host.mjs +6 -1
  15. package/dist/mcp/server.mjs +35 -4
  16. package/dist/mcp/showcase-host.mjs +55 -5
  17. package/dist/mcp/showcase-http.mjs +66 -0
  18. package/dist/preview-bun.mjs +75 -60
  19. package/dist/preview-incremental.mjs +358 -0
  20. package/dist/preview-manifest-update.mjs +70 -0
  21. package/dist/preview-resources.mjs +33 -1
  22. package/dist/render-composition.mjs +27 -5
  23. package/dist/scenarios-compiler.mjs +19 -1
  24. package/dist/showcase/client.bundle.js +54 -54
  25. package/dist/showcase/comparison.js +15 -12
  26. package/dist/showcase/connection.js +10 -0
  27. package/dist/showcase/http-client.bundle.js +9 -0
  28. package/dist/showcase/http-connection.js +86 -0
  29. package/dist/showcase/http-preview.js +81 -0
  30. package/dist/showcase-http-routes.mjs +31 -0
  31. package/dist/skills/README.md +3 -3
  32. package/dist/skills/ads-designer/SKILL.md +5 -1
  33. package/dist/skills/ads-designer/references/accessibility.md +6 -2
  34. package/dist/skills/ads-designer/references/captures.md +1 -1
  35. package/dist/skills/ads-designer/references/runtimes.md +31 -0
  36. package/dist/skills/ads-designer/references/workflows.md +16 -0
  37. package/dist/skills/ads-import/references/captures.md +1 -1
  38. package/dist/skills/ads-import/references/runtimes.md +31 -0
  39. package/dist/skills/ads-import/references/workflows.md +16 -0
  40. package/dist/skills/ads-migrate/SKILL.md +3 -1
  41. package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +2 -3
  42. package/dist/skills/ads-migrate/references/0.4.3-to-0.4.4.md +89 -0
  43. package/dist/skills/ads-migrate/references/0.4.4-to-0.4.5.md +72 -0
  44. package/dist/skills/ads-port/references/captures.md +1 -1
  45. package/dist/skills/ads-port/references/runtimes.md +31 -0
  46. package/dist/skills/ads-port/references/workflows.md +16 -0
  47. package/dist/style-token-rules.mjs +51 -0
  48. package/dist/verification/browser.mjs +2 -2
  49. package/docs/ADS.md +9 -7
  50. package/docs/ARCHITECTURE.md +109 -48
  51. package/docs/CACHING.md +40 -1
  52. package/docs/CHANGELOG.md +100 -22
  53. package/docs/GUIDE.md +37 -10
  54. package/docs/HTTP-SHOWCASE-POC.md +397 -0
  55. package/docs/MCP.md +104 -25
  56. package/docs/benchmarks/README.md +1 -1
  57. package/docs/benchmarks/http-showcase-optimized.json +1879 -0
  58. package/docs/benchmarks/http-showcase-profile.json +308 -0
  59. package/docs/benchmarks/http-showcase.json +3069 -0
  60. package/package.json +6 -4
@@ -0,0 +1,397 @@
1
+ # HTTP showcase design and proof history
2
+
3
+ The HTTP showcase is being promoted to the 0.4.5 release candidate. It uses the
4
+ same compiler/checker/draft engine as 0.4.4 and remains separate from V3 assets,
5
+ source emission and iframe-removal proposals. Historical experiment results
6
+ below are retained with their original limitations; the latest matched results
7
+ are in [Optimized HTTP results](#optimized-http-results-2026-11-10).
8
+
9
+ Release preparation: HTTP is now the default local showcase. The initial 14
10
+ compatibility checks passed, including real guide/current/draft captures. The
11
+ separate React/Preact product MCP widget proof and both MCP/HTTP draft workflows
12
+ also pass. Draft retirement during asynchronous compiler startup now releases
13
+ the builder without recreating its workspace. The final complete analysis suite
14
+ passes its existing comparison gates; the measurements and earlier failed runs
15
+ are recorded below. Full-suite evidence is generated in the
16
+ [release changelog](CHANGELOG.md#045) by `bun run release:verify` and checked by
17
+ `bun run release:proof`. This document does not establish that 0.4.5 has been
18
+ published.
19
+
20
+ ## Release analysis verification, 2026-11-11
21
+
22
+ The complete serial suite measured committed engine `37001f9` on Bun 1.4.4,
23
+ Linux x64, Intel Core Ultra 9 275HX, with the existing sampled process-tree
24
+ memory limit and a 3 GiB systemd scope cap. The recorded source digest is
25
+ `aee4b34e61629150f58abf8f29d8f9f5934a0f805b60c8442def7e3e852b249d`.
26
+ The [canonical report](../scripts/benchmarks/analysis/results/latest.json)
27
+ includes three trials for each size, spatial, branch, capture and composed
28
+ contrast scenarios. Rendering and registered behavior execution are excluded.
29
+
30
+ | Check, median / observed p95 | 8 owners | 24 owners | 8 owners, spatial |
31
+ | --- | ---: | ---: | ---: |
32
+ | Warm check | 90.5 / 113.1 ms | 141.2 / 170.7 ms | 101.6 / 123.0 ms |
33
+ | Source edit | 170.4 / 214.9 ms | 279.1 / 296.8 ms | 171.9 / 216.1 ms |
34
+ | Import edit | 158.4 / 190.6 ms | 257.0 / 312.7 ms | 161.7 / 194.1 ms |
35
+ | Audit selection | 29.2 / 50.0 ms | 39.6 / 45.0 ms | 32.8 / 44.8 ms |
36
+ | Draft acceptance | 360.3 / 401.6 ms | 547.1 / 615.9 ms | 372.0 / 426.7 ms |
37
+ | Draft rejection | 327.8 / 369.5 ms | 469.9 / 519.8 ms | 323.3 / 372.0 ms |
38
+ | Sampled process-tree peak RSS | 792.2 MiB | 589.4 MiB | 821.9 MiB |
39
+
40
+ This final run passed the unchanged timing and memory comparison gates. Earlier
41
+ complete runs failed: the first had timing regressions while unrelated Rust
42
+ builds were active, and both had 24-owner RSS peaks around 822–830 MiB, exceeding
43
+ the existing 782 MiB comparison limit. Those results are retained locally in
44
+ `output/http-release-analysis-failed.json` and
45
+ `output/http-release-analysis-repeat.json`; they were not committed as baselines.
46
+ The unchanged control passed at 594 MiB, with a focused repeat at 609 MiB.
47
+ Further diagnostic runs of the startup fix varied from 665 to 863 MiB. A
48
+ throwing diagnostic at the compiler startup entry point confirmed that this
49
+ benchmark does not invoke the changed startup body. The transient RSS cause is
50
+ not established. The passing final run does not erase that variation or establish
51
+ a memory improvement. No thresholds or production gates were relaxed.
52
+
53
+ ## Architecture
54
+
55
+ The browser loads a dedicated HTTP shell bundle, without the MCP client or Apps
56
+ SDK. Ordinary HTTP endpoints provide discovery, status, icons, tokens, preview
57
+ selection and draft preview selection. An event stream reports changes. Preview
58
+ manifests retain known-revision/delta reuse. Compiled modules, styles, fonts and
59
+ images load through scoped, immutable HTTP URLs.
60
+
61
+ Agents retain the existing MCP tools. The HTTP adapter calls the same in-process
62
+ services and schema validation used by those tools; it does not make an MCP
63
+ connection or send JSON-RPC. There is one compiler, checker and draft engine.
64
+ The adapter exposes only actions already used by the browser. It does not add
65
+ browser controls for accepting or editing source, or an unrestricted tool-call
66
+ endpoint. Draft creation/editing/acceptance by agents continues through MCP.
67
+
68
+ Each preview remains in a persistent opaque iframe on the separate preview
69
+ origin. HTTP replaces the browser protocol and resource delivery, not isolation,
70
+ viewport behavior or hot-update state preservation. The extra MCP Apps hosting
71
+ frame is absent. Accepted and candidate previews have separate instances.
72
+
73
+ Workers also arrive over HTTP. Because browser Worker constructors reject direct
74
+ HTTP URLs from an opaque frame, the loader verifies the original worker bytes
75
+ and creates local Blob URLs for workers and modules that refer to them. Other
76
+ assets use native HTTP. Thus “HTTP” means no browser MCP traffic, not zero Blob
77
+ URLs. Removing the preview frame is a separate experiment.
78
+
79
+ ## Endpoint boundary
80
+
81
+ | HTTP operation | Purpose |
82
+ | --- | --- |
83
+ | `GET /api/explorer` | Navigation, capabilities, draft references and status |
84
+ | `GET /api/build`, `/api/icons`, `/api/tokens`, `/api/scenarios`, `/api/drafts` | Explicit browser reads |
85
+ | `GET /api/previews/{manifest,live}?from=<revision>` | Full, delta or unchanged preview graph |
86
+ | `POST /api/previews` | Select a discovered scenario; preserve compiled/verified semantics |
87
+ | `POST /api/drafts/<id>/preview` | Prepare or select an isolated draft preview |
88
+ | `GET /api/drafts/<id>/<read>` | The corresponding read within that draft scope |
89
+ | `GET /api/events` | SSE build reports and catalogue notifications; reconnect triggers fresh discovery and scoped status reads |
90
+ | `POST /preview-http` | Open, prepare a checked graph with its assets, reconcile a retained instance, and retire it |
91
+
92
+ Direct draft showcase URLs under `/draft/<id>/` bind these services to the draft
93
+ workspace. The existing loopback host/origin guard applies. Routes reject
94
+ arbitrary files, nested draft scopes and generic tool dispatch. Request
95
+ cancellation reaches the shared services. Shutdown closes streams and requests.
96
+
97
+ The preview registry pins verified bytes for each active capability before
98
+ publication. Bounds: 16 frames, 4096 assets and 64 MiB retained per frame; pending
99
+ unleased frames expire after 60 seconds (checked every 10 seconds). A lost
100
+ lifetime stream permits reconnection within that grace period; explicit close,
101
+ scope retirement and server shutdown release assets immediately. Peer prefetch keeps the same 16 MiB/256-resource
102
+ bound as the existing loader. Slow event consumers are disconnected; at most 64
103
+ event streams are retained.
104
+
105
+ `prepare` replaces the separate browser manifest read and publication round trip.
106
+ The server captures one authorized graph, pins its reachable assets against that
107
+ graph and returns a full/delta/unchanged manifest with its HTTP base. A superseded
108
+ requested revision returns a changed result without publishing its assets.
109
+ Cancellation and asset digest/size checks remain binding. Each frame retains one
110
+ metadata graph for deltas; asset retention keeps the bounds above.
111
+
112
+ The HTTP browser does not poll build status periodically. It reads on selection,
113
+ receives subsequent reports through SSE, and reads fresh catalogue/status after
114
+ reconnection. Each accepted/draft frame reconciles its own scope. Returning to a
115
+ hidden preview also reconciles status. EventSource handles stream reconnection;
116
+ while disconnected, the UI labels the retained preview as potentially stale.
117
+ An expired frame capability reopens through the normal preview lifecycle.
118
+ Source reconciliation still runs on the server, covering missed filesystem
119
+ notifications. The MCP comparison path retains its existing polling behavior.
120
+
121
+ ## Running and migration
122
+
123
+ Build with `bun run build`, then use the normal `ads showcase` or `ads mcp`
124
+ command. HTTP is the default; no `ADS_PROOF_HTTP_PREVIEW` environment variable or
125
+ `delivery=http` query parameter is required. The internal `delivery=blob` or
126
+ `delivery=mcp` comparison route retains the MCP browser for regression tests.
127
+ Agents and external MCP Apps continue using MCP normally.
128
+
129
+ No component, token, scenario, framework or project configuration migration is
130
+ required. Keep `.ds` evidence and tracked drafts. Follow the
131
+ [0.4.4 to 0.4.5 migration guide](../skills/ads-migrate/references/0.4.4-to-0.4.5.md)
132
+ to upgrade and restart the appropriate runtime.
133
+
134
+ ## Proof and decision
135
+
136
+ - [x] React and Preact edits, state/focus/selection preservation, rejected edit
137
+ recovery, visited views, workers and WebAssembly, with browser `/mcp` blocked.
138
+ - [x] Separate HTTP bundle with no MCP transport or protocol implementation.
139
+ - [x] Scoped asset publication, integrity failures, retired capabilities and
140
+ abrupt-frame cleanup.
141
+ - [x] Draft comparisons, dependency changes, acceptance notifications and
142
+ direct draft URLs without browser MCP.
143
+ - [x] Endpoint validation, cancellation and event lifecycle checks.
144
+ - [x] Foundation views, themes, viewport and guide parity in the HTTP browser.
145
+ - [x] Serial matched comparison against the exact 0.4.4 release engine: cold and
146
+ second-view display, edit-to-visible and edit-to-verified latency, modules
147
+ rebuilt, completed response bytes, wire bytes, peak process-tree RSS and state.
148
+ - [x] Decide whether gains justify promoting the HTTP browser; record regressions
149
+ and remaining compatibility/capture work before any release decision.
150
+
151
+ Use three fresh alternating trials per variant with the same fixture, browser,
152
+ incremental compiler and checks. Record median/p95 and source/fixture hashes. Do
153
+ not compare against the former bundled compiler or run benchmarks alongside
154
+ tests. Count HTTP and MCP response bodies consistently; long-lived event streams
155
+ are not completed responses. Report bundle size separately from measured latency.
156
+
157
+ Foundation checks exposed shared incremental-compiler defects: generated previews
158
+ did not load the configured project stylesheet, inlined CSS imports were missing
159
+ from content invalidation, and isolated Preact foundations could not load refresh
160
+ helpers. The same fixes and React/Preact regression checks are included in both
161
+ comparison variants. They are not credited as HTTP improvements. The draft
162
+ workflow also had an intermittent late navigation failure during competing test
163
+ work; its subsequent isolated run passed. That observation remains a limitation
164
+ until broader repeated testing establishes reliability.
165
+
166
+ After the shared watcher lifecycle fix, the final focused HTTP browser run passed
167
+ all four checks: React and Preact hot updates/workers/rejection recovery, the full
168
+ draft comparison/acceptance workflow, and foundation/theme/guide rendering.
169
+ Each HTTP browser path asserts that it makes no MCP requests. This is focused
170
+ prototype verification, not a full-suite or HTTP capture-compatibility claim.
171
+
172
+ ## Matched results, 2026-11-10
173
+
174
+ Baseline: 0.4.4 candidate commit `d8d9b2d`, including the shared
175
+ foundation/CSS fixes and draft watcher lifecycle fix. Three fresh alternating
176
+ trials per variant; nine samples per edit kind, on Bun 1.4.4, Linux x64, Intel
177
+ Core Ultra 9 275HX. No competing ADS test/benchmark jobs ran. Existing unrelated
178
+ applications remained running. Both variants use the current incremental compiler
179
+ and normal checking gates.
180
+
181
+ | Latency, median / observed p95 | 0.4.4 MCP browser | HTTP browser |
182
+ | --- | ---: | ---: |
183
+ | Cold visible | 4,986 / 5,368 ms | 4,066 / 4,175 ms |
184
+ | Cold verified | 6,371 / 6,385 ms | 5,483 / 6,074 ms |
185
+ | Second view, already warmed visible | 516 / 698 ms | 433 / 449 ms |
186
+ | Second view, already warmed verified | 518 / 700 ms | 444 / 453 ms |
187
+ | Owner-code edit visible | 897 / 1,058 ms | 1,065 / 1,321 ms |
188
+ | Owner-code edit verified | 2,181 / 2,603 ms | 2,308 / 2,595 ms |
189
+ | Owner-style edit visible | 882 / 1,088 ms | 1,102 / 1,261 ms |
190
+ | Owner-style edit verified | 2,056 / 2,407 ms | 2,023 / 2,309 ms |
191
+ | Shared dependency edit visible | 944 / 1,036 ms | 1,014 / 1,123 ms |
192
+ | Shared dependency edit verified | 2,106 / 2,372 ms | 1,974 / 2,571 ms |
193
+ | Token edit visible | 1,128 / 1,581 ms | 1,165 / 1,439 ms |
194
+ | Token edit verified | 2,816 / 3,580 ms | 2,747 / 3,354 ms |
195
+
196
+ | Resource measure, median | 0.4.4 MCP browser | HTTP browser |
197
+ | --- | ---: | ---: |
198
+ | Cold completed response bodies | 2,669,718 B | 1,914,413 B |
199
+ | Cold wire response bodies | 2,670,780 B | 916,099 B |
200
+ | Owner-code edit completed bodies | 261,777 B | 252,766 B |
201
+ | Owner-code edit wire bodies | 262,074 B | 246,683 B |
202
+ | Owner-style edit completed bodies | 292,980 B | 236,628 B |
203
+ | Shared dependency edit completed bodies | 289,236 B | 238,006 B |
204
+ | Token edit completed bodies | 383,421 B | 299,454 B |
205
+ | Owner-code DS modules transformed | 1 | 1 |
206
+ | Owner-code compiler time | 121 ms | 114 ms |
207
+ | Trial-peak process-tree RSS | 2,438 MiB | 2,360 MiB |
208
+ | Observed p95 trial-peak RSS | 2,571 MiB | 2,405 MiB |
209
+ | Full interaction state preserved | 36/36 edits | 36/36 edits |
210
+ | Preview frames, excluding the top page | 2 | 1 |
211
+
212
+ HTTP makes zero browser MCP requests in all three runs. Cold completed bodies fall
213
+ 28.3%, wire bodies 65.7%, and median sampled peak RSS 3.2% (78 MiB). Wire savings
214
+ include gzip in the HTTP asset adapter; compression is also possible independently
215
+ of a transport migration. RSS sums resident pages across the process tree,
216
+ including shared mappings; it is not unique physical memory or JavaScript heap.
217
+
218
+ Cold visible/verified medians improve 18.4%/13.9% in this final run. However,
219
+ owner-code and owner-style edits become visible 18.7% and 24.9% more slowly.
220
+ Verified-edit changes are small and mixed. Both variants transform one DS module
221
+ per owner-code/style/dependency edit; a token edit transforms 18 and re-extracts
222
+ two Linaria modules in this fixture.
223
+
224
+ An earlier matched run reported a 262 MiB (10.4%) memory reduction, versus 78 MiB
225
+ (3.2%) here. Its cold-verification median did not improve, and it included an
226
+ unexplained 18.9-second baseline token-verification outlier. Those measurements
227
+ remain in Git history and `output/http-showcase-comparison/`; they are not pooled
228
+ with this final candidate or used to claim a stable 10% memory gain.
229
+
230
+ With only three cold/trial-peak samples and nine per edit kind, observed p95 is
231
+ the maximum sample, not a production-tail estimate. All second views had already
232
+ compiled in the background; these are not cold unseen-owner timings. Full
233
+ acceptance latency and registered behavior execution were outside this benchmark.
234
+
235
+ **Decision: retain the HTTP branch for further work; do not promote it into 0.4.4.**
236
+ Transfer savings and removal of browser MCP are established in these checks.
237
+ Memory savings are modest and variable, and the branch does not establish an
238
+ editing-speed improvement. Before promotion, profile the publication/transport
239
+ portion of slower edits, repeat draft lifecycle tests, and complete HTTP
240
+ capture/evidence compatibility. The release stays on the tested MCP browser path.
241
+
242
+ The [machine-readable results](benchmarks/http-showcase.json) retain all operation
243
+ samples and source/distribution/fixture/harness hashes. Full requests, compiler
244
+ stage records, screenshots and logs are in
245
+ `output/http-showcase-final/{release,http}-{1,2,3}/`. Run after building both
246
+ checkouts, with the existing prepared fixture:
247
+
248
+ ```sh
249
+ bun scripts/benchmarks/preview/http.mjs /tmp/ads-release-0.4.4 output/http-showcase-final
250
+ ```
251
+
252
+ ## Latency diagnosis, 2026-11-10
253
+
254
+ One release profile and two HTTP profiles recorded request timings, the existing
255
+ browser performance measures, compiler timing and (in the second HTTP profile)
256
+ publication phases and source-check duration. They ran serially, with unrelated
257
+ applications left running. All 36 edits retained the complete interaction state;
258
+ both HTTP runs made zero browser MCP requests and all three runs reported no
259
+ browser errors. The build, reference synchronization and tooling lint passed.
260
+ The five focused HTTP publication, scope, routing, cancellation and lifecycle
261
+ checks also passed (zero failures).
262
+ This is a stage diagnosis, not a replacement for the matched benchmark above.
263
+ The release trace also had long delays before compilation: an owner-style edit
264
+ took 9.25 seconds to become visible, and a token edit took 6.18 seconds visible /
265
+ 22.96 seconds verified. Their cause is not established by this profile, so no
266
+ cross-run speedup is inferred from these samples.
267
+
268
+ The median owner-code sample in the detailed HTTP run took 1,195 ms to become
269
+ visible. Its stages were:
270
+
271
+ | Sequential stage | Time |
272
+ | --- | ---: |
273
+ | Edit until compiler begins | 342 ms |
274
+ | Incremental compilation, one owner module | 107 ms |
275
+ | Compilation end until browser starts reading live manifest | 295 ms |
276
+ | Browser live-manifest request | 199 ms |
277
+ | HTTP publication request | 198 ms |
278
+ | Module load, refresh and visible-frame observation | 54 ms |
279
+ | Total | 1,195 ms |
280
+
281
+ The changed JavaScript download itself took 1.7 ms. The 295 ms interval includes
282
+ server publication and browser detection/status work; it is not a measurement
283
+ of polling delay alone. The frame checks status every 150 ms, and the outer shell
284
+ also reads it after build events.
285
+
286
+ The extra HTTP publication is a confirmed bottleneck. In this sample, its server
287
+ work took 196 ms: 177 ms rereading the live manifest and 18 ms pinning three new
288
+ assets. Across the three owner-code edits, the client publication step took
289
+ 119–198 ms. The manifest was already requested by the browser immediately before
290
+ this operation. Both live-manifest reads call the same build-status service,
291
+ which captures the source revision again before permitting live access. Source
292
+ freshness remains necessary; the avoidable cost is repeating that work in two
293
+ sequential requests for one update.
294
+
295
+ Publication also retrieves each new asset through the generic resource reader.
296
+ That reader looks up and validates the current/history manifest for each asset,
297
+ even though publication already holds the selected graph. Pinning took 14–60 ms
298
+ across these edits. The native HTTP transfer and browser refresh following
299
+ publication were much smaller than these server preparation stages.
300
+
301
+ Both paths also spend substantial work on status and discovery. In the first
302
+ HTTP profile, one owner-code edit made 13 build-status requests (183 KB) during
303
+ its 2.07-second verification interval; the changed module was 8.8 KB. Source
304
+ checks in the detailed HTTP run took 0.78–1.33 seconds per edit and began after
305
+ the live compilation. Transport changes do not remove these checks. In its cold
306
+ sample, 2.25 seconds elapsed before selected-view compilation began and that
307
+ compilation took 772 ms; the view appeared at 4.06 seconds. Startup/discovery
308
+ within that first interval needs further profiling.
309
+
310
+ The next improvements to test are:
311
+
312
+ 1. Return the manifest delta and its authorized HTTP publication together, using
313
+ one coherent source/revision check for that operation. Preserve scope,
314
+ integrity, supersession and rejected-edit recovery.
315
+ 2. Pin assets against that already validated graph instead of repeating manifest
316
+ and history discovery for each asset.
317
+ 3. Use build-change events to wake the frame and coalesce duplicate status reads,
318
+ retaining content reconciliation for missed events. Measure the common path
319
+ in the release engine as well as HTTP.
320
+
321
+ No latency optimization or validation-gate change was made during this diagnosis.
322
+ The branch adds opt-in timers only. The [profile summary](benchmarks/http-showcase-profile.json)
323
+ records all detailed HTTP edit stages, source identities and verification results.
324
+ Full request timelines remain under `output/http-profile/{release-1,http-1,http-deep-1}/`.
325
+ To reproduce, build the intended checkout and run the existing trial with
326
+ `ADS_PREVIEW_BENCH_PROFILE=1`, `ADS_PREVIEW_BENCH_DELIVERY=http`, and
327
+ `ADS_PREVIEW_BENCH_FIXTURE=output/http-comparison-fixture`; use a fresh output
328
+ directory. HTTP publication timers require this profiling revision. The released
329
+ checkout can be selected with `ADS_PREVIEW_BENCH_REPO=/tmp/ads-release-0.4.4`
330
+ and `ADS_PREVIEW_BENCH_DELIVERY=blob`.
331
+
332
+ ## Optimized HTTP results, 2026-11-10
333
+
334
+ **Rerun complete after competing jobs were stopped.** The user authorized stopping six old CPU-bound Bun build/proof jobs; Neezler compilation had finished. Normal desktop applications and preview watchers remained running. Before measurement, sampled host CPU usage was **8.3%** across 24 logical CPUs. No competing build/proof jobs appeared in the ten-second load samples.
335
+
336
+ The complete analysis suite now passes its historical timing and memory limits. All source, distribution, client, harness and fixture hashes match the previous contended run, so no implementation or threshold change accounts for the recovery. The earlier noisy comparison is superseded; its raw evidence remains under `output/http-sse-optimized-comparison/`.
337
+
338
+ The combined graph preparation, pinned asset reads and event-driven build reports are implemented in this isolated POC. Periodic HTTP browser polling is removed. These measurements compare released **0.4.4**, the frozen HTTP POC before these changes, and optimized HTTP.
339
+
340
+ | Operation | Release visible / verified | Earlier HTTP visible / verified | Optimized HTTP visible / verified |
341
+ | --- | ---: | ---: | ---: |
342
+ | Cold display | 3,295 / 4,678 ms | 3,397 / 4,531 ms | 2,996 / 4,330 ms |
343
+ | Second view (already warmed) | 398 / 400 ms | 349 / 357 ms | 383 / 384 ms |
344
+ | Owner code edit | 714 / 1,716 ms | 818 / 1,757 ms | 589 / 1,594 ms |
345
+ | Owner style edit | 730 / 1,640 ms | 844 / 1,636 ms | 641 / 1,590 ms |
346
+ | Shared component edit | 753 / 1,628 ms | 812 / 1,624 ms | 594 / 1,557 ms |
347
+ | Token edit | 891 / 2,207 ms | 1,024 / 2,253 ms | 775 / 2,092 ms |
348
+
349
+ All edit categories pooled (36 edits per variant; medians):
350
+
351
+ | Metric | Release 0.4.4 | Earlier HTTP | Optimized HTTP |
352
+ | --- | ---: | ---: | ---: |
353
+ | Edit to visible | 767 ms | 841 ms | 638 ms |
354
+ | Edit to verified | 1,696 ms | 1,712 ms | 1,594 ms |
355
+ | Decoded response bytes per edit, including SSE | 270,420 B | 241,903 B | 189,270 B |
356
+ | Sampled process-tree peak RSS (median) | 2,270 MiB | 2,199 MiB | 2,235 MiB |
357
+ | Complete interaction state preserved | 36/36 | 36/36 | 36/36 |
358
+
359
+ Against the release, optimized HTTP improved median edit-to-visible latency by **17%**, verification latency by **6%**, and decoded response bytes by **30%**. Against earlier HTTP, the improvements were **24%**, **7%**, and **22%** respectively. These are local matched-run results, not guarantees for remote deployments.
360
+
361
+ No substantial memory benefit is demonstrated: optimized HTTP used **35 MiB (1.5%) less** sampled peak RSS than the release but **36 MiB (1.6%) more** than earlier HTTP. Warmed second-view navigation was **383 ms** versus **349 ms** in earlier HTTP, although below the release’s **398 ms**. Token verification p95 was **2,301 ms** versus the release’s **2,274 ms**; that is the maximum of nine samples, not a stable tail estimate.
362
+
363
+ Three serial rounds rotated variant order under a 3 GiB memory cap with swap disabled. Each edit category has nine samples; cold/navigation/RSS have three. Every second view was already background-compiled. Timings include ordinary source checking and paint gates; full acceptance and registered behavior execution are excluded from the preview timings and covered separately. No browser MCP requests or browser errors occurred in either HTTP variant.
364
+
365
+ Byte accounting version 2 includes open event-stream payloads. The headline comparison uses decoded response bytes. CDP may deliver encoded stream-byte accounting after decoded data, so per-operation wire estimates are not exact network bills. Older completed-response-only tables above remain historical measurements.
366
+
367
+ The previous build, lint/reference synchronization, six control/integration checks and six browser checks passed; this rerun uses exactly that implementation. Browser checks cover React/Preact HTTP and MCP editing, rejection/restoration, workers/Wasm, foundations/guides, and scoped draft reconnection with continued edits and acceptance. Fault-injection cases interrupt a real EventSource and verify no periodic HTTP status reads, a disconnect warning, fresh reads on reconnect and retained state. One earlier new-draft navigation timeout did not recur in three subsequent full HTTP draft runs; no assertion or timeout was weakened.
368
+
369
+ The repository-required analysis suite completed all three inventories plus focused branch, input-capture and contrast scenarios. It exited **0** and passed the unchanged historical comparison limits. The record is `scripts/benchmarks/analysis/results/latest.json`; no performance threshold was changed.
370
+
371
+ Analysis timings (median / p95, milliseconds):
372
+
373
+ | Scenario | 8 owners | 24 owners | 8 owners, spatial |
374
+ | --- | ---: | ---: | ---: |
375
+ | warm-check | 95.8 / 116.6 | 147.2 / 166.1 | 109.0 / 132.9 |
376
+ | source-edit-check | 178.2 / 230.3 | 281.7 / 344.6 | 165.4 / 191.8 |
377
+ | import-edit-check | 153.3 / 232.6 | 254.1 / 322.0 | 161.9 / 210.7 |
378
+ | audit-selection | 32.0 / 45.6 | 39.9 / 46.0 | 30.4 / 39.2 |
379
+ | draft-accept | 383.0 / 426.5 | 562.1 / 724.4 | 389.6 / 457.3 |
380
+ | draft-reject | 332.1 / 379.6 | 467.0 / 527.0 | 338.7 / 390.3 |
381
+ | Sampled process-tree peak RSS | 641.9 MiB | 579.1 MiB | 833.9 MiB |
382
+
383
+ This is focused POC evidence, not release approval. The production release is unchanged. HTTP capture/evidence compatibility remains a separate deferred gate.
384
+
385
+ [Preview results, p95 values, source hashes and host-load metadata](benchmarks/http-showcase-optimized.json). [Complete analysis record](../scripts/benchmarks/analysis/results/latest.json). Raw preview operations and screenshots are under `output/http-sse-rerun/preview/`; host-load samples and phase exit codes are in `output/http-sse-rerun/`.
386
+
387
+ Reproduce with unchanged, built checkouts and no competing build/benchmark jobs:
388
+
389
+ ```sh
390
+ ADS_PREVIEW_BENCH_HTTP_BASELINE=/tmp/ads-http-before-optimizations \
391
+ systemd-run --user --scope -p MemoryMax=3G -p MemorySwapMax=0 \
392
+ bun scripts/benchmarks/preview/http.mjs /tmp/ads-release-0.4.4 \
393
+ output/http-sse-rerun/preview
394
+ # After preview measurements finish:
395
+ systemd-run --user --scope -p MemoryMax=3G -p MemorySwapMax=0 \
396
+ bun run bench:analysis:record
397
+ ```
package/docs/MCP.md CHANGED
@@ -31,9 +31,41 @@ read by the sandboxed MCP App. Existing style and geometry boundaries still appl
31
31
  Websites and product MCP Apps reuse the project's public design-system UI. The
32
32
  consuming application owns data, actions, mounting, MCP communication and serving.
33
33
  The ADS MCP server supports development, inspection and review of that UI. Its
34
- showcase renders real implementations as MCP Apps, providing evidence for the
34
+ showcase renders real implementations in isolated HTTP previews, providing evidence for the
35
35
  exercised conditions alongside normal application integration checks.
36
36
 
37
+ ### Product widgets and payload scope
38
+
39
+ The local HTTP showcase does not replace product MCP Apps. Build a product widget
40
+ from named imports of the generated public design-system entry, using the
41
+ application's normal framework and Linaria integration. Give the bundler the
42
+ widget entry as its root; do not embed a complete design-system library or an ADS
43
+ preview graph. Preserve intentional CSS and JavaScript side effects in package
44
+ metadata. The application owns its MCP tool, HTML resource and actions; serving
45
+ the resulting widget requires neither an ADS server nor authoring source.
46
+
47
+ The [independent product MCP proof](../tests/browser/product-mcp.test.mjs) builds
48
+ React and native Preact widgets from ADS-generated entries, then deletes the
49
+ authored design system before starting a separate
50
+ [product MCP server](../tests/fixtures/product-mcp/server.mjs). A real stdio MCP
51
+ client reads its HTML resource; the official Apps bridge mounts it in Chromium
52
+ and forwards a button action back to that server. The check covers generated
53
+ themes, extracted styles, an inline font and artwork, and no network dependency
54
+ on ADS. It rejects unrelated exported component code, CSS and artwork in the
55
+ served payload, as well as review/scenario and ADS preview runtime modules.
56
+
57
+ Shared foundation token/theme CSS and the selected framework, Apps SDK, font and
58
+ assets remain part of the widget. This is a check of the widget's dependency
59
+ closure, not a claim that every unused token declaration or SDK function has
60
+ been removed. Applications using a different bundler or prebuilt library must
61
+ check their actual emitted CSS and assets too; JavaScript tree shaking alone
62
+ does not establish payload scope.
63
+
64
+ After `bun run build`, run `bun test --parallel=1 tests/browser/product-mcp.test.mjs`.
65
+ The proof prints the complete HTML, JavaScript and CSS byte counts. MCP Explorer
66
+ tests separately cover ADS's development preview tools and resources; they do
67
+ not substitute for this product-server check.
68
+
37
69
  ## Editing access and compiler ownership
38
70
 
39
71
  Use [the direct editing and MCP-only workflows](../skills/ads-designer/references/workflows.md),
@@ -71,6 +103,20 @@ result is implied by a timeout, killed worker or disconnected MCP transport.
71
103
 
72
104
  ## Built-in showcase client
73
105
 
106
+ From 0.4.5, the local showcase uses HTTP JSON endpoints and immutable checked
107
+ asset URLs by default; the browser does not run an MCP client. Agents and
108
+ external MCP Apps retain the existing tools, resources and protocol transports.
109
+ Both use the same compiler, scoped draft services and verification gates.
110
+ No project configuration or experimental flag is needed.
111
+
112
+ Build reports arrive through server-sent events (SSE), with no periodic browser
113
+ status polling. On interruption the retained preview is marked potentially stale;
114
+ EventSource reconnects and ADS rereads current discovery/build state. Returning
115
+ to a visible tab also reconciles current state. A disconnected preview is not
116
+ current evidence. Captures and registered browser verification use this same
117
+ local HTTP showcase and still wait for verified revisions.
118
+
119
+
74
120
  ### Auto-mode tracked drafts
75
121
 
76
122
  Use the [draft workflow](../skills/ads-designer/references/drafts.md) for MCP-only
@@ -115,7 +161,7 @@ Install the exported `developmentImportGuard()` in application Vite/Rollup build
115
161
  Explorer keeps pending proposals in the ordinary catalogue, with Draft badges
116
162
  on their owners, including new owners without an accepted version. Selecting an
117
163
  entry with accepted and draft versions shows Split view in the preview toolbar to compare Accepted
118
- and Draft in the right pane using separate opaque MCP Apps, the same scenario/theme
164
+ and Draft in the right pane using separate opaque preview iframes, the same scenario/theme
119
165
  and matched available/phone viewport widths. New-only entries show their draft
120
166
  without a comparison toggle. Entries without a draft also hide the toggle, and
121
167
  the toolbar disappears when empty. Unchanged scenarios available as explicit overlay review
@@ -180,7 +226,7 @@ port fails startup; ADS does not silently switch ports or terminate another live
180
226
  client. Reuse the connected server's showcase instead of launching another one.
181
227
  `ads mcp --no-showcase` disables the website for headless clients.
182
228
  The website binds to 127.0.0.1 and accepts its own origin only. It serves packaged
183
- client assets and MCP, with no arbitrary file reader or command launcher.
229
+ client assets, scoped HTTP preview services and MCP, with no arbitrary file reader or command launcher.
184
230
  Shutdown closes both transports, subscriptions and the managed compiler.
185
231
 
186
232
  The shell is minimal: header, section tabs, collapsible left menu, a theme button that
@@ -188,12 +234,11 @@ steps through the project's declared themes (`ads_status.themes`), a brand selec
188
234
  it when the project declares brands (`ads_status.brands`),
189
235
  status/diagnostics when needed, and the App slot. The Icons tab (shown when the project has
190
236
  a glyph set) renders `ads://project/icons` natively: the glyph set, each glyph on its grid
191
- at every icon size with aliases and glyph errors, and the logos in `assets/logos/`. Its MCP client does discovery,
192
- tool calls, resource forwarding and notification handling. Token categories come
237
+ at every icon size with aliases and glyph errors, and the logos in `assets/logos/`. Its HTTP client handles discovery,
238
+ scoped preview actions and SSE build events. Token categories come
193
239
  from `ads_tokens.categories` (the catalogue's groups); every scenario section also
194
240
  comes from the same `ads_scenarios` registry.
195
- It invokes the selected App tool and uses the official Apps bridge to render its
196
- HTML in an opaque sandbox. Project UI is never imported into the shell.
241
+ It opens the selected scenario in a persistent opaque preview iframe. Project UI is never imported into the shell.
197
242
 
198
243
  The built-in client refreshes menus after catalogue changes and automatically
199
244
  refreshes the active scenario inside the same reusable App after a current
@@ -201,8 +246,9 @@ successful build. Failed builds show a compact status strip below the toolbar,
201
246
  outside the App canvas. Details opens full file/line diagnostics; Retry requests
202
247
  the selected preview again. The retained view is identified as stale. Themes and
203
248
  available space flow through host context. Other coding-agent hosts retain their own reload
204
- policy. A disconnected subscription marks retained output stale and tears down
205
- App watchers; refresh the page after restarting ADS. Compilation remains necessary for project TSX/Linaria, performed by the
249
+ policy. An interrupted SSE connection marks retained output potentially stale; reconnection
250
+ and visibility resume reconcile current state. Reopen the URL after restarting ADS
251
+ if the runtime selects a different port. Compilation remains necessary for project TSX/Linaria, performed by the
206
252
  managed Bun compiler on demand and after relevant source changes.
207
253
 
208
254
  Switching entries updates the scenario inside the existing App. A quiet monochrome
@@ -805,6 +851,7 @@ the tool result. `resources/read` supplies these registered resources:
805
851
  | `ui://ads/preview` | Tool-owned App bootstrap, official App SDK and resource loader |
806
852
  | `ads://preview/manifest` | ADS preview compiler's versioned scenario/dependency graph |
807
853
  | `ads://preview/live` | Current-source compiled feedback while checks are pending; explicitly unverified |
854
+ | `ads://preview/manifest{?from}` / `ads://preview/live{?from}` | Internal UI updates relative to a known SHA-256 graph revision |
808
855
  | `ads://assets/<hash>.js` | Compiled shared runtime or scenario module |
809
856
  | `ads://assets/<hash>.css` | Extracted foundation or scenario styles |
810
857
  | `ads://assets/<hash>.woff2` (and other asset types) | Binary font/image/worker assets |
@@ -817,6 +864,18 @@ and asset references. URIs are immutable identities; manifests publish atomicall
817
864
  after all files exist. The server validates the graph and served bytes. Binary
818
865
  resources use MCP `blob` content rather than text encoding.
819
866
 
867
+ The App retains known manifests and uses the verified `manifestRevision` from
868
+ `ads://project/build` (or a current live/tool selection) to reuse one without
869
+ another graph download. When a read is needed, `?from=<revision>` returns a
870
+ version-1 envelope: `full` with `manifest`, `unchanged` with current metadata,
871
+ or `delta` with changed/removed asset and scenario records and, when changed,
872
+ scenario order. Updates name their exact `baseRevision`; the App reconstructs
873
+ and validates the graph without changing its cached base. Missing/pruned history
874
+ or a delta larger than the full response returns `full`. Omitting `from` still
875
+ returns the original manifest shape. Live queries retain the same current-source
876
+ and session checks. These exchanges stay inside the preview resource bridge;
877
+ tool replies continue to carry selection/status and graph references, not graphs.
878
+
820
879
  The loader runs **inside the App iframe**. It reads through the host's resource
821
880
  bridge, verifies bytes, materializes Blob URLs and native ESM import maps, loads
822
881
  CSS/fonts, then invokes the selected module's `mount(container)`. It caches
@@ -881,10 +940,11 @@ showcase puts these states in a small monochrome header indicator with tooltip
881
940
  and expandable details; it keeps status and loading overlays out of the widget
882
941
  area. Other Apps hosts retain the in-App status fallback.
883
942
 
884
- ### ADS-owned Bun compiler
943
+ ### ADS-owned preview compiler
885
944
 
886
- Bun 1.4.1+ compiles ADS browser bundles and MCP previews independently of the
887
- application's bundler. Configure `framework`; ADS supplies its compiler and
945
+ ADS runs on Bun 1.4.1+ and compiles previews independently of the application's
946
+ bundler. Watched previews use a private incremental module graph; complete
947
+ unwatched previews use Bun builds. Configure `framework`; ADS supplies its compiler and
888
948
  publishes the graph to `.ds/preview/`:
889
949
 
890
950
  ```json
@@ -893,7 +953,7 @@ publishes the graph to `.ds/preview/`:
893
953
 
894
954
  Use `preact` for native Preact. The project retains its framework mount in
895
955
  `showcase/mcp/main.ads.mount.tsx` under the ADS root. It exports
896
- `mountScenario(Scenario,container)` and returns cleanup. Bun selects the ADS JSX
956
+ `mountScenario(Scenario,container)` and returns cleanup. ADS selects the framework JSX
897
957
  runtime, resolves the public alias and extracts Linaria through the shared tag
898
958
  resolver. Project application build settings stay under project control.
899
959
 
@@ -904,14 +964,17 @@ continuous compiler. Project setup can call `compilePreviews` from
904
964
  always runs native gates; `acceptance.scripts`, `acceptance.behavior` and
905
965
  `acceptance.audit` choose additional scripts and whether the owners' tests and audit run. Oxlint is not an ADS gate dependency.
906
966
 
907
- MCP warms the prioritized view first, then compiles the remaining graph in
908
- one background build, without delaying service startup. One compiler job runs
967
+ MCP warms the prioritized view first, then warms remaining views sequentially
968
+ through the retained module graph, without delaying service startup. One compiler job runs
909
969
  at a time; foreground selections take priority over queued warming. Compiled views stay cached; unchanged warmed navigation
910
970
  needs no compilation. Linaria transforms and worker bundles reuse source and
911
971
  transitive dependency hashes. Worker compilation also uses Bun and temporary
912
972
  worker compiler processes release their heaps after output is captured.
913
973
 
914
- The build resource includes `warmup: {state,completed,total,failed}`. Build changes
974
+ The build resource includes `warmup: {state,completed,total,failed}` and optional
975
+ `manifestRevision`, identifying the integrity-checked verified graph for its
976
+ session. The revision alone does not authorize freshness: the selected entry's
977
+ `current` and live status still govern rendering. Build changes
915
978
  notify supported MCP subscribers and Explorer updates automatically. Warming and
916
979
  acceptance never suspend the interactive compiler. Cached output remains visible
917
980
  while changed source compiles and validates.
@@ -931,11 +994,14 @@ reuses successful validation/output only when inputs, compiler/tool code,
931
994
  lockfile, recorded dependencies and content digests match. A source edit
932
995
  revalidates the project and incrementally updates the watched module graph. Both
933
996
  must succeed against unchanged source before verified atomic publication; a failed or
934
- superseded build cannot become current. Files outside Bun's module graph still trigger
935
- validation and a reconciled build. Preview refresh retains the selected view's
936
- state when its complete static module/style/asset closure is unchanged, while
937
- rerunning its token/paint audits against the new manifest. Actual selected-view
938
- changes remount it. Normal application builds retain their own chunking and optimization.
997
+ superseded build cannot become current. Files outside the compiled module graph still trigger
998
+ validation and a reconciled build. Preview refresh retains the iframe and compatible component state across
999
+ source and style edits, including loaded lazy branches. Token/paint audits rerun
1000
+ against the new manifest. React Refresh and native Prefresh determine compatible
1001
+ component/hook updates. Incompatible exports, compiler changes or added/removed
1002
+ source files that require renewing import resolution reopen the
1003
+ isolated frame; rejected revisions also use a clean frame when restoring already
1004
+ executed old code. Navigation to another scenario mounts that scenario normally. Normal application builds retain their own chunking and optimization.
939
1005
 
940
1006
  Accepted MCP edits enqueue preparation even without an open preview. Matching
941
1007
  validated candidate graphs seed the same project cache; location-dependent,
@@ -951,14 +1017,19 @@ directories under `.ds/preview/sessions/`. Tiny
951
1017
  `.ds/scenarios/<id>/index.html` descriptors retain the reporter/registry contract;
952
1018
  they are not standalone runnable previews. Six previous graph revisions retain
953
1019
  old assets for in-flight reads; older references expire with a refresh error.
954
- An App permits 20 build revisions to bound retained native ESM modules. The
955
- built-in host then recreates the App automatically; external hosts receive an
956
- explicit reopen diagnostic. Manifest size is capped at 2 MiB and individual resources
1020
+ Watched manifests carry `refresh: {version: 1, epoch}` and module records carry
1021
+ `hot: {id, source}`: a session-stable logical ID and SHA-256 of the module before
1022
+ resource-address rewriting. Complete manifests omit these optional fields.
1023
+ The App rejects malformed/duplicate refresh identities. Watched Apps bound
1024
+ retained metadata to 4096 records and materialized resources to 64 MiB; complete
1025
+ bundled Apps retain the 20 selected-module-revision limit. At the next mount the
1026
+ built-in host recreates the App when a limit is exceeded; external hosts receive
1027
+ `ADS_PREVIEW_REOPEN`. In-flight superseded refresh also requires a clean frame. Manifest size is capped at 2 MiB and individual resources
957
1028
  at 16 MiB; those development transport limits do not alter production bundles.
958
1029
 
959
1030
  ### One client command, managed preview builds
960
1031
 
961
- With a declared framework, `ads mcp` starts ADS's Bun
1032
+ With a declared framework, `ads mcp` starts ADS's watched preview
962
1033
  compiler and warms the prioritized view followed by the remaining graph in
963
1034
  the background. Jobs run sequentially; foreground selections have priority. The client configuration above stays the same; no second terminal
964
1035
  or separately managed server is needed. The same compiler also builds every draft
@@ -1349,3 +1420,11 @@ reported). Abandoned known mutation workspaces are removed during recovery;
1349
1420
  unreferenced old verification folders are removed after the configured age.
1350
1421
  No cleanup is triggered solely by a client disconnect. Independent ADS processes
1351
1422
  on the same project are outside this process-local coordination guarantee.
1423
+
1424
+ ## Experimental browser transport
1425
+
1426
+ The isolated HTTP experiment replaces MCP in the showcase browser, including
1427
+ discovery, status, events and preview actions. Agents retain MCP against the
1428
+ same engine. Preview isolation still uses a persistent iframe. See the
1429
+ [scope, endpoint boundary and proof checklist](HTTP-SHOWCASE-POC.md). This is not
1430
+ part of the 0.4.4 release.
@@ -29,7 +29,7 @@ Other performance work needs a workload specific to the changed path:
29
29
  | --- | --- |
30
30
  | Persisted batch task reports | [Cache ownership and controls](../CACHING.md); `tests/integration/task-cache.test.mjs` |
31
31
  | Preview compilation and imported computed CSS | [Preview architecture](../ARCHITECTURE.md); `tests/browser/bun-preview.test.mjs`, `tests/integration/analysis-preview-cache.test.mjs`, `tests/integration/preview-cache.test.mjs` |
32
- | Browser delivery, navigation and lazy resources | [MCP previews](../MCP.md#ads-owned-bun-compiler); affected browser/resource tests |
32
+ | Browser delivery, navigation and lazy resources | [MCP previews](../MCP.md#ads-owned-preview-compiler); affected browser/resource tests |
33
33
  | Execution ownership, cancellation and recovery | [Execution coordination](../MCP.md#shared-process-execution-coordination); `tests/integration/execution-coordination.test.mjs` |
34
34
 
35
35
  Correctness tests establish their assertions, not a performance baseline. For a