@botiverse/porthole 0.10.0 → 0.12.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.
Files changed (48) hide show
  1. package/dist/annotate/types.d.ts +18 -6
  2. package/dist/annotate/validate.d.ts +11 -1
  3. package/dist/annotate/validate.js +18 -1
  4. package/dist/check/files.d.ts +2 -0
  5. package/dist/check/files.js +67 -50
  6. package/dist/check/lint.d.ts +8 -1
  7. package/dist/check/lint.js +18 -0
  8. package/dist/check/markup.d.ts +7 -0
  9. package/dist/check/markup.js +49 -0
  10. package/dist/check/page-source.js +1 -1
  11. package/dist/check/scroll.d.ts +100 -0
  12. package/dist/check/scroll.js +1429 -0
  13. package/dist/conformance/harness-source.js +1 -1
  14. package/dist/conformance/runtime.js +6 -0
  15. package/dist/guide/guide.js +1 -1
  16. package/dist/guide/runtime.js +2 -2
  17. package/dist/host/create-host.js +3 -3
  18. package/dist/index.d.ts +1 -1
  19. package/dist/react/frame.d.ts +2 -1
  20. package/dist/runtime/requests.d.ts +5 -0
  21. package/dist/runtime/requests.js +16 -1
  22. package/dist/runtime/types.generated.js +1 -1
  23. package/dist/shell/annotate.d.ts +2 -1
  24. package/dist/shell/annotate.js +29 -12
  25. package/dist/shell/use.js +9 -1
  26. package/docs/ADOPTING.md +25 -3
  27. package/docs/ARCHITECTURE.md +2 -1
  28. package/docs/DECISIONS.md +391 -2
  29. package/docs/DESIGN.md +31 -9
  30. package/docs/THREAT_MODEL.md +42 -7
  31. package/package.json +1 -1
  32. package/src/annotate/types.ts +19 -6
  33. package/src/annotate/validate.ts +20 -1
  34. package/src/check/files.ts +68 -54
  35. package/src/check/lint.ts +24 -0
  36. package/src/check/markup.ts +53 -0
  37. package/src/check/scroll.ts +1757 -0
  38. package/src/conformance/runtime.ts +9 -0
  39. package/src/guide/guide.ts +1 -0
  40. package/src/guide/runtime.ts +2 -2
  41. package/src/host/create-host.ts +9 -3
  42. package/src/index.ts +1 -0
  43. package/src/react/frame.tsx +2 -1
  44. package/src/runtime/requests.ts +23 -1
  45. package/src/runtime/types.generated.ts +1 -1
  46. package/src/shell/annotate.ts +29 -12
  47. package/src/shell/use.ts +9 -1
  48. package/types/runtime/v1/comments.d.ts +14 -4
package/docs/DECISIONS.md CHANGED
@@ -3033,7 +3033,7 @@ store); `test/runtime.test.ts` (the CSP sources; upload limits and names).
3033
3033
  the public suffix list (CORP becomes defense in depth), or a host needs assets shared across
3034
3034
  artifacts (`copy_from`: a new id in the destination).
3035
3035
 
3036
- ## P090 · 2026-10-18 · Comments from the page: the host's composer at the page's anchor, write-only · Accepted; amended by P091
3036
+ ## P090 · 2026-10-18 · Comments from the page: the host's composer at the page's anchor, write-only · Accepted; amended by P091, P108
3037
3037
 
3038
3038
  **Decision.** `comments` is a built-in (P086) host function served by a handler: `open({ name,
3039
3039
  label?, quote? })` (a name the page chose, ≤ 256 characters, `slide-3`, `refs/a.md#L12`; a label ≤
@@ -4595,7 +4595,7 @@ second wall on a tab); a host needs a served page to open windows from a tab (th
4595
4595
  `'self'` default (it joins `FRAME_DENIED_FEATURES`); or WebKit and Firefox apply
4596
4596
  `Permissions-Policy` to these features (the shell's device locks become the second wall there too).
4597
4597
 
4598
- ## P104 · 2026-10-20 · Annotation markers: a number at an anchor, a click the host hears, marks that follow a scroll · Accepted; amended by P105
4598
+ ## P104 · 2026-10-20 · Annotation markers: a number at an anchor, a click the host hears, marks that follow a scroll · Accepted; amended by P105, P107
4599
4599
 
4600
4600
  A host that shows its comments beside an artifact page wants, at each comment's anchor in the page,
4601
4601
  a small marker (a bubble and how many comments are there) that scrolls with the content; a click on
@@ -4849,6 +4849,9 @@ P097's CI triggers. From the audit of 2026-10-19 (V01, V02).
4849
4849
  registry), each uploading its reports and `verdicts.json`; the `controls` job puts them
4850
4850
  together (`--summary`) and fails if any control failed or never ran on an engine. A job's
4851
4851
  name changed, so release.yml's REQUIRED_CI_JOBS lists the twelve shards and `controls`.
4852
+ Later (0.11.0, #46): a shard runs about 42 minutes, but a browser install that usually takes
4853
+ 20 seconds took 21 (apt mirrors) and the 60-minute shard was cancelled with every control it
4854
+ reached passing. A shard now allows 90 minutes, and its install fails on its own past 25.
4852
4855
 
4853
4856
  **Why.** PRINCIPLE 6: a wall never seen to fail proves nothing, and a check that says a wall was
4854
4857
  seen to fail when its run never happened is worse than no check. CI's "every control" was 7 of
@@ -5104,3 +5107,389 @@ default, gate or policy loosens.
5104
5107
  none`), a host shows right-to-left text (the gutter is on the right), a host needs to place
5105
5108
  markers itself (then it draws them from `anchored`), an engine changes what gives a page
5106
5109
  activation, or MCP Apps defines annotations.
5110
+
5111
+ ## P106 · 2026-10-23 · A page held to one screen by its own styles is warned before it is published · Accepted
5112
+
5113
+ From Raft's triage of its Artifacts (task #71): agents' first versions of high-fidelity mockups,
5114
+ bundled from an app's own code, carry the app shell's global styles, `html, body { height: 100%;
5115
+ overflow: hidden }` and `#root { position: fixed; height: 100dvh; overflow: hidden }`, right for
5116
+ the app and wrong for a long page in a frame: it doesn't scroll. 2 of 50 artifacts on the server
5117
+ had it (the first version broken, the second fixing it by overriding the styles); one also had an
5118
+ inner box take the wheel. Nothing told the agent: the manual spoke only of sideways overflow, and
5119
+ `admitFiles` didn't look.
5120
+
5121
+ **Decision.**
5122
+ 1. **`scroll-lock`, a warning** in `lintContent` (so `admitContent`) and `lintFiles` (so
5123
+ `admitFiles`), from `src/check/scroll.ts`: a cascade, read from the text, of the few
5124
+ properties that matter (overflow, height, max-height, position, top and bottom, with their
5125
+ shorthands) over the three elements that hold a document: html, body, and the body's one
5126
+ element of content (the root: `#root`, `#app`, a lone `div`; none where body has two). It
5127
+ warns where one of them holds the page and nothing below body scrolls itself:
5128
+ - html with overflow-y hidden or clip;
5129
+ - body with overflow-y hidden or clip, where html's overflow is visible or body is one screen;
5130
+ - the root with overflow-y hidden or clip, one screen tall;
5131
+ - any of them `position: fixed`, one screen tall.
5132
+ Nothing below body scrolls itself: no element in the page's own markup below body has
5133
+ `overflow` or `overflow-y` auto or scroll, by its `style=""`, by a Tailwind class (where
5134
+ Tailwind is loaded), or by a rule the check reads whose selector matches it (with the selectors
5135
+ the check can match; one it can't read, or that matches nothing in the markup, doesn't count).
5136
+ The root itself isn't such an element, by its `style=""`, its classes or a rule: it is in the
5137
+ cascade, so its own values decide. One screen tall with overflow-y auto or scroll, it scrolls
5138
+ the page (no warning); without a height it grows with what it holds and has nothing to scroll,
5139
+ so `html, body { height: 100%; overflow: hidden } #root { overflow-y: auto }`, or the same
5140
+ with `<div id="root" style="overflow: auto">`, is held. A root that scrolls in a height the
5141
+ check can't read is its own box, as an inner one is (no warning): under a flex or grid body
5142
+ (its `display`, or Tailwind's `flex`, `grid`; the root's height is the layout's: `flex-1`), or
5143
+ with a height of another shape (a length, `min()`, `var()`, a `calc()` other than below, an
5144
+ arbitrary `h-[…]`), where body itself is one screen tall. It is held where its height is the
5145
+ content's (unset, `auto`, `fit-content`, or 100% of a body that is) under a block body, and
5146
+ wherever body isn't one screen tall (a body that grows with the page holds a flex column that
5147
+ does too: `html { height: 100%; overflow: hidden } body { display: flex; flex-direction:
5148
+ column; overflow: hidden } #root { overflow: auto }` is held).
5149
+ Where one does, the page may scroll in that box (a dashboard's `main { flex: 1; overflow-y:
5150
+ auto }`), and the text can't tell which box holds the content: no warning; the manual's line on
5151
+ the wheel says the rest. Matched against at most 2,000 elements, 32 deep, 256 selectors and a
5152
+ million steps (each selector's compound and element tried once).
5153
+ **A page its script draws** (body holds at most one element of content, with no text, and the
5154
+ page has a script: `<div id="root"></div>`) has nothing to match: it is warned, but said as a
5155
+ page that looks held: "The page looks held to one screen in its frame: … If it is meant to fit
5156
+ one screen, or a box its script draws scrolls the content, ignore this; otherwise let it scroll
5157
+ as a document: …". A page with its content in the markup is told "The page won't scroll in its
5158
+ frame: … Unless it is meant to fit one screen, let it scroll as a document: …".
5159
+ One screen: height or max-height (or `block-size`, `max-block-size`) `100vh` (`dvh`, `svh`,
5160
+ `lvh`) or `calc(100vh - 4rem)` (the whole less one positive length: px, rem, em, %, vh),
5161
+ `100%` or `calc(100% - 56px)` of a one-screen parent (html's 100% is
5162
+ the frame's; Tailwind's arbitrary `h-[calc(100vh-4rem)]` read as Tailwind writes it, with
5163
+ spaces around `-` and `+`) or of the frame where it is fixed or absolute, or fixed or absolute with both top
5164
+ and bottom set (`inset: 0`). Measured with Playwright's Chromium and Firefox (a 3,000 px
5165
+ page, a 400 px frame, the wheel): each of these stops it; `body { overflow: hidden }` alone
5166
+ does (the viewport takes body's overflow), as does `#root { position: fixed; inset: 0 }`
5167
+ without any overflow; `#root { overflow: hidden }` without a height, `#root { height: 100% }`
5168
+ under a body as tall as its content, `html, body { height: 100% }` alone, and
5169
+ `overflow-x: hidden` alone don't; a one-screen `#root { overflow: auto }` under a held body
5170
+ scrolls in the root. WebKit couldn't run on the box; nothing here is engine-specific CSS.
5171
+ Why the markup: an app's whole stylesheet, bundled into a page, has scroll boxes of its own (a
5172
+ list, a sidebar) that a page may never draw; counting every such rule would leave the app
5173
+ shell's page, the case this is for, unwarned.
5174
+ 2. **What it reads:** `<style>` and `<link rel=stylesheet>` in document order (not for print, not
5175
+ alternate), the linked sheets found in the version and their `@import`s, `style=""` on the
5176
+ three, rules whose selectors it can match (type, id, class, `*`, `:root`, `:only-child`,
5177
+ `:first-child`, descendant and child), and, where the page loads Tailwind (its CDN, or a
5178
+ Tailwind stylesheet), the utilities that hold a page (`h-screen`, `h-full`, `overflow-hidden`,
5179
+ `fixed`, `inset-0`…). Specificity, order, `!important` and cascade layers pick each value, so
5180
+ a later override, as the triage's second versions wrote, is seen. A layer's place is where it is
5181
+ first declared or its block opens, a sub-layer's rules below its parent's own, unlayered rules
5182
+ above all layers, reversed for `!important`; each value is picked once every sheet is read.
5183
+ **Bounded:** a page's stylesheets are each read once (a sheet linked or imported again is read
5184
+ where it first comes), at most 32 of them and 4 MiB in all, its own `<style>` elements
5185
+ included; past that, the rest isn't read (a later one that fits still is). Each
5186
+ is asked of the caller once per place it is named from. The check is then linear in what it
5187
+ reads: ten sheets each importing the next six times read ten sheets, not 6^10; each element
5188
+ keeps, per longhand, only each layer's winner so far (within a layer, and within `!important`
5189
+ or `style=""`, specificity and order decide; the layers' order picks among those once all is
5190
+ read), and the layers' tree is built in place, so a sheet of 80,000 declarations, or an `@layer`
5191
+ of 80,000 names, costs what sixteen of 5,000 do. A rule's selectors are read one at a time, and
5192
+ a scroll rule's kept only while there is room for them (a 2 MiB rule of 300,000 selectors ran
5193
+ out of memory at 128 MB before). An element's classes are a set, and a compound
5194
+ selector of more than 32 ids and classes matches nothing, so matching a compound against an
5195
+ element is bounded work, for html, body and the root as for the elements below body: the size
5196
+ of the sheets and the size of the page add, not multiply. A layer named more than 16 deep
5197
+ (`a.b.c…`, with the layers it is in) isn't read: its rules are dropped, but its first 16 parts
5198
+ are declared where it comes, as a browser declares them, so the layers' order holds. A page's
5199
+ sheets name at most 1,024 layers (each, parents included): a new one past them isn't declared
5200
+ and its rules aren't read, as a layer too deep (each layer kept every value its rules gave:
5201
+ 2 MiB of anonymous layers needed 128 MB of heap, of layers 15 parts deep 256 MB, in 8daa075
5202
+ too). A layer's name with the layers it is in (`a.b.c`) is at most 256 characters: a longer
5203
+ one isn't declared, nor its rules or the layers in it read (each anonymous layer in a 1.9 MB
5204
+ one copied its name: out of memory at 1,024 MB; in a 1 MB one, past 300 s).
5205
+ **A version's pages** (`lintFiles`, so `admitFiles` at publish): the rule reads the pages an
5206
+ agent opens first, the entry and then the others in path order, at most 8 in all, each as a
5207
+ page alone (its sheets read as it streams them: nothing parsed is kept from one page to the
5208
+ next). Only the pages' paths are kept for it, and the eight it checks are decoded again there
5209
+ (keeping every page's text took 96 MB for 500 pages of 192 KB). The 8 share one budget: 8 MiB of stylesheet read, every sheet each page reads (one two
5210
+ pages link is read for each) and each page's own `<style>`, and two million steps of matching
5211
+ scroll rules against markup. A page that would spend more than is left isn't checked, nor are
5212
+ any after it, the cheap ones too. Where pages aren't checked (past 8, or past the budget), one
5213
+ warning says how many: "N pages not checked for scroll lock: the check reads the entry and at
5214
+ most 7 other pages, within one budget. If one of them holds html, body or its root to one
5215
+ screen (…), let it scroll as a document." A page over its size isn't read at all (its error
5216
+ says so) and isn't counted. A warning, so an unchecked page is a warning missed, never a
5217
+ refusal. Bounded: whatever a version holds, the rule reads at most 8 pages and 8 MiB of
5218
+ sheets (the review's 500 pages sharing a 250 KB sheet took 13.8 s; 999 pages sharing a 1 MB one
5219
+ now read 8). Why not read each sheet once for the version and replay it for each page (the
5220
+ fourth review's answer): its parsed rules took about 100 bytes a byte, kept for the version (a
5221
+ page with one 2 MiB sheet ran out of memory at 128 MB; eight with their own took 1.5 GB), for
5222
+ an advisory rule whose pages that matter are the ones an agent opens.
5223
+ 3. **The warning says what to do:** what holds it, as the page wrote it, and the rule that undoes
5224
+ it under the page's own selectors (so it wins by coming later; `!important` where the hold
5225
+ was). The page's CSS goes into the agent's context, so only values of a known shape are echoed
5226
+ (lengths, percentages, viewport units, 0, auto, hidden, clip, fixed, static…; else the property
5227
+ and `…`), each declaration (its `!important` included) and selector at most 60 characters, and
5228
+ a selector with escapes, other than plain characters or longer is given as the element's own
5229
+ name: `#root` where the root's id is plain and `#id` at most 60 characters (the id is page text
5230
+ too), else `body > div`, or `body > *` for an element HTML doesn't have (a custom element's
5231
+ name is page text too). Where that name has less specificity than the selector it stands for
5232
+ (`body > div` for a 61-character `#id`, `#root` for `body > #\72 oot.x`), the fix is
5233
+ `!important`, or it couldn't win. So: `add html, body, #root { height: auto; overflow: visible; position: static } after
5234
+ those rules`, `take h-screen overflow-hidden off body's class`, or `take … out of html's style
5235
+ attribute`. In `lintFiles` it names the stylesheet and line the hold is in; a page's own
5236
+ `<style>` is reported once.
5237
+ 4. **The manual** (the Pages section, every kind): "It scrolls as a document: unless it's meant to
5238
+ fit one screen (a game, a canvas), don't hold html, body or the element that holds it all to one
5239
+ screen (height: 100% or 100vh with overflow: hidden, or
5240
+ position: fixed), or what's below the first screen can't be reached. A box that scrolls by
5241
+ itself takes the wheel while the pointer is over it: keep those to parts of the page (a wide
5242
+ table, a long list), never the whole of it."
5243
+
5244
+ **Why.** The agent learns it at publish, with the fix in the words of its own CSS, instead of from
5245
+ a person who can't scroll. A warning and not a refusal: some pages are one-screen apps on purpose,
5246
+ and a text read can't be sure.
5247
+
5248
+ **Rejected.**
5249
+ - Overflow hidden on html or body only together with a one-screen height (the triage's first
5250
+ rule): body's overflow alone stops the viewport, measured above; requiring the height misses
5251
+ `body { overflow: hidden }`, which is the common way to stop a page's scroll.
5252
+ - Measuring it in a browser (`checkPage` comparing the document's scroll height with the frame):
5253
+ publish has no browser; a later check may add it, and then the wheel too.
5254
+ - Warning on an inner one-screen scroll box: it does scroll, and an app's sidebar is one; the
5255
+ manual says it instead.
5256
+ - Warning where a box below body scrolls, unless it is shown to hold the page: from the text, a
5257
+ box's height in a flex or grid layout can't be told, and the review's three cases (a flex
5258
+ `main`, Tailwind's dashboard, a `style="overflow: auto"`) were false warnings.
5259
+ - Any rule that gives something below body a scroll box silencing the warning (the first answer
5260
+ to that review): an app's bundled stylesheet always has one, and its pages went unwarned.
5261
+
5262
+ **Limits.** Not read: rules under `@media` (but `all` and `screen`), `@supports`, `@container`;
5263
+ `:is()`, `:where()`, `:not()`, attributes and sibling combinators (they match nothing); nested
5264
+ rules; values through `var()` or `calc()`; `@import … layer()` beyond a name; a layer named more
5265
+ than 16 deep; a sheet's second link or import; what scripts set; stylesheets from another origin;
5266
+ sheets past the budget. Each can miss a hold or an override (a warning then wrong, never
5267
+ a refusal). A body with stray unclosed tags may be taken as having one child. A root that scrolls
5268
+ under a flex or grid body, or with a height the check can't read, is taken as its own scroll box:
5269
+ where it is in fact as tall as its content (a flex column's item without `flex: 1`, a `min()`
5270
+ that comes to its content), the hold is missed. In a version, pages past the entry and 7 more,
5271
+ or past the budget (8 MiB of sheets, two million match steps), aren't checked: a warning says
5272
+ how many. A page's layers past 1,024, and a layer's name past 256 characters, aren't read: that
5273
+ misses a hold in them, and it can warn wrongly too, where the hold is in a layer read and what
5274
+ undoes it is in one that isn't (`html { overflow: hidden }` in layer `p0`, and `html { overflow:
5275
+ visible }` in a new layer past the cap). Known, to follow: the app shell's fix names
5276
+ only html (`add html { … }`), and body's overflow, which the viewport takes once html's is
5277
+ visible, is said by a second warning after it; an `!important` hold inside a layer can't be
5278
+ undone by the unlayered `!important` the fix suggests (a layer's `!important` beats it), so the
5279
+ same advice comes again; `display: -webkit-box` isn't taken as flex.
5280
+
5281
+ **Tested.** `test/check.test.ts` (a page held to one screen): the app shell's exact styles (the
5282
+ message and line), body or html hidden alone, the root by height, max-height and `inset: 0`, a
5283
+ lone `div` by `:only-child`, `style=""`, `!important`, a more specific hold over a later override,
5284
+ Tailwind's CDN utilities on body and a build's class rules; none for overflow hidden on the root
5285
+ without a height, a one-screen height without overflow hidden, `overflow-x: hidden`, an inner
5286
+ element, two body children, a one-screen scroll box in a held body, 100% of a content-tall body;
5287
+ later overrides (same `<style>`, a later one, `style=""`, unlayered over layered, a comment),
5288
+ part of an override not enough; the limits (`@media`, `@supports`, `var()`, `:is()`); the
5289
+ manual's line in the artifact, fill and inline manuals; after review: none where something below
5290
+ body scrolls in the markup (a flex `main`, Tailwind's dashboard, `style="overflow: auto"`), held
5291
+ where it only scrolls sideways; an app bundle (the shell's styles and `.message-list { overflow-y:
5292
+ auto }`, an empty `#root`) warned in the hedged words, silent with a `.message-list` in its markup
5293
+ (also through `#root > section .message-list`), held where the markup has no match, the selector
5294
+ can't be read (`:hover`) or doesn't match (`section > .message-list`); the shell's styles over
5295
+ content in the markup said flatly; a hostile `top:` value and a long one not echoed, an escaped
5296
+ selector given as `#root`; after the second review: a scroll rule on the root without a height
5297
+ held (`#root { overflow-y: auto }`, `body > div { overflow: auto }`), one screen tall not, a box in
5298
+ the root or one of two in body still a scroll box; a plain id of 1,400 characters given as `body >
5299
+ div` (in the rule, the fix and the style attribute's fix; the message 346 characters, 3,128
5300
+ before), one of 59 as `#id`; a layer 100,000 deep not read (it overflowed the stack), 16 deep read;
5301
+ 80,000 declarations of body and an `@layer` of 80,000 names timed against sixteen times 5,000
5302
+ (under eight times as long, and each under 2 s: about 0.06 s and 0.14 s here, 36.6 s and 36.3 s
5303
+ before); after the third review: html, body, the root and 24 paragraphs with 4,000 classes each
5304
+ against two 2 MB `.a.a….b` rules, timed against sixteen sixteenths of both (under eight times,
5305
+ under 2 s: 0.1 s here, 178 s before; a sixteenth of both took 0.74 s, a quarter 11 s), a
5306
+ compound of 32 classes read and 33 not, a deep layer's parents declared where it comes (`theme`
5307
+ before `reset`), `!important` within the 60 characters, a custom element as `body > *`, the root
5308
+ by its own `style="overflow: auto"` and Tailwind class held without a height and not with
5309
+ `h-full`, by `block-size`, `max-block-size` and `calc(100vh - 56px)`, and a `style="overflow:
5310
+ auto"` below the root still a scroll box; after the fourth review: the four app shells (a
5311
+ Tailwind flex column with a `flex-1 overflow-y-auto` root, `display: flex` with an inline-styled
5312
+ root, Tailwind's grid with an `overflow-auto` main, an `h-[calc(100vh-4rem)]` root) and `min()`,
5313
+ a longer `calc()` and a length silent, the content's heights (none, `fit-content`, `auto`, a
5314
+ `display: block` body, 100% of a content-tall body) held; `calc()` read only as a whole less one
5315
+ positive length (`- 1px + 2000px`, `- -2000px`, `-10px`, `var()` not), `calc(100% - 4rem)` one
5316
+ screen under a one-screen body and not under a content-tall one; an `@import` into a layer 17
5317
+ deep declaring its first 16 parts; with no root, a body child's `style=""` still a scroll box;
5318
+ the fix `!important` where `#root` or `body > div` stands for a more specific selector, not where
5319
+ it is the selector; after the fifth review: `:root { overflow: hidden }` and `* { height: 100%;
5320
+ overflow: hidden }` held (the fix under their own selectors), `#\72 oot` as specific as `#root`
5321
+ so no `!important`, a flex column under a body that grows with the page held, and a root of
5322
+ `640px` under such a body too; a layer opened early with nothing for the page losing to a later one, a sub-layer below
5323
+ its parent's own rules either way round. `test/files.test.ts`: a linked sheet (its
5324
+ path and line), an `@import`ed one, each page by what it links, overrides across sheets in either
5325
+ order, print, alternate and missing sheets, and `admitFiles`'s note; ten sheets each importing the
5326
+ next six times (11 asks, well under 2 s; without the budget it ran past 60 s), a thousand links to
5327
+ one sheet (asked once), and a hold past 32 sheets unread; `lintFiles` on a page linking a 1.8 MB
5328
+ sheet of 230,000 declarations for body, under 3 s (0.2 s; 285 s before); 999 pages sharing a 1
5329
+ MB sheet (a version's most files) the entry and 7 more checked, in that order, and "991 pages
5330
+ not checked" said, under 10 s (41 s before) and under four times what 8 pages cost; eight
5331
+ pages or fewer, no note; eight pages, the first five linking a sheet just under 2 MiB, four
5332
+ checked and the fifth stopping the rest, the three cheap ones after it too ("4 pages not
5333
+ checked"); a page's own `<style>` charged (three of 3.5 MiB, the third not checked, nor a cheap
5334
+ one after); four pages each spending a page's million match steps, two checked; in a child
5335
+ process under a 48 MB heap, one page linking a 2 MiB sheet of each of six shapes: `.kN{top:0}`,
5336
+ `div{top:0}`, one rule's 300,000 selectors, anonymous layers, layers 15 parts deep and named
5337
+ layers of six declarations (each runs in 32 MB; the fourth review's code ran out at 128 MB on the
5338
+ first three, 8daa075 on the third; 11c422f on the last three at 64 MB, the layers 15 parts
5339
+ deep at 128 MB too), and 500
5340
+ pages of 192 KB as bytes (8 checked, "492 pages not checked"; 11c422f ran out at 96 MB). After
5341
+ the sixth review: 1,023 layers and a new one read, 1,024 and a new one not, `a.b` with one place
5342
+ left not, an unlayered rule and a layer already named still read, an `@import … layer(z)` past
5343
+ them not read; a layer's name of 256 characters read and of 257 not, nor one of 250 with a
5344
+ sub-layer of 6; an `@import … layer()` of 256 characters read and of 257 not; a statement's
5345
+ 257-character name taking no place among the 1,024; a 1.9 MB layer name with 5,500 anonymous layers in it, under the 48 MB heap and
5346
+ 5 s (out of memory at 1,024 MB before); a page's own `<style>` past
5347
+ 4 MiB not read and the next one read; Tailwind's `h-[calc(100vh-4rem)] overflow-hidden` on the
5348
+ root held, `h-[calc(100vh--4rem)]` not one screen. The manual's examples and the
5349
+ Vite + React fixture still lint clean.
5350
+
5351
+ **Revisit when** `checkPage` measures scrolling in a browser (then this can defer to it), a host's
5352
+ viewer scrolls the frame itself (a page then can't be held), or the misses above show up in
5353
+ published pages.
5354
+
5355
+ ## P107 · 2026-10-23 · Draft marks: a person's unposted comments, a dashed line and a hollow marker with no number · Accepted
5356
+
5357
+ A host adding batch comments (Raft Artifacts) shows a person's unsubmitted comments, drafts, in the
5358
+ page while they write more: at their anchors, in a style apart from posted comments, so that what
5359
+ others can already read and what only the author has written so far don't look alike. P104's marks
5360
+ have one look (a solid underline, a filled numbered marker, or neither), and P104 rejected a style
5361
+ knob per mark for want of a need. This is the need: one state, not a knob.
5362
+
5363
+ **Decision.**
5364
+ 1. **`AnnotationMark.kind?: "posted" | "draft"`**, absent meaning posted. `checkMarks` checks it
5365
+ as it checks the other fields: any other value (a typo, another case, a number, null) throws,
5366
+ naming the mark. A posted mark is sent to the frame as 0.10.0 sent it (no `kind`, whether the host
5367
+ said `"posted"` or nothing), so nothing changes for a host that has no drafts, nor for the page.
5368
+ 2. **A draft has a marker, never a number.** Its `count` is still checked (a bad one throws: it is
5369
+ the host's bug) and then dropped: the frame gets `{ id, anchor, kind: "draft" }`. The shell, too,
5370
+ draws no number for a draft and drops a mark of a kind it doesn't know. A draft gets a marker
5371
+ with or without a count (`hasMarker`), so everything P104 and P105 give a mark with a marker it
5372
+ gets the same way: `activated` taken for its id (within a gesture), `anchored` with the rest,
5373
+ following after a scroll or a change of the content (a host whose only markers are drafts is
5374
+ followed), placement in the gutter, compact where it must, stepping aside while picking.
5375
+ 3. **Drawn apart.** A draft's text mark is a dashed 2 px underline (3 px when active) over a
5376
+ lighter fill than a posted mark's; an element's is P104's quiet outline, dashed. Its marker is
5377
+ hollow: a near-white bubble with a 1 px dashed amber edge and the bubble glyph's outline
5378
+ (stroked, not filled), no number, the same size as a posted marker without one (so placement is
5379
+ unchanged). Hover and active lighten it, as they do a posted one. The colors are the layer's own,
5380
+ as P104's are (the page's styles don't reach the layer), and read on light and dark pages. No
5381
+ new motion (the focus flash is the posted mark's). The shell has no forced-colors or
5382
+ high-contrast styles of its own; in forced colors a draft's dashed borders survive where the
5383
+ posted marks' box-shadow underline doesn't, which is the shell's gap, not this change's.
5384
+
5385
+ **Trust.** Unchanged in kind from P104; one thing more the page learns.
5386
+ - *What content can now learn:* which of its marks are drafts, that the person viewing it is
5387
+ writing a comment there before they post it. Accepted, and said in THREAT_MODEL §7: the host sends
5388
+ drafts only to their author's own frame (Porthole can't tell whose a frame is: it is the host's
5389
+ duty, said in ADOPTING.md); the page is the thing being commented on and already sees where that
5390
+ person selects (`selected`) and points; and closed egress keeps what it learns off the network.
5391
+ Not off the channels the host opens: with the runtime's `db` writes and `user`, a page can read
5392
+ who is viewing (`user.get()`) and which shown marks are drafts, and store "viewer A is drafting
5393
+ at section 3" where its author and other viewers read it before A posts, then tie A's posted
5394
+ comment to A by its anchor and time; origins a config declares for egress (an MCP App's
5395
+ `connectDomains`, an `egress` the host opened; the `liveWidget` preset has none, P103) carry it
5396
+ out the same way (THREAT_MODEL S4, S5, §7). So a draft's existence, place and timing are the page's to
5397
+ pass on wherever the host gave it a way, and ADOPTING.md says: don't send drafts to such a page,
5398
+ or accept that its author and other viewers can learn of them. Nothing else of a draft reaches
5399
+ it: not its count (dropped, control `draft-count`; a host that sends a mark per draft tells how
5400
+ many there are), and its id is the host's, which ADOPTING.md already asks to say nothing.
5401
+ - *What content can fake:* `activated` for a draft's id, as for any mark with a marker (P104,
5402
+ P105): the host's view of a draft opens on it, guarded as THREAT_MODEL §6 says, and never acts
5403
+ (no submit, no discard one click away).
5404
+ - *A shared frame:* a host that sends drafts into a frame several people see tells that page, and
5405
+ whatever it draws for them, what one of them hasn't posted. That is the host's choice to not make.
5406
+
5407
+ **API.** `AnnotationMark.kind`, `AnnotationMarkKind` (exported), `hasMarker` (internal to the host
5408
+ and its checks). `annotations.show` throws on a bad `kind` (React's `annotations` reports it
5409
+ through `onHostError`, kind `"annotations"`). No other change: posted marks, every report, the
5410
+ bridge's rate are as they were. The shell is the content server's: one from before P107, given a
5411
+ draft by a newer host, draws it as a posted mark without a marker (it ignores `kind` and has no
5412
+ count), so a host upgrades its content server's Porthole before sending drafts.
5413
+
5414
+ **Tested.** `test/annotate.test.ts`: `checkMarks` keeps a draft's kind and drops its count, sends
5415
+ `"posted"` as nothing, still refuses a draft's bad count, and throws on `"Draft"`, `"note"`, `""`,
5416
+ `"draft "`, 1, null, true and `{}`; on `createHost` over a stand-in platform, `activated` taken for a
5417
+ draft with and without a count, and dropped for a posted mark without one. `leak/annotate.spec.ts`,
5418
+ on Chromium, WebKit and Firefox: the same anchors as posted marks (count 0, so neither has a number)
5419
+ and then as drafts look different in the frame and on the words; on Chromium, every draft's marker
5420
+ and line carry the draft's style and the markers have no number though one draft was given 7; a
5421
+ draft and a posted mark together, each drawn its way, the draft's text and element markers' clicks
5422
+ and the posted one's reported for their ids, none reaching the content's listeners (control
5423
+ `marker-click`, the shell's stop out, fails it too); the page,
5424
+ listening to its own window, reads a draft as `{ id, anchor, kind }` and posted marks as before
5425
+ (control `draft-count`, the count left on drafts, fails exactly that test); a raw `show` posted to
5426
+ the frame from the host's page, past `checkMarks`, with a draft given a count and a mark of kind
5427
+ `"note"`: the draft's marker is a bubble without a number (by its clicked box on every engine, by
5428
+ its words on Chromium) and the unknown kind is neither anchored nor drawn (control
5429
+ `draft-shell-checks`, the shell's two checks out, fails exactly that test); drafts alone followed
5430
+ once a scroll settles. P104's and P105's marker tests and controls pass as before.
5431
+
5432
+ **Threat it re-opens.** None of Porthole's: no default, gate or policy loosens. The page learns one
5433
+ fact more (a mark is a draft), bounded by the host's duty above.
5434
+
5435
+ **Rejected.**
5436
+ - A style per mark (colors, dashes) for the host to choose: P104's reason; two states cover the
5437
+ need, and a style the host picks is one more thing the page reads.
5438
+ - Hiding that a mark is a draft from the page (drawing drafts the host's own way, over the frame):
5439
+ the host can't place over the frame what moves with the frame's scroll without the frame's
5440
+ reports, which is what markers are; and the author's own frame is the one place a draft goes.
5441
+ - A draft's count drawn as a number: a hollow marker with a number reads as posted; a host with
5442
+ several drafts at an anchor gives them one mark or several, as it likes.
5443
+ - A dot without the glyph: the bubble's outline reads as "a comment, not yet", and keeps the size,
5444
+ so a draft's marker sits where a posted one would.
5445
+
5446
+ **Revisit when** a host needs drafts in a frame others see (then the host draws them itself), a
5447
+ third state is asked for (resolved, private: then a state list, still not a style knob), the
5448
+ shell gets forced-colors styles, or MCP Apps defines annotations.
5449
+
5450
+ ## P108 · 2026-10-26 · A comment's draft from the page: text the composer starts with, never posted by the page · Accepted
5451
+
5452
+ Amends P090. A page that asks for decisions (Raft's "decision sheet": a card per question with
5453
+ "Approve" and "Needs changes" buttons) opens the host's composer at the card with `comments.open`
5454
+ (P090), and the person then types the same words every time. xxchan asked for the button to carry
5455
+ them (#proj-workspace, 2026-10-26).
5456
+
5457
+ **Decision.**
5458
+ 1. **`comments.open(anchor, { draft })`.** `draft` is text the composer starts with: a string, not
5459
+ blank, at most 2,000 characters (the quote's limit), well-formed, and nothing a person can't see
5460
+ (P100's `unseen`: no zero-width, bidi or tag characters, no controls but a new line and a tab,
5461
+ so a checklist is fine). Anything else refuses the call as `invalid` before any handler, as a
5462
+ draft that isn't a string does: the shell sends it as the page gave it (options that aren't an
5463
+ object send `null`), read after the click's check, so a getter that throws is a rejection. The
5464
+ handler gets `{ anchor, draft }`.
5465
+ 2. **The rest is P090's.** From a click (`user-activation`, 30 a minute), view level; content hears
5466
+ only whether the composer opened; no method reads a thread; the page never posts.
5467
+ 3. **The host's duties** (THREAT_MODEL §6 and §7, ADOPTING's example): show the draft whole, as the
5468
+ person's editable plain text, in its own composer; post it only on the person's Send; arm the
5469
+ composer as §6 arms a view the content brought: no press, and no Enter that sends, for 500 ms
5470
+ after it opens, Send not focused, beside the frame where the layout allows. Once posted the
5471
+ comment is the person's, mentions in it included: that is why they must see it all first.
5472
+ `defineRuntimeConformance` checks that the handler takes a draft (answers a boolean); that it
5473
+ never posts on its own can't be seen from a handler and is the host's.
5474
+
5475
+ **Why.** The comment is still the person's word: they see all of the text, can change or drop it,
5476
+ and post it themselves, as P090 requires. What the page saves them is typing.
5477
+ **Threats it opens, and their bounds.**
5478
+ - *Words the person didn't read:* a long draft hiding a line they wouldn't sign, or one an agent
5479
+ reading the comment later takes as their instruction. Bounded by visible text only (no hidden
5480
+ characters: the review found tags, U+200B and U+202E would otherwise pass), 2,000 characters, and
5481
+ the host showing it whole; reading it is the person's.
5482
+ - *Click-through:* before P108 a stray press on Send posted nothing; now the first click already
5483
+ loads a postable comment, and the page can place its button where Send will appear (the second
5484
+ click of a double click), or ask the person to press Enter. Bounded by the host's arming (above).
5485
+ **Rejected.** The page posting the comment (P090); a draft without a gesture; rich text or
5486
+ mentions resolved from the draft before posting (the host would be acting on the content's names);
5487
+ coercing what isn't text into text (`String(null)` is "null", which the person never meant).
5488
+ **Tested.** `test/runtime.test.ts` ("a draft (P108)": as given, a checklist too; past 2,000,
5489
+ blank, a number, null, a lone surrogate, tag characters, U+200B, U+202E, a bell: `invalid`, no
5490
+ handler); `leak/served/runtime.spec.ts` ("a comment's draft is the host's to check": from real
5491
+ clicks, a zero-width space, tags, 2,001 characters, a number and a string as options open nothing
5492
+ and reach no handler, a checklist reaches the composer; "comments are write-only": the draft beside
5493
+ the anchor). Negative control `comment-draft` (the draft taken as given) → the first case, every
5494
+ engine. `types/runtime/v1/check.ts` (the page-shaped call compiles); the runtime conformance's
5495
+ comments case sends a draft.
package/docs/DESIGN.md CHANGED
@@ -628,7 +628,9 @@ What both adopters still wrote after 0.2 moves into Porthole (ADOPTING.md is the
628
628
  over the size, a document where a fragment goes that has no body, nested frames and plugins,
629
629
  `document.write`. Warnings for the rest: a document sent as a widget (taken as its body,
630
630
  `fragmentOf`), the clipboard, dialogs, forms, hosts outside egress, unpinned CDN libraries,
631
- `position: fixed` in a flow layout, new windows without `openLink`.
631
+ `position: fixed` in a flow layout, new windows without `openLink`, the page's own styles
632
+ holding it to one screen (P106: `src/check/scroll.ts`, a cascade of html, body and the root's
633
+ overflow, height and position; `lintFiles` reads the version's linked stylesheets too).
632
634
  - **`admitContent(config, content, { refuseOn })`**: the show tool's gate. It refuses errors by
633
635
  default with a text that says what to change; otherwise it shows the content (a widget's
634
636
  document taken as its body) and returns the warnings as a note.
@@ -988,6 +990,7 @@ for that to lapse and click with raw input.
988
990
  | Live data: a kept result is a read (P094) | a result the host pushed (`changed(result)`), or read after a stale answer, answers the frame's next read only past every gate a read has (level, names, rate, gesture, consent, confirm), with no new upstream call | `test/audit-gates.test.ts`; `leak/served/runtime.spec.ts`: "a read above the viewer's level: a result the host pushed is refused as a cold read is" | `live-held-read` → that case (all three) |
989
991
  | The runtime: per-user data (P088) | `dbAccess`: `me` is the host's id; another's `data/users/<id>`, or anything else under `data`, refused at every level, in the bridge and the host | `test/runtime.test.ts`; `leak/served/runtime.spec.ts`: "a person's own data is theirs" | `db-private` → that case (all three) |
990
992
  | The runtime: comments write-only (P090) | the bridge answers `comments` with `true` only for a handler's `true`; no read method | `test/runtime.test.ts`; `leak/served/runtime.spec.ts`: "comments are write-only" | `comments-result` → that case (all three) |
993
+ | The runtime: a comment's draft is visible text (P108) | the bridge refuses a draft that isn't a string, is blank, past 2,000 characters, or holds what a person can't see (`unseen`), before any handler | `test/runtime.test.ts`: "a draft (P108)"; `leak/served/runtime.spec.ts`: "a comment's draft is the host's to check" | `comment-draft` → that case (all three) |
991
994
  | The asset library (P089, P091) | `/_blob/<id>` (or the frame's `<sealed base>__porthole/blob/<id>`) for an access to its artifact (a cookie, a sealed `Referer`, the sealed path), then the host's check, the store asked with it; typed by name, never a page, code only where trusted and uploaded code may run (asked at each load; by id alone, every artifact config must, P103), inert CSP, CORP, revalidated; the page's CSP opens `<origin>/_blob/` for images, media, fonts and data, for scripts and styles only where uploads are the admins' | `test/assets.test.ts` (a forged same-origin claim: 401; another artifact's session: 404; revoked: 403; bearer mode; a stricter config turns trusted code into a download, bearer mode too); `leak/served/runtime.spec.ts`: an upload loads in its frame; a set's page loads it; static `/_blob/` in a frame by `Referer` (Chromium, Firefox; WebKit sends only the origin: measured); "a script asset runs as code only if an admin uploaded it"; "scripts load from /_blob/ only where uploads are the admins'"; "an asset reaches only its own artifact's pages"; "an asset opened on its own runs nothing" | `blob-trusted` → the trusted-code case; `blob-script,blob-trusted` (two walls) → that case and the tab's CSP case; `blob-inert` → the opened-on-its-own case (all three; `scripts/controls.ts`) |
992
995
  | Workers (P044, P045) | no Node module in `/server`; D1 tickets taken by one `DELETE … RETURNING` | `test/workers.test.ts` (workerd, no `nodejs_compat`, real D1: once per ticket, a race, anonymous, a revocation, flat names, reserved namespaces) | — |
993
996
 
@@ -1027,13 +1030,13 @@ chooses), and the annotation runtime is in the shell only then.
1027
1030
  |-----------|---------|--------|
1028
1031
  | host → frame | `porthole/annotate.start` | `{ elements, text }`: picking elements (the one under the pointer or finger outlined with its name; a click or tap picks it, never reaching the content; Escape cancels; one pick), selecting text (each settled selection), or both (a click picks, a drag selects) |
1029
1032
  | host → frame | `porthole/annotate.stop` | — |
1030
- | host → frame | `porthole/annotate.show` | `{ marks: [{ id, anchor, count? }], active? }`: drawn over the content in the shell's own layer (a closed shadow root), found again whenever the content changes; a mark with a `count` (0 to 999) also gets a marker (P104) |
1033
+ | host → frame | `porthole/annotate.show` | `{ marks: [{ id, anchor, count?, kind? }], active? }`: drawn over the content in the shell's own layer (a closed shadow root), found again whenever the content changes; a mark with a `count` (0 to 999) also gets a marker (P104); `kind: "draft"` (absent: posted) is drawn apart, with a marker and never a count (P107) |
1031
1034
  | host → frame | `porthole/annotate.focus` | `{ id }`: scrolled into view inside the frame, made the active mark, flashed |
1032
1035
  | host → frame | `porthole/annotate.clear` | — |
1033
1036
  | frame → host | `porthole/annotate.selected` | `{ anchor, rect }`; after a scroll, the same selection again only if its box moved more than 0.5 px, on the follow-ups' clock (P105) |
1034
1037
  | frame → host | `porthole/annotate.unselected` | — (the text selection went away) |
1035
1038
  | frame → host | `porthole/annotate.cancelled` | — (Escape) |
1036
- | frame → host | `porthole/annotate.anchored` | `{ results: [{ id, state: "attached" \| "orphaned", rect? }] }`: every mark after `show`, the one after `focus`, every mark when the content changed a state, and, while any mark has a `count`, once a scroll, a resize or a run of content changes has settled (150 ms quiet), only the marks that moved more than 0.5 px since the host was last told, at most one a second together with the selection's (P104, P105) |
1039
+ | frame → host | `porthole/annotate.anchored` | `{ results: [{ id, state: "attached" \| "orphaned", rect? }] }`: every mark after `show`, the one after `focus`, every mark when the content changed a state, and, while any mark has a marker (a `count` or a draft, P107), once a scroll, a resize or a run of content changes has settled (150 ms quiet), only the marks that moved more than 0.5 px since the host was last told, at most one a second together with the selection's (P104, P105) |
1037
1040
  | frame → host | `porthole/annotate.activated` | `{ id, rect }`: the person clicked a mark's marker; `rect` is the marker's (P104); taken only while the host's page has transient activation (P105) |
1038
1041
 
1039
1042
  - **Anchors** are W3C Web Annotation selectors, at most one of each:
@@ -1078,8 +1081,17 @@ chooses), and the annotation runtime is in the shell only then.
1078
1081
  happened, by `:active`, `relatedTarget` and user activation. Markers step aside
1079
1082
  while elements are picked. No tab stop, and the layer stays `aria-hidden`: the
1080
1083
  host's own list of marks is the keyboard path.
1081
- - **Following** (P104), only while a mark has a `count`. Each mark keeps what the
1082
- host was last told (state and box); a settled scroll or resize (any scroller), or
1084
+ - **Drafts** (P107). A mark with `kind: "draft"` (a comment not yet posted) has a
1085
+ marker whether or not it has a count, placed as a posted one's, and drawn apart: a
1086
+ dashed underline (a dashed outline on an element), a lighter fill, and a hollow
1087
+ marker (a light bubble with a dashed edge and the glyph's outline) with no number.
1088
+ `checkMarks` sends a posted mark as before (no `kind`), a draft without its count,
1089
+ and throws on any other kind; the shell draws no number for a draft and drops a
1090
+ mark of a kind it doesn't know. Its click is `activated`, its place `anchored`,
1091
+ and it is followed after a scroll, as a posted marker's.
1092
+ - **Following** (P104), only while a mark has a marker (a `count`, or a draft:
1093
+ P107). Each mark keeps what the host was last told (state and box); a settled
1094
+ scroll or resize (any scroller), or
1083
1095
  a quiet run of content changes (one the deadline cut short is checked once quiet),
1084
1096
  reports only what moved. A selection the host was told is told again after a
1085
1097
  settled scroll only if its box moved (P105, with or without counts). Both share one
@@ -1093,8 +1105,8 @@ chooses), and the annotation runtime is in the shell only then.
1093
1105
  all of it, read what `show` sends (ids, anchors, counts), or fake any report. The
1094
1106
  host takes a selection only while it asked for that kind, a cancel only while
1095
1107
  picking, results only for its own marks, a marker's click only for a mark it shows
1096
- with a count and only within a gesture (P105); it rebuilds each from known fields
1097
- within `ANNOTATION_LIMITS` (a label without what the person can't see, P105) and
1108
+ with a marker (a count or a draft) and only within a gesture (P105); it rebuilds
1109
+ each from known fields within `ANNOTATION_LIMITS` (a label without what the person can't see, P105) and
1098
1110
  drops the rest, through the bridge's rate limit. UI hints only, never
1099
1111
  permissions: what a report says decides where a comment is drawn, never who may
1100
1112
  see or do anything. A view a report opens or moves guards its presses
@@ -1132,7 +1144,14 @@ the layer itself (`annotation-activated`, `annotation-activated-count`,
1132
1144
  engine, a touch screen and a phone's emulation (iPhone 13, Pixel 5), content hearing
1133
1145
  none of it (`marker-tap` → WebKit; `marker-click` too); on a 640 px column and a phone page's lines
1134
1146
  with one marker each, no marker covering a word (`marker-place`, the marker just
1135
- past its words as 0.9.0 had it); and ADOPTING.md's `guardPresses`, as written
1147
+ past its words as 0.9.0 had it); drafts (P107) drawn apart from posted marks on the
1148
+ same anchors (the frame's pixels and the words' own differ; on Chromium every draft's
1149
+ marker and line drawn as a draft's, no number though given a count), a draft's and a
1150
+ posted marker's clicks reported beside each other, none reaching the content
1151
+ (`marker-click` too), the
1152
+ page reading a draft's kind and never its count (`draft-count`), a raw `show` past
1153
+ `checkMarks` drawing a draft given a count without a number and dropping a mark of
1154
+ an unknown kind (`draft-shell-checks`), and drafts alone followed after a scroll; and ADOPTING.md's `guardPresses`, as written
1136
1155
  there, taking no press within 500 ms of its view opening (a release on a menu item,
1137
1156
  a double click's second press on a button or a trigger, a press held past the
1138
1157
  arming) and the person's own press or key after.
@@ -1406,7 +1425,7 @@ control the tables above name to the registry):
1406
1425
  | `annotation-activated` | `annotate.spec.ts` | `a hostile page fakes a marker's click: the host takes it only for a mark it shows with a marker` | — | — |
1407
1426
  | `annotation-activated-count` | `annotate.spec.ts` | `a hostile page fakes a marker's click: the host takes it only for a mark it shows with a marker` | — | — |
1408
1427
  | `marker-trusted` | `annotate.spec.ts` | `a hostile page fakes a marker's click: the host takes it only for a mark it shows with a marker` | — | — |
1409
- | `marker-click` | `annotate.spec.ts` | `markers: a mark with a count gets a numbered bubble; its click is reported and never reaches the content`, `a marker's press, of any kind, moves nothing of the content's: no handler, no focus, no selection`, `a page that patches the event's built-ins neither hears a marker's press nor stops its report (P105)`, `a tap on a marker is reported on every engine, and the content hears none of it (P105)` | — | — |
1428
+ | `marker-click` | `annotate.spec.ts` | `markers: a mark with a count gets a numbered bubble; its click is reported and never reaches the content`, `a marker's press, of any kind, moves nothing of the content's: no handler, no focus, no selection`, `a page that patches the event's built-ins neither hears a marker's press nor stops its report (P105)`, `a tap on a marker is reported on every engine, and the content hears none of it (P105)`, `drafts (P107): a dashed line and a hollow marker with no number, apart from posted marks; their clicks are reported the same` | — | — |
1410
1429
  | `marker-prevent` | `annotate.spec.ts` | `a marker's press, of any kind, moves nothing of the content's: no handler, no focus, no selection` | — | — |
1411
1430
  | `marker-place` | `annotate.spec.ts` | `text markers cover no word: on a column page, and on a phone's lines with one marker each (P105, #36)` | — | — |
1412
1431
  | `marker-tap` | `annotate.spec.ts` | nothing | WebKit: `a tap on a marker is reported on every engine, and the content hears none of it (P105)` | no probe can see it on Chromium and Firefox: they make a tap a click on the marker without a listener of its own (measured, P105) |
@@ -1414,6 +1433,8 @@ control the tables above name to the registry):
1414
1433
  | `follow-throttle` | `annotate.spec.ts` | `an honest scroll session, long, in comment mode, leaves room for a marker's click: follow-ups, the selection's too, at most one a second` | — | — |
1415
1434
  | `selection-follow` | `annotate.spec.ts` | `an honest scroll session, long, in comment mode, leaves room for a marker's click: follow-ups, the selection's too, at most one a second` | — | — |
1416
1435
  | `follow-count` | `annotate.spec.ts` | `following: a host that gives no counts hears no follow-up after a scroll, as before markers` | — | — |
1436
+ | `draft-count` | `annotate.spec.ts` | `what the page reads of a draft (P107): that it is one, never its count; a posted mark as before` | — | — |
1437
+ | `draft-shell-checks` | `annotate.spec.ts` | `the shell's own checks on a raw show (P107): a draft draws no number, a kind it doesn't know is no mark` | — | — |
1417
1438
  | `annotation-activated-gesture` | `annotate.spec.ts` | `a hostile page's marker click with no gesture is dropped; one on the person's own press is the host's view to guard (P105)` | — | — |
1418
1439
  | `annotation-rect-clamp` | `annotate.spec.ts` | `a hostile page reports a box outside its frame: the host gets it clamped to the frame's viewport`, `marks: drawn over their anchors, one brought into view, an unfound one orphaned, all cleared`, `following: once a scroll settles, one report with only the marks that moved` | — | — |
1419
1440
  | `authorize` | `served/authorize.spec.ts` | `a revoked subject's ticket opens nothing: a page and an app are denied, and the host is told`, `in a tab of its own, a revoked app and page are denied from the next request on` | Chromium, Firefox: `a framed app mid-session: its next request after revocation is denied, and its next load tells the host`, `a framed page mid-session: its next load after revocation is denied where the engine keeps its cookie` | — |
@@ -1438,6 +1459,7 @@ control the tables above name to the registry):
1438
1459
  | `live-held-read` | `served/runtime.spec.ts` | `a read above the viewer's level: a result the host pushed is refused as a cold read is` | — | — |
1439
1460
  | `db-private` | `served/runtime.spec.ts` | `a person's own data is theirs: another person's is refused, never reaching the service` | — | — |
1440
1461
  | `comments-result` | `served/runtime.spec.ts` | `comments are write-only: the composer opens from a click, content hears only that` | — | — |
1462
+ | `comment-draft` | `served/runtime.spec.ts` | `a comment's draft is the host's to check: past the limit, holding what a person can't see, or not text, it opens no composer (P108)` | — | — |
1441
1463
  | `blob-script` | `served/runtime.spec.ts` | nothing | — | an untrusted script asset is served as a download (`blob-script,blob-trusted`) |
1442
1464
  | `blob-trusted` | `served/runtime.spec.ts` | `a script asset runs as code only if an admin uploaded it where uploads are the admins'` | — | — |
1443
1465
  | `blob-script,blob-trusted` | `served/runtime.spec.ts` | `a script asset runs as code only if an admin uploaded it where uploads are the admins'`, `scripts load from /_blob/ only where uploads are the admins' (a tab, its session)` | — | — |