oficina / slides Public

Merge main into feat/scenes: agents add pictures over the API

Brings in c2c83d5, POST /api/v1/decks/{sqid}/assets. Both sides added
applyAgentOpsFrom and apiOpsFailed to api.go with the same code; one
copy of each is kept, with main's fuller comments, and the scene
routes (scenestills.go) and the new asset route (agent_assets.go) both
use them. The router has both sets of routes.

A scene's still is now held to the same pixel budget as an agent's
picture: 30000 pixels a side and maxImagePixels (svg.MaxDecodePixels,
50 megapixels) together, read from the header. TestAStillIsAPicture-
OfTheRightSize gains main's 10000 x 10000 PNG and 30000 x 30000 WebP
headers (refused before this, now 422 not_an_image). A clip's poster
is not decoded on registration; every decode of it (thumbnail, export)
already keeps to the budget. docs/api.md keeps the stills section
beside the new upload and says 50 megapixels; docs/scenes.md's limits
table too. Bundles and credits regenerated (unchanged); core untouched,
so no wasm.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 9ace9ddfc393f660e690158936f3af2e272c85e7 parent e87fc76parent c2c83d5
12 files changed, +759 −44
  • AGENTS.md +13 −2
  • docs/api.md +71 −20
  • docs/scenes.md +1 −1
  • internal/slides/agent_assets.go +175 −0
  • internal/slides/api.go +12 −7
  • internal/slides/export.go +3 −2
  • internal/slides/scenestills.go +9 −4
  • internal/slides/svg/svg.go +15 −1
  • internal/slides/svg/svg_test.go +49 −0
  • internal/slides/team_guard_test.go +73 −0
  • internal/slidestest/agent_assets_test.go +323 −0
  • internal/slidestest/scenes_agent_test.go +15 −7

CI failed — run details

CI log
=== gate ===
=== rust: fmt
=== rust: clippy
    Updating crates.io index
 Downloading crates ...
  Downloaded cfg-if v1.0.4
  Downloaded async-trait v0.1.92
  Downloaded autocfg v1.5.1
  Downloaded async-lock v3.4.2
  Downloaded arrayvec v0.7.8
  Downloaded scopeguard v1.2.0
  Downloaded indexmap-nostd v0.4.0
  Downloaded bitflags v2.13.1
  Downloaded smallstr v0.3.1
  Downloaded ahash v0.8.12
  Downloaded downcast-rs v1.2.1
  Downloaded itoa v1.0.18
  Downloaded version_check v0.9.5
  Downloaded multi-stash v0.2.0
  Downloaded thiserror-impl v2.0.20
  Downloaded event-listener-strategy v0.5.4
  Downloaded num-derive v0.4.2
  Downloaded foldhash v0.2.0
  Downloaded equivalent v1.0.2
  Downloaded parking v2.2.1
  Downloaded arc-swap v1.9.2
  Downloaded rustversion v1.0.23
  Downloaded wasmi_core v0.32.3
  Downloaded pin-project-lite v0.2.17
  Downloaded string-interner v0.17.0
  Downloaded lock_api v0.4.14
  Downloaded thiserror v2.0.20
  Downloaded wasmi_collections v0.32.3
  Downloaded crossbeam-utils v0.8.22
  Downloaded once_cell v1.21.4
  Downloaded paste v1.0.15
  Downloaded semver v1.0.28
  Downloaded event-listener v5.4.2
  Downloaded smallvec v1.15.2
  Downloaded spin v0.9.9
  Downloaded zmij v1.0.23
  Downloaded parking_lot_core v0.9.12
  Downloaded serde_core v1.0.229
  Downloaded num-traits v0.2.19
  Downloaded quote v1.0.47
  Downloaded unicode-ident v1.0.24
  Downloaded dashmap v6.2.1
  Downloaded proc-macro2 v1.0.107
  Downloaded serde v1.0.229
  Downloaded serde_derive v1.0.229
  Downloaded indexmap v2.14.1
  Downloaded memchr v2.8.3
  Downloaded wasmparser-nostd v0.100.2
  Downloaded hashbrown v0.17.1
  Downloaded libm v0.2.16
  Downloaded serde_json v1.0.151
  Downloaded hashbrown v0.14.5
  Downloaded wasmparser v0.258.0
  Downloaded yrs v0.23.5
  Downloaded zerocopy v0.8.56
  Downloaded syn v2.0.119
  Downloaded wasmi v0.32.3
  Downloaded syn v3.0.4
  Downloaded libc v0.2.189
   Compiling proc-macro2 v1.0.107
   Compiling quote v1.0.47
   Compiling unicode-ident v1.0.24
   Compiling serde_core v1.0.229
   Compiling version_check v0.9.5
   Compiling zerocopy v0.8.56
    Checking cfg-if v1.0.4
   Compiling serde v1.0.229
    Checking once_cell v1.21.4
   Compiling libc v0.2.189
    Checking smallvec v1.15.2
   Compiling parking_lot_core v0.9.12
    Checking pin-project-lite v0.2.17
   Compiling rustversion v1.0.23
   Compiling autocfg v1.5.1
   Compiling zmij v1.0.23
   Compiling crossbeam-utils v0.8.22
    Checking parking v2.2.1
    Checking event-listener v5.4.2
   Compiling serde_json v1.0.151
   Compiling thiserror v2.0.20
   Compiling paste v1.0.15
   Compiling ahash v0.8.12
    Checking scopeguard v1.2.0
   Compiling libm v0.2.16
   Compiling num-traits v0.2.19
    Checking lock_api v0.4.14
    Checking event-listener-strategy v0.5.4
    Checking memchr v2.8.3
    Checking foldhash v0.2.0
    Checking itoa v1.0.18
    Checking smallstr v0.3.1
    Checking async-lock v3.4.2
    Checking indexmap-nostd v0.4.0
    Checking equivalent v1.0.2
    Checking downcast-rs v1.2.1
    Checking fastrand v2.5.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core/vendor/fastrand-2.5.0)
    Checking bitflags v2.13.1
    Checking multi-stash v0.2.0
    Checking wasmparser-nostd v0.100.2
    Checking semver v1.0.28
    Checking spin v0.9.9
    Checking arrayvec v0.7.8
    Checking arc-swap v1.9.2
   Compiling syn v3.0.4
   Compiling syn v2.0.119
    Checking wasmi_core v0.32.3
    Checking hashbrown v0.17.1
   Compiling num-derive v0.4.2
    Checking indexmap v2.14.1
   Compiling serde_derive v1.0.229
   Compiling thiserror-impl v2.0.20
   Compiling async-trait v0.1.92
    Checking hashbrown v0.14.5
    Checking dashmap v6.2.1
    Checking string-interner v0.17.0
    Checking yrs v0.23.5
    Checking wasmparser v0.258.0
    Checking wasmi_collections v0.32.3
    Checking wasmi v0.32.3
    Checking slides-core v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 16.40s
=== the embedded wasm must be built from these sources
wasm-stamp: internal/slides/core/testdata/slides_core.wasm was built from these inputs
=== wasm: the artifact the host embeds
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
build-wasm: Linux/aarch64 builds natively; the result is not the canonical amd64 build
 Downloading crates ...
  Downloaded getrandom v0.4.3
   Compiling proc-macro2 v1.0.107
   Compiling quote v1.0.47
   Compiling unicode-ident v1.0.24
   Compiling serde_core v1.0.229
   Compiling cfg-if v1.0.4
   Compiling smallvec v1.15.2
   Compiling parking_lot_core v0.9.12
   Compiling getrandom v0.4.3
   Compiling rustversion v1.0.23
   Compiling crossbeam-utils v0.8.22
   Compiling pin-project-lite v0.2.17
   Compiling zmij v1.0.23
   Compiling serde_json v1.0.151
   Compiling serde v1.0.229
   Compiling scopeguard v1.2.0
   Compiling thiserror v2.0.20
   Compiling hashbrown v0.14.5
   Compiling memchr v2.8.3
   Compiling event-listener v5.4.2
   Compiling itoa v1.0.18
   Compiling lock_api v0.4.14
   Compiling once_cell v1.21.4
   Compiling fastrand v2.5.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core/vendor/fastrand-2.5.0)
   Compiling smallstr v0.3.1
   Compiling event-listener-strategy v0.5.4
   Compiling async-lock v3.4.2
   Compiling arc-swap v1.9.2
   Compiling dashmap v6.2.1
   Compiling syn v3.0.4
   Compiling serde_derive v1.0.229
   Compiling thiserror-impl v2.0.20
   Compiling async-trait v0.1.92
   Compiling yrs v0.23.5
   Compiling slides-core v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core)
    Finished `release` profile [optimized] target(s) in 11.90s
core/target/wasm32-unknown-unknown/release/slides_core.wasm (915096 bytes)
=== the embedded wasm must match a fresh build
gate: byte comparison skipped on Linux/aarch64: no build on this host reproduces the canonical amd64 bytes; the input stamp above holds freshness here
=== rust: test
   Compiling cfg-if v1.0.4
   Compiling once_cell v1.21.4
   Compiling smallvec v1.15.2
   Compiling pin-project-lite v0.2.17
   Compiling serde_core v1.0.229
   Compiling zerocopy v0.8.56
   Compiling parking v2.2.1
   Compiling libc v0.2.189
   Compiling scopeguard v1.2.0
   Compiling zmij v1.0.23
   Compiling crossbeam-utils v0.8.22
   Compiling itoa v1.0.18
   Compiling memchr v2.8.3
   Compiling foldhash v0.2.0
   Compiling libm v0.2.16
   Compiling arc-swap v1.9.2
   Compiling thiserror v2.0.20
   Compiling lock_api v0.4.14
   Compiling num-traits v0.2.19
   Compiling event-listener v5.4.2
   Compiling downcast-rs v1.2.1
   Compiling indexmap-nostd v0.4.0
   Compiling smallstr v0.3.1
   Compiling fastrand v2.5.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core/vendor/fastrand-2.5.0)
   Compiling equivalent v1.0.2
   Compiling bitflags v2.13.1
   Compiling spin v0.9.9
   Compiling semver v1.0.28
   Compiling multi-stash v0.2.0
   Compiling arrayvec v0.7.8
   Compiling event-listener-strategy v0.5.4
   Compiling wasmparser-nostd v0.100.2
   Compiling async-lock v3.4.2
   Compiling wasmi_core v0.32.3
   Compiling parking_lot_core v0.9.12
   Compiling serde v1.0.229
   Compiling serde_json v1.0.151
   Compiling hashbrown v0.17.1
   Compiling indexmap v2.14.1
   Compiling wasmparser v0.258.0
   Compiling ahash v0.8.12
   Compiling hashbrown v0.14.5
   Compiling dashmap v6.2.1
   Compiling string-interner v0.17.0
   Compiling wasmi_collections v0.32.3
   Compiling yrs v0.23.5
   Compiling wasmi v0.32.3
   Compiling slides-core v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 13.25s
     Running unittests src/lib.rs (core/target/debug/deps/slides_core-5c4023f915b1da3e)

running 35 tests
test check::tests::the_empty_document_passes ... ok
test layout::tests::aside_region_rect ... ok
test layout::tests::default_region_by_kind ... ok
test layout::tests::body_region_rect_narrows_for_an_aside ... ok
test layout::tests::heading_region_rect ... ok
test layout::tests::media_region_rect ... ok
test markdown::tests::empty_input_is_no_paragraphs_and_lines_keep_blanks ... ok
test markdown::tests::inline_marks ... ok
test markdown::tests::marks_nest_and_links_carry_marks ... ok
test markdown::tests::paragraphs_split_on_blank_lines_and_list_markers ... ok
test layout::tests::to_canvas_narrows_body_when_an_aside_is_present ... ok
test scene::tests::numbers_print_as_javascript_prints_them ... ok
test scene::tests::sha256_known_answers ... ok
test layout::tests::to_flow_is_a_no_op_when_already_in_order ... ok
test layout::tests::to_canvas_splits_a_shared_region_equally_and_sets_z_by_index ... ok
test layout::tests::to_flow_classifies_by_position_and_kind ... ok
test schema::tests::an_empty_map_reads_as_a_set_mark ... ok
test schema::tests::an_href_map_without_a_string_url_reads_as_no_link ... ok
test schema::tests::href_written_as_a_plain_string_still_reads_back ... ok
test schema::tests::href_is_written_as_a_one_key_map_and_reads_back ... ok
test check::tests::what_the_ops_write_passes ... ok
test check::tests::bare_text_at_fragment_level_is_reported ... ok
test check::tests::an_element_inside_a_paragraph_is_reported ... ok
test layout::tests::to_flow_orders_y_then_x ... ok
test check::tests::a_non_paragraph_child_is_reported ... ok
test check::tests::y_prosemirror_shapes_pass ... ok
test check::tests::an_unknown_formatting_attribute_is_reported ... ok
test view::tests::scenes_keep_only_their_typed_fields ... ok
test view::tests::malformed_background_is_the_default ... ok
test view::tests::malformed_fonts_are_null ... ok
test view::tests::assets_are_typed_or_skipped ... ok
test view::tests::malformed_box_is_null_and_phone_keeps_only_typed_fields ... ok
test view::tests::step_items_talk_and_arrive_outside_their_vocabularies_are_absent ... ok
test view::tests::a_malformed_font_files_list_is_absent ... ok
test layout::tests::to_flow_keeps_a_concurrent_text_edit ... ok

test result: ok. 35 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/no_host_imports.rs (core/target/debug/deps/no_host_imports-6d5c8d83dad78479)

running 1 test
test no_host_imports ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/ops.rs (core/target/debug/deps/ops-57046cb9b7287a0e)

running 22 tests
test add_slide_then_view_lists_it ... ok
test ops_are_atomic ... ok
test add_block_with_markdown_produces_runs ... ok
test a_deck_without_the_fields_has_no_such_keys_in_its_view ... ok
test font_files_round_trip_and_clear ... ok
test layout_switch_assigns_boxes ... ok
test remove_block_drops_it_from_columns_children ... ok
test set_slide_refuses_an_unknown_talk ... ok
test columns_children_must_name_blocks_on_the_slide ... ok
test duplicate_slide_remaps_columns_children ... ok
test qr_url_must_be_a_follow_link ... ok
test columns_children_have_one_parent_and_no_cycles ... ok
test set_meta_arrive_round_trips_and_clears ... ok
test set_block_refuses_a_step_of_zero_negative_or_non_finite ... ok
test set_block_refuses_items_on_a_non_list ... ok
test set_slide_talk_round_trips_and_clears ... ok
test set_block_step_round_trips_and_clears ... ok
test move_block_keeps_a_concurrent_text_edit ... ok
test update_roundtrip ... ok
test move_slide_keeps_a_concurrent_text_edit ... ok
test remaining_ops_roundtrip ... ok
test font_files_refusals ... ok

test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s

     Running tests/scene_update.rs (core/target/debug/deps/scene_update-ce1e1f6fe3f553c6)

running 5 tests
test a_batch_with_no_scene_op_is_not_measured ... ok
test just_under_the_cap_is_taken ... ok
test exactly_one_mib_is_taken_and_one_byte_more_is_refused ... ok
test two_scene_changes_in_one_batch_are_measured_together ... ok
test tenths_past_one_update_are_refused ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.76s

     Running tests/scenes.rs (core/target/debug/deps/scenes-9ec2f61468714179)

running 18 tests
test a_deck_without_scenes_has_no_scenes_key ... ok
test a_video_asset_carries_its_poster_and_duration ... ok
test add_scene_defaults_words_data_and_state_names ... ok
test add_scene_round_trips ... ok
test scene_version_vectors ... ok
test remove_scene_drops_it_and_an_empty_map_leaves_the_view ... ok
test a_scene_id_is_twelve_lowercase_base32_characters ... ok
test duplicate_slide_keeps_a_scene_block_checkable ... ok
test data_numbers_keep_every_digit_an_agent_sent ... ok
test author_is_written_when_the_op_carries_one ... ok
test a_clip_block_plays_on_a_press_in_a_loop_or_once ... ok
test a_removed_scene_or_state_leaves_the_block_as_it_was ... ok
test set_scene_patches_words_per_key_replaces_data_and_sets_stills ... ok
test proto_is_refused_as_a_state_id_a_word_key_and_anywhere_in_data ... ok
test a_scene_block_names_a_scene_and_two_of_its_states ... ok
test scene_version_changes_with_code_data_and_words_only ... ok
test data_up_to_960_kib_of_canonical_json_is_taken ... ok
test scene_refusals_apply_nothing ... ok

test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.50s

   Doc-tests slides_core

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

=== rust: fmt (pdf)
=== rust: clippy (pdf)
    Updating crates.io index
 Downloading crates ...
  Downloaded adler2 v2.0.1
  Downloaded arrayref v0.3.9
  Downloaded unicode-vo v0.1.0
  Downloaded byteorder-lite v0.1.0
  Downloaded bytemuck_derive v1.12.0
  Downloaded strict-num v0.1.1
  Downloaded float-cmp v0.9.0
  Downloaded zerofrom-derive v0.1.7
  Downloaded bytemuck v1.25.2
  Downloaded fdeflate v0.3.7
  Downloaded bumpalo v3.20.3
  Downloaded xmlwriter v0.1.0
  Downloaded smallvec v1.16.0
  Downloaded synstructure v0.13.2
  Downloaded font-types v0.11.3
  Downloaded rustc-hash v2.1.3
  Downloaded tinyvec_macros v0.1.1
  Downloaded core_maths v0.1.1
  Downloaded color_quant v1.1.0
  Downloaded quick-error v2.0.1
  Downloaded unicode-bidi-mirroring v0.4.0
  Downloaded zerofrom v0.1.8
  Downloaded base64 v0.22.1
  Downloaded simplecss v0.2.2
  Downloaded stable_deref_trait v1.2.1
  Downloaded siphasher v1.0.3
  Downloaded unicode-ccc v0.4.0
  Downloaded fontconfig-parser v0.5.8
  Downloaded gif v0.14.2
  Downloaded xmp-writer v0.3.3
  Downloaded data-url v0.3.2
  Downloaded imagesize v0.14.0
  Downloaded krilla-svg v0.8.1
  Downloaded pico-args v0.5.0
  Downloaded polycool v0.4.0
  Downloaded subsetter v0.2.6
  Downloaded yoke v0.8.3
  Downloaded yoke-derive v0.8.2
  Downloaded rgb v0.8.53
  Downloaded ryu v1.0.23
  Downloaded weezl v0.1.12
  Downloaded simd-adler32 v0.3.10
  Downloaded zune-core v0.5.3
  Downloaded unicode-properties v0.1.4
  Downloaded unicode-script v0.5.8
  Downloaded memmap2 v0.9.11
  Downloaded flate2 v1.1.10
  Downloaded image-webp v0.2.4
  Downloaded miniz_oxide v0.9.1
  Downloaded roxmltree v0.21.1
  Downloaded svgtypes v0.16.1
  Downloaded crc32fast v1.5.1
  Downloaded euclid v0.22.14
  Downloaded resvg v0.47.0
  Downloaded miniz_oxide v0.8.9
  Downloaded roxmltree v0.20.0
  Downloaded slotmap v1.1.1
  Downloaded tiny-skia-path v0.12.0
  Downloaded log v0.4.34
  Downloaded tinyvec v1.13.2
  Downloaded unicode-bidi v0.3.18
  Downloaded zune-jpeg v0.5.15
  Downloaded indexmap v2.14.2
  Downloaded fontdb v0.23.0
  Downloaded png v0.18.1
  Downloaded usvg v0.47.0
  Downloaded kurbo v0.13.1
  Downloaded krilla v0.8.2
  Downloaded ttf-parser v0.25.1
  Downloaded zlib-rs v0.6.7
  Downloaded skrifa v0.42.1
  Downloaded tiny-skia v0.12.0
  Downloaded write-fonts v0.48.1
  Downloaded rustybuzz v0.20.1
  Downloaded syn v3.0.5
  Downloaded read-fonts v0.39.2
  Downloaded pdf-writer v0.15.0
   Compiling proc-macro2 v1.0.107
   Compiling unicode-ident v1.0.24
   Compiling quote v1.0.47
   Compiling autocfg v1.5.1
   Compiling libm v0.2.16
    Checking simd-adler32 v0.3.10
    Checking log v0.4.34
    Checking arrayvec v0.7.8
   Compiling serde_core v1.0.229
    Checking adler2 v2.0.1
    Checking bitflags v2.13.1
    Checking smallvec v1.16.0
   Compiling crc32fast v1.5.1
    Checking cfg-if v1.0.4
   Compiling libc v0.2.189
   Compiling version_check v0.9.5
    Checking foldhash v0.2.0
    Checking memchr v2.8.3
    Checking equivalent v1.0.2
    Checking miniz_oxide v0.9.1
    Checking arrayref v0.3.9
    Checking miniz_oxide v0.8.9
    Checking fdeflate v0.3.7
    Checking unicode-properties v0.1.4
    Checking tinyvec_macros v0.1.1
    Checking polycool v0.4.0
    Checking siphasher v1.0.3
    Checking unicode-bidi-mirroring v0.4.0
    Checking unicode-ccc v0.4.0
    Checking roxmltree v0.20.0
    Checking unicode-script v0.5.8
    Checking tinyvec v1.13.2
    Checking kurbo v0.13.1
    Checking color_quant v1.1.0
   Compiling slotmap v1.1.1
    Checking weezl v0.1.12
    Checking quick-error v2.0.1
    Checking imagesize v0.14.0
    Checking base64 v0.22.1
   Compiling num-traits v0.2.19
    Checking byteorder-lite v0.1.0
    Checking flate2 v1.1.10
    Checking zune-core v0.5.3
    Checking roxmltree v0.21.1
    Checking gif v0.14.2
    Checking simplecss v0.2.2
    Checking pico-args v0.5.0
    Checking fontconfig-parser v0.5.8
    Checking unicode-vo v0.1.0
    Checking zune-jpeg v0.5.15
    Checking image-webp v0.2.4
    Checking rustc-hash v2.1.3
    Checking ryu v1.0.23
    Checking unicode-bidi v0.3.18
    Checking png v0.18.1
    Checking xmlwriter v0.1.0
    Checking itoa v1.0.18
    Checking data-url v0.3.2
    Checking stable_deref_trait v1.2.1
   Compiling serde v1.0.229
    Checking bumpalo v3.20.3
    Checking xmp-writer v0.3.3
    Checking pdf-writer v0.15.0
    Checking semver v1.0.28
    Checking svgtypes v0.16.1
   Compiling syn v3.0.5
   Compiling syn v2.0.119
    Checking core_maths v0.1.1
    Checking ttf-parser v0.25.1
    Checking float-cmp v0.9.0
    Checking strict-num v0.1.1
    Checking memmap2 v0.9.11
    Checking hashbrown v0.17.1
    Checking indexmap v2.14.2
    Checking fontdb v0.23.0
   Compiling bytemuck_derive v1.12.0
   Compiling synstructure v0.13.2
    Checking wasmparser v0.258.0
   Compiling zerofrom-derive v0.1.7
   Compiling yoke-derive v0.8.2
    Checking bytemuck v1.25.2
    Checking font-types v0.11.3
    Checking tiny-skia-path v0.12.0
    Checking rustybuzz v0.20.1
    Checking rgb v0.8.53
    Checking zerofrom v0.1.8
    Checking yoke v0.8.3
    Checking read-fonts v0.39.2
    Checking tiny-skia v0.12.0
    Checking usvg v0.47.0
    Checking resvg v0.47.0
    Checking skrifa v0.42.1
    Checking write-fonts v0.48.1
    Checking subsetter v0.2.6
    Checking krilla v0.8.2
    Checking krilla-svg v0.8.1
    Checking slides-pdf v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core/pdf)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.00s
=== the embedded pdf wasm must be built from these sources
wasm-stamp: internal/slides/pdfcore/testdata/slides_pdf.wasm was built from these inputs
=== wasm: the pdf artifact the host embeds
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
build-pdf-wasm: Linux/aarch64 builds natively; the result is not the canonical amd64 build
   Compiling proc-macro2 v1.0.107
   Compiling unicode-ident v1.0.24
   Compiling quote v1.0.47
   Compiling autocfg v1.5.1
   Compiling log v0.4.34
   Compiling simd-adler32 v0.3.10
   Compiling libm v0.2.16
   Compiling arrayvec v0.7.8
   Compiling crc32fast v1.5.1
   Compiling smallvec v1.16.0
   Compiling adler2 v2.0.1
   Compiling cfg-if v1.0.4
   Compiling bitflags v2.13.1
   Compiling version_check v0.9.5
   Compiling arrayref v0.3.9
   Compiling memchr v2.8.3
   Compiling unicode-ccc v0.4.0
   Compiling siphasher v1.0.3
   Compiling miniz_oxide v0.9.1
   Compiling miniz_oxide v0.8.9
   Compiling fdeflate v0.3.7
   Compiling polycool v0.4.0
   Compiling unicode-script v0.5.8
   Compiling unicode-bidi-mirroring v0.4.0
   Compiling hashbrown v0.17.1
   Compiling unicode-properties v0.1.4
   Compiling equivalent v1.0.2
   Compiling tinyvec_macros v0.1.1
   Compiling weezl v0.1.12
   Compiling tinyvec v1.13.2
   Compiling slotmap v1.1.1
   Compiling kurbo v0.13.1
   Compiling zune-core v0.5.3
   Compiling base64 v0.22.1
   Compiling num-traits v0.2.19
   Compiling flate2 v1.1.10
   Compiling memmap2 v0.9.11
   Compiling color_quant v1.1.0
   Compiling byteorder-lite v0.1.0
   Compiling quick-error v2.0.1
   Compiling indexmap v2.14.2
   Compiling imagesize v0.14.0
   Compiling gif v0.14.2
   Compiling zune-jpeg v0.5.15
   Compiling syn v3.0.5
   Compiling syn v2.0.119
   Compiling png v0.18.1
   Compiling image-webp v0.2.4
   Compiling core_maths v0.1.1
   Compiling roxmltree v0.21.1
   Compiling float-cmp v0.9.0
   Compiling ttf-parser v0.25.1
   Compiling strict-num v0.1.1
   Compiling svgtypes v0.16.1
   Compiling simplecss v0.2.2
   Compiling stable_deref_trait v1.2.1
   Compiling data-url v0.3.2
   Compiling ryu v1.0.23
   Compiling pico-args v0.5.0
   Compiling unicode-bidi v0.3.18
   Compiling unicode-vo v0.1.0
   Compiling xmlwriter v0.1.0
   Compiling rustc-hash v2.1.3
   Compiling itoa v1.0.18
   Compiling pdf-writer v0.15.0
   Compiling bumpalo v3.20.3
   Compiling xmp-writer v0.3.3
   Compiling bytemuck_derive v1.12.0
   Compiling synstructure v0.13.2
   Compiling fontdb v0.23.0
   Compiling zerofrom-derive v0.1.7
   Compiling yoke-derive v0.8.2
   Compiling bytemuck v1.25.2
   Compiling font-types v0.11.3
   Compiling tiny-skia-path v0.12.0
   Compiling rustybuzz v0.20.1
   Compiling rgb v0.8.53
   Compiling zerofrom v0.1.8
   Compiling yoke v0.8.3
   Compiling read-fonts v0.39.2
   Compiling tiny-skia v0.12.0
   Compiling usvg v0.47.0
   Compiling resvg v0.47.0
   Compiling write-fonts v0.48.1
   Compiling skrifa v0.42.1
   Compiling subsetter v0.2.6
   Compiling krilla v0.8.2
   Compiling krilla-svg v0.8.1
   Compiling slides-pdf v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core/pdf)
    Finished `release` profile [optimized] target(s) in 18.92s
core/pdf/target/wasm32-unknown-unknown/release/slides_pdf.wasm (4157674 bytes)
=== the embedded pdf wasm must match a fresh build
gate: byte comparison skipped on Linux/aarch64: no build on this host reproduces the canonical amd64 bytes; the input stamp above holds freshness here
=== rust: test (pdf)
   Compiling simd-adler32 v0.3.10
   Compiling log v0.4.34
   Compiling arrayvec v0.7.8
   Compiling adler2 v2.0.1
   Compiling bitflags v2.13.1
   Compiling smallvec v1.16.0
   Compiling cfg-if v1.0.4
   Compiling foldhash v0.2.0
   Compiling libm v0.2.16
   Compiling serde_core v1.0.229
   Compiling memchr v2.8.3
   Compiling arrayref v0.3.9
   Compiling equivalent v1.0.2
   Compiling num-traits v0.2.19
   Compiling bytemuck v1.25.2
   Compiling libc v0.2.189
   Compiling crc32fast v1.5.1
   Compiling unicode-bidi-mirroring v0.4.0
   Compiling unicode-script v0.5.8
   Compiling roxmltree v0.20.0
   Compiling miniz_oxide v0.9.1
   Compiling fdeflate v0.3.7
   Compiling miniz_oxide v0.8.9
   Compiling polycool v0.4.0
   Compiling unicode-properties v0.1.4
   Compiling unicode-ccc v0.4.0
   Compiling tinyvec_macros v0.1.1
   Compiling font-types v0.11.3
   Compiling siphasher v1.0.3
   Compiling tinyvec v1.13.2
   Compiling slotmap v1.1.1
   Compiling kurbo v0.13.1
   Compiling imagesize v0.14.0
   Compiling color_quant v1.1.0
   Compiling float-cmp v0.9.0
   Compiling flate2 v1.1.10
   Compiling read-fonts v0.39.2
   Compiling fontconfig-parser v0.5.8
   Compiling weezl v0.1.12
   Compiling byteorder-lite v0.1.0
   Compiling strict-num v0.1.1
   Compiling quick-error v2.0.1
   Compiling zune-core v0.5.3
   Compiling base64 v0.22.1
   Compiling tiny-skia-path v0.12.0
   Compiling core_maths v0.1.1
   Compiling gif v0.14.2
   Compiling ttf-parser v0.25.1
   Compiling png v0.18.1
   Compiling memmap2 v0.9.11
   Compiling zune-jpeg v0.5.15
   Compiling image-webp v0.2.4
   Compiling roxmltree v0.21.1
   Compiling zerofrom v0.1.8
   Compiling simplecss v0.2.2
   Compiling unicode-vo v0.1.0
   Compiling rustc-hash v2.1.3
   Compiling ryu v1.0.23
   Compiling stable_deref_trait v1.2.1
   Compiling unicode-bidi v0.3.18
   Compiling itoa v1.0.18
   Compiling svgtypes v0.16.1
   Compiling pico-args v0.5.0
   Compiling xmlwriter v0.1.0
   Compiling data-url v0.3.2
   Compiling pdf-writer v0.15.0
   Compiling yoke v0.8.3
   Compiling rgb v0.8.53
   Compiling bumpalo v3.20.3
   Compiling xmp-writer v0.3.3
   Compiling tiny-skia v0.12.0
   Compiling semver v1.0.28
   Compiling hashbrown v0.17.1
   Compiling serde v1.0.229
   Compiling indexmap v2.14.2
   Compiling rustybuzz v0.20.1
   Compiling fontdb v0.23.0
   Compiling wasmparser v0.258.0
   Compiling usvg v0.47.0
   Compiling resvg v0.47.0
   Compiling skrifa v0.42.1
   Compiling write-fonts v0.48.1
   Compiling subsetter v0.2.6
   Compiling krilla v0.8.2
   Compiling krilla-svg v0.8.1
   Compiling slides-pdf v0.1.0 (/home/ci/work/repos/oficina__slides/wt/feat__scenes/core/pdf)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 20.66s
     Running unittests src/lib.rs (core/pdf/target/debug/deps/slides_pdf-7ec7cd25f86a82d7)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/no_host_imports.rs (core/pdf/target/debug/deps/no_host_imports-09d1f8ca96bf3a46)

running 1 test
test no_host_imports ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

     Running tests/render.rs (core/pdf/target/debug/deps/render-888658dffec5d3c9)

running 6 tests
test a_null_zero_length_pair_is_no_frames_not_a_dereference ... ok
test text_with_no_fonts_at_all_still_renders_the_shapes ... ok
test raster_image_is_embedded ... ok
test abi_frames_round_trip ... ok
test renders_text_as_embedded_glyphs ... ok
test two_svgs_make_two_pages ... ok

test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

   Doc-tests slides_pdf

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

=== fixtures: node dependencies
v22.23.4
10.9.9
=== fixtures: npm ci (needs the registry — see .amadan/README.md)

added 19 packages, and audited 20 packages in 2s

5 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 10.9.9 -> 12.2.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.2.3
npm notice To update run: npm install -g npm@12.2.3
npm notice
=== fixtures: the JS side's own tests
TAP version 13
# Subtest: one finished upload is register_asset plus the block that uses it, in one batch
ok 1 - one finished upload is register_asset plus the block that uses it, in one batch
  ---
  duration_ms: 10.002774
  type: 'test'
  ...
# Subtest: a record missing its numbers still makes an op the core accepts
ok 2 - a record missing its numbers still makes an op the core accepts
  ---
  duration_ms: 1.415784
  type: 'test'
  ...
# Subtest: unusedAssets is what no slide refers to, and remove_asset drops one
ok 3 - unusedAssets is what no slide refers to, and remove_asset drops one
  ---
  duration_ms: 5.114155
  type: 'test'
  ...
# Subtest: a finished clip is its poster, its video and the block naming it, in one batch; the poster is in use
ok 4 - a finished clip is its poster, its video and the block naming it, in one batch; the poster is in use
  ---
  duration_ms: 2.534271
  type: 'test'
  ...
# Subtest: a scene still is in use: its asset is never offered as unused
ok 5 - a scene still is in use: its asset is never offered as unused
  ---
  duration_ms: 8.055368
  type: 'test'
  ...
# Subtest: the Unused images list reconciles by id and names each Remove button
ok 6 - the Unused images list reconciles by id and names each Remove button
  ---
  duration_ms: 1.881222
  type: 'test'
  ...
# Subtest: an upload refusal is said in words the person can act on
ok 7 - an upload refusal is said in words the person can act on
  ---
  duration_ms: 0.355194
  type: 'test'
  ...
# Subtest: a request is the trimmed prompt, the scope, the slide and the model
ok 8 - a request is the trimmed prompt, the scope, the slide and the model
  ---
  duration_ms: 2.352582
  type: 'test'
  ...
# Subtest: an empty, blank or over-long prompt, or "this slide" with none, is never sent
ok 9 - an empty, blank or over-long prompt, or "this slide" with none, is never sent
  ---
  duration_ms: 0.664641
  type: 'test'
  ...
# Subtest: server words map onto the panel's strings, and anything else is generic
ok 10 - server words map onto the panel's strings, and anything else is generic
  ---
  duration_ms: 0.380697
  type: 'test'
  ...
# Subtest: an answer must be a list of op objects; anything else is generic
ok 11 - an answer must be a list of op objects; anything else is generic
  ---
  duration_ms: 0.948583
  type: 'test'
  ...
# Subtest: an answer is posted as JSON, applied through commit, saved, and focused
ok 12 - an answer is posted as JSON, applied through commit, saved, and focused
  ---
  duration_ms: 0.925445
  type: 'test'
  ...
# Subtest: a slide is focused only once its save is acknowledged
ok 13 - a slide is focused only once its save is acknowledged
  ---
  duration_ms: 0.266812
  type: 'test'
  ...
# Subtest: no ops is "nothing", and nothing is committed
ok 14 - no ops is "nothing", and nothing is committed
  ---
  duration_ms: 0.398428
  type: 'test'
  ...
# Subtest: every failure is a word, and nothing is applied
ok 15 - every failure is a word, and nothing is applied
  ---
  duration_ms: 1.274467
  type: 'test'
  ...
# Subtest: undo takes back the answer's own step, once
ok 16 - undo takes back the answer's own step, once
  ---
  duration_ms: 0.844702
  type: 'test'
  ...
# Subtest: a batch shaped as the server answers it applies through ops.mjs
ok 17 - a batch shaped as the server answers it applies through ops.mjs
  ---
  duration_ms: 14.866853
  type: 'test'
  ...
# Subtest: the toggle is lit while the panel is open, and opening focuses the prompt
ok 18 - the toggle is lit while the panel is open, and opening focuses the prompt
  ---
  duration_ms: 2.597689
  type: 'test'
  ...
# Subtest: a deck with no slide opens on "the whole deck"
ok 19 - a deck with no slide opens on "the whole deck"
  ---
  duration_ms: 0.596039
  type: 'test'
  ...
# Subtest: asking is busy, then says what was done and offers Undo
ok 20 - asking is busy, then says what was done and offers Undo
  ---
  duration_ms: 1.240278
  type: 'test'
  ...
# Subtest: an error is said in the catalog's words, marked, and offers no Undo
ok 21 - an error is said in the catalog's words, marked, and offers no Undo
  ---
  duration_ms: 0.937447
  type: 'test'
  ...
# Subtest: destroy takes every listener away
ok 22 - destroy takes every listener away
  ---
  duration_ms: 0.572745
  type: 'test'
  ...
# Subtest: rowsFor: a canvas box is arranged in layers and placed; a flow box by region
ok 23 - rowsFor: a canvas box is arranged in layers and placed; a flow box by region
  ---
  duration_ms: 1.858768
  type: 'test'
  ...
# Subtest: canOwnContextMenu: never in text being edited, anywhere else on a box
ok 24 - canOwnContextMenu: never in text being edited, anywhere else on a box
  ---
  duration_ms: 0.993623
  type: 'test'
  ...
# Subtest: boxKey: the box's keys, and Delete and the arrows only from the box itself
ok 25 - boxKey: the box's keys, and Delete and the arrows only from the box itself
  ---
  duration_ms: 0.356137
  type: 'test'
  ...
# Subtest: open draws only the rows that apply, and focuses the first
ok 26 - open draws only the rows that apply, and focuses the first
  ---
  duration_ms: 3.378681
  type: 'test'
  ...
# Subtest: a row runs its command and closes; a region row sets the region
ok 27 - a row runs its command and closes; a region row sets the region
  ---
  duration_ms: 1.52815
  type: 'test'
  ...
# Subtest: the arrows move through the rows drawn; Esc closes and focuses the box, and goes no further
ok 28 - the arrows move through the rows drawn; Esc closes and focuses the box, and goes no further
  ---
  duration_ms: 1.575361
  type: 'test'
  ...
# Subtest: place: the round button follows the selection, and an empty selection closes the menu
ok 29 - place: the round button follows the selection, and an empty selection closes the menu
  ---
  duration_ms: 1.375161
  type: 'test'
  ...
# Subtest: a right-click on a box opens the menu; in text being edited it is the browser's
ok 30 - a right-click on a box opens the menu; in text being edited it is the browser's
  ---
  duration_ms: 0.820567
  type: 'test'
  ...
# Subtest: the keys: from the box, from its text, and never from outside the stage
ok 31 - the keys: from the box, from its text, and never from outside the stage
  ---
  duration_ms: 1.28859
  type: 'test'
  ...
# Subtest: sync: the menu closes when the slide's layout changes, and its region checks follow the box
ok 32 - sync: the menu closes when the slide's layout changes, and its region checks follow the box
  ---
  duration_ms: 3.326062
  type: 'test'
  ...
# Subtest: a row that no longer applies to the box does nothing, and closes the menu
ok 33 - a row that no longer applies to the box does nothing, and closes the menu
  ---
  duration_ms: 0.794313
  type: 'test'
  ...
# Subtest: destroy takes every listener off the page's elements
ok 34 - destroy takes every listener off the page's elements
  ---
  duration_ms: 0.404197
  type: 'test'
  ...
# Subtest: place: a stage with no room docks the round button beside the view switch
ok 35 - place: a stage with no room docks the round button beside the view switch
  ---
  duration_ms: 1.013955
  type: 'test'
  ...
# Subtest: place: the round button follows the phone screen's scroll, and goes while its box is out of sight
ok 36 - place: the round button follows the phone screen's scroll, and goes while its box is out of sight
  ---
  duration_ms: 0.683223
  type: 'test'
  ...
# Subtest: buttonSpot: at the top end corner, inside the stage, clear of every handle
ok 37 - buttonSpot: at the top end corner, inside the stage, clear of every handle
  ---
  duration_ms: 1.732838
  type: 'test'
  ...
# Subtest: menuSpot: under its anchor, flipped and kept inside the window
ok 38 - menuSpot: under its anchor, flipped and kept inside the window
  ---
  duration_ms: 1.088608
  type: 'test'
  ...
# Subtest: buttonSpot: any box, a tiny one in a corner included, gets a spot that covers no handle
ok 39 - buttonSpot: any box, a tiny one in a corner included, gets a spot that covers no handle
  ---
  duration_ms: 75.529033
  type: 'test'
  ...
# Subtest: buttonSpot: the reviewer's box filling a small stage, and boxes filling stages
ok 40 - buttonSpot: the reviewer's box filling a small stage, and boxes filling stages
  ---
  duration_ms: 2.002764
  type: 'test'
  ...
# Subtest: buttonSpot: thousands of boxes, every answer fits, null only when nothing does
ok 41 - buttonSpot: thousands of boxes, every answer fits, null only when nothing does
  ---
  duration_ms: 43.949399
  type: 'test'
  ...
# Subtest: clip: what can be seen of a rect through a frame; the rect itself where the frame has no box
ok 42 - clip: what can be seen of a rect through a frame; the rect itself where the frame has no box
  ---
  duration_ms: 0.282347
  type: 'test'
  ...
# Subtest: buttonSpot: clear of the other boxes where it can be, over one only where nothing else fits
ok 43 - buttonSpot: clear of the other boxes where it can be, over one only where nothing else fits
  ---
  duration_ms: 0.831499
  type: 'test'
  ...
# Subtest: clampBox keeps the box inside the frame and no smaller than the minimum
ok 44 - clampBox keeps the box inside the frame and no smaller than the minimum
  ---
  duration_ms: 1.658803
  type: 'test'
  ...
# Subtest: fixBox writes four decimals
ok 45 - fixBox writes four decimals
  ---
  duration_ms: 0.373787
  type: 'test'
  ...
# Subtest: guides are the thirds plus every other block edge
ok 46 - guides are the thirds plus every other block edge
  ---
  duration_ms: 0.2611
  type: 'test'
  ...
# Subtest: snapMove pulls the nearest edge onto a guide within one per cent, and leaves a far one
ok 47 - snapMove pulls the nearest edge onto a guide within one per cent, and leaves a far one
  ---
  duration_ms: 0.444321
  type: 'test'
  ...
# Subtest: snapResize moves only the edges the handle drags
ok 48 - snapResize moves only the edges the handle drags
  ---
  duration_ms: 0.269593
  type: 'test'
  ...
# Subtest: moveBox and resizeBox by handle
ok 49 - moveBox and resizeBox by handle
  ---
  duration_ms: 0.270453
  type: 'test'
  ...
# Subtest: nudge: arrows move by half a per cent, Shift by two, Alt resizes
ok 50 - nudge: arrows move by half a per cent, Shift by two, Alt resizes
  ---
  duration_ms: 0.39305
  type: 'test'
  ...
# Subtest: rectBox reads a block rectangle against its frame
ok 51 - rectBox reads a block rectangle against its frame
  ---
  duration_ms: 0.284253
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (a) the paste right after the refused x (Fable's probe)
ok 52 - a paste that waited for its font is kept: (a) the paste right after the refused x (Fable's probe)
  ---
  duration_ms: 22.229249
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (b) the refused x elsewhere, before the paste
ok 53 - a paste that waited for its font is kept: (b) the refused x elsewhere, before the paste
  ---
  duration_ms: 4.917406
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (g) the refused x after the paste point
ok 54 - a paste that waited for its font is kept: (g) the refused x after the paste point
  ---
  duration_ms: 6.203364
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (c) two refused x, the paste after the second
ok 55 - a paste that waited for its font is kept: (c) two refused x, the paste after the second
  ---
  duration_ms: 3.401323
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (i) the refused x mid-paragraph, the paste at its end
ok 56 - a paste that waited for its font is kept: (i) the refused x mid-paragraph, the paste at its end
  ---
  duration_ms: 3.17812
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (e) the paste over "paragraph.x"
ok 57 - a paste that waited for its font is kept: (e) the paste over "paragraph.x"
  ---
  duration_ms: 5.224538
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (f) a refused deletion elsewhere
ok 58 - a paste that waited for its font is kept: (f) a refused deletion elsewhere
  ---
  duration_ms: 2.771327
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (h) two paragraphs pasted after the refused x
ok 59 - a paste that waited for its font is kept: (h) two paragraphs pasted after the refused x
  ---
  duration_ms: 3.146753
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (j) a colleague's words before, the refused x after
ok 60 - a paste that waited for its font is kept: (j) a colleague's words before, the refused x after
  ---
  duration_ms: 7.004363
  type: 'test'
  ...
# Subtest: a paste that waited for its font is kept: (k) a colleague appended where the x was refused
ok 61 - a paste that waited for its font is kept: (k) a colleague appended where the x was refused
  ---
  duration_ms: 6.42899
  type: 'test'
  ...
# Subtest: a paste into a paragraph the refused change made cannot be kept: nothing is posted, the page is the server's
ok 62 - a paste into a paragraph the refused change made cannot be kept: nothing is posted, the page is the server's
  ---
  duration_ms: 2.202319
  type: 'test'
  ...
# Subtest: a paste made elsewhere carries as its own updates, not a replay
ok 63 - a paste made elsewhere carries as its own updates, not a replay
  ---
  duration_ms: 1.686849
  type: 'test'
  ...
# Subtest: the replay is one change for an undo manager tracking the carried origin
ok 64 - the replay is one change for an undo manager tracking the carried origin
  ---
  duration_ms: 3.113205
  type: 'test'
  ...
# Subtest: every update written on top of the refused text is held back, not only the first
ok 65 - every update written on top of the refused text is held back, not only the first
  ---
  duration_ms: 1.737673
  type: 'test'
  ...
# Subtest: a Backspace over the refused text is held back
ok 66 - a Backspace over the refused text is held back
  ---
  duration_ms: 1.06072
  type: 'test'
  ...
# Subtest: of an update that partly took, the part that took is posted, and nothing the server would hold pending
ok 67 - of an update that partly took, the part that took is posted, and nothing the server would hold pending
  ---
  duration_ms: 2.883824
  type: 'test'
  ...
# Subtest: an update that rewrites formatting and writes on top of the refused text posts the formatting, not the words
ok 68 - an update that rewrites formatting and writes on top of the refused text posts the formatting, not the words
  ---
  duration_ms: 1.61068
  type: 'test'
  ...
# Subtest: a paste elsewhere is posted and a keystroke after the refused x is not
ok 69 - a paste elsewhere is posted and a keystroke after the refused x is not
  ---
  duration_ms: 2.728934
  type: 'test'
  ...
# Subtest: took reads all, some and none from the update itself
ok 70 - took reads all, some and none from the update itself
  ---
  duration_ms: 1.115443
  type: 'test'
  ...
# Subtest: a Backspace over this tab's own saved words and its refused ones together posts the saved part (one delete range, one client)
ok 71 - a Backspace over this tab's own saved words and its refused ones together posts the saved part (one delete range, one client)
  ---
  duration_ms: 6.963284
  type: 'test'
  ...
# Subtest: a paste right after a refused repeated letter lands where it was made
ok 72 - a paste right after a refused repeated letter lands where it was made
  ---
  duration_ms: 9.726985
  type: 'test'
  ...
# Subtest: a change made in a clean spot is not lost with one held back on the refused text (on the refused text, then elsewhere)
ok 73 - a change made in a clean spot is not lost with one held back on the refused text (on the refused text, then elsewhere)
  ---
  duration_ms: 2.113417
  type: 'test'
  ...
# Subtest: a change made in a clean spot is not lost with one held back on the refused text (elsewhere, then on the refused text)
ok 74 - a change made in a clean spot is not lost with one held back on the refused text (elsewhere, then on the refused text)
  ---
  duration_ms: 1.177813
  type: 'test'
  ...
# Subtest: the keeper groups the updates of one held change into one entry, and hands the entries over once
ok 75 - the keeper groups the updates of one held change into one entry, and hands the entries over once
  ---
  duration_ms: 0.537573
  type: 'test'
  ...
# Subtest: every change made while diverged is kept, whatever it was written on
ok 76 - every change made while diverged is kept, whatever it was written on
  ---
  duration_ms: 7.684965
  type: 'test'
  ...
# Subtest: a change that cannot be kept in the middle loses nothing after it
ok 77 - a change that cannot be kept in the middle loses nothing after it
  ---
  duration_ms: 4.542771
  type: 'test'
  ...
# Subtest: a replay that cannot be made falls back to what of the change's own updates integrates
ok 78 - a replay that cannot be made falls back to what of the change's own updates integrates
  ---
  duration_ms: 1.547664
  type: 'test'
  ...
# Subtest: the carried changes undo in the steps they were made in
ok 79 - the carried changes undo in the steps they were made in
  ---
  duration_ms: 4.083733
  type: 'test'
  ...
# Subtest: a multi-step change replays each step where it was made: an insert, then an insert just before the refused text
ok 80 - a multi-step change replays each step where it was made: an insert, then an insert just before the refused text
  ---
  duration_ms: 0.833834
  type: 'test'
  ...
# Subtest: a multi-step change replays each step where it was made: an insert, then a mark over it, the refused text two letters on
ok 81 - a multi-step change replays each step where it was made: an insert, then a mark over it, the refused text two letters on
  ---
  duration_ms: 0.807563
  type: 'test'
  ...
# Subtest: a multi-step change replays each step where it was made: a delete, then an insert past the refused text
ok 82 - a multi-step change replays each step where it was made: a delete, then an insert past the refused text
  ---
  duration_ms: 0.314124
  type: 'test'
  ...
# Subtest: a mark made over an insertion in the same change covers all of it
ok 83 - a mark made over an insertion in the same change covers all of it
  ---
  duration_ms: 0.389173
  type: 'test'
  ...
# Subtest: a multi-step change on the refused text is replayed where it was made, on the page and the server
ok 84 - a multi-step change on the refused text is replayed where it was made, on the page and the server
  ---
  duration_ms: 2.289208
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: A: "abc" on the x; Backspace; undo the Backspace
ok 85 - an undo or a redo while diverged ends as the person saw it: A: "abc" on the x; Backspace; undo the Backspace
  ---
  duration_ms: 4.804506
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: B: "a" on the x; select it, type "b"; undo
ok 86 - an undo or a redo while diverged ends as the person saw it: B: "a" on the x; select it, type "b"; undo
  ---
  duration_ms: 6.831631
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: C: "a" on the x; Backspace; undo
ok 87 - an undo or a redo while diverged ends as the person saw it: C: "a" on the x; Backspace; undo
  ---
  duration_ms: 4.727131
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: D: "a" on the x; Backspace; undo; "b" typed
ok 88 - an undo or a redo while diverged ends as the person saw it: D: "a" on the x; Backspace; undo; "b" typed
  ---
  duration_ms: 4.150002
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: E: "a" on the x; Backspace; undo; redo
ok 89 - an undo or a redo while diverged ends as the person saw it: E: "a" on the x; Backspace; undo; redo
  ---
  duration_ms: 6.547166
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: F: "a" elsewhere; Backspace; undo
ok 90 - an undo or a redo while diverged ends as the person saw it: F: "a" elsewhere; Backspace; undo
  ---
  duration_ms: 2.867067
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: G: "a" on the x; undo; redo; undo; redo
ok 91 - an undo or a redo while diverged ends as the person saw it: G: "a" on the x; undo; redo; undo; redo
  ---
  duration_ms: 5.811636
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: H: "a" on the x; "b"; undo; undo; redo; redo; "c"
ok 92 - an undo or a redo while diverged ends as the person saw it: H: "a" on the x; "b"; undo; undo; redo; redo; "c"
  ---
  duration_ms: 6.402468
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: I: "a" on the x; Backspace over "xa"; undo
ok 93 - an undo or a redo while diverged ends as the person saw it: I: "a" on the x; Backspace over "xa"; undo
  ---
  duration_ms: 3.276033
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: J: "a" on the x; Backspace over ".xa"; undo
ok 94 - an undo or a redo while diverged ends as the person saw it: J: "a" on the x; Backspace over ".xa"; undo
  ---
  duration_ms: 3.345156
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: K: the x and "a" one undo step; undo; redo
ok 95 - an undo or a redo while diverged ends as the person saw it: K: the x and "a" one undo step; undo; redo
  ---
  duration_ms: 3.917958
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: L: "a" on the x; undo; "b"; undo; redo
ok 96 - an undo or a redo while diverged ends as the person saw it: L: "a" on the x; undo; "b"; undo; redo
  ---
  duration_ms: 6.654331
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: M: two words pasted on the x; the first deleted; undo
ok 97 - an undo or a redo while diverged ends as the person saw it: M: two words pasted on the x; the first deleted; undo
  ---
  duration_ms: 3.812089
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: N: "a" on the x; undo
ok 98 - an undo or a redo while diverged ends as the person saw it: N: "a" on the x; undo
  ---
  duration_ms: 2.394812
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: O: "a" on the x; undo; "b"
ok 99 - an undo or a redo while diverged ends as the person saw it: O: "a" on the x; undo; "b"
  ---
  duration_ms: 2.859503
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: P: "a" on the x; "b" elsewhere; undo; undo
ok 100 - an undo or a redo while diverged ends as the person saw it: P: "a" on the x; "b" elsewhere; undo; undo
  ---
  duration_ms: 2.568992
  type: 'test'
  ...
# Subtest: an undo or a redo while diverged ends as the person saw it: Q: "a" on the x; undo; redo; "c"
ok 101 - an undo or a redo while diverged ends as the person saw it: Q: "a" on the x; undo; redo; "c"
  ---
  duration_ms: 3.302918
  type: 'test'
  ...
# Subtest: an undo of a change saved before the refusal is still carried
ok 102 - an undo of a change saved before the refusal is still carried
  ---
  duration_ms: 2.187122
  type: 'test'
  ...
# Subtest: derivedStep turns one document into the other, and is null for the same one
ok 103 - derivedStep turns one document into the other, and is null for the same one
  ---
  duration_ms: 0.246905
  type: 'test'
  ...
# Subtest: carrying grows linearly over a long divergence: changes typed elsewhere, 1000 against 4000, under few client ids
ok 104 - carrying grows linearly over a long divergence: changes typed elsewhere, 1000 against 4000, under few client ids
  ---
  duration_ms: 2225.206353
  type: 'test'
  ...
# Subtest: carrying grows linearly over a long divergence: changes typed on the refused text, 500 against 2000, under few client ids
ok 105 - carrying grows linearly over a long divergence: changes typed on the refused text, 500 against 2000, under few client ids
  ---
  duration_ms: 4057.151096
  type: 'test'
  ...
# Subtest: a client id never collides with one the document already holds
ok 106 - a client id never collides with one the document already holds
  ---
  duration_ms: 0.458031
  type: 'test'
  ...
# Subtest: ProseMirror changes inside one window share an id; one held back there does not strand the next
ok 107 - ProseMirror changes inside one window share an id; one held back there does not strand the next
  ---
  duration_ms: 1.993467
  type: 'test'
  ...
# Subtest: typing into a block is a text change on its slide only
ok 108 - typing into a block is a text change on its slide only
  ---
  duration_ms: 9.198635
  type: 'test'
  ...
# Subtest: a block's props changing is structure on its slide
ok 109 - a block's props changing is structure on its slide
  ---
  duration_ms: 1.873377
  type: 'test'
  ...
# Subtest: adding, moving or removing a block is structure on its slide
ok 110 - adding, moving or removing a block is structure on its slide
  ---
  duration_ms: 2.77662
  type: 'test'
  ...
# Subtest: the notes are text on their slide
ok 111 - the notes are text on their slide
  ---
  duration_ms: 1.636216
  type: 'test'
  ...
# Subtest: a slide added, removed or moved is an order change
ok 112 - a slide added, removed or moved is an order change
  ---
  duration_ms: 4.497756
  type: 'test'
  ...
# Subtest: one transaction touching several things reports each once
ok 113 - one transaction touching several things reports each once
  ---
  duration_ms: 1.5098
  type: 'test'
  ...
# Subtest: what the ops write passes, and so does an empty document
ok 114 - what the ops write passes, and so does an empty document
  ---
  duration_ms: 9.959907
  type: 'test'
  ...
# Subtest: the shapes y-prosemirror and older documents write pass
ok 115 - the shapes y-prosemirror and older documents write pass
  ---
  duration_ms: 1.880346
  type: 'test'
  ...
# Subtest: an unknown formatting attribute is reported with the core's message
ok 116 - an unknown formatting attribute is reported with the core's message
  ---
  duration_ms: 2.630522
  type: 'test'
  ...
# Subtest: an element inside a paragraph, a non-paragraph child and bare text are reported
ok 117 - an element inside a paragraph, a non-paragraph child and bare text are reported
  ---
  duration_ms: 5.738112
  type: 'test'
  ...
# Subtest: the unknownmark poison shape is what the check refuses
ok 118 - the unknownmark poison shape is what the check refuses
  ---
  duration_ms: 1.985999
  type: 'test'
  ...
# Subtest: y-prosemirror 1.3.7 deletes the words under an unknown mark; sanitising first keeps them
ok 119 - y-prosemirror 1.3.7 deletes the words under an unknown mark; sanitising first keeps them
  ---
  duration_ms: 5.096373
  type: 'test'
  ...
# Subtest: the vocabulary is the five marks and nothing else
ok 120 - the vocabulary is the five marks and nothing else
  ---
  duration_ms: 0.172351
  type: 'test'
  ...
# Subtest: a reload reuses the id this tab stored for the deck
ok 121 - a reload reuses the id this tab stored for the deck
  ---
  duration_ms: 1.124468
  type: 'test'
  ...
# Subtest: two tabs, and two decks in one tab, get different ids
ok 122 - two tabs, and two decks in one tab, get different ids
  ---
  duration_ms: 1.406658
  type: 'test'
  ...
# Subtest: a stored value that is not an id, or storage that throws, gives a fresh id
ok 123 - a stored value that is not an id, or storage that throws, gives a fresh id
  ---
  duration_ms: 0.522848
  type: 'test'
  ...
# Subtest: a duplicated tab gives up the copied id; the original keeps it
ok 124 - a duplicated tab gives up the copied id; the original keeps it
  ---
  duration_ms: 7.961726
  type: 'test'
  ...
# Subtest: a reload finds no rival and keeps its id
ok 125 - a reload finds no rival and keeps its id
  ---
  duration_ms: 2.389217
  type: 'test'
  ...
# Subtest: presence switches id: beats carry the new one and the old one is somebody else
ok 126 - presence switches id: beats carry the new one and the old one is somebody else
  ---
  duration_ms: 1.231163
  type: 'test'
  ...
# Subtest: a clip on a press plays once its press has come; loop and once from arrival
ok 127 - a clip on a press plays once its press has come; loop and once from arrival
  ---
  duration_ms: 5.362813
  type: 'test'
  ...
# Subtest: reduced motion keeps the poster for loop and once; a press still plays
ok 128 - reduced motion keeps the poster for loop and once; a press still plays
  ---
  duration_ms: 0.450886
  type: 'test'
  ...
# Subtest: one muted, inline video per clip, over its poster, live only once it plays
ok 129 - one muted, inline video per clip, over its poster, live only once it plays
  ---
  duration_ms: 1.903946
  type: 'test'
  ...
# Subtest: a press plays from the start; back pauses, rewinds and shows the poster
ok 130 - a press plays from the start; back pauses, rewinds and shows the poster
  ---
  duration_ms: 0.706762
  type: 'test'
  ...
# Subtest: a video that will not play leaves its poster, and is not tried again
ok 131 - a video that will not play leaves its poster, and is not tried again
  ---
  duration_ms: 7.81477
  type: 'test'
  ...
# Subtest: under reduced motion a loop is never started
ok 132 - under reduced motion a loop is never started
  ---
  duration_ms: 0.676531
  type: 'test'
  ...
# Subtest: setTitle commits the deck's title, one set_meta
ok 133 - setTitle commits the deck's title, one set_meta
  ---
  duration_ms: 1.858214
  type: 'test'
  ...
# Subtest: accent-reset commits the theme's accent back, once
ok 134 - accent-reset commits the theme's accent back, once
  ---
  duration_ms: 0.26565
  type: 'test'
  ...
# Subtest: addBlock commits the kind after the selected box, then selects it; refused, selects nothing
ok 135 - addBlock commits the kind after the selected box, then selects it; refused, selects nothing
  ---
  duration_ms: 1.480153
  type: 'test'
  ...
# Subtest: addBlock with no slide on the stage commits nothing
ok 136 - addBlock with no slide on the stage commits nothing
  ---
  duration_ms: 0.388715
  type: 'test'
  ...
# Subtest: the box menu's rows into the card: Format and Position and size, for a selected box only
ok 137 - the box menu's rows into the card: Format and Position and size, for a selected box only
  ---
  duration_ms: 0.318709
  type: 'test'
  ...
# Subtest: addBlock("qr") asks for an audience link and adds the box with it; the card's button replaces it
ok 138 - addBlock("qr") asks for an audience link and adds the box with it; the card's button replaces it
  ---
  duration_ms: 0.935868
  type: 'test'
  ...
# Subtest: a stack leads with its first family, unquoted
ok 139 - a stack leads with its first family, unquoted
  ---
  duration_ms: 1.37488
  type: 'test'
  ...
# Subtest: a field shows the uploaded family its stack leads with, else the stack
ok 140 - a field shows the uploaded family its stack leads with, else the stack
  ---
  duration_ms: 0.244753
  type: 'test'
  ...
# Subtest: the theme's stack for a role, an unknown theme's being the default's
ok 141 - the theme's stack for a role, an unknown theme's being the default's
  ---
  duration_ms: 0.19042
  type: 'test'
  ...
# Subtest: a pick sets the role in front of the theme stack and lists the family, one op
ok 142 - a pick sets the role in front of the theme stack and lists the family, one op
  ---
  duration_ms: 1.248497
  type: 'test'
  ...
# Subtest: two people's Brands: picking one for the body keeps the other in the heading
ok 143 - two people's Brands: picking one for the body keeps the other in the heading
  ---
  duration_ms: 0.442374
  type: 'test'
  ...
# Subtest: another choice drops a family no role leads with any more, in the same op
ok 144 - another choice drops a family no role leads with any more, in the same op
  ---
  duration_ms: 0.339568
  type: 'test'
  ...
# Subtest: a pick answered after a newer choice for its field commits nothing
ok 145 - a pick answered after a newer choice for its field commits nothing
  ---
  duration_ms: 0.705229
  type: 'test'
  ...
# Subtest: two picks answered out of order: the newer one is the one written
ok 146 - two picks answered out of order: the newer one is the one written
  ---
  duration_ms: 0.263142
  type: 'test'
  ...
# Subtest: a change to one field does not cancel the other field's pick
ok 147 - a change to one field does not cancel the other field's pick
  ---
  duration_ms: 0.757579
  type: 'test'
  ...
# Subtest: the ops are ones the document takes
ok 148 - the ops are ones the document takes
  ---
  duration_ms: 6.809933
  type: 'test'
  ...
# Subtest: a change that loads runs once and releases the queue in order
ok 149 - a change that loads runs once and releases the queue in order
  ---
  duration_ms: 6.325633
  type: 'test'
  ...
# Subtest: a refusal releases the queue in order and refills the inspector
ok 150 - a refusal releases the queue in order and refills the inspector
  ---
  duration_ms: 1.218197
  type: 'test'
  ...
# Subtest: a refusal whose notice throws still releases the queue
ok 151 - a refusal whose notice throws still releases the queue
  ---
  duration_ms: 1.314973
  type: 'test'
  ...
# Subtest: a change that throws still releases the queue, and is refused
ok 152 - a change that throws still releases the queue, and is refused
  ---
  duration_ms: 0.94564
  type: 'test'
  ...
# Subtest: a change that can no longer be made once its font is in is said as interrupted, not as a font that failed
ok 153 - a change that can no longer be made once its font is in is said as interrupted, not as a font that failed
  ---
  duration_ms: 3.283163
  type: 'test'
  ...
# Subtest: a second change during a wait is refused at once and never queued
ok 154 - a second change during a wait is refused at once and never queued
  ---
  duration_ms: 0.77532
  type: 'test'
  ...
# Subtest: free() with no wait on resolves at once
ok 155 - free() with no wait on resolves at once
  ---
  duration_ms: 0.538617
  type: 'test'
  ...
# Subtest: a wait makes the Deck settings dialog inert with the card
ok 156 - a wait makes the Deck settings dialog inert with the card
  ---
  duration_ms: 1.4271
  type: 'test'
  ...
# Subtest: the shared vectors have cases to check
ok 157 - the shared vectors have cases to check
  ---
  duration_ms: 1.303183
  type: 'test'
  ...
# Subtest: familiesOfView: an empty deck draws in nothing
ok 158 - familiesOfView: an empty deck draws in nothing
  ---
  duration_ms: 0.88137
  type: 'test'
  ...
# Subtest: familiesOfView: paper: serif headings, sans body
ok 159 - familiesOfView: paper: serif headings, sans body
  ---
  duration_ms: 0.590018
  type: 'test'
  ...
# Subtest: familiesOfView: ink: sans for both
ok 160 - familiesOfView: ink: sans for both
  ---
  duration_ms: 0.304139
  type: 'test'
  ...
# Subtest: familiesOfView: an unknown theme is paper
ok 161 - familiesOfView: an unknown theme is paper
  ---
  duration_ms: 0.160238
  type: 'test'
  ...
# Subtest: familiesOfView: a code block brings in mono
ok 162 - familiesOfView: a code block brings in mono
  ---
  duration_ms: 0.139965
  type: 'test'
  ...
# Subtest: familiesOfView: an empty code block still does
ok 163 - familiesOfView: an empty code block still does
  ---
  duration_ms: 0.265008
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in a text block
ok 164 - familiesOfView: a code mark in a text block
  ---
  duration_ms: 1.577892
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in a heading
ok 165 - familiesOfView: a code mark in a heading
  ---
  duration_ms: 0.640142
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in a table cell
ok 166 - familiesOfView: a code mark in a table cell
  ---
  duration_ms: 0.785269
  type: 'test'
  ...
# Subtest: familiesOfView: a code mark in the notes is the chrome's
ok 167 - familiesOfView: a code mark in the notes is the chrome's
  ---
  duration_ms: 0.271924
  type: 'test'
  ...
# Subtest: familiesOfView: bold, italic, highlight and links stay in the family
ok 168 - familiesOfView: bold, italic, highlight and links stay in the family
  ---
  duration_ms: 0.118061
  type: 'test'
  ...
# Subtest: familiesOfView: the inspector's system heading drops serif
ok 169 - familiesOfView: the inspector's system heading drops serif
  ---
  duration_ms: 0.3284
  type: 'test'
  ...
# Subtest: familiesOfView: system faces for both draw in no web face
ok 170 - familiesOfView: system faces for both draw in no web face
  ---
  duration_ms: 0.093803
  type: 'test'
  ...
# Subtest: familiesOfView: a body override naming mono
ok 171 - familiesOfView: a body override naming mono
  ---
  duration_ms: 0.077875
  type: 'test'
  ...
# Subtest: familiesOfView: a family anywhere in a stack counts
ok 172 - familiesOfView: a family anywhere in a stack counts
  ---
  duration_ms: 0.068044
  type: 'test'
  ...
# Subtest: familiesOfView: an override that fails the allowlist is the theme's
ok 173 - familiesOfView: an override that fails the allowlist is the theme's
  ---
  duration_ms: 0.178306
  type: 'test'
  ...
# Subtest: familiesOfView: a too-long override is the theme's
ok 174 - familiesOfView: a too-long override is the theme's
  ---
  duration_ms: 0.081646
  type: 'test'
  ...
# Subtest: familiesOfView: padded overrides are trimmed
ok 175 - familiesOfView: padded overrides are trimmed
  ---
  duration_ms: 0.069238
  type: 'test'
  ...
# Subtest: familiesOfView: a family named only on a later slide's code
ok 176 - familiesOfView: a family named only on a later slide's code
  ---
  duration_ms: 0.092277
  type: 'test'
  ...
# Subtest: familiesOfView: an uploaded family in the heading only
ok 177 - familiesOfView: an uploaded family in the heading only
  ---
  duration_ms: 0.132691
  type: 'test'
  ...
# Subtest: familiesOfView: an uploaded family in the body only
ok 178 - familiesOfView: an uploaded family in the body only
  ---
  duration_ms: 0.081344
  type: 'test'
  ...
# Subtest: familiesOfView: an uploaded family listed but unused is not needed
ok 179 - familiesOfView: an uploaded family listed but unused is not needed
  ---
  duration_ms: 0.066992
  type: 'test'
  ...
# Subtest: familiesOfView: an odd but clean name
ok 180 - familiesOfView: an odd but clean name
  ---
  duration_ms: 0.06442
  type: 'test'
  ...
# Subtest: familiesOfView: a stack naming an uploaded family the deck does not list falls back
ok 181 - familiesOfView: a stack naming an uploaded family the deck does not list falls back
  ---
  duration_ms: 0.080123
  type: 'test'
  ...
# Subtest: familiesOfView: an uploaded family only later in a stack is not needed
ok 182 - familiesOfView: an uploaded family only later in a stack is not needed
  ---
  duration_ms: 0.063102
  type: 'test'
  ...
# Subtest: familiesOfView: two uploaded families come in fontFiles order
ok 183 - familiesOfView: two uploaded families come in fontFiles order
  ---
  duration_ms: 0.067878
  type: 'test'
  ...
# Subtest: familiesOfView: one uploaded family in both roles is needed once
ok 184 - familiesOfView: one uploaded family in both roles is needed once
  ---
  duration_ms: 0.066649
  type: 'test'
  ...
# Subtest: familiesOfView: an empty deck needs no uploaded family
ok 185 - familiesOfView: an empty deck needs no uploaded family
  ---
  duration_ms: 0.060558
  type: 'test'
  ...
# Subtest: a stack names a family wherever it appears, in any case, quoted or not
ok 186 - a stack names a family wherever it appears, in any case, quoted or not
  ---
  duration_ms: 0.155201
  type: 'test'
  ...
# Subtest: safeFontStack is render.go's allowlist
ok 187 - safeFontStack is render.go's allowlist
  ---
  duration_ms: 0.139726
  type: 'test'
  ...
# Subtest: a section names its heading and body families
ok 188 - a section names its heading and body families
  ---
  duration_ms: 0.353787
  type: 'test'
  ...
# Subtest: a section with code in it brings in the code family
ok 189 - a section with code in it brings in the code family
  ---
  duration_ms: 0.269945
  type: 'test'
  ...
# Subtest: only the two font properties are read off a section
ok 190 - only the two font properties are read off a section
  ---
  duration_ms: 0.14968
  type: 'test'
  ...
# Subtest: nothing joins the page until all four faces of a family are in, and then all four do
ok 191 - nothing joins the page until all four faces of a family are in, and then all four do
  ---
  duration_ms: 7.77451
  type: 'test'
  ...
# Subtest: every face is a block face of the manifest's family, weight and style
ok 192 - every face is a block face of the manifest's family, weight and style
  ---
  duration_ms: 2.933964
  type: 'test'
  ...
# Subtest: a family that misses the deadline is committed and never joins, even when it arrives
ok 193 - a family that misses the deadline is committed and never joins, even when it arrives
  ---
  duration_ms: 1.523675
  type: 'test'
  ...
# Subtest: a family whose file fails is committed by the gate: wrong but stable
ok 194 - a family whose file fails is committed by the gate: wrong but stable
  ---
  duration_ms: 0.986636
  type: 'test'
  ...
# Subtest: a person's action waits for its family and then may run, once it is in
ok 195 - a person's action waits for its family and then may run, once it is in
  ---
  duration_ms: 0.715755
  type: 'test'
  ...
# Subtest: a person's action is refused when its family fails or is late, and nothing is committed
ok 196 - a person's action is refused when its family fails or is late, and nothing is committed
  ---
  duration_ms: 2.048118
  type: 'test'
  ...
# Subtest: content from elsewhere waits for a new family, then is committed past the timeout, never held
ok 197 - content from elsewhere waits for a new family, then is committed past the timeout, never held
  ---
  duration_ms: 1.207582
  type: 'test'
  ...
# Subtest: a family on screen in its web face is never committed
ok 198 - a family on screen in its web face is never committed
  ---
  duration_ms: 1.725115
  type: 'test'
  ...
# Subtest: a composition commits a family that is not in, rather than waiting
ok 199 - a composition commits a family that is not in, rather than waiting
  ---
  duration_ms: 0.803208
  type: 'test'
  ...
# Subtest: prefetch loads the families not asked for yet, one at a time, and puts none on
ok 200 - prefetch loads the families not asked for yet, one at a time, and puts none on
  ---
  duration_ms: 1.726744
  type: 'test'
  ...
# Subtest: an unknown family is no family
ok 201 - an unknown family is no family
  ---
  duration_ms: 0.419871
  type: 'test'
  ...
# Subtest: the system session is ready for everything and loads nothing
ok 202 - the system session is ready for everything and loads nothing
  ---
  duration_ms: 0.246797
  type: 'test'
  ...
# Subtest: an uploaded face loads in its own format and weight, under its name as it is
ok 203 - an uploaded face loads in its own format and weight, under its name as it is
  ---
  duration_ms: 7.325926
  type: 'test'
  ...
# Subtest: a catalog face is woff2
ok 204 - a catalog face is woff2
  ---
  duration_ms: 2.97788
  type: 'test'
  ...
# Subtest: an uploaded family late past the deadline is committed and never joins
ok 205 - an uploaded family late past the deadline is committed and never joins
  ---
  duration_ms: 1.629649
  type: 'test'
  ...
# Subtest: the editor brings in the deck's uploaded families too
ok 206 - the editor brings in the deck's uploaded families too
  ---
  duration_ms: 1.295168
  type: 'test'
  ...
# Subtest: a family the deck takes on during the visit is learned, once
ok 207 - a family the deck takes on during the visit is learned, once
  ---
  duration_ms: 1.121319
  type: 'test'
  ...
# Subtest: uploadedFamily is the manifest's entry for one of meta.fontFiles
ok 208 - uploadedFamily is the manifest's entry for one of meta.fontFiles
  ---
  duration_ms: 0.480533
  type: 'test'
  ...
# Subtest: a rendered slide names an uploaded family by leading a stack with it
ok 209 - a rendered slide names an uploaded family by leading a stack with it
  ---
  duration_ms: 0.847685
  type: 'test'
  ...
# Subtest: a change that brings in an uploaded family this tab never knew is checked, and waits for it
ok 210 - a change that brings in an uploaded family this tab never knew is checked, and waits for it
  ---
  duration_ms: 13.019782
  type: 'test'
  ...
# Subtest: an uploaded family already on screen in its fallback is committed there when learned, never loaded
ok 211 - an uploaded family already on screen in its fallback is committed there when learned, never loaded
  ---
  duration_ms: 4.307939
  type: 'test'
  ...
# Subtest: a family whose faces change is learned again, and its new set joins in place of the old, once all have loaded
ok 212 - a family whose faces change is learned again, and its new set joins in place of the old, once all have loaded
  ---
  duration_ms: 8.057839
  type: 'test'
  ...
# Subtest: a new set late past its timeout leaves the old set on the page, never a fallback
ok 213 - a new set late past its timeout leaves the old set on the page, never a fallback
  ---
  duration_ms: 3.976572
  type: 'test'
  ...
# Subtest: the editor: picking the grown family waits for its new set; undo and redo swap sets with the change
ok 214 - the editor: picking the grown family waits for its new set; undo and redo swap sets with the change
  ---
  duration_ms: 17.588556
  type: 'test'
  ...
# Subtest: a change refused while its new set loads leaves the tab on the deck's own set
ok 215 - a change refused while its new set loads leaves the tab on the deck's own set
  ---
  duration_ms: 4.983035
  type: 'test'
  ...
# Subtest: a range carrying the mark is pressed; one without is not
ok 216 - a range carrying the mark is pressed; one without is not
  ---
  duration_ms: 2.362287
  type: 'test'
  ...
# Subtest: at a cursor, the stored marks decide
ok 217 - at a cursor, the stored marks decide
  ---
  duration_ms: 0.650482
  type: 'test'
  ...
# Subtest: focus moving to another place to type lets go; to a button keeps the view
ok 218 - focus moving to another place to type lets go; to a button keeps the view
  ---
  duration_ms: 0.336641
  type: 'test'
  ...
# Subtest: the whole card is the bar: its own fields keep the view
ok 219 - the whole card is the bar: its own fields keep the view
  ---
  duration_ms: 0.213358
  type: 'test'
  ...
# Subtest: the marks act on the box the card shows, and on no other
ok 220 - the marks act on the box the card shows, and on no other
  ---
  duration_ms: 0.318615
  type: 'test'
  ...
# Subtest: a view's box is the nearest block around it: a table cell's is the table
ok 221 - a view's box is the nearest block around it: a table cell's is the table
  ---
  duration_ms: 0.189926
  type: 'test'
  ...
# Subtest: an empty body is no frames
ok 222 - an empty body is no frames
  ---
  duration_ms: 1.406974
  type: 'test'
  ...
# Subtest: frames come back in order with their exact bytes
ok 223 - frames come back in order with their exact bytes
  ---
  duration_ms: 0.378446
  type: 'test'
  ...
# Subtest: a length prefix is big-endian
ok 224 - a length prefix is big-endian
  ---
  duration_ms: 0.348245
  type: 'test'
  ...
# Subtest: a truncated frame throws rather than returning a short update
ok 225 - a truncated frame throws rather than returning a short update
  ---
  duration_ms: 1.329067
  type: 'test'
  ...
# Subtest: Format writes the cookie the server reads, and flips the card and its toggles
ok 226 - Format writes the cookie the server reads, and flips the card and its toggles
  ---
  duration_ms: 3.930089
  type: 'test'
  ...
# Subtest: the View menu row toggles the card too, and keeps aria-pressed with the button
ok 227 - the View menu row toggles the card too, and keeps aria-pressed with the button
  ---
  duration_ms: 0.73668
  type: 'test'
  ...
# Subtest: the first paint is the server's: mounting writes nothing and changes nothing
ok 228 - the first paint is the server's: mounting writes nothing and changes nothing
  ---
  duration_ms: 0.466888
  type: 'test'
  ...
# Subtest: an old localStorage 'off' with no cookie is applied once, moved to the cookie as closed, and removed
ok 229 - an old localStorage 'off' with no cookie is applied once, moved to the cookie as closed, and removed
  ---
  duration_ms: 2.115219
  type: 'test'
  ...
# Subtest: an old localStorage 'on' with no cookie is applied once, moved to the cookie as open, and removed
ok 230 - an old localStorage 'on' with no cookie is applied once, moved to the cookie as open, and removed
  ---
  duration_ms: 0.990605
  type: 'test'
  ...
# Subtest: with a cookie already set, an old localStorage key is dropped and not applied
ok 231 - with a cookie already set, an old localStorage key is dropped and not applied
  ---
  duration_ms: 0.803617
  type: 'test'
  ...
# Subtest: with cookies blocked, Format still shows and hides the card for this page
ok 232 - with cookies blocked, Format still shows and hides the card for this page
  ---
  duration_ms: 0.638684
  type: 'test'
  ...
# Subtest: with site data blocked (localStorage throws), the toggle still works
ok 233 - with site data blocked (localStorage throws), the toggle still works
  ---
  duration_ms: 0.352053
  type: 'test'
  ...
# Subtest: showInspector(true, {focus}) focuses the card's first showing control; hiding gives focus back
ok 234 - showInspector(true, {focus}) focuses the card's first showing control; hiding gives focus back
  ---
  duration_ms: 0.872112
  type: 'test'
  ...
# Subtest: Format from the keyboard moves focus into the card; from a pointer it does not
ok 235 - Format from the keyboard moves focus into the card; from a pointer it does not
  ---
  duration_ms: 0.886581
  type: 'test'
  ...
# Subtest: asking to delete a slide shows a hidden card, with focus
ok 236 - asking to delete a slide shows a hidden card, with focus
  ---
  duration_ms: 0.341015
  type: 'test'
  ...
# Subtest: on https the cookie is Secure
ok 237 - on https the cookie is Secure
  ---
  duration_ms: 1.287587
  type: 'test'
  ...
# Subtest: opened from the View menu by keyboard, the card gives focus back to the menu's button, not its hidden row
ok 238 - opened from the View menu by keyboard, the card gives focus back to the menu's button, not its hidden row
  ---
  duration_ms: 0.343715
  type: 'test'
  ...
# Subtest: dismissed from inside the card through the View row, focus goes to the menu's button
ok 239 - dismissed from inside the card through the View row, focus goes to the menu's button
  ---
  duration_ms: 0.323474
  type: 'test'
  ...
# Subtest: a return target that can no longer take focus falls back to Format
ok 240 - a return target that can no longer take focus falls back to Format
  ---
  duration_ms: 0.315971
  type: 'test'
  ...
# Subtest: asking to delete from a strip item's menu returns focus to that menu's button
ok 241 - asking to delete from a strip item's menu returns focus to that menu's button
  ---
  duration_ms: 0.316947
  type: 'test'
  ...
# Subtest: focus into the card reaches a radio group at its checked radio
ok 242 - focus into the card reaches a radio group at its checked radio
  ---
  duration_ms: 0.243044
  type: 'test'
  ...
# Subtest: the bar's title is the one place the deck's title is edited: a change is commitTitle
ok 243 - the bar's title is the one place the deck's title is edited: a change is commitTitle
  ---
  duration_ms: 0.595778
  type: 'test'
  ...
# Subtest: a menu row's dialog opens modal, and on close focus goes to the menu's title
ok 244 - a menu row's dialog opens modal, and on close focus goes to the menu's title
  ---
  duration_ms: 0.395041
  type: 'test'
  ...
# Subtest: an Insert row adds its kind through commands.addBlock, and closes the menu
ok 245 - an Insert row adds its kind through commands.addBlock, and closes the menu
  ---
  duration_ms: 0.754305
  type: 'test'
  ...
# Subtest: View → Outline opens the Outline under the View menu's title, and leaves the card alone
ok 246 - View → Outline opens the Outline under the View menu's title, and leaves the card alone
  ---
  duration_ms: 0.390877
  type: 'test'
  ...
# Subtest: it starts on the slide, as the server rendered it
ok 247 - it starts on the slide, as the server rendered it
  ---
  duration_ms: 1.738013
  type: 'test'
  ...
# Subtest: a box selected shows the box
ok 248 - a box selected shows the box
  ---
  duration_ms: 1.645601
  type: 'test'
  ...
# Subtest: nothing selected shows the slide
ok 249 - nothing selected shows the slide
  ---
  duration_ms: 0.165253
  type: 'test'
  ...
# Subtest: the selected box gone (deleted, or its creation undone) shows the slide, never an empty box
ok 250 - the selected box gone (deleted, or its creation undone) shows the slide, never an empty box
  ---
  duration_ms: 0.162263
  type: 'test'
  ...
# Subtest: the caret in the notes shows the notes
ok 251 - the caret in the notes shows the notes
  ---
  duration_ms: 0.335168
  type: 'test'
  ...
# Subtest: with the caret in the notes, nothing selected stays on the notes; a box selected shows the box
ok 252 - with the caret in the notes, nothing selected stays on the notes; a box selected shows the box
  ---
  duration_ms: 0.163564
  type: 'test'
  ...
# Subtest: the caret back on the stage leaves the kind to the selection
ok 253 - the caret back on the stage leaves the kind to the selection
  ---
  duration_ms: 0.359403
  type: 'test'
  ...
# Subtest: reset shows the slide, from anything
ok 254 - reset shows the slide, from anything
  ---
  duration_ms: 0.234532
  type: 'test'
  ...
# Subtest: onChange hears a change of kind only, never a repeat
ok 255 - onChange hears a change of kind only, never a repeat
  ---
  duration_ms: 0.559229
  type: 'test'
  ...
# Subtest: a box, the notes, then the same box again shows the box
ok 256 - a box, the notes, then the same box again shows the box
  ---
  duration_ms: 0.611929
  type: 'test'
  ...
# Subtest: no slide left (a colleague removed the last one) shows the deck, from the notes or a box
ok 257 - no slide left (a colleague removed the last one) shows the deck, from the notes or a box
  ---
  duration_ms: 0.360339
  type: 'test'
  ...
# Subtest: a slide shown keeps the card as it was: the notes stay the notes
ok 258 - a slide shown keeps the card as it was: the notes stay the notes
  ---
  duration_ms: 0.133451
  type: 'test'
  ...
# Subtest: appearsOf: with the slide, on a press, item by item
ok 259 - appearsOf: with the slide, on a press, item by item
  ---
  duration_ms: 1.227986
  type: 'test'
  ...
# Subtest: appearsOps: On a press takes the next step after the largest
ok 260 - appearsOps: On a press takes the next step after the largest
  ---
  duration_ms: 1.378128
  type: 'test'
  ...
# Subtest: appearsOps: With the slide clears the step and the items
ok 261 - appearsOps: With the slide clears the step and the items
  ---
  duration_ms: 0.327522
  type: 'test'
  ...
# Subtest: appearsOps: Item by item is a list's, and gives it a press when it has none
ok 262 - appearsOps: Item by item is a list's, and gives it a press when it has none
  ---
  duration_ms: 0.241183
  type: 'test'
  ...
# Subtest: afterOps: the midpoint between the press and the next one, nothing renumbered
ok 263 - afterOps: the midpoint between the press and the next one, nothing renumbered
  ---
  duration_ms: 1.624027
  type: 'test'
  ...
# Subtest: afterOps: the box ends up in the press after the one chosen
ok 264 - afterOps: the box ends up in the press after the one chosen
  ---
  duration_ms: 0.3207
  type: 'test'
  ...
# Subtest: afterChoices: each press of the other boxes, by number; an item-by-item list counts its items
ok 265 - afterChoices: each press of the other boxes, by number; an item-by-item list counts its items
  ---
  duration_ms: 0.48314
  type: 'test'
  ...
# Subtest: appearsShown: Item by item is offered on a list alone
ok 266 - appearsShown: Item by item is offered on a list alone
  ---
  duration_ms: 0.419745
  type: 'test'
  ...
# Subtest: marksFor: press numbers in press order, not step values; a list item by item numbers each item
ok 267 - marksFor: press numbers in press order, not step values; a list item by item numbers each item
  ---
  duration_ms: 0.783181
  type: 'test'
  ...
# Subtest: a scene block counts in the editor's press numbering, and After… never offers press value 0
ok 268 - a scene block counts in the editor's press numbering, and After… never offers press value 0
  ---
  duration_ms: 2.271165
  type: 'test'
  ...
# Subtest: deck controls are set_meta
ok 269 - deck controls are set_meta
  ---
  duration_ms: 14.354813
  type: 'test'
  ...
# Subtest: slide controls are set_slide, and background keeps its colour
ok 270 - slide controls are set_slide, and background keeps its colour
  ---
  duration_ms: 5.221089
  type: 'test'
  ...
# Subtest: move up and down are move_slide with the right after
ok 271 - move up and down are move_slide with the right after
  ---
  duration_ms: 2.375643
  type: 'test'
  ...
# Subtest: block props: value kinds, region, a shape label
ok 272 - block props: value kinds, region, a shape label
  ---
  duration_ms: 2.259554
  type: 'test'
  ...
# Subtest: box fields are set_block on the desktop and set_phone in the phone view
ok 273 - box fields are set_block on the desktop and set_phone in the phone view
  ---
  duration_ms: 2.124585
  type: 'test'
  ...
# Subtest: move block and the layer buttons
ok 274 - move block and the layer buttons
  ---
  duration_ms: 1.954885
  type: 'test'
  ...
# Subtest: add block: region after the selection on flow, a default box on canvas, a heading level that fits
ok 275 - add block: region after the selection on flow, a default box on canvas, a heading level that fits
  ---
  duration_ms: 9.105903
  type: 'test'
  ...
# Subtest: a block is named by its type and its first words
ok 276 - a block is named by its type and its first words
  ---
  duration_ms: 2.609636
  type: 'test'
  ...
# Subtest: blockChange: a control element to its op
ok 277 - blockChange: a control element to its op
  ---
  duration_ms: 2.103103
  type: 'test'
  ...
# Subtest: a segmented choice: setValue checks the radio for the value, and its change is the prop
ok 278 - a segmented choice: setValue checks the radio for the value, and its change is the prop
  ---
  duration_ms: 1.888453
  type: 'test'
  ...
# Subtest: corner radius shows for an image and a rectangle, not for a shape with no corners
ok 279 - corner radius shows for an image and a rectangle, not for a shape with no corners
  ---
  duration_ms: 3.343983
  type: 'test'
  ...
# Subtest: a shape's swatches show what the slide shows: no fill as none, no stroke in the ink
ok 280 - a shape's swatches show what the slide shows: no fill as none, no stroke in the ink
  ---
  duration_ms: 2.03562
  type: 'test'
  ...
# Subtest: Position and size keeps open or closed across a remount, in memory only
ok 281 - Position and size keeps open or closed across a remount, in memory only
  ---
  duration_ms: 6.634457
  type: 'test'
  ...
# Subtest: setValue leaves the focused select alone, except in a forced fill (undo, redo)
ok 282 - setValue leaves the focused select alone, except in a forced fill (undo, redo)
  ---
  duration_ms: 0.196841
  type: 'test'
  ...
# Subtest: litFor: Free placement on a canvas slide, else the template
ok 283 - litFor: Free placement on a canvas slide, else the template
  ---
  duration_ms: 1.283361
  type: 'test'
  ...
# Subtest: pickOps: the four cases, op for op
ok 284 - pickOps: the four cases, op for op
  ---
  duration_ms: 0.999943
  type: 'test'
  ...
# Subtest: the pictures are the seven templates, then Free placement
ok 285 - the pictures are the seven templates, then Free placement
  ---
  duration_ms: 0.170169
  type: 'test'
  ...
# Subtest: fill lights exactly one picture: the template, or Free placement
ok 286 - fill lights exactly one picture: the template, or Free placement
  ---
  duration_ms: 2.282679
  type: 'test'
  ...
# Subtest: a choice on a flow slide commits its op, and asks nothing
ok 287 - a choice on a flow slide commits its op, and asks nothing
  ---
  duration_ms: 3.891811
  type: 'test'
  ...
# Subtest: a template on a canvas slide asks in the card first and commits nothing
ok 288 - a template on a canvas slide asks in the card first and commits nothing
  ---
  duration_ms: 1.028076
  type: 'test'
  ...
# Subtest: its action commits both ops in one commit call
ok 289 - its action commits both ops in one commit call
  ---
  duration_ms: 1.039052
  type: 'test'
  ...
# Subtest: cancel commits nothing and lights Free placement again
ok 290 - cancel commits nothing and lights Free placement again
  ---
  duration_ms: 1.084716
  type: 'test'
  ...
# Subtest: choosing Free placement again while asked withdraws the question
ok 291 - choosing Free placement again while asked withdraws the question
  ---
  duration_ms: 1.094202
  type: 'test'
  ...
# Subtest: fill after the slide became flow elsewhere withdraws the question, and the action commits nothing
ok 292 - fill after the slide became flow elsewhere withdraws the question, and the action commits nothing
  ---
  duration_ms: 1.45817
  type: 'test'
  ...
# Subtest: fill on another slide, or none, withdraws the question
ok 293 - fill on another slide, or none, withdraws the question
  ---
  duration_ms: 1.071115
  type: 'test'
  ...
# Subtest: Escape in a row's popover closes it, focuses its row, and goes no further
ok 294 - Escape in a row's popover closes it, focuses its row, and goes no further
  ---
  duration_ms: 2.076676
  type: 'test'
  ...
# Subtest: destroy takes every listener off the form
ok 295 - destroy takes every listener off the form
  ---
  duration_ms: 0.596093
  type: 'test'
  ...
# Subtest: open resolves to the button that closed it and the trimmed field
ok 296 - open resolves to the button that closed it and the trimmed field
  ---
  duration_ms: 1.733415
  type: 'test'
  ...
# Subtest: a second open while the dialog is up joins the first
ok 297 - a second open while the dialog is up joins the first
  ---
  duration_ms: 0.240071
  type: 'test'
  ...
# Subtest: a missing dialog mounts as nothing
ok 298 - a missing dialog mounts as nothing
  ---
  duration_ms: 0.144879
  type: 'test'
  ...
# Subtest: a tab advances its own cursor only when its POST is the very next row
ok 299 - a tab advances its own cursor only when its POST is the very next row
  ---
  duration_ms: 1.452609
  type: 'test'
  ...
# Subtest: the cursor never moves backwards when a response is overtaken by this tab's own write
ok 300 - the cursor never moves backwards when a response is overtaken by this tab's own write
  ---
  duration_ms: 0.646588
  type: 'test'
  ...
# Subtest: a later response still carries the cursor forward
ok 301 - a later response still carries the cursor forward
  ---
  duration_ms: 0.39937
  type: 'test'
  ...
# Subtest: a burst of notifications collapses into one fetch at a time
ok 302 - a burst of notifications collapses into one fetch at a time
  ---
  duration_ms: 0.265014
  type: 'test'
  ...
# Subtest: an event naming a seq the tab already has fetches nothing
ok 303 - an event naming a seq the tab already has fetches nothing
  ---
  duration_ms: 0.394042
  type: 'test'
  ...
# Subtest: a stopped subscriber drops a response that arrives late
ok 304 - a stopped subscriber drops a response that arrives late
  ---
  duration_ms: 0.285257
  type: 'test'
  ...
# Subtest: stop closes the stream, and start opens exactly one
ok 305 - stop closes the stream, and start opens exactly one
  ---
  duration_ms: 0.320584
  type: 'test'
  ...
# Subtest: a hidden tab closes its stream on a shortened deadline, and activity reopens it
ok 306 - a hidden tab closes its stream on a shortened deadline, and activity reopens it
  ---
  duration_ms: 0.893608
  type: 'test'
  ...
# Subtest: switching away and back inside the grace never drops the stream, so nothing has to be caught up
ok 307 - switching away and back inside the grace never drops the stream, so nothing has to be caught up
  ---
  duration_ms: 0.888914
  type: 'test'
  ...
# Subtest: a visible tab that is only being READ closes when idle and comes back on any activity
ok 308 - a visible tab that is only being READ closes when idle and comes back on any activity
  ---
  duration_ms: 0.720194
  type: 'test'
  ...
# Subtest: activity while streaming defers the idle close rather than reopening anything
ok 309 - activity while streaming defers the idle close rather than reopening anything
  ---
  duration_ms: 0.309967
  type: 'test'
  ...
# Subtest: a stream failure is never reported as a save failure, and heals on activity
ok 310 - a stream failure is never reported as a save failure, and heals on activity
  ---
  duration_ms: 1.530373
  type: 'test'
  ...
# Subtest: an empty response advances the cursor without applying anything
ok 311 - an empty response advances the cursor without applying anything
  ---
  duration_ms: 0.205337
  type: 'test'
  ...
# Subtest: a failed fetch leaves the cursor alone so the next notification retries it
ok 312 - a failed fetch leaves the cursor alone so the next notification retries it
  ---
  duration_ms: 0.216888
  type: 'test'
  ...
# Subtest: a decode failure retries once through the raw log, then gives up
ok 313 - a decode failure retries once through the raw log, then gives up
  ---
  duration_ms: 0.287256
  type: 'test'
  ...
# Subtest: updatesURL spells the query string exactly, in particular raw as the literal raw=1
ok 314 - updatesURL spells the query string exactly, in particular raw as the literal raw=1
  ---
  duration_ms: 0.143833
  type: 'test'
  ...
# Subtest: leaving the page closes the stream at once, and coming back reopens it and catches up
ok 315 - leaving the page closes the stream at once, and coming back reopens it and catches up
  ---
  duration_ms: 0.337231
  type: 'test'
  ...
# Subtest: a page left before its subscriber starts never opens a stream
ok 316 - a page left before its subscriber starts never opens a stream
  ---
  duration_ms: 0.140182
  type: 'test'
  ...
# Subtest: moves vectors
    # Subtest: next through a slide
    ok 1 - next through a slide
      ---
      duration_ms: 1.943351
      type: 'test'
      ...
    # Subtest: next through a slide to its last press
    ok 2 - next through a slide to its last press
      ---
      duration_ms: 0.229067
      type: 'test'
      ...
    # Subtest: next across slides with no steps
    ok 3 - next across slides with no steps
      ---
      duration_ms: 0.461449
      type: 'test'
      ...
    # Subtest: next across slides skips full only and parked in core
    ok 4 - next across slides skips full only and parked in core
      ---
      duration_ms: 0.368225
      type: 'test'
      ...
    # Subtest: next across slides shows full only in full
    ok 5 - next across slides shows full only in full
      ---
      duration_ms: 0.299576
      type: 'test'
      ...
    # Subtest: next across slides skips parked in full
    ok 6 - next across slides skips parked in full
      ---
      duration_ms: 0.217701
      type: 'test'
      ...
    # Subtest: next from a step above the count leaves the slide
    ok 7 - next from a step above the count leaves the slide
      ---
      duration_ms: 0.161187
      type: 'test'
      ...
    # Subtest: next at the end of the talk stays
    ok 8 - next at the end of the talk stays
      ---
      duration_ms: 0.338277
      type: 'test'
      ...
    # Subtest: back through a slide
    ok 9 - back through a slide
      ---
      duration_ms: 0.601989
      type: 'test'
      ...
    # Subtest: back lands fully built
    ok 10 - back lands fully built
      ---
      duration_ms: 0.418969
      type: 'test'
      ...
    # Subtest: back lands fully built on a full only slide in full
    ok 11 - back lands fully built on a full only slide in full
      ---
      duration_ms: 0.241405
      type: 'test'
      ...
    # Subtest: back across a slide with no steps
    ok 12 - back across a slide with no steps
      ---
      duration_ms: 0.122556
      type: 'test'
      ...
    # Subtest: back at the start of the talk stays
    ok 13 - back at the start of the talk stays
      ---
      duration_ms: 0.078367
      type: 'test'
      ...
    # Subtest: back at the start skips a full only first slide in core
    ok 14 - back at the start skips a full only first slide in core
      ---
      duration_ms: 0.07441
      type: 'test'
      ...
    # Subtest: first
    ok 15 - first
      ---
      duration_ms: 0.06584
      type: 'test'
      ...
    # Subtest: first in core skips a full only first slide
    ok 16 - first in core skips a full only first slide
      ---
      duration_ms: 0.090791
      type: 'test'
      ...
    # Subtest: first in full
    ok 17 - first in full
      ---
      duration_ms: 0.065169
      type: 'test'
      ...
    # Subtest: last
    ok 18 - last
      ---
      duration_ms: 0.058326
      type: 'test'
      ...
    # Subtest: last skips a parked last slide
    ok 19 - last skips a parked last slide
      ---
      duration_ms: 0.06877
      type: 'test'
      ...
    # Subtest: goto lands at step 0
    ok 20 - goto lands at step 0
      ---
      duration_ms: 0.065509
      type: 'test'
      ...
    # Subtest: goto the current slide goes back to step 0
    ok 21 - goto the current slide goes back to step 0
      ---
      duration_ms: 0.059021
      type: 'test'
      ...
    # Subtest: goto a full only slide from core switches to full
    ok 22 - goto a full only slide from core switches to full
      ---
      duration_ms: 0.057972
      type: 'test'
      ...
    # Subtest: goto a parked slide changes nothing
    ok 23 - goto a parked slide changes nothing
      ---
      duration_ms: 0.054797
      type: 'test'
      ...
    # Subtest: goto a missing slide changes nothing
    ok 24 - goto a missing slide changes nothing
      ---
      duration_ms: 0.050455
      type: 'test'
      ...
    # Subtest: goto with no slide changes nothing
    ok 25 - goto with no slide changes nothing
      ---
      duration_ms: 0.070481
      type: 'test'
      ...
    # Subtest: mode flips core to full and keeps the position
    ok 26 - mode flips core to full and keeps the position
      ---
      duration_ms: 0.066987
      type: 'test'
      ...
    # Subtest: mode flips full to core on a full only slide and keeps the position
    ok 27 - mode flips full to core on a full only slide and keeps the position
      ---
      duration_ms: 0.056226
      type: 'test'
      ...
    # Subtest: mode keeps black
    ok 28 - mode keeps black
      ---
      duration_ms: 0.05081
      type: 'test'
      ...
    # Subtest: next on a full only slide in core steps through it
    ok 29 - next on a full only slide in core steps through it
      ---
      duration_ms: 0.269055
      type: 'test'
      ...
    # Subtest: next on a full only slide in core leaves by its place in the deck
    ok 30 - next on a full only slide in core leaves by its place in the deck
      ---
      duration_ms: 0.090814
      type: 'test'
      ...
    # Subtest: back on a full only slide in core leaves by its place in the deck
    ok 31 - back on a full only slide in core leaves by its place in the deck
      ---
      duration_ms: 0.079467
      type: 'test'
      ...
    # Subtest: next on a parked slide leaves by its place in the deck
    ok 32 - next on a parked slide leaves by its place in the deck
      ---
      duration_ms: 0.066443
      type: 'test'
      ...
    # Subtest: back on a parked slide leaves by its place in the deck
    ok 33 - back on a parked slide leaves by its place in the deck
      ---
      duration_ms: 0.075325
      type: 'test'
      ...
    # Subtest: next from a missing slide lands where settle would
    ok 34 - next from a missing slide lands where settle would
      ---
      duration_ms: 0.186092
      type: 'test'
      ...
    # Subtest: black turns the screen black
    ok 35 - black turns the screen black
      ---
      duration_ms: 0.081682
      type: 'test'
      ...
    # Subtest: black again lifts it
    ok 36 - black again lifts it
      ---
      duration_ms: 0.060126
      type: 'test'
      ...
    # Subtest: next lifts black
    ok 37 - next lifts black
      ---
      duration_ms: 0.069391
      type: 'test'
      ...
    # Subtest: next at the end lifts black and stays
    ok 38 - next at the end lifts black and stays
      ---
      duration_ms: 1.042183
      type: 'test'
      ...
    # Subtest: back lifts black
    ok 39 - back lifts black
      ---
      duration_ms: 0.108785
      type: 'test'
      ...
    # Subtest: back at the start lifts black and stays
    ok 40 - back at the start lifts black and stays
      ---
      duration_ms: 0.079338
      type: 'test'
      ...
    # Subtest: first lifts black
    ok 41 - first lifts black
      ---
      duration_ms: 0.05801
      type: 'test'
      ...
    # Subtest: last lifts black
    ok 42 - last lifts black
      ---
      duration_ms: 0.051664
      type: 'test'
      ...
    # Subtest: goto lifts black
    ok 43 - goto lifts black
      ---
      duration_ms: 0.058338
      type: 'test'
      ...
    # Subtest: an unknown move changes nothing
    ok 44 - an unknown move changes nothing
      ---
      duration_ms: 0.054773
      type: 'test'
      ...
    # Subtest: empty talk: next
    ok 45 - empty talk: next
      ---
      duration_ms: 0.093385
      type: 'test'
      ...
    # Subtest: empty talk: back
    ok 46 - empty talk: back
      ---
      duration_ms: 0.05799
      type: 'test'
      ...
    # Subtest: empty talk: first and last
    ok 47 - empty talk: first and last
      ---
      duration_ms: 0.052984
      type: 'test'
      ...
    # Subtest: empty talk: mode flips and nothing else
    ok 48 - empty talk: mode flips and nothing else
      ---
      duration_ms: 0.049599
      type: 'test'
      ...
    # Subtest: empty talk: goto a parked slide changes nothing
    ok 49 - empty talk: goto a parked slide changes nothing
      ---
      duration_ms: 0.049975
      type: 'test'
      ...
    # Subtest: start: the first slide of the core talk
    ok 50 - start: the first slide of the core talk
      ---
      duration_ms: 0.128266
      type: 'test'
      ...
    # Subtest: start skips a full only first slide
    ok 51 - start skips a full only first slide
      ---
      duration_ms: 0.065035
      type: 'test'
      ...
    # Subtest: start of an empty talk
    ok 52 - start of an empty talk
      ---
      duration_ms: 0.054203
      type: 'test'
      ...
    # Subtest: settle: a position in the talk stays
    ok 53 - settle: a position in the talk stays
      ---
      duration_ms: 0.08157
      type: 'test'
      ...
    # Subtest: settle: a step above the count clamps to the count
    ok 54 - settle: a step above the count clamps to the count
      ---
      duration_ms: 0.067564
      type: 'test'
      ...
    # Subtest: settle: a step below 0 clamps to 0
    ok 55 - settle: a step below 0 clamps to 0
      ---
      duration_ms: 0.064729
      type: 'test'
      ...
    # Subtest: settle: a parked slide becomes the next slide of the order after it
    ok 56 - settle: a parked slide becomes the next slide of the order after it
      ---
      duration_ms: 0.086011
      type: 'test'
      ...
    # Subtest: settle: a parked slide with nothing after it becomes the last
    ok 57 - settle: a parked slide with nothing after it becomes the last
      ---
      duration_ms: 0.080042
      type: 'test'
      ...
    # Subtest: settle: a missing slide with no place known becomes the last
    ok 58 - settle: a missing slide with no place known becomes the last
      ---
      duration_ms: 0.059283
      type: 'test'
      ...
    # Subtest: settle: a full only slide in core stays, its step clamped
    ok 59 - settle: a full only slide in core stays, its step clamped
      ---
      duration_ms: 0.064813
      type: 'test'
      ...
    # Subtest: settle: no slide yet becomes the first
    ok 60 - settle: no slide yet becomes the first
      ---
      duration_ms: 0.118511
      type: 'test'
      ...
    # Subtest: settle: an empty talk gives only the mode
    ok 61 - settle: an empty talk gives only the mode
      ---
      duration_ms: 0.131729
      type: 'test'
      ...
    # Subtest: settle near: deleting B from A-B-C-D lands on C
    ok 62 - settle near: deleting B from A-B-C-D lands on C
      ---
      duration_ms: 0.135792
      type: 'test'
      ...
    # Subtest: settle near: deleting the last slide lands on the new last
    ok 63 - settle near: deleting the last slide lands on the new last
      ---
      duration_ms: 0.076493
      type: 'test'
      ...
    # Subtest: settle near: deleting the only full-only slide while in core
    ok 64 - settle near: deleting the only full-only slide while in core
      ---
      duration_ms: 0.060182
      type: 'test'
      ...
    # Subtest: settle near: a full-only follower is skipped in core
    ok 65 - settle near: a full-only follower is skipped in core
      ---
      duration_ms: 0.116392
      type: 'test'
      ...
    # Subtest: settle near: a full-only follower is kept in full
    ok 66 - settle near: a full-only follower is kept in full
      ---
      duration_ms: 0.084842
      type: 'test'
      ...
    # Subtest: settle near: nothing in the mode after it gives the last
    ok 67 - settle near: nothing in the mode after it gives the last
      ---
      duration_ms: 0.068679
      type: 'test'
      ...
    # Subtest: settle near: deleting all but one
    ok 68 - settle near: deleting all but one
      ---
      duration_ms: 0.063854
      type: 'test'
      ...
    # Subtest: settle near: deleting all but one, from the middle
    ok 69 - settle near: deleting all but one, from the middle
      ---
      duration_ms: 0.062877
      type: 'test'
      ...
    # Subtest: settle near: -1 is no place known, the last
    ok 70 - settle near: -1 is no place known, the last
      ---
      duration_ms: 0.070107
      type: 'test'
      ...
    # Subtest: settle near: a parked slide goes by its own place, not near
    ok 71 - settle near: a parked slide goes by its own place, not near
      ---
      duration_ms: 0.06659
      type: 'test'
      ...
    # Subtest: settle near: a slide still there clamps its step as settle does
    ok 72 - settle near: a slide still there clamps its step as settle does
      ---
      duration_ms: 0.100405
      type: 'test'
      ...
    # Subtest: settle near: an empty talk gives only the mode
    ok 73 - settle near: an empty talk gives only the mode
      ---
      duration_ms: 0.093559
      type: 'test'
      ...
    1..73
ok 317 - moves vectors
  ---
  duration_ms: 19.327938
  type: 'test'
  ...
# Subtest: talkOrder leaves out parked slides, and full-only ones in core
ok 318 - talkOrder leaves out parked slides, and full-only ones in core
  ---
  duration_ms: 0.157432
  type: 'test'
  ...
# Subtest: the keys are the ones the switch used, and the new height key
ok 319 - the keys are the ones the switch used, and the new height key
  ---
  duration_ms: 1.606031
  type: 'test'
  ...
# Subtest: the cookies are the ones the server reads
ok 320 - the cookies are the ones the server reads
  ---
  duration_ms: 0.27027
  type: 'test'
  ...
# Subtest: open, close and toggle set data-state and remember open/closed in the cookie
ok 321 - open, close and toggle set data-state and remember open/closed in the cookie
  ---
  duration_ms: 1.485366
  type: 'test'
  ...
# Subtest: mounting keeps the state the server painted and writes nothing
ok 322 - mounting keeps the state the server painted and writes nothing
  ---
  duration_ms: 1.079843
  type: 'test'
  ...
# Subtest: a localStorage preference from before the cookies is honoured once, moved to the cookies and removed
ok 323 - a localStorage preference from before the cookies is honoured once, moved to the cookies and removed
  ---
  duration_ms: 1.142893
  type: 'test'
  ...
# Subtest: cookies and storage that throw leave the notes working for the visit
ok 324 - cookies and storage that throw leave the notes working for the visit
  ---
  duration_ms: 0.765316
  type: 'test'
  ...
# Subtest: the × closes and moves focus to the tab; the tab opens and moves focus into the notes
ok 325 - the × closes and moves focus to the tab; the tab opens and moves focus into the notes
  ---
  duration_ms: 0.589804
  type: 'test'
  ...
# Subtest: mounting does not take focus
ok 326 - mounting does not take focus
  ---
  duration_ms: 0.360036
  type: 'test'
  ...
# Subtest: HEAD_PX is the card less its body as editor.css draws it: a hairline (1 + 1) and 12px of padding above and below
ok 327 - HEAD_PX is the card less its body as editor.css draws it: a hairline (1 + 1) and 12px of padding above and below
  ---
  duration_ms: 0.365669
  type: 'test'
  ...
# Subtest: clampHeight: at least two lines and the head, at most half the desk
ok 328 - clampHeight: at least two lines and the head, at most half the desk
  ---
  duration_ms: 0.519855
  type: 'test'
  ...
# Subtest: the height is the remembered one, clamped, written as a CSS length and as the separator's value
ok 329 - the height is the remembered one, clamped, written as a CSS length and as the separator's value
  ---
  duration_ms: 0.547985
  type: 'test'
  ...
# Subtest: ArrowUp and ArrowDown move the height by 16px, Home and End go to the limits, each remembered
ok 330 - ArrowUp and ArrowDown move the height by 16px, Home and End go to the limits, each remembered
  ---
  duration_ms: 0.440575
  type: 'test'
  ...
# Subtest: dragging the top edge up makes the notes taller, within the limits, and remembers on release
ok 331 - dragging the top edge up makes the notes taller, within the limits, and remembers on release
  ---
  duration_ms: 0.349992
  type: 'test'
  ...
# Subtest: a stored height clamped on mount: ArrowDown moves from what is shown, and that is remembered
ok 332 - a stored height clamped on mount: ArrowDown moves from what is shown, and that is remembered
  ---
  duration_ms: 0.24202
  type: 'test'
  ...
# Subtest: a desk that shrinks after mount: the next key starts from the height now shown
ok 333 - a desk that shrinks after mount: the next key starts from the height now shown
  ---
  duration_ms: 0.26878
  type: 'test'
  ...
# Subtest: a window resize narrows what is shown and keeps the preferred height for when the room comes back
ok 334 - a window resize narrows what is shown and keeps the preferred height for when the room comes back
  ---
  duration_ms: 0.215536
  type: 'test'
  ...
# Subtest: a drag after clamping moves from the shown height on its first pixel
ok 335 - a drag after clamping moves from the shown height on its first pixel
  ---
  duration_ms: 0.202881
  type: 'test'
  ...
# Subtest: refresh() writes the tab's text: the word for notes, and the count of words when there are any
ok 336 - refresh() writes the tab's text: the word for notes, and the count of words when there are any
  ---
  duration_ms: 0.321856
  type: 'test'
  ...
# Subtest: refresh() writes nothing when the tab already says it (the server's first paint)
ok 337 - refresh() writes nothing when the tab already says it (the server's first paint)
  ---
  duration_ms: 0.232711
  type: 'test'
  ...
# Subtest: countWords: what the server counts (strings.Fields of the plain text), through paragraphs and runs
ok 338 - countWords: what the server counts (strings.Fields of the plain text), through paragraphs and runs
  ---
  duration_ms: 0.663508
  type: 'test'
  ...
# Subtest: empty_doc_views_as_defaults
ok 339 - empty_doc_views_as_defaults
  ---
  duration_ms: 4.013157
  type: 'test'
  ...
# Subtest: set_meta
ok 340 - set_meta
  ---
  duration_ms: 3.324263
  type: 'test'
  ...
# Subtest: slides: add, move, remove, set_slide, set_notes
ok 341 - slides: add, move, remove, set_slide, set_notes
  ---
  duration_ms: 7.411891
  type: 'test'
  ...
# Subtest: duplicate_slide
ok 342 - duplicate_slide
  ---
  duration_ms: 4.042807
  type: 'test'
  ...
# Subtest: blocks: add, move, remove, set_block
ok 343 - blocks: add, move, remove, set_block
  ---
  duration_ms: 4.918135
  type: 'test'
  ...
# Subtest: set_phone
ok 344 - set_phone
  ---
  duration_ms: 1.408731
  type: 'test'
  ...
# Subtest: table cells follow rows and cols
ok 345 - table cells follow rows and cols
  ---
  duration_ms: 1.395192
  type: 'test'
  ...
# Subtest: canvas blocks: box defaults from the region, z from the index
ok 346 - canvas blocks: box defaults from the region, z from the index
  ---
  duration_ms: 1.554063
  type: 'test'
  ...
# Subtest: assets: register and remove
ok 347 - assets: register and remove
  ---
  duration_ms: 1.526986
  type: 'test'
  ...
# Subtest: assets: a video carries its poster and duration; a picture has neither
ok 348 - assets: a video carries its poster and duration; a picture has neither
  ---
  duration_ms: 1.175086
  type: 'test'
  ...
# Subtest: markdown: every mark, code blocks are plain lines
ok 349 - markdown: every mark, code blocks are plain lines
  ---
  duration_ms: 1.404342
  type: 'test'
  ...
# Subtest: batch_is_atomic
ok 350 - batch_is_atomic
  ---
  duration_ms: 2.386646
  type: 'test'
  ...
# Subtest: a batch applies in one transaction with the given origin
ok 351 - a batch applies in one transaction with the given origin
  ---
  duration_ms: 0.581187
  type: 'test'
  ...
# Subtest: columns_children_validated
ok 352 - columns_children_validated
  ---
  duration_ms: 1.696101
  type: 'test'
  ...
# Subtest: layout_switch_round_trip
ok 353 - layout_switch_round_trip
  ---
  duration_ms: 2.777771
  type: 'test'
  ...
# Subtest: view_matches_snapshot_fixtures
ok 354 - view_matches_snapshot_fixtures
  ---
  duration_ms: 29.137506
  type: 'test'
  ...
# Subtest: columns children have one parent and no cycles (codex 7)
ok 355 - columns children have one parent and no cycles (codex 7)
  ---
  duration_ms: 1.581734
  type: 'test'
  ...
# Subtest: canvas-to-flow keeps a concurrent text edit (codex 4)
ok 356 - canvas-to-flow keeps a concurrent text edit (codex 4)
  ---
  duration_ms: 3.31634
  type: 'test'
  ...
# Subtest: move_block keeps a concurrent text edit, and later inserts land where after says (codex 4)
ok 357 - move_block keeps a concurrent text edit, and later inserts land where after says (codex 4)
  ---
  duration_ms: 2.529111
  type: 'test'
  ...
# Subtest: move_slide keeps a concurrent text edit, and later inserts land where after says (codex 4 at slide level)
ok 358 - move_slide keeps a concurrent text edit, and later inserts land where after says (codex 4 at slide level)
  ---
  duration_ms: 2.218449
  type: 'test'
  ...
# Subtest: set_block step round-trips, fractions included, survives a duplicate and clears
ok 359 - set_block step round-trips, fractions included, survives a duplicate and clears
  ---
  duration_ms: 0.953476
  type: 'test'
  ...
# Subtest: set_block refuses a step of zero, below zero, or not finite
ok 360 - set_block refuses a step of zero, below zero, or not finite
  ---
  duration_ms: 0.861097
  type: 'test'
  ...
# Subtest: set_block refuses items on a non-list; on a list it round-trips and clears
ok 361 - set_block refuses items on a non-list; on a list it round-trips and clears
  ---
  duration_ms: 1.19768
  type: 'test'
  ...
# Subtest: set_slide talk round-trips, survives a duplicate and clears; an unknown one is refused
ok 362 - set_slide talk round-trips, survives a duplicate and clears; an unknown one is refused
  ---
  duration_ms: 1.628656
  type: 'test'
  ...
# Subtest: set_meta arrive round-trips and clears; an unknown one is refused
ok 363 - set_meta arrive round-trips and clears; an unknown one is refused
  ---
  duration_ms: 1.313293
  type: 'test'
  ...
# Subtest: a deck without the fields has no such keys in its view
ok 364 - a deck without the fields has no such keys in its view
  ---
  duration_ms: 0.577978
  type: 'test'
  ...
# Subtest: meta.fontFiles: round trip, absent key, clear
ok 365 - meta.fontFiles: round trip, absent key, clear
  ---
  duration_ms: 0.910841
  type: 'test'
  ...
# Subtest: meta.fontFiles: refusals apply nothing
ok 366 - meta.fontFiles: refusals apply nothing
  ---
  duration_ms: 2.321224
  type: 'test'
  ...
# Subtest: a qr block takes a follow link as its url, or none, and refuses anything else
ok 367 - a qr block takes a follow link as its url, or none, and refuses anything else
  ---
  duration_ms: 1.744483
  type: 'test'
  ...
# Subtest: the Outline's list reconciles by id and keeps its rows
ok 368 - the Outline's list reconciles by id and keeps its rows
  ---
  duration_ms: 3.10226
  type: 'test'
  ...
# Subtest: open fills the list by kind and first words, and focuses the selected box's row
ok 369 - open fills the list by kind and first words, and focuses the selected box's row
  ---
  duration_ms: 1.185373
  type: 'test'
  ...
# Subtest: with no box on the slide it says so, and focus goes to the popover
ok 370 - with no box on the slide it says so, and focus goes to the popover
  ---
  duration_ms: 0.598691
  type: 'test'
  ...
# Subtest: a row selects its box and closes, leaving focus to the box
ok 371 - a row selects its box and closes, leaving focus to the box
  ---
  duration_ms: 0.589758
  type: 'test'
  ...
# Subtest: Escape closes it, gives focus back, and goes no further
ok 372 - Escape closes it, gives focus back, and goes no further
  ---
  duration_ms: 0.391904
  type: 'test'
  ...
# Subtest: closed by the browser (a click outside), it fills no more; destroy takes its listeners off
ok 373 - closed by the browser (a click outside), it fills no more; destroy takes its listeners off
  ---
  duration_ms: 0.410602
  type: 'test'
  ...
# Subtest: a row from the template takes its words in its label, and keeps its check
ok 374 - a row from the template takes its words in its label, and keeps its check
  ---
  duration_ms: 0.278946
  type: 'test'
  ...
# Subtest: open keeps the panel inside the window: moved back from the end edge, no taller than the room under its title
ok 375 - open keeps the panel inside the window: moved back from the end edge, no taller than the room under its title
  ---
  duration_ms: 0.80393
  type: 'test'
  ...
# Subtest: the scale is the room over the phone height, never above 1
ok 376 - the scale is the room over the phone height, never above 1
  ---
  duration_ms: 1.020702
  type: 'test'
  ...
# Subtest: the scale fits the width as well: the smaller of the two
ok 377 - the scale fits the width as well: the smaller of the two
  ---
  duration_ms: 0.199119
  type: 'test'
  ...
# Subtest: the scale never rounds up past the room it was given
ok 378 - the scale never rounds up past the room it was given
  ---
  duration_ms: 0.394932
  type: 'test'
  ...
# Subtest: mountPhoneFrame writes the scale on every frame, and again when the stages resize
ok 379 - mountPhoneFrame writes the scale on every frame, and again when the stages resize
  ---
  duration_ms: 2.320795
  type: 'test'
  ...
# Subtest: update() measures again when the room changes and the stages do not resize
ok 380 - update() measures again when the room changes and the stages do not resize
  ---
  duration_ms: 0.514141
  type: 'test'
  ...
# Subtest: waitingAt is everything whose press comes after the one given
ok 381 - waitingAt is everything whose press comes after the one given
  ---
  duration_ms: 3.052728
  type: 'test'
  ...
# Subtest: pressesWords: the count at rest, the press while playing
ok 382 - pressesWords: the count at rest, the press while playing
  ---
  duration_ms: 0.216649
  type: 'test'
  ...
# Subtest: a click plays press 1, each click the next, and one after the last shows the finished slide
ok 383 - a click plays press 1, each click the next, and one after the last shows the finished slide
  ---
  duration_ms: 3.684931
  type: 'test'
  ...
# Subtest: Esc while not playing is left alone
ok 384 - Esc while not playing is left alone
  ---
  duration_ms: 0.882631
  type: 'test'
  ...
# Subtest: a looping or once clip with a step waits for it; a clip on a press keeps its poster
ok 385 - a looping or once clip with a step waits for it; a clip on a press keeps its poster
  ---
  duration_ms: 0.836897
  type: 'test'
  ...
# Subtest: reads a cookie by its exact name; absent is null
ok 386 - reads a cookie by its exact name; absent is null
  ---
  duration_ms: 1.025747
  type: 'test'
  ...
# Subtest: a cookie jar that throws reads as absent and writes nothing
ok 387 - a cookie jar that throws reads as absent and writes nothing
  ---
  duration_ms: 0.445779
  type: 'test'
  ...
# Subtest: written for a year, site-wide, Lax, and Secure on https only
ok 388 - written for a year, site-wide, Lax, and Secure on https only
  ---
  duration_ms: 0.170383
  type: 'test'
  ...
# Subtest: format: {name} and {n} interpolate; an unknown key is left as text
ok 389 - format: {name} and {n} interpolate; an unknown key is left as text
  ---
  duration_ms: 0.87035
  type: 'test'
  ...
# Subtest: a beat on connect, then one every twenty seconds
ok 390 - a beat on connect, then one every twenty seconds
  ---
  duration_ms: 1.931478
  type: 'test'
  ...
# Subtest: a move posts once, 200ms after the last of a burst, and re-arms the beat
ok 391 - a move posts once, 200ms after the last of a burst, and re-arms the beat
  ---
  duration_ms: 1.094294
  type: 'test'
  ...
# Subtest: a hidden tab stops beating; coming back posts at once
ok 392 - a hidden tab stops beating; coming back posts at once
  ---
  duration_ms: 0.434757
  type: 'test'
  ...
# Subtest: applySet leaves this tab out and answers what changed
ok 393 - applySet leaves this tab out and answers what changed
  ---
  duration_ms: 0.957521
  type: 'test'
  ...
# Subtest: a set with rubbish in it is read for what it does carry
ok 394 - a set with rubbish in it is read for what it does carry
  ---
  duration_ms: 0.267138
  type: 'test'
  ...
# Subtest: initials, and a client id per tab
ok 395 - initials, and a client id per tab
  ---
  duration_ms: 2.724634
  type: 'test'
  ...
# Subtest: the cookie's panels read and write back the same
ok 396 - the cookie's panels read and write back the same
  ---
  duration_ms: 2.771566
  type: 'test'
  ...
# Subtest: a panel moves by whole cells into free room
ok 397 - a panel moves by whole cells into free room
  ---
  duration_ms: 0.882133
  type: 'test'
  ...
# Subtest: a move stops at the edge of the grid
ok 398 - a move stops at the edge of the grid
  ---
  duration_ms: 0.472223
  type: 'test'
  ...
# Subtest: a move goes round a panel in its way when it can
ok 399 - a move goes round a panel in its way when it can
  ---
  duration_ms: 0.391945
  type: 'test'
  ...
# Subtest: a move stops at the panel in its way, never over it
ok 400 - a move stops at the panel in its way, never over it
  ---
  duration_ms: 0.706001
  type: 'test'
  ...
# Subtest: a resize keeps at least 2×2, inside the grid, clear of the others
ok 401 - a resize keeps at least 2×2, inside the grid, clear of the others
  ---
  duration_ms: 0.266741
  type: 'test'
  ...
# Subtest: every change from every arrangement stays a valid window
ok 402 - every change from every arrangement stays a valid window
  ---
  duration_ms: 10.112144
  type: 'test'
  ...
# Subtest: arrow keys move a panel a cell; with Shift they resize it
ok 403 - arrow keys move a panel a cell; with Shift they resize it
  ---
  duration_ms: 0.347243
  type: 'test'
  ...
# Subtest: the stylesheet places the panels as the server does
ok 404 - the stylesheet places the panels as the server does
  ---
  duration_ms: 0.845241
  type: 'test'
  ...
# Subtest: each of the eight buttons is one cell of one change
ok 405 - each of the eight buttons is one cell of one change
  ---
  duration_ms: 3.828857
  type: 'test'
  ...
# Subtest: a button is offered only where its change can be made
ok 406 - a button is offered only where its change can be made
  ---
  duration_ms: 0.499348
  type: 'test'
  ...
# Subtest: the live region says the panel's size and place, counted from one
ok 407 - the live region says the panel's size and place, counted from one
  ---
  duration_ms: 0.323836
  type: 'test'
  ...
# Subtest: right to left, moves are mirrored and the buttons' sizes keep their meaning
ok 408 - right to left, moves are mirrored and the buttons' sizes keep their meaning
  ---
  duration_ms: 0.240597
  type: 'test'
  ...
# Subtest: the table: each key does its one thing
ok 409 - the table: each key does its one thing
  ---
  duration_ms: 2.365932
  type: 'test'
  ...
# Subtest: a held key is not a second press
ok 410 - a held key is not a second press
  ---
  duration_ms: 0.312502
  type: 'test'
  ...
# Subtest: a clicker works from inside a field, and nothing else does
ok 411 - a clicker works from inside a field, and nothing else does
  ---
  duration_ms: 1.50305
  type: 'test'
  ...
# Subtest: a number then Enter jumps
ok 412 - a number then Enter jumps
  ---
  duration_ms: 0.321283
  type: 'test'
  ...
# Subtest: modifier keys are the browser's
ok 413 - modifier keys are the browser's
  ---
  duration_ms: 0.331108
  type: 'test'
  ...
# Subtest: keys kept before the script are pressed once it mounts, in order, and only once
ok 414 - keys kept before the script are pressed once it mounts, in order, and only once
  ---
  duration_ms: 0.317888
  type: 'test'
  ...
# Subtest: brightPart is the step, or the last part when there are fewer parts than presses
ok 415 - brightPart is the step, or the last part when there are fewer parts than presses
  ---
  duration_ms: 0.895532
  type: 'test'
  ...
# Subtest: fitSize steps down a pixel to the floor and stops there
ok 416 - fitSize steps down a pixel to the floor and stops there
  ---
  duration_ms: 0.360842
  type: 'test'
  ...
# Subtest: smaller and larger step 2px between 16 and 48
ok 417 - smaller and larger step 2px between 16 and 48
  ---
  duration_ms: 0.175088
  type: 'test'
  ...
# Subtest: the cookie is percent-encoded and keeps the panels
ok 418 - the cookie is percent-encoded and keeps the panels
  ---
  duration_ms: 2.021542
  type: 'test'
  ...
# Subtest: writePrefs sets path /p, a year, SameSite=Lax, and readPrefs reads it back
ok 419 - writePrefs sets path /p, a year, SameSite=Lax, and readPrefs reads it back
  ---
  duration_ms: 0.627294
  type: 'test'
  ...
# Subtest: the fade is on the sides with more
ok 420 - the fade is on the sides with more
  ---
  duration_ms: 0.164499
  type: 'test'
  ...
# Subtest: a part already in view is left; otherwise its top is brought up
ok 421 - a part already in view is left; otherwise its top is brought up
  ---
  duration_ms: 0.292011
  type: 'test'
  ...
# Subtest: no query finds every slide, in talk order
ok 422 - no query finds every slide, in talk order
  ---
  duration_ms: 1.018842
  type: 'test'
  ...
# Subtest: a number finds that slide first, then the slides whose number starts with it
ok 423 - a number finds that slide first, then the slides whose number starts with it
  ---
  duration_ms: 1.043447
  type: 'test'
  ...
# Subtest: words find titles whatever their case, every word needed
ok 424 - words find titles whatever their case, every word needed
  ---
  duration_ms: 0.699171
  type: 'test'
  ...
# Subtest: a slide with no title is found by its number alone
ok 425 - a slide with no title is found by its number alone
  ---
  duration_ms: 0.22391
  type: 'test'
  ...
# Subtest: gridStep moves by one across a row and by a row up and down, and stops at the ends
ok 426 - gridStep moves by one across a row and by a row up and down, and stops at the ends
  ---
  duration_ms: 0.354311
  type: 'test'
  ...
# Subtest: presses vectors
    # Subtest: no steps: everything arrives with the slide
    ok 1 - no steps: everything arrives with the slide
      ---
      duration_ms: 2.207579
      type: 'test'
      ...
    # Subtest: ties: equal values arrive on one press, in block order
    ok 2 - ties: equal values arrive on one press, in block order
      ---
      duration_ms: 0.672904
      type: 'test'
      ...
    # Subtest: 1, 1.5, 2: a midpoint is a press between its neighbours
    ok 3 - 1, 1.5, 2: a midpoint is a press between its neighbours
      ---
      duration_ms: 0.394989
      type: 'test'
      ...
    # Subtest: values compare exactly as stored
    ok 4 - values compare exactly as stored
      ---
      duration_ms: 0.305721
      type: 'test'
      ...
    # Subtest: each: one press per item, the rest of its value with the first
    ok 5 - each: one press per item, the rest of its value with the first
      ---
      duration_ms: 0.295726
      type: 'test'
      ...
    # Subtest: each with blank items: they take no press and keep their index
    ok 6 - each with blank items: they take no press and keep their index
      ---
      duration_ms: 0.178841
      type: 'test'
      ...
    # Subtest: an empty list makes no press, with or without each
    ok 7 - an empty list makes no press, with or without each
      ---
      duration_ms: 0.181947
      type: 'test'
      ...
    # Subtest: a list without each arrives whole
    ok 8 - a list without each arrives whole
      ---
      duration_ms: 0.552235
      type: 'test'
      ...
    # Subtest: two each lists tied pair up by index, the next value after the longest
    ok 9 - two each lists tied pair up by index, the next value after the longest
      ---
      duration_ms: 0.583339
      type: 'test'
      ...
    # Subtest: each with no step arrives with the slide
    ok 10 - each with no step arrives with the slide
      ---
      duration_ms: 0.328564
      type: 'test'
      ...
    # Subtest: a blank text box makes no press; an image always shows
    ok 11 - a blank text box makes no press; an image always shows
      ---
      duration_ms: 0.133614
      type: 'test'
      ...
    # Subtest: child later than container: the child keeps its own value
    ok 12 - child later than container: the child keeps its own value
      ---
      duration_ms: 0.23709
      type: 'test'
      ...
    # Subtest: child earlier than container: the child waits, and its own press goes
    ok 13 - child earlier than container: the child waits, and its own press goes
      ---
      duration_ms: 0.120485
      type: 'test'
      ...
    # Subtest: a box two containers deep takes the latest of the three
    ok 14 - a box two containers deep takes the latest of the three
      ---
      duration_ms: 1.11421
      type: 'test'
      ...
    # Subtest: an each list in a later container starts at the container's value
    ok 15 - an each list in a later container starts at the container's value
      ---
      duration_ms: 0.112346
      type: 'test'
      ...
    # Subtest: empty columns make no press
    ok 16 - empty columns make no press
      ---
      duration_ms: 0.111221
      type: 'test'
      ...
    # Subtest: columns naming each other still settle
    ok 17 - columns naming each other still settle
      ---
      duration_ms: 0.088634
      type: 'test'
      ...
    # Subtest: columns whose children all come later arrive with the first of them
    ok 18 - columns whose children all come later arrive with the first of them
      ---
      duration_ms: 0.083655
      type: 'test'
      ...
    # Subtest: a blank child does not hold a columns box at its own value
    ok 19 - a blank child does not hold a columns box at its own value
      ---
      duration_ms: 0.067602
      type: 'test'
      ...
    # Subtest: an outer columns box waits through an inner one for its first child
    ok 20 - an outer columns box waits through an inner one for its first child
      ---
      duration_ms: 0.068792
      type: 'test'
      ...
    # Subtest: a scene block: one press per state after from, up to and including to, beside other steps
    ok 21 - a scene block: one press per state after from, up to and including to, beside other steps
      ---
      duration_ms: 0.185571
      type: 'test'
      ...
    # Subtest: a scene block with no step starts right after the slide arrives
    ok 22 - a scene block with no step starts right after the slide arrives
      ---
      duration_ms: 0.082888
      type: 'test'
      ...
    # Subtest: a scene block starting mid-way counts states by their place in the scene
    ok 23 - a scene block starting mid-way counts states by their place in the scene
      ---
      duration_ms: 0.067717
      type: 'test'
      ...
    # Subtest: from equal to to, a removed scene, a removed state or from after to: no presses
    ok 24 - from equal to to, a removed scene, a removed state or from after to: no presses
      ---
      duration_ms: 0.071967
      type: 'test'
      ...
    # Subtest: a scene with no scenes known makes no press
    ok 25 - a scene with no scenes known makes no press
      ---
      duration_ms: 0.079816
      type: 'test'
      ...
    # Subtest: a scene and an each list tied at one value pair up by index
    ok 26 - a scene and an each list tied at one value pair up by index
      ---
      duration_ms: 0.087036
      type: 'test'
      ...
    # Subtest: a scene block with no step inside a stepped columns box starts with it
    ok 27 - a scene block with no step inside a stepped columns box starts with it
      ---
      duration_ms: 0.074212
      type: 'test'
      ...
    # Subtest: a clip on a press takes one press, right after arrival with no step; loop and once take none of their own
    ok 28 - a clip on a press takes one press, right after arrival with no step; loop and once take none of their own
      ---
      duration_ms: 0.099306
      type: 'test'
      ...
    # Subtest: a scene with no step and a press clip with none share the first press
    ok 29 - a scene with no step and a press clip with none share the first press
      ---
      duration_ms: 0.076256
      type: 'test'
      ...
    1..29
ok 427 - presses vectors
  ---
  duration_ms: 12.858856
  type: 'test'
  ...
# Subtest: a slide with no blocks key has no presses
ok 428 - a slide with no blocks key has no presses
  ---
  duration_ms: 0.093359
  type: 'test'
  ...
# Subtest: a resync that fails is retried with backoff until it succeeds, without ever running twice at once
ok 429 - a resync that fails is retried with backoff until it succeeds, without ever running twice at once
  ---
  duration_ms: 2.016322
  type: 'test'
  ...
# Subtest: the browser's online event retries immediately, not just on the next backoff tick
ok 430 - the browser's online event retries immediately, not just on the next backoff tick
  ---
  duration_ms: 0.333969
  type: 'test'
  ...
# Subtest: reportDivergence before any failure runs the first attempt without a caller ever calling online
ok 431 - reportDivergence before any failure runs the first attempt without a caller ever calling online
  ---
  duration_ms: 1.364207
  type: 'test'
  ...
# Subtest: a permanent 4xx drops its batch instead of retrying it, and does not poison the next edit
ok 432 - a permanent 4xx drops its batch instead of retrying it, and does not poison the next edit
  ---
  duration_ms: 75.723442
  type: 'test'
  ...
# Subtest: a network failure or a 5xx is retried, not dropped
ok 433 - a network failure or a 5xx is retried, not dropped
  ---
  duration_ms: 42.265016
  type: 'test'
  ...
# Subtest: a 500 is retried the same way a network failure is, never dropped
ok 434 - a 500 is retried the same way a network failure is, never dropped
  ---
  duration_ms: 41.055142
  type: 'test'
  ...
# Subtest: flush with nothing queued waits for the save already on the wire
ok 435 - flush with nothing queued waits for the save already on the wire
  ---
  duration_ms: 0.966527
  type: 'test'
  ...
# Subtest: an edit made while a save is on the wire waits for it, and both stay owed until answered
ok 436 - an edit made while a save is on the wire waits for it, and both stay owed until answered
  ---
  duration_ms: 2.114218
  type: 'test'
  ...
# Subtest: a flush resolves only once every earlier update is answered, whichever save answers last
ok 437 - a flush resolves only once every earlier update is answered, whichever save answers last
  ---
  duration_ms: 22.232829
  type: 'test'
  ...
# Subtest: a flush through a retry waits for the retry, and a successful retry is a save
ok 438 - a flush through a retry waits for the retry, and a successful retry is a save
  ---
  duration_ms: 1.887888
  type: 'test'
  ...
# Subtest: a network failure is retried the same way
ok 439 - a network failure is retried the same way
  ---
  duration_ms: 0.825849
  type: 'test'
  ...
# Subtest: a refusal resolves the flush false and is final; later edits still save
ok 440 - a refusal resolves the flush false and is final; later edits still save
  ---
  duration_ms: 1.504116
  type: 'test'
  ...
# Subtest: edits made during a flush are not what that flush waits for
ok 441 - edits made during a flush are not what that flush waits for
  ---
  duration_ms: 1.309676
  type: 'test'
  ...
# Subtest: the queue says saving, not ok, while an answered save leaves another to send
ok 442 - the queue says saving, not ok, while an answered save leaves another to send
  ---
  duration_ms: 0.821365
  type: 'test'
  ...
# Subtest: a save is sent keepalive, and given up if it is never answered
ok 443 - a save is sent keepalive, and given up if it is never answered
  ---
  duration_ms: 26.388354
  type: 'test'
  ...
# Subtest: a batch carries at most maxBatchBytes, and the rest follow in order once it is answered
ok 444 - a batch carries at most maxBatchBytes, and the rest follow in order once it is answered
  ---
  duration_ms: 1.808849
  type: 'test'
  ...
# Subtest: an update bigger than maxBatchBytes still goes, on its own
ok 445 - an update bigger than maxBatchBytes still goes, on its own
  ---
  duration_ms: 0.854847
  type: 'test'
  ...
# Subtest: a save never answered is given up, retried with a real request, and its late answer ignored
ok 446 - a save never answered is given up, retried with a real request, and its late answer ignored
  ---
  duration_ms: 1.047424
  type: 'test'
  ...
# Subtest: resume sends again at once what was on the wire as the page left, without saying it failed
ok 447 - resume sends again at once what was on the wire as the page left, without saying it failed
  ---
  duration_ms: 1.267429
  type: 'test'
  ...
# Subtest: a keepalive save on the wire is left out of what the unload beacons; a plain one is kept
ok 448 - a keepalive save on the wire is left out of what the unload beacons; a plain one is kept
  ---
  duration_ms: 0.836542
  type: 'test'
  ...
# Subtest: a save refused with no answer says retrying only if the server cannot be reached either
ok 449 - a save refused with no answer says retrying only if the server cannot be reached either
  ---
  duration_ms: 2.343696
  type: 'test'
  ...
# Subtest: retries the browser refuses while the server answers back off, and reset once one is answered
ok 450 - retries the browser refuses while the server answers back off, and reset once one is answered
  ---
  duration_ms: 1.573582
  type: 'test'
  ...
# Subtest: reachable tries a keepalive request, then an ordinary one
ok 451 - reachable tries a keepalive request, then an ordinary one
  ---
  duration_ms: 0.536937
  type: 'test'
  ...
# Subtest: a large save is gzipped, and goes keepalive if what is sent fits
ok 452 - a large save is gzipped, and goes keepalive if what is sent fits
  ---
  duration_ms: 3.344625
  type: 'test'
  ...
# Subtest: a gzipped save a server refuses is sent again uncompressed, and later saves skip gzip
ok 453 - a gzipped save a server refuses is sent again uncompressed, and later saves skip gzip
  ---
  duration_ms: 76.904407
  type: 'test'
  ...
# Subtest: a refused save that was not gzipped is not sent again
ok 454 - a refused save that was not gzipped is not sent again
  ---
  duration_ms: 2.33098
  type: 'test'
  ...
# Subtest: a scene block names a scene and two of its states
ok 455 - a scene block names a scene and two of its states
  ---
  duration_ms: 16.287893
  type: 'test'
  ...
# Subtest: a removed scene or state leaves the block as it was
ok 456 - a removed scene or state leaves the block as it was
  ---
  duration_ms: 6.225336
  type: 'test'
  ...
# Subtest: a clip block plays on a press, in a loop or once
ok 457 - a clip block plays on a press, in a loop or once
  ---
  duration_ms: 2.321331
  type: 'test'
  ...
# Subtest: duplicate_slide keeps a scene block checkable
ok 458 - duplicate_slide keeps a scene block checkable
  ---
  duration_ms: 2.104278
  type: 'test'
  ...
# Subtest: scenesByName: the deck's scenes in name order; Insert places the first, first state to last
ok 459 - scenesByName: the deck's scenes in name order; Insert places the first, first state to last
  ---
  duration_ms: 11.360773
  type: 'test'
  ...
# Subtest: pickOps: another scene starts at its first state and walks to its last
ok 460 - pickOps: another scene starts at its first state and walks to its last
  ---
  duration_ms: 0.377618
  type: 'test'
  ...
# Subtest: rangeOps: From and To are one set_block each, and stay in order
ok 461 - rangeOps: From and To are one set_block each, and stay in order
  ---
  duration_ms: 0.434702
  type: 'test'
  ...
# Subtest: wordOps: one set_scene of the one word
ok 462 - wordOps: one set_scene of the one word
  ---
  duration_ms: 0.174205
  type: 'test'
  ...
# Subtest: picturesNote: stale when a still was made from another version; the states with none, counted
ok 463 - picturesNote: stale when a still was made from another version; the states with none, counted
  ---
  duration_ms: 1.26793
  type: 'test'
  ...
# Subtest: tableOf: a list of objects with scalar fields, or the first such list in an object
ok 464 - tableOf: a list of objects with scalar fields, or the first such list in an object
  ---
  duration_ms: 0.386159
  type: 'test'
  ...
# Subtest: withCell, withRow, withoutRow: the whole data back, the value keeping its kind
ok 465 - withCell, withRow, withoutRow: the whole data back, the value keeping its kind
  ---
  duration_ms: 0.731172
  type: 'test'
  ...
# Subtest: parseData: JSON or a refusal
ok 466 - parseData: JSON or a refusal
  ---
  duration_ms: 0.239425
  type: 'test'
  ...
# Subtest: saveSceneCode: signs, puts and registers the text as a scene; the ref back
ok 467 - saveSceneCode: signs, puts and registers the text as a scene; the ref back
  ---
  duration_ms: 5.790876
  type: 'test'
  ...
# Subtest: refusalText and authorLine: the approved words, the name in them
ok 468 - refusalText and authorLine: the approved words, the name in them
  ---
  duration_ms: 0.7135
  type: 'test'
  ...
# Subtest: dataTooBig: 960 KiB of canonical JSON is the most, one byte over is refused
ok 469 - dataTooBig: 960 KiB of canonical JSON is the most, one byte over is refused
  ---
  duration_ms: 18.249218
  type: 'test'
  ...
# Subtest: stillsList: each scene with pictures missing or stale, by name, in the card's words
ok 470 - stillsList: each scene with pictures missing or stale, by name, in the card's words
  ---
  duration_ms: 1.07869
  type: 'test'
  ...
# Subtest: stillsList and picturesNote count a still with no registered asset as missing
ok 471 - stillsList and picturesNote count a still with no registered asset as missing
  ---
  duration_ms: 0.614871
  type: 'test'
  ...
# Subtest: mountSceneCode: Save is off again while new code loads, and stays off when it fails to load
ok 472 - mountSceneCode: Save is off again while new code loads, and stays off when it fails to load
  ---
  duration_ms: 10.012375
  type: 'test'
  ...
# Subtest: init goes once the frame has loaded, with the state it is at by then
ok 473 - init goes once the frame has loaded, with the state it is at by then
  ---
  duration_ms: 7.567335
  type: 'test'
  ...
# Subtest: ready shows the frame; a state is sent as it comes, animate as asked
ok 474 - ready shows the frame; a state is sent as it comes, animate as asked
  ---
  duration_ms: 2.209657
  type: 'test'
  ...
# Subtest: messages from any other window are not the scene
ok 475 - messages from any other window are not the scene
  ---
  duration_ms: 1.231346
  type: 'test'
  ...
# Subtest: a scene silent for 3 seconds is given up, and its still stays
ok 476 - a scene silent for 3 seconds is given up, and its still stays
  ---
  duration_ms: 2.132891
  type: 'test'
  ...
# Subtest: a frame that navigates away, or says error, is given up
ok 477 - a frame that navigates away, or says error, is given up
  ---
  duration_ms: 1.660473
  type: 'test'
  ...
# Subtest: reduced motion is passed on, and changes nothing else
ok 478 - reduced motion is passed on, and changes nothing else
  ---
  duration_ms: 1.219077
  type: 'test'
  ...
# Subtest: fonts that never come do not hold init for ever
ok 479 - fonts that never come do not hold init for ever
  ---
  duration_ms: 1.256596
  type: 'test'
  ...
# Subtest: destroy takes the frame out and listens no more
ok 480 - destroy takes the frame out and listens no more
  ---
  duration_ms: 2.926787
  type: 'test'
  ...
# Subtest: a block is at the newest state that has arrived; the box is its key
ok 481 - a block is at the newest state that has arrived; the box is its key
  ---
  duration_ms: 3.712986
  type: 'test'
  ...
# Subtest: a frame is kept for the same scene in the same box, made fresh otherwise
ok 482 - a frame is kept for the same scene in the same box, made fresh otherwise
  ---
  duration_ms: 0.550005
  type: 'test'
  ...
# Subtest: each placement of a scene on a slide is its own, paired with the next slide's by order
ok 483 - each placement of a scene on a slide is its own, paired with the next slide's by order
  ---
  duration_ms: 0.674261
  type: 'test'
  ...
# Subtest: a placement keeps its number while an earlier block of its scene waits for its press
ok 484 - a placement keeps its number while an earlier block of its scene waits for its press
  ---
  duration_ms: 2.597469
  type: 'test'
  ...
# Subtest: one press apart is a move that animates; anything else is a jump
ok 485 - one press apart is a move that animates; anything else is a jump
  ---
  duration_ms: 0.638864
  type: 'test'
  ...
# Subtest: a scene is sent the deck faces its data names, and only those
ok 486 - a scene is sent the deck faces its data names, and only those
  ---
  duration_ms: 0.352751
  type: 'test'
  ...
# Subtest: a phone view shows stills
ok 487 - a phone view shows stills
  ---
  duration_ms: 0.536054
  type: 'test'
  ...
# Subtest: a scene inside a box that has not arrived runs nothing yet
ok 488 - a scene inside a box that has not arrived runs nothing yet
  ---
  duration_ms: 0.352642
  type: 'test'
  ...
# Subtest: a scene with a box over it on a canvas runs inside its block, not over the slide
ok 489 - a scene with a box over it on a canvas runs inside its block, not over the slide
  ---
  duration_ms: 1.099021
  type: 'test'
  ...
# Subtest: image-full puts its heading over the media: a scene there runs inside its block
ok 490 - image-full puts its heading over the media: a scene there runs inside its block
  ---
  duration_ms: 0.893741
  type: 'test'
  ...
# Subtest: on a page that steps, one press apart animates and anything else is a jump
ok 491 - on a page that steps, one press apart animates and anything else is a jump
  ---
  duration_ms: 0.638628
  type: 'test'
  ...
# Subtest: stillsCurrent: missing, stale and current
ok 492 - stillsCurrent: missing, stale and current
  ---
  duration_ms: 20.368095
  type: 'test'
  ...
# Subtest: stillsCurrent tolerates a scene with no states or stills
ok 493 - stillsCurrent tolerates a scene with no states or stills
  ---
  duration_ms: 0.298394
  type: 'test'
  ...
# Subtest: a still whose asset is no longer registered is missing
ok 494 - a still whose asset is no longer registered is missing
  ---
  duration_ms: 3.672455
  type: 'test'
  ...
# Subtest: the live update limit is 1 MiB
ok 495 - the live update limit is 1 MiB
  ---
  duration_ms: 0.903701
  type: 'test'
  ...
# Subtest: 150,000 tenths fit the data limit but not one live update, and are refused
ok 496 - 150,000 tenths fit the data limit but not one live update, and are refused
  ---
  duration_ms: 187.589968
  type: 'test'
  ...
# Subtest: just under the cap is taken, and its update is what was measured
ok 497 - just under the cap is taken, and its update is what was measured
  ---
  duration_ms: 70.613777
  type: 'test'
  ...
# Subtest: two scene changes in one batch are measured together
ok 498 - two scene changes in one batch are measured together
  ---
  duration_ms: 128.165092
  type: 'test'
  ...
# Subtest: a batch with no scene op is not measured, and other refusals are not tooBig
ok 499 - a batch with no scene op is not measured, and other refusals are not tooBig
  ---
  duration_ms: 140.008581
  type: 'test'
  ...
# Subtest: exactly 1 MiB is taken and one byte more is refused
ok 500 - exactly 1 MiB is taken and one byte more is refused
  ---
  duration_ms: 53.373139
  type: 'test'
  ...
# Subtest: a deck without scenes has no scenes key
ok 501 - a deck without scenes has no scenes key
  ---
  duration_ms: 6.416649
  type: 'test'
  ...
# Subtest: add_scene round trips
ok 502 - add_scene round trips
  ---
  duration_ms: 5.419065
  type: 'test'
  ...
# Subtest: add_scene defaults words, data and state names
ok 503 - add_scene defaults words, data and state names
  ---
  duration_ms: 1.264692
  type: 'test'
  ...
# Subtest: set_scene patches words per key, replaces data and sets stills
ok 504 - set_scene patches words per key, replaces data and sets stills
  ---
  duration_ms: 6.478102
  type: 'test'
  ...
# Subtest: author is written when the op carries one, and left alone otherwise
ok 505 - author is written when the op carries one, and left alone otherwise
  ---
  duration_ms: 2.802378
  type: 'test'
  ...
# Subtest: remove_scene drops it, and an empty map leaves the view
ok 506 - remove_scene drops it, and an empty map leaves the view
  ---
  duration_ms: 2.012802
  type: 'test'
  ...
# Subtest: scene refusals apply nothing
ok 507 - scene refusals apply nothing
  ---
  duration_ms: 23.38117
  type: 'test'
  ...
# Subtest: data up to 960 KiB of canonical JSON is taken
ok 508 - data up to 960 KiB of canonical JSON is taken
  ---
  duration_ms: 20.835974
  type: 'test'
  ...
# Subtest: scene version vectors
    # Subtest: null data and no words
    ok 1 - null data and no words
      ---
      duration_ms: 1.009449
      type: 'test'
      ...
    # Subtest: absent data and words read as null and none
    ok 2 - absent data and words read as null and none
      ---
      duration_ms: 0.372953
      type: 'test'
      ...
    # Subtest: nested data: keys sorted at every level, numbers as JSON.stringify prints them
    ok 3 - nested data: keys sorted at every level, numbers as JSON.stringify prints them
      ---
      duration_ms: 0.194838
      type: 'test'
      ...
    # Subtest: unicode: code point order, escapes as JSON.stringify writes them
    ok 4 - unicode: code point order, escapes as JSON.stringify writes them
      ---
      duration_ms: 0.292179
      type: 'test'
      ...
    # Subtest: empty object, empty list and an empty word
    ok 5 - empty object, empty list and an empty word
      ---
      duration_ms: 0.13257
      type: 'test'
      ...
    # Subtest: a string as the whole of data
    ok 6 - a string as the whole of data
      ---
      duration_ms: 0.095152
      type: 'test'
      ...
    # Subtest: collision pair, one word holding a newline and a NUL
    ok 7 - collision pair, one word holding a newline and a NUL
      ---
      duration_ms: 0.091715
      type: 'test'
      ...
    # Subtest: collision pair, the two words that spelled the same lines
    ok 8 - collision pair, the two words that spelled the same lines
      ---
      duration_ms: 0.135825
      type: 'test'
      ...
    # Subtest: quotes, backslashes, NUL and newline in keys and text; __proto__ as text
    ok 9 - quotes, backslashes, NUL and newline in keys and text; __proto__ as text
      ---
      duration_ms: 0.288448
      type: 'test'
      ...
    # Subtest: code alone differs: the same data and words as the first
    ok 10 - code alone differs: the same data and words as the first
      ---
      duration_ms: 0.126305
      type: 'test'
      ...
    # Subtest: numbers JSON.stringify writes with seventeen digits keep every one
    ok 11 - numbers JSON.stringify writes with seventeen digits keep every one
      ---
      duration_ms: 0.105392
      type: 'test'
      ...
    1..11
ok 509 - scene version vectors
  ---
  duration_ms: 5.01225
  type: 'test'
  ...
# Subtest: a scene version changes with code, data and words only
ok 510 - a scene version changes with code, data and words only
  ---
  duration_ms: 3.435143
  type: 'test'
  ...
# Subtest: a scene id is twelve lowercase base32 characters
ok 511 - a scene id is twelve lowercase base32 characters
  ---
  duration_ms: 0.8264
  type: 'test'
  ...
# Subtest: __proto__ is refused as a state id, a word key and anywhere in data
ok 512 - __proto__ is refused as a state id, a word key and anywhere in data
  ---
  duration_ms: 1.914137
  type: 'test'
  ...
# Subtest: the core-written structure reads as ProseMirror marks
ok 513 - the core-written structure reads as ProseMirror marks
  ---
  duration_ms: 6.785419
  type: 'test'
  ...
# Subtest: a y-prosemirror round trip preserves bold and the link
ok 514 - a y-prosemirror round trip preserves bold and the link
  ---
  duration_ms: 2.874587
  type: 'test'
  ...
# Subtest: y-prosemirror writes href as the one-key map and marks as {}
ok 515 - y-prosemirror writes href as the one-key map and marks as {}
  ---
  duration_ms: 1.143176
  type: 'test'
  ...
# Subtest: a plain-string href, written before the map shape, still reads
ok 516 - a plain-string href, written before the map shape, still reads
  ---
  duration_ms: 1.010246
  type: 'test'
  ...
# Subtest: textFragment writes the same shape as writeText
ok 517 - textFragment writes the same shape as writeText
  ---
  duration_ms: 0.728397
  type: 'test'
  ...
# Subtest: safeHref is the server allowlist, and a disallowed href never draws an anchor
ok 518 - safeHref is the server allowlist, and a disallowed href never draws an anchor
  ---
  duration_ms: 0.513683
  type: 'test'
  ...
# Subtest: parseHash splits the slide and the block, and survives a stray %
ok 519 - parseHash splits the slide and the block, and survives a stray %
  ---
  duration_ms: 1.616964
  type: 'test'
  ...
# Subtest: destroy takes the listeners off, and a second mount leaves one of each
ok 520 - destroy takes the listeners off, and a second mount leaves one of each
  ---
  duration_ms: 1.924303
  type: 'test'
  ...
# Subtest: formatHash is the inverse
ok 521 - formatHash is the inverse
  ---
  duration_ms: 0.322275
  type: 'test'
  ...
# Subtest: selecting the selected block again is heard; a new one is too
ok 522 - selecting the selected block again is heard; a new one is too
  ---
  duration_ms: 0.796775
  type: 'test'
  ...
# Subtest: each layout makes its template and its empty blocks, and passes the gate
ok 523 - each layout makes its template and its empty blocks, and passes the gate
  ---
  duration_ms: 15.448508
  type: 'test'
  ...
# Subtest: a layout goes after the slide it is asked to follow
ok 524 - a layout goes after the slide it is asked to follow
  ---
  duration_ms: 2.339455
  type: 'test'
  ...
# Subtest: an unknown layout still makes a slide, and plain New slide follows the one before
ok 525 - an unknown layout still makes a slide, and plain New slide follows the one before
  ---
  duration_ms: 0.22805
  type: 'test'
  ...
# Subtest: refresh makes each box with no text a named group in the tab order, and leaves text to its editor
ok 526 - refresh makes each box with no text a named group in the tab order, and leaves text to its editor
  ---
  duration_ms: 4.608391
  type: 'test'
  ...
# Subtest: focus on a box with no text selects it; focus in text is the text editor's to say
ok 527 - focus on a box with no text selects it; focus in text is the text editor's to say
  ---
  duration_ms: 1.362549
  type: 'test'
  ...
# Subtest: on a canvas slide focus on a box goes on to the overlay
ok 528 - on a canvas slide focus on a box goes on to the overlay
  ---
  duration_ms: 1.964358
  type: 'test'
  ...
# Subtest: Tab and Shift+Tab on the overlay walk the boxes in the slide's order
ok 529 - Tab and Shift+Tab on the overlay walk the boxes in the slide's order
  ---
  duration_ms: 1.400311
  type: 'test'
  ...
# Subtest: Tab and Shift+Tab on the overlay pass a box that is not drawn
ok 530 - Tab and Shift+Tab on the overlay pass a box that is not drawn
  ---
  duration_ms: 1.541795
  type: 'test'
  ...
# Subtest: focus(id) puts focus on the box: its text, the box itself, or on a canvas slide the overlay
ok 531 - focus(id) puts focus on the box: its text, the box itself, or on a canvas slide the overlay
  ---
  duration_ms: 0.855312
  type: 'test'
  ...
# Subtest: destroy takes every listener off the stage
ok 532 - destroy takes every listener off the stage
  ---
  duration_ms: 0.444442
  type: 'test'
  ...
# Subtest: held and restore keep focus on a box across a load
ok 533 - held and restore keep focus on a box across a load
  ---
  duration_ms: 1.025598
  type: 'test'
  ...
# Subtest: held on a canvas slide is the selected box, from its overlay
ok 534 - held on a canvas slide is the selected box, from its overlay
  ---
  duration_ms: 0.650089
  type: 'test'
  ...
# Subtest: after Delete, focus goes to the next box, else the previous, else the slide
ok 535 - after Delete, focus goes to the next box, else the previous, else the slide
  ---
  duration_ms: 1.987849
  type: 'test'
  ...
# Subtest: after a move, focus in the box's text is held across the load too
ok 536 - after a move, focus in the box's text is held across the load too
  ---
  duration_ms: 0.555695
  type: 'test'
  ...
# Subtest: textBlocks finds the text-bearing blocks and skips the rest
ok 537 - textBlocks finds the text-bearing blocks and skips the rest
  ---
  duration_ms: 2.05592
  type: 'test'
  ...
# Subtest: mountTarget is the element whose children are the paragraphs
ok 538 - mountTarget is the element whose children are the paragraphs
  ---
  duration_ms: 0.296138
  type: 'test'
  ...
# Subtest: paragraphTag keeps the renderer's own markup per type
ok 539 - paragraphTag keeps the renderer's own markup per type
  ---
  duration_ms: 0.268581
  type: 'test'
  ...
# Subtest: blockFragment finds a block's text by slide and block id
ok 540 - blockFragment finds a block's text by slide and block id
  ---
  duration_ms: 8.48295
  type: 'test'
  ...
# Subtest: notesFragment finds the slide's notes
ok 541 - notesFragment finds the slide's notes
  ---
  duration_ms: 1.538595
  type: 'test'
  ...
# Subtest: blockIDs and slideIDs are the orders on the stage and the strip
ok 542 - blockIDs and slideIDs are the orders on the stage and the strip
  ---
  duration_ms: 2.738087
  type: 'test'
  ...
# Subtest: cellFragments are a table's cells, row-major
ok 543 - cellFragments are a table's cells, row-major
  ---
  duration_ms: 2.394488
  type: 'test'
  ...
# Subtest: a load that fails leaves the stage on the slide it was showing and says so
ok 544 - a load that fails leaves the stage on the slide it was showing and says so
  ---
  duration_ms: 2.030864
  type: 'test'
  ...
# Subtest: slideAfter is the slide to show once one is gone
ok 545 - slideAfter is the slide to show once one is gone
  ---
  duration_ms: 0.663436
  type: 'test'
  ...
# Subtest: the queue words map to savestatus states, failed staying failed
ok 546 - the queue words map to savestatus states, failed staying failed
  ---
  duration_ms: 0.961221
  type: 'test'
  ...
# Subtest: a dropped batch outranks the queue, for the rest of the session
ok 547 - a dropped batch outranks the queue, for the rest of the session
  ---
  duration_ms: 0.2138
  type: 'test'
  ...
# Subtest: the editor status: the save line and the load error are two lines
ok 548 - the editor status: the save line and the load error are two lines
  ---
  duration_ms: 0.3819
  type: 'test'
  ...
# Subtest: mountSaveStatus loads estilo's module and mounts it on the line
ok 549 - mountSaveStatus loads estilo's module and mounts it on the line
  ---
  duration_ms: 1.950304
  type: 'test'
  ...
# Subtest: a save-status module that will not load says so and refuses to mount
ok 550 - a save-status module that will not load says so and refuses to mount
  ---
  duration_ms: 0.512306
  type: 'test'
  ...
# Subtest: dropTarget: before puts it ahead of the item, after behind it, null means first
ok 551 - dropTarget: before puts it ahead of the item, after behind it, null means first
  ---
  duration_ms: 1.687795
  type: 'test'
  ...
# Subtest: a drop that leaves the order as it is is no move
ok 552 - a drop that leaves the order as it is is no move
  ---
  duration_ms: 0.269086
  type: 'test'
  ...
# Subtest: dropOp is the move_slide
ok 553 - dropOp is the move_slide
  ---
  duration_ms: 0.759705
  type: 'test'
  ...
# Subtest: labelFor is the slide's first heading, else the numbered fallback
ok 554 - labelFor is the slide's first heading, else the numbered fallback
  ---
  duration_ms: 6.934492
  type: 'test'
  ...
# Subtest: flush re-points every dirty thumbnail and relabels it
ok 555 - flush re-points every dirty thumbnail and relabels it
  ---
  duration_ms: 4.399343
  type: 'test'
  ...
# Subtest: destroy takes the item-menu listener off; a second mount leaves one
ok 556 - destroy takes the item-menu listener off; a second mount leaves one
  ---
  duration_ms: 0.594715
  type: 'test'
  ...
# Subtest: plan says what to add, drop and where each item goes
ok 557 - plan says what to add, drop and where each item goes
  ---
  duration_ms: 1.130922
  type: 'test'
  ...
# Subtest: sync moves only the items out of place and keeps focus
ok 558 - sync moves only the items out of place and keeps focus
  ---
  duration_ms: 3.744897
  type: 'test'
  ...
# Subtest: sync keeps the New slide row last
ok 559 - sync keeps the New slide row last
  ---
  duration_ms: 3.150884
  type: 'test'
  ...
# Subtest: relabel keeps the link's title the label
ok 560 - relabel keeps the link's title the label
  ---
  duration_ms: 2.824722
  type: 'test'
  ...
# Subtest: a contextmenu on an item opens its menu
ok 561 - a contextmenu on an item opens its menu
  ---
  duration_ms: 0.666335
  type: 'test'
  ...
# Subtest: sync renumbers both numbers after an add, a remove and a reorder
ok 562 - sync renumbers both numbers after an add, a remove and a reorder
  ---
  duration_ms: 3.071369
  type: 'test'
  ...
# Subtest: desktop view: box and size are the block; hidden and order are always the phone map
ok 563 - desktop view: box and size are the block; hidden and order are always the phone map
  ---
  duration_ms: 1.800558
  type: 'test'
  ...
# Subtest: phone view: everything goes to set_phone, carrying the rest of the map
ok 564 - phone view: everything goes to set_phone, carrying the rest of the map
  ---
  duration_ms: 0.519129
  type: 'test'
  ...
# Subtest: the ops it makes are ones the document takes
ok 565 - the ops it makes are ones the document takes
  ---
  duration_ms: 11.581502
  type: 'test'
  ...
# Subtest: phoneMap reads only the four keys, and only well-typed
ok 566 - phoneMap reads only the four keys, and only well-typed
  ---
  duration_ms: 0.188759
  type: 'test'
  ...
# Subtest: the stored view is read defensively
ok 567 - the stored view is read defensively
  ---
  duration_ms: 0.461679
  type: 'test'
  ...
# Subtest: a ready slide is put up at once, the end at once
ok 568 - a ready slide is put up at once, the end at once
  ---
  duration_ms: 2.785265
  type: 'test'
  ...
# Subtest: a preview waiting across a newer deck never puts up the new version unready
ok 569 - a preview waiting across a newer deck never puts up the new version unready
  ---
  duration_ms: 4.169888
  type: 'test'
  ...
# Subtest: a later press supersedes a preview still waiting
ok 570 - a later press supersedes a preview still waiting
  ---
  duration_ms: 1.238211
  type: 'test'
  ...
# Subtest: a press is sent once and in order
ok 571 - a press is sent once and in order
  ---
  duration_ms: 11.985084
  type: 'test'
  ...
# Subtest: a late answer does not move a window with presses waiting
ok 572 - a late answer does not move a window with presses waiting
  ---
  duration_ms: 2.059125
  type: 'test'
  ...
# Subtest: offline presses end in one resume
ok 573 - offline presses end in one resume
  ---
  duration_ms: 3.402871
  type: 'test'
  ...
# Subtest: a failed send is offline at once
ok 574 - a failed send is offline at once
  ---
  duration_ms: 0.835358
  type: 'test'
  ...
# Subtest: a stream that comes back by itself is not a split
ok 575 - a stream that comes back by itself is not a split
  ---
  duration_ms: 0.606599
  type: 'test'
  ...
# Subtest: a window that pressed nothing takes the server's position
ok 576 - a window that pressed nothing takes the server's position
  ---
  duration_ms: 0.901757
  type: 'test'
  ...
# Subtest: a press id is 22 characters of the allowed alphabet
ok 577 - a press id is 22 characters of the allowed alphabet
  ---
  duration_ms: 2.509445
  type: 'test'
  ...
# Subtest: a press given up on is numbered below the resume that replaces it
ok 578 - a press given up on is numbered below the resume that replaces it
  ---
  duration_ms: 2.154832
  type: 'test'
  ...
# Subtest: every command carries the link and a rising number
ok 579 - every command carries the link and a rising number
  ---
  duration_ms: 1.399632
  type: 'test'
  ...
# Subtest: the black screen pressed offline goes with the resume, either way
ok 580 - the black screen pressed offline goes with the resume, either way
  ---
  duration_ms: 1.767186
  type: 'test'
  ...
# Subtest: the timer is taken from the server even where the position is the same
ok 581 - the timer is taken from the server even where the position is the same
  ---
  duration_ms: 0.455943
  type: 'test'
  ...
# Subtest: a stale timer never undoes a press still waiting for its answer
ok 582 - a stale timer never undoes a press still waiting for its answer
  ---
  duration_ms: 0.91063
  type: 'test'
  ...
# Subtest: clips are warmed one at a time, streamed and dropped, up to 300 MiB, and no slide waits for them
ok 583 - clips are warmed one at a time, streamed and dropped, up to 300 MiB, and no slide waits for them
  ---
  duration_ms: 29.396188
  type: 'test'
  ...
# Subtest: linkAt reads the link under the cursor and nothing elsewhere
ok 584 - linkAt reads the link under the cursor and nothing elsewhere
  ---
  duration_ms: 2.723848
  type: 'test'
  ...
# Subtest: setLink marks the selection
ok 585 - setLink marks the selection
  ---
  duration_ms: 2.610457
  type: 'test'
  ...
# Subtest: setLink on a collapsed cursor inside a link replaces that link
ok 586 - setLink on a collapsed cursor inside a link replaces that link
  ---
  duration_ms: 1.036957
  type: 'test'
  ...
# Subtest: setLink with nothing selected and no link does nothing
ok 587 - setLink with nothing selected and no link does nothing
  ---
  duration_ms: 0.367554
  type: 'test'
  ...
# Subtest: removeLink clears the link under the cursor
ok 588 - removeLink clears the link under the cursor
  ---
  duration_ms: 0.785734
  type: 'test'
  ...
# Subtest: the keymap binds every documented shortcut
ok 589 - the keymap binds every documented shortcut
  ---
  duration_ms: 0.241689
  type: 'test'
  ...
# Subtest: Mod-b toggles bold through the keymap
ok 590 - Mod-b toggles bold through the keymap
  ---
  duration_ms: 1.92256
  type: 'test'
  ...
# Subtest: setLink refuses an address outside the allowlist and writes nothing
ok 591 - setLink refuses an address outside the allowlist and writes nothing
  ---
  duration_ms: 0.843079
  type: 'test'
  ...
# Subtest: a scene word, its data and its code each undo on their own
ok 592 - a scene word, its data and its code each undo on their own
  ---
  duration_ms: 18.66304
  type: 'test'
  ...
# Subtest: a batch changing a slide and a scene undoes as one step
ok 593 - a batch changing a slide and a scene undoes as one step
  ---
  duration_ms: 3.465539
  type: 'test'
  ...
# Subtest: an added scene is taken back by its undo
ok 594 - an added scene is taken back by its undo
  ---
  duration_ms: 3.444245
  type: 'test'
  ...
# Subtest: the state machine runs choose → sign → put → register → op
ok 595 - the state machine runs choose → sign → put → register → op
  ---
  duration_ms: 2.686647
  type: 'test'
  ...
# Subtest: a file the deck will not take never reaches the network
ok 596 - a file the deck will not take never reaches the network
  ---
  duration_ms: 0.76186
  type: 'test'
  ...
# Subtest: alt text is required before the bytes move, unless the image is decorative
ok 597 - alt text is required before the bytes move, unless the image is decorative
  ---
  duration_ms: 0.519024
  type: 'test'
  ...
# Subtest: a step that fails stops the ones after it and reports its own code
ok 598 - a step that fails stops the ones after it and reports its own code
  ---
  duration_ms: 0.706357
  type: 'test'
  ...
# Subtest: a failure that is not ours still becomes an UploadError
ok 599 - a failure that is not ours still becomes an UploadError
  ---
  duration_ms: 0.526898
  type: 'test'
  ...
# Subtest: a second pick while one is in flight is refused, not raced
ok 600 - a second pick while one is in flight is refused, not raced
  ---
  duration_ms: 0.517743
  type: 'test'
  ...
# Subtest: an unreadable size is zero rather than a failure
ok 601 - an unreadable size is zero rather than a failure
  ---
  duration_ms: 0.553164
  type: 'test'
  ...
# Subtest: a per-call applyOp wins, so an upload lands on the block it was chosen for
ok 602 - a per-call applyOp wins, so an upload lands on the block it was chosen for
  ---
  duration_ms: 1.682774
  type: 'test'
  ...
# Subtest: checkFile takes exactly the four types
ok 603 - checkFile takes exactly the four types
  ---
  duration_ms: 1.071707
  type: 'test'
  ...
# Subtest: sha256Hex is the hex digest of the bytes
ok 604 - sha256Hex is the hex digest of the bytes
  ---
  duration_ms: 12.067572
  type: 'test'
  ...
# Subtest: refusal reads this app's JSON error shape, and survives one that is not
ok 605 - refusal reads this app's JSON error shape, and survives one that is not
  ---
  duration_ms: 0.528101
  type: 'test'
  ...
# Subtest: a clip is staged, its first frame drawn from the staged bytes and registered, then the video naming it
ok 606 - a clip is staged, its first frame drawn from the staged bytes and registered, then the video naming it
  ---
  duration_ms: 1.099403
  type: 'test'
  ...
# Subtest: a clip that is not an MP4 or WebM, or over 50 MiB, never reaches the network; one with no frame is never registered
ok 607 - a clip that is not an MP4 or WebM, or over 50 MiB, never reaches the network; one with no frame is never registered
  ---
  duration_ms: 0.627348
  type: 'test'
  ...
# Subtest: a clip's refusal is said with its name, in the approved words
ok 608 - a clip's refusal is said with its name, in the approved words
  ---
  duration_ms: 0.22083
  type: 'test'
  ...
# Subtest: a poster is at most 4 MiB, checked before it goes up; too big, the upload fails in the usual words
ok 609 - a poster is at most 4 MiB, checked before it goes up; too big, the upload fails in the usual words
  ---
  duration_ms: 0.371964
  type: 'test'
  ...
# Subtest: malformed fonts are null
ok 610 - malformed fonts are null
  ---
  duration_ms: 4.225321
  type: 'test'
  ...
# Subtest: a malformed fontFiles list is absent; a good one is rebuilt from known fields
ok 611 - a malformed fontFiles list is absent; a good one is rebuilt from known fields
  ---
  duration_ms: 3.0013
  type: 'test'
  ...
# Subtest: a malformed background is the theme default
ok 612 - a malformed background is the theme default
  ---
  duration_ms: 1.797684
  type: 'test'
  ...
# Subtest: a malformed box is null
ok 613 - a malformed box is null
  ---
  duration_ms: 1.016314
  type: 'test'
  ...
# Subtest: the phone layer keeps only its typed fields, order as a whole number
ok 614 - the phone layer keeps only its typed fields, order as a whole number
  ---
  duration_ms: 0.949183
  type: 'test'
  ...
# Subtest: assets are typed or skipped
ok 615 - assets are typed or skipped
  ---
  duration_ms: 0.650492
  type: 'test'
  ...
# Subtest: every poison update is deterministic bytes that apply to any deck
ok 616 - every poison update is deterministic bytes that apply to any deck
  ---
  duration_ms: 26.889117
  type: 'test'
  ...
# Subtest: step, items, talk and arrive outside their vocabularies are absent
ok 617 - step, items, talk and arrive outside their vocabularies are absent
  ---
  duration_ms: 2.274459
  type: 'test'
  ...
# Subtest: scenes keep only their typed fields; a scene that is not a map is skipped
ok 618 - scenes keep only their typed fields; a scene that is not a map is skipped
  ---
  duration_ms: 1.223541
  type: 'test'
  ...
# Subtest: a key named __proto__ is an ordinary key everywhere in the view
ok 619 - a key named __proto__ is an ordinary key everywhere in the view
  ---
  duration_ms: 1.327368
  type: 'test'
  ...
# Subtest: every vector decoded from its bytes views as its committed view
ok 620 - every vector decoded from its bytes views as its committed view
  ---
  duration_ms: 13.999864
  type: 'test'
  ...
1..620
# tests 733
# suites 0
# pass 733
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 8197.244642
=== the vectors must match a fresh generation
canvas: 28 ops, 4373 bytes
columns: 23 ops, 3134 bytes
every-block: 36 ops, 3180 bytes
qr: 10 ops, 1096 bytes
scenes: 23 ops, 3016 bytes
table: 14 ops, 1509 bytes
title-only: 6 ops, 1136 bytes
=== the editor bundle must match a fresh build
wrote internal/slides/static/editor.26ad85f3833572c1.js (481054 bytes)
wrote internal/slides/static/fontsgate.e19ff517f8f3aaef.js (25388 bytes)
wrote internal/slides/static/fontshold.876f3d8d396da42f.js (314 bytes)
wrote internal/slides/static/presenter.2cfd034613ea4abf.js (51061 bytes)
=== go: vet, gofmt, test, migration check
go vet ./...
go vet -tags browser ./internal/slidestest/
go test ./...
ok  	amadan.net/oficina/slides/cmd/slides	2.042s
?   	amadan.net/oficina/slides/cmd/slides-contract	[no test files]
?   	amadan.net/oficina/slides/gen	[no test files]
ok  	amadan.net/oficina/slides/gen/locales	0.003s
ok  	amadan.net/oficina/slides/internal/slides	102.625s
ok  	amadan.net/oficina/slides/internal/slides/assist	0.015s
ok  	amadan.net/oficina/slides/internal/slides/core	4.811s
ok  	amadan.net/oficina/slides/internal/slides/deck	0.017s
ok  	amadan.net/oficina/slides/internal/slides/fonts	0.055s
?   	amadan.net/oficina/slides/internal/slides/fonts/fontstest	[no test files]
?   	amadan.net/oficina/slides/internal/slides/icons	[no test files]
?   	amadan.net/oficina/slides/internal/slides/keymailtest	[no test files]
ok  	amadan.net/oficina/slides/internal/slides/layout	0.050s
ok  	amadan.net/oficina/slides/internal/slides/live	0.006s
ok  	amadan.net/oficina/slides/internal/slides/pdfcore	5.294s
ok  	amadan.net/oficina/slides/internal/slides/present	0.010s
?   	amadan.net/oficina/slides/internal/slides/qr	[no test files]
ok  	amadan.net/oficina/slides/internal/slides/render	0.038s
ok  	amadan.net/oficina/slides/internal/slides/svg	0.016s
?   	amadan.net/oficina/slides/internal/slides/teamstate	[no test files]
--- FAIL: TestAShortFlowRegionFitsTheScene (0.39s)
    scenes_stills_test.go:152: full9's thumbnail draws no still:
        <?xml version="1.0" encoding="UTF-8"?>
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1920" height="1080" viewBox="0 0 1920 1080" role="img">
        <title>Over the scene</title>
        <rect x="0" y="0" width="1920" height="1080" fill="#faf7f0"/>
        <image x="106.496" y="-0" width="1707.008" height="960.192" preserveAspectRatio="xMidYMid meet" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg=="><title>One box</title></image>
        <text x="0" y="1063.6935" xml:space="preserve"><tspan x="0" font-family="Liberation Sans, system-ui, -apple-system, Segoe UI, Roboto, sans-serif" font-size="53.76" fill="#1c1a17">Under the scene</tspan></text>
        <rect x="120" y="770.688" width="877.3167" height="189.312" rx="19.2" fill="#faf7f0"/>
        <text x="169.92" y="908.0996" xml:space="preserve"><tspan x="169.92" font-family="Liberation Serif, Georgia, serif" font-size="126.72" font-weight="700" fill="#1c1a17">Over the scene</tspan></text>
        </svg>
FAIL
FAIL	amadan.net/oficina/slides/internal/slidestest	136.815s
?   	amadan.net/oficina/slides/scripts/writeestilo	[no test files]
FAIL
make: *** [Makefile:87: test] Error 1

amadan: step gate failed: exit status 2

amadan: job failed at step gate — its output is above, not at the tail of this log
diff --git a/AGENTS.md b/AGENTS.md
index 131fe6b..c944ba4 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -172,6 +172,15 @@ seeded on first sign-in — and comes back out as a PDF.
`0008_create_asset_uploads.sql`): one deck, one actor, single use, two
hours. A ref alone registers nothing, and no PUT is ever signed for an
address something is already served from (spec §2.7, codex 1 and 2).
+ An agent uploads with the bearer instead (`agent_assets.go`,
+ `POST /api/v1/decks/{sqid}/assets`): the bytes are the body, at most
+ 20 MiB, a PNG, JPEG or WebP by its magic that `image.DecodeConfig`
+ reads within `maxAssetDimension` and `svg.MaxDecodePixels` (no SVG; the
+ header only, not a full decode), stored under their hash,
+ the `deck_assets` row written, then `register_asset` (with width,
+ height and `?alt=`) applied as the agent through `applyAgentOpsFrom`,
+ which builds the batch from the document it lands on. The same bytes
+ twice are one asset: 200 with the existing id, nothing written.
- **The font library** (`library.go`, `fonts.html`, estilo's `typeface`
package): `/fonts` is a person's own set of fonts, uploaded through
the app (TTF, OTF, WOFF, WOFF2; `typeface.Inspect` reads the family,
@@ -311,6 +320,7 @@ plus `templates/` — with one file per screen area beside them (`auth.go`,
`decks.go`, `viewer.go`, `share.go`, `presentation.go`, `sample.go`,
`live.go`, `editor.go`, `snapshot.go`, `assets.go`, `svg.go`,
`thumbs.go`, `export.go`, `exports.go`, `api.go`, `agents.go`,
+`agent_assets.go`,
`assets_embed.go`, and team mode's `team_*.go`) and one
package per concern nested underneath: `core` (the wazero host), `deck`
(Go types for the core's JSON view), `render` (slide HTML), `layout`
@@ -474,8 +484,9 @@ deck's `assets` map refers to *this* ref before it serves a byte;
without that, any capability for any deck would fetch any object in the
bucket. It costs an `openDeck` per image request, which is known and
noted rather than forgotten. It also requires a `deck_assets` row for
-the pair, written only by `registerAsset` after it read, sniffed and
-sanitised the bytes: `register_asset` is an op any member can apply with
+the pair, written only by `registerAsset` (or the agent's upload,
+`apiPostAsset`) after it read, sniffed and sanitised or decoded the
+bytes: `register_asset` is an op any member can apply with
any ref, and a presigned PUT lands whatever the browser sent, so the map
alone would let an unverified object be served.
diff --git a/docs/api.md b/docs/api.md
index 938db46..8c41850 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -62,7 +62,8 @@ takes effect without anybody hunting down tokens.
Requests with a body send JSON and say so:
`Content-Type: application/json`. Anything else is a 415. A body over
-1 MiB is a 413.
+1 MiB is a 413. The one exception is adding a picture, whose body is
+the image itself (see `POST /api/v1/decks/{sqid}/assets`).
Every answer with a body is JSON. Every error is:
@@ -80,7 +81,7 @@ Every answer with a body is JSON. Every error is:
| 404 | `not_found` | No such deck, slide or path — including a deck the operator cannot see. A deck that is not yours does not exist. |
| 405 | `method_not_allowed` | Right path, wrong verb. |
| 409 | `conflict` | Somebody else wrote to the deck while this batch was landing, twice. Re-read the deck and decide what your batch now means. |
-| 413 | `too_large` | The body is over 1 MiB. |
+| 413 | `too_large` | The body is over 1 MiB (a picture: over 20 MiB). |
| 415 | `unsupported_media_type` | The body is not `application/json`. |
| 422 | `invalid` | The request was read and refused. `message` says why; `op` is the index of the operation at fault, when the failure was about one. A body carrying anything after its JSON value is refused here too, rather than half-read. |
| 429 | `busy` | You already have four exports running. Wait for one to finish; nothing was started. |
@@ -242,6 +243,57 @@ It is not a substitute for reading the document: a picture is for
looking at what you made, and `GET /api/v1/decks/{sqid}` is for knowing
what is in it.
+### `POST /api/v1/decks/{sqid}/assets` — add a picture
+
+The body is the image: a PNG, JPEG or WebP, at most 20 MiB, no more
+than 30000 pixels either way and 50 megapixels in all. The type is read
+from the bytes, not from `Content-Type`, so send whatever header your
+client likes. The server reads the image's header for its type and
+size, and does not decode the whole picture: a file whose header is
+fine but whose pixels are broken is taken, and shows as a broken
+picture. `?alt=` gives the picture its description, which a screen
+reader says in place of it; leave it out only for a picture that is
+decoration. The same bearer and the same decks as
+`POST /api/v1/decks/{sqid}/ops`.
+
+```sh
+curl -X POST -H "Authorization: Bearer $SLIDES_TOKEN" \
+ --data-binary @roadmap.png \
+ "https://slides.example/api/v1/decks/k7m2xq9dwb/assets?alt=Three%20phases%2C%20each%20with%20a%20date"
+```
+
+```json
+{"id": "b3k9xw2mq7tz", "ref": "9f2c1e...ab", "width": 1600, "height": 900}
+```
+
+The server keeps the bytes under their SHA-256 (`ref`), as it does a
+picture uploaded in the editor, and applies `register_asset` to the
+deck as you, so anybody with the deck open sees it at once. `id` is the
+asset's id in the deck: an image block names it as `props.asset`.
+
+The answer is `201` for a new picture. Send the same bytes to the same
+deck again and the answer is `200` with the asset already there, its
+`id` and `ref` unchanged; nothing is added.
+
+Then put it on a slide. Here `$S` is a slide made with the
+`image-full` template, whose `media` region takes a picture; on a
+canvas slide give a `box` instead, as under `add_block` below.
+
+```sh
+curl -X POST -H "Authorization: Bearer $SLIDES_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"ops":[{"op":"add_block","slide":"'"$S"'","type":"image",
+ "region":"media","props":{"asset":"b3k9xw2mq7tz"}}]}' \
+ https://slides.example/api/v1/decks/k7m2xq9dwb/ops
+```
+
+Refusals are `{"error": "…"}`, most with a `"message"` for you to
+read; branch on `error`, since `message` is not always there:
+`not_found` (no such deck, or not yours; 404, no message), `too_large`
+(413), `not_an_image` (422: anything else, including SVG, bytes that
+only start like a picture, and a header claiming too many pixels), and
+`no_store` (503: this instance has nowhere to keep pictures).
+
### `POST /api/v1/decks/{sqid}/export` — make a PDF
```sh
@@ -583,9 +635,10 @@ layout, never a replacement for it.
### Assets
-**`register_asset`** — name an image the deck can use. The bytes go up
-separately (see "Getting the bytes there" below); this records the
-result. `ref` is the object store's address for those bytes — a hex
+**`register_asset`** — name an image the deck can use. An agent does
+not need it: `POST /api/v1/decks/{sqid}/assets` uploads the picture and
+applies this for you. The editor's upload applies it itself (see
+"Getting the bytes there" below). `ref` is the object store's address for those bytes — a hex
SHA-256, because the store is content-addressed.
```sh
@@ -712,9 +765,9 @@ now. Stills made before it are out of date.
**`PUT /api/v1/decks/{sqid}/scenes/{id}/stills/{state}?made=<version>`** —
a state's still. The body is a PNG or a WebP, 4 MiB at most, that decodes
-and is no more than 30000 pixels either way. `made` must be the scene's
-current version, which you work out as above, or the answer is
-`409 stale` and nothing changes. On success the picture is registered as
+and is no more than 30000 pixels either way and 50 megapixels in all.
+`made` must be the scene's current version, which you work out as
+above, or the answer is `409 stale` and nothing changes. On success the picture is registered as
an asset of the deck and set on the scene with `set_scene`, and the answer
is `{"ref": "…", "made": "…"}`.
@@ -737,18 +790,16 @@ is stale.
## Getting the bytes there
-Images never travel through this API. They go browser-to-bucket, and
-three endpoints on the *signed-in* surface arrange it. They take a
-session cookie rather than a bearer token, because they are what the
-editor's own upload uses.
-
-**An agent cannot add a picture today.** It can name a ref in a
-`register_asset` op, and the document will hold it, but no surface will
-serve those bytes: serving requires a verification row, and a
-verification row is only ever written by the registration endpoint
-below, for an upload it signed itself. Naming an address is not a way
-to publish one. A bearer-authenticated upload is the obvious next
-thing to build and is not built.
+This section is the editor's upload: three endpoints on the
+*signed-in* surface, which take a session cookie rather than a bearer
+token. **An agent adds a picture with
+`POST /api/v1/decks/{sqid}/assets`** (above) and needs none of this.
+
+A ref named in a `register_asset` op is held by the document, but no
+surface serves bytes until the server has read and checked them itself:
+serving requires a verification row, written only by the registration
+endpoint below or by the agent's upload. Naming an address is not a
+way to publish one.
Limits, on all three: 20 MiB per image, and PNG, JPEG, WebP or SVG.
diff --git a/docs/scenes.md b/docs/scenes.md
index df767d4..a1da53d 100644
--- a/docs/scenes.md
+++ b/docs/scenes.md
@@ -194,7 +194,7 @@ shows a plain panel with the scene's name and the state's description.
|---|---|
| Bundle | one HTML document, 2 MiB |
| `data` | 960 KiB as compact JSON, and its change one live update (1 MiB) |
-| Still | PNG or WebP, 4 MiB |
+| Still | PNG or WebP, 4 MiB, 30000 pixels a side and 50 megapixels in all |
| `ready` | 3 seconds after `init` |
Number-heavy data encodes larger than its JSON. A batch that adds or
diff --git a/internal/slides/agent_assets.go b/internal/slides/agent_assets.go
new file mode 100644
index 0000000..1877767
--- /dev/null
+++ b/internal/slides/agent_assets.go
@@ -0,0 +1,175 @@
+// agent_assets.go is how an agent puts a picture in a deck, over the
+// bearer API:
+//
+// POST /api/v1/decks/{sqid}/assets?alt=<description>
+//
+// The body is the image itself, not JSON and not a signed upload: an
+// agent has no browser to PUT to a bucket, and the registration endpoint
+// in assets.go only verifies bytes a session staged. So this route does
+// that endpoint's work on bytes it read itself. It judges them by what
+// they are rather than by any header (a PNG, JPEG or WebP that decodes,
+// within the size a picture may be), stores them under their own hash,
+// writes the DeckAsset row that serveAsset requires, and applies
+// `register_asset` through the ops path as the agent, so live editors
+// see it and it has a seq, an actor and an undo step like any other
+// change.
+//
+// SVG is refused here, though the browser path takes it through
+// svg.go's sanitiser: a sanitised SVG has no pixel size to answer with,
+// and an agent that has an SVG can as well send the picture of it.
+//
+// The same bytes twice for one deck are one asset: the second upload
+// finds the ref already in the deck's map and answers it with 200,
+// writing nothing to the document.
+package slides
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "image"
+ "io"
+ "net/http"
+ "slices"
+ "time"
+
+ "gorm.io/gorm"
+ "gorm.io/gorm/clause"
+
+ "amadan.net/oficina/slides/internal/slides/deck"
+)
+
+// apiAssetMessages is the developer's sentence for each refusal this
+// route adds to the API's own.
+var apiAssetMessages = map[string]string{
+ errTooLarge: "A picture may be at most 20 MiB.",
+ "not_an_image": "A picture is a PNG, JPEG or WebP whose header reads, at most 30000 pixels either way and 50 megapixels in all. SVG is not taken here.",
+ "no_store": "This instance has no object store to keep pictures in.",
+}
+
+// apiAssetFail answers one refusal with its code and its sentence.
+func (a *app) apiAssetFail(w http.ResponseWriter, status int, code string) {
+ a.writeJSON(w, status, map[string]string{"error": code, "message": apiAssetMessages[code]})
+}
+
+// errAssetKnown is a batch not built because the deck already registers
+// the ref: the upload is a duplicate, and there is nothing to write.
+var errAssetKnown = errors.New("slides: the deck already registers this picture")
+
+// apiPostAsset serves POST /api/v1/decks/{sqid}/assets.
+func (a *app) apiPostAsset(w http.ResponseWriter, r *http.Request) {
+ p, ok := a.apiPrincipal(w, r)
+ if !ok {
+ return
+ }
+ d, ok := a.apiDeckFor(w, r, p)
+ if !ok {
+ return
+ }
+ store := a.cfg.Blobs
+ if store == nil {
+ a.apiAssetFail(w, http.StatusServiceUnavailable, "no_store")
+ return
+ }
+
+ raw, err := io.ReadAll(http.MaxBytesReader(w, r.Body, maxAssetBytes))
+ if err != nil {
+ var tooBig *http.MaxBytesError
+ if errors.As(err, &tooBig) {
+ a.apiAssetFail(w, http.StatusRequestEntityTooLarge, errTooLarge)
+ return
+ }
+ apiFail(w, http.StatusBadRequest, errInvalid)
+ return
+ }
+ // Judged by its bytes: one of the three raster types by its magic,
+ // then a header that reads as a size a picture may be: 30000 pixels
+ // either way and 50 megapixels together, the budget every decode of
+ // it (thumbnail, export) is held to. Only the header is read, not the
+ // whole image. The size is what the image says it is, which is the
+ // only size there is for an agent to be held to.
+ kind := sniffImage(raw)
+ if kind != "image/png" && kind != "image/jpeg" && kind != "image/webp" {
+ a.apiAssetFail(w, http.StatusUnprocessableEntity, "not_an_image")
+ return
+ }
+ cfg, _, err := image.DecodeConfig(bytes.NewReader(raw))
+ if err != nil || cfg.Width < 1 || cfg.Height < 1 || cfg.Width > maxAssetDimension || cfg.Height > maxAssetDimension ||
+ cfg.Width*cfg.Height > maxImagePixels {
+ a.apiAssetFail(w, http.StatusUnprocessableEntity, "not_an_image")
+ return
+ }
+ alt := trimTo(r.URL.Query().Get("alt"), maxAssetAlt)
+
+ // Content-addressed, as registerAsset promotes a browser's upload:
+ // the ref is the SHA-256 of these bytes.
+ stored, err := store.Put(r.Context(), bytes.NewReader(raw), kind)
+ if err != nil {
+ a.logger.Error("slides: keep an agent's picture", "deck", d.Sqid, "err", err)
+ apiFail(w, http.StatusInternalServerError, errInternal)
+ return
+ }
+ ref := stored.Hash
+
+ // The verification row serveAsset requires, as registerAsset writes
+ // it. Before the op, so a picture the deck names is always one it
+ // can serve; a row whose op then fails serves nothing, since the
+ // deck's map does not name the ref.
+ g := a.deckGuard(r.Context(), p.operator, d)
+ if err := a.guarded(r.Context(), g, func(db *gorm.DB) error {
+ return db.Clauses(clause.OnConflict{DoNothing: true}).
+ Create(&DeckAsset{DeckID: d.ID, Ref: ref, CreatedAt: time.Now().UTC()}).Error
+ }); err != nil {
+ if guardRefusedJSON(w, err) {
+ return
+ }
+ a.logger.Error("slides: record an agent's verified picture", "deck", d.Sqid, "err", err)
+ apiFail(w, http.StatusInternalServerError, errInternal)
+ return
+ }
+
+ assetID, err := newID()
+ if err != nil {
+ apiFail(w, http.StatusInternalServerError, errInternal)
+ return
+ }
+ // Built from the document the write lands on, so a duplicate is
+ // judged against the deck as it is at the write, not as it was when
+ // the request began.
+ existing := ""
+ build := func(view *deck.Deck) ([]map[string]json.RawMessage, error) {
+ ids := make([]string, 0, len(view.Assets))
+ for id, asset := range view.Assets {
+ if asset.Ref == ref {
+ ids = append(ids, id)
+ }
+ }
+ if len(ids) > 0 {
+ slices.Sort(ids)
+ existing = ids[0]
+ return nil, errAssetKnown
+ }
+ return []map[string]json.RawMessage{opOf(map[string]any{
+ "op": "register_asset", "id": assetID, "ref": ref,
+ "width": cfg.Width, "height": cfg.Height, "alt": alt,
+ })}, nil
+ }
+ _, _, err = a.applyAgentOpsFrom(r.Context(), &d, p.actor(), build, g)
+ switch {
+ case err == nil:
+ a.writeJSON(w, http.StatusCreated, map[string]any{"id": assetID, "ref": ref, "width": cfg.Width, "height": cfg.Height})
+ case errors.Is(err, errAssetKnown):
+ a.writeJSON(w, http.StatusOK, map[string]any{"id": existing, "ref": ref, "width": cfg.Width, "height": cfg.Height})
+ default:
+ a.apiOpsFailed(w, d, err)
+ }
+}
+
+// opOf is one op of a batch, from the values it carries.
+func opOf(fields map[string]any) map[string]json.RawMessage {
+ op := make(map[string]json.RawMessage, len(fields))
+ for k, v := range fields {
+ op[k], _ = json.Marshal(v)
+ }
+ return op
+}
diff --git a/internal/slides/api.go b/internal/slides/api.go
index 4e4286b..3ed4dca 100644
--- a/internal/slides/api.go
+++ b/internal/slides/api.go
@@ -77,9 +77,9 @@ const (
// maxAPIBody is the largest request body this surface reads. A mebibyte
// is far more than any batch of operations needs — the biggest thing an
// op carries is a slide's Markdown — and it is the bound that stops an
-// unbounded read from being the way to take the process down. Asset
-// bytes never come through here (spec §7.2: a presigned upload, then
-// register_asset naming the result).
+// unbounded read from being the way to take the process down. A
+// picture's bytes come through POST .../assets instead, which reads at
+// most maxAssetBytes (agent_assets.go).
const maxAPIBody = 1 << 20
// apiRouter is the whole drive surface, gated by the bearer and
@@ -95,6 +95,8 @@ func (a *app) apiRouter() http.Handler {
r.Post(apiPrefix+"/decks", a.apiCreateDeck)
r.Get(apiPrefix+"/decks/{sqid}", a.apiGetDeck)
r.Post(apiPrefix+"/decks/{sqid}/ops", a.apiOps)
+ // A picture, the bytes as the body (agent_assets.go).
+ r.Post(apiPrefix+"/decks/{sqid}/assets", a.apiPostAsset)
// A scene's pictures and code (scenestills.go).
r.Put(apiPrefix+"/decks/{sqid}/scenes/{id}/stills/{state}", a.apiPutStill)
r.Put(apiPrefix+"/decks/{sqid}/scenes/{id}/code", a.apiPutSceneCode)
@@ -512,8 +514,10 @@ func (a *app) apiOps(w http.ResponseWriter, r *http.Request) {
a.writeJSON(w, http.StatusOK, map[string]any{"seq": d.Seq, "ids": ids})
}
-// apiOpsFailed answers a batch applyAgentOps refused, for every route
-// that applies one.
+// apiOpsFailed answers a batch the deck refused, for every route that
+// applies one (apiOps, agent_assets.go, scenestills.go): the guard's
+// answer, a lost race twice over, the core's account of the op it
+// refused, or a 500.
func (a *app) apiOpsFailed(w http.ResponseWriter, d Deck, err error) {
switch {
case guardRefusedJSON(w, err):
@@ -559,8 +563,9 @@ func (a *app) applyAgentOps(ctx context.Context, d *Deck, actor string, ops []ma
// document it lands on: build is given the view each attempt opened, so
// whatever it checked is what the write is made against. The optimistic
// lock refuses the write if the deck has moved since that open, and the
-// retry builds again from the newer one. It answers the document as the
-// write left it.
+// retry builds again from the newer one. An error from build is
+// returned as it is, with nothing written. It answers the document as
+// the write left it.
func (a *app) applyAgentOpsFrom(ctx context.Context, d *Deck, actor string, build func(*deck.Deck) ([]map[string]json.RawMessage, error), g writeGuard) (map[string]string, *deck.Deck, error) {
var ids map[string]string
var lastErr error
diff --git a/internal/slides/export.go b/internal/slides/export.go
index e97b48d..bbc1cf3 100644
--- a/internal/slides/export.go
+++ b/internal/slides/export.go
@@ -79,8 +79,9 @@ const maxExportAsset = 20 << 20
// byte cap above says nothing about pixels — a 20 MiB PNG can be a
// hundred thousand pixels a side — and decoding is where the memory
// goes. Fifty megapixels is an 8000 by 6000 photograph; anything larger
-// is dropped with a warning.
-const maxImagePixels = 50_000_000
+// is dropped with a warning. One budget with the thumbnail's and the
+// agent upload's (svg.MaxDecodePixels).
+const maxImagePixels = svg.MaxDecodePixels
// maxImageEdge is the long edge an inlined image is scaled down to
// (§4.3). Slightly over the page's own 1920, so a full-bleed picture is
diff --git a/internal/slides/scenestills.go b/internal/slides/scenestills.go
index 4a34bc4..2831052 100644
--- a/internal/slides/scenestills.go
+++ b/internal/slides/scenestills.go
@@ -168,13 +168,18 @@ func (a *app) apiPutStill(w http.ResponseWriter, r *http.Request) {
if !ok {
return
}
- // Judged as a picture is (registerAsset): by its bytes, and a type
- // of the two a still is drawn as. The size is what the image says it
- // is, which is the only size there is for an agent to be held to.
+ // Judged as an agent's picture is (agent_assets.go): by its bytes, a
+ // type of the two a still is drawn as, and a header that reads as a
+ // size a picture may be: 30000 pixels either way and maxImagePixels
+ // (svg.MaxDecodePixels, 50 megapixels) together, the budget every
+ // decode of it (thumbnail, export) is held to. The size is what the
+ // image says it is, which is the only size there is for an agent to
+ // be held to.
kind := sniffImage(raw)
cfg, _, err := image.DecodeConfig(bytes.NewReader(raw))
if (kind != "image/png" && kind != "image/webp") || err != nil ||
- cfg.Width < 1 || cfg.Height < 1 || cfg.Width > maxAssetDimension || cfg.Height > maxAssetDimension {
+ cfg.Width < 1 || cfg.Height < 1 || cfg.Width > maxAssetDimension || cfg.Height > maxAssetDimension ||
+ cfg.Width*cfg.Height > maxImagePixels {
apiSceneFail(w, http.StatusUnprocessableEntity, "not_an_image")
return
}
diff --git a/internal/slides/svg/svg.go b/internal/slides/svg/svg.go
index 26fb7f8..b73f645 100644
--- a/internal/slides/svg/svg.go
+++ b/internal/slides/svg/svg.go
@@ -405,8 +405,22 @@ var inlineTypes = []string{"image/png", "image/jpeg", "image/gif"}
// consequence of changing the converter under it.
//
// A file that does not decode answers ok=false and the caller falls
-// back to the URL, exactly as an unknown type does.
+// back to the URL, exactly as an unknown type does. So does one whose
+// header claims more than MaxDecodePixels, read before the decode: a
+// forty-byte WebP can say 30000 by 30000, and the decoder allocates
+// what the header says before it finds the bytes are not there.
+// MaxDecodePixels bounds what one picture may decode to, here and in
+// the export (export.go's maxImagePixels), and what an agent's upload
+// may claim (agent_assets.go). The byte cap says nothing about pixels,
+// and decoding is where the memory goes. Fifty megapixels is an 8000 by
+// 6000 photograph.
+const MaxDecodePixels = 50_000_000
+
func webpAsPNG(data []byte) ([]byte, bool) {
+ cfg, err := webp.DecodeConfig(bytes.NewReader(data))
+ if err != nil || cfg.Width <= 0 || cfg.Height <= 0 || cfg.Width*cfg.Height > MaxDecodePixels {
+ return nil, false
+ }
img, err := webp.Decode(bytes.NewReader(data))
if err != nil {
return nil, false
diff --git a/internal/slides/svg/svg_test.go b/internal/slides/svg/svg_test.go
index 665ec51..3ec586f 100644
--- a/internal/slides/svg/svg_test.go
+++ b/internal/slides/svg/svg_test.go
@@ -3,10 +3,12 @@ package svg_test
import (
"bytes"
"encoding/base64"
+ "encoding/binary"
"encoding/hex"
"encoding/xml"
"image/png"
"io"
+ "runtime"
"strings"
"testing"
@@ -526,6 +528,53 @@ func TestAWebPIsInlinedAsAPNG(t *testing.T) {
}
}
+// hugeWebP is forty bytes that say 30000 by 30000 with alpha: a VP8X
+// header and an uncompressed ALPH chunk cut short. Its header reads;
+// decoding it allocates the whole alpha plane (900 MB) before finding
+// the bytes are not there.
+func hugeWebP() []byte {
+ edge := 30000
+ vp8x := make([]byte, 10)
+ vp8x[0] = 1 << 4 // alpha
+ vp8x[4], vp8x[5], vp8x[6] = byte(edge-1), byte((edge-1)>>8), byte((edge-1)>>16)
+ vp8x[7], vp8x[8], vp8x[9] = byte(edge-1), byte((edge-1)>>8), byte((edge-1)>>16)
+ var body bytes.Buffer
+ body.WriteString("WEBP")
+ chunk := func(id string, data []byte) {
+ body.WriteString(id)
+ binary.Write(&body, binary.LittleEndian, uint32(len(data)))
+ body.Write(data)
+ }
+ chunk("VP8X", vp8x)
+ chunk("ALPH", []byte{0, 0})
+ var out bytes.Buffer
+ out.WriteString("RIFF")
+ binary.Write(&out, binary.LittleEndian, uint32(body.Len()))
+ out.Write(body.Bytes())
+ return out.Bytes()
+}
+
+// A WebP whose header claims more pixels than MaxDecodePixels is not
+// decoded for the picture: it falls back to the URL, and the encode
+// allocates nowhere near the plane the header asks for.
+func TestAWebPTooBigToDecodeIsNotDecoded(t *testing.T) {
+ huge := hugeWebP()
+ var before, after runtime.MemStats
+ runtime.GC()
+ runtime.ReadMemStats(&before)
+ doc := parse(t, svg.Encode(frame(layout.Image{W: 10, H: 10, Asset: "asset0001aaa"}), svg.Options{
+ InlineImages: inline("image/webp", huge),
+ AssetURL: func(string) string { return "/assets/x" },
+ }))
+ runtime.ReadMemStats(&after)
+ if got := doc.first(t, "image").attr["href"]; got != "/assets/x" {
+ t.Errorf("an oversized WebP inlined as %q", trunc(got))
+ }
+ if grew := after.TotalAlloc - before.TotalAlloc; grew > 64<<20 {
+ t.Errorf("encoding a slide with an oversized WebP allocated %d MB: it was decoded", grew>>20)
+ }
+}
+
// trunc keeps a failure message about a data URI readable.
func trunc(s string) string {
if len(s) > 80 {
diff --git a/internal/slides/team_guard_test.go b/internal/slides/team_guard_test.go
index 2c3914b..90d6b30 100644
--- a/internal/slides/team_guard_test.go
+++ b/internal/slides/team_guard_test.go
@@ -224,6 +224,9 @@ func TestTeamEveryWriteRouteRefusesALapseBeforeCommit(t *testing.T) {
{"api present", nil, func() *httptest.ResponseRecorder {
return f.api(token, "POST", apiPrefix+"/decks/"+plan.Sqid+"/present", "")
}},
+ {"api asset", nil, func() *httptest.ResponseRecorder {
+ return f.api(token, "POST", apiPrefix+"/decks/"+plan.Sqid+"/assets", string(png))
+ }},
}
for _, route := range routes {
if route.setup != nil {
@@ -312,3 +315,73 @@ func TestNoGuardOutsideTeamMode(t *testing.T) {
t.Fatal("presign TTL changed outside team mode")
}
}
+
+// An agent's picture is two writes: the verification row, then the
+// register_asset op. Standing that lapses during the second leaves the
+// first (a row that serves nothing) and refuses the second: a 503, the
+// document and its seq as they were, and the ref not served.
+func TestTeamAnAgentPictureLapsingDuringItsOpIsRefused(t *testing.T) {
+ f := newTeamFixture(t)
+ store, err := blobs.Dir(t.TempDir())
+ if err != nil {
+ t.Fatal(err)
+ }
+ f.a.cfg.Blobs = store
+ u := f.member(teamSubject('a'), "member")
+ plan := f.deck(u, "Team plan", rungTeam)
+ token := f.agent(u)
+ png := pngBytes(t, 4, 4, color.Black)
+ sum := sha256.Sum256(png)
+ ref := hex.EncodeToString(sum[:])
+
+ writes := 0
+ teamGuard = func(ctx context.Context, authorize func(roster.State) error, write func() error) error {
+ writes++
+ if writes == 1 {
+ return teammode.Guard(ctx, authorize, write)
+ }
+ return lapsing(f)(ctx, authorize, write)
+ }
+ t.Cleanup(func() { teamGuard = teammode.Guard })
+
+ before := f.snapshot(plan)
+ got := f.api(token, "POST", apiPrefix+"/decks/"+plan.Sqid+"/assets", string(png))
+ if got.Code != http.StatusServiceUnavailable {
+ t.Fatalf("a picture whose op lapsed = %d %s, want 503", got.Code, got.Body.String())
+ }
+ if writes != 2 {
+ t.Fatalf("%d guarded writes, want the row and then the op", writes)
+ }
+ after := f.snapshot(plan)
+ if after.seq != before.seq || after.updates != before.updates {
+ t.Errorf("the op was written: seq %d -> %d, updates %d -> %d", before.seq, after.seq, before.updates, after.updates)
+ }
+ if after.assets != before.assets+1 {
+ t.Errorf("verification rows %d -> %d, want the row committed", before.assets, after.assets)
+ }
+ var fresh Deck
+ if err := f.d.G.Take(&fresh, plan.ID).Error; err != nil {
+ t.Fatal(err)
+ }
+ h, view, err := f.a.openDeck(context.Background(), fresh)
+ if err != nil {
+ t.Fatal(err)
+ }
+ h.Close(context.Background())
+ if len(view.Assets) != 0 {
+ t.Errorf("the deck registers assets after a refused op: %+v", view.Assets)
+ }
+
+ teamGuard = teammode.Guard
+ f.renewed()
+ if rec := f.do("GET", deckPath(plan)+"/assets/"+ref, "", "", ""); rec.Code != http.StatusNotFound {
+ t.Errorf("the picture of a refused op is served: %d", rec.Code)
+ }
+ // And the same upload with standing back registers and serves it.
+ if rec := f.api(token, "POST", apiPrefix+"/decks/"+plan.Sqid+"/assets", string(png)); rec.Code != http.StatusCreated {
+ t.Fatalf("the upload again = %d %s, want 201", rec.Code, rec.Body.String())
+ }
+ if rec := f.do("GET", deckPath(plan)+"/assets/"+ref, "", "", ""); rec.Code != http.StatusOK {
+ t.Errorf("the picture once registered = %d, want 200", rec.Code)
+ }
+}
diff --git a/internal/slidestest/agent_assets_test.go b/internal/slidestest/agent_assets_test.go
new file mode 100644
index 0000000..c910987
--- /dev/null
+++ b/internal/slidestest/agent_assets_test.go
@@ -0,0 +1,323 @@
+package slidestest
+
+// An agent's pictures through the drive API (internal/slides/agent_assets.go):
+// POST /api/v1/decks/{sqid}/assets takes the image bytes as the body,
+// judges them, keeps them under their own hash, verifies them for the
+// deck and registers them as an asset of it, as the agent.
+
+import (
+ "bytes"
+ "encoding/binary"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "hash/crc32"
+ "image"
+ "image/color"
+ "image/jpeg"
+ "image/png"
+ "net/http"
+ "net/http/httptest"
+ "net/url"
+ "strings"
+ "testing"
+
+ "golang.org/x/image/webp"
+)
+
+// webpPicture is a 4 by 3 lossless WebP of one flat colour (the export
+// test's fixture): Go has no WebP encoder, so the bytes are written out.
+func webpPicture(t *testing.T) []byte {
+ t.Helper()
+ raw, err := hex.DecodeString("524946461e000000574542505650384c110000002f0380000007508f2217a5ff8188e87f0000")
+ if err != nil {
+ t.Fatal(err)
+ }
+ return raw
+}
+
+// jpegPicture is a w by h JPEG of one colour.
+func jpegPicture(t *testing.T, w, h int) []byte {
+ t.Helper()
+ img := image.NewRGBA(image.Rect(0, 0, w, h))
+ for i := range img.Pix {
+ img.Pix[i] = 0x80
+ }
+ img.Set(0, 0, color.Black)
+ var buf bytes.Buffer
+ if err := jpeg.Encode(&buf, img, nil); err != nil {
+ t.Fatal(err)
+ }
+ return buf.Bytes()
+}
+
+// hugeWebP is forty bytes whose header says 30000 by 30000 with alpha
+// (the svg package's HugeWebP): a decode would allocate 900 MB.
+func hugeWebP() []byte {
+ edge := 30000
+ b := []byte("RIFF\x20\x00\x00\x00WEBPVP8X\x0a\x00\x00\x00\x10\x00\x00\x00" +
+ "\x00\x00\x00\x00\x00\x00ALPH\x02\x00\x00\x00\x00\x00")
+ for _, at := range []int{24, 27} {
+ b[at], b[at+1], b[at+2] = byte(edge-1), byte((edge-1)>>8), byte((edge-1)>>16)
+ }
+ return b
+}
+
+// postPicture is one upload: the bytes as the body, under the token.
+func postPicture(t *testing.T, a *testApp, sqid, token, query string, body []byte) *httptest.ResponseRecorder {
+ t.Helper()
+ req := httptest.NewRequest(http.MethodPost, "/api/v1/decks/"+sqid+"/assets"+query, bytes.NewReader(body))
+ req.Header.Set("Authorization", "Bearer "+token)
+ req.Header.Set("Content-Type", "application/octet-stream")
+ return send(t, a, req)
+}
+
+func jsonObject(t *testing.T, rec *httptest.ResponseRecorder) map[string]any {
+ t.Helper()
+ if ct := rec.Header().Get("Content-Type"); !strings.HasPrefix(ct, "application/json") {
+ t.Fatalf("Content-Type = %q, want JSON\n%s", ct, rec.Body)
+ }
+ var out map[string]any
+ if err := json.Unmarshal(rec.Body.Bytes(), &out); err != nil {
+ t.Fatalf("body is not a JSON object: %v\n%s", err, rec.Body)
+ }
+ return out
+}
+
+type agentAsset struct {
+ Ref string `json:"ref"`
+ Name string `json:"name"`
+ Width int `json:"width"`
+ Height int `json:"height"`
+ Alt string `json:"alt"`
+}
+
+// deckAssets is the deck's assets as an agent reads them.
+func deckAssets(t *testing.T, a *testApp, token, sqid string) map[string]agentAsset {
+ t.Helper()
+ rec := send(t, a, bearerRequest(t, http.MethodGet, "/api/v1/decks/"+sqid, token, ""))
+ if rec.Code != http.StatusOK {
+ t.Fatalf("GET deck: status %d\n%s", rec.Code, rec.Body)
+ }
+ var view struct {
+ Assets map[string]agentAsset `json:"assets"`
+ }
+ if err := json.Unmarshal(rec.Body.Bytes(), &view); err != nil {
+ t.Fatal(err)
+ }
+ return view.Assets
+}
+
+// agentPictures is an app with a store, a signed-in person, their
+// agent's token and a deck.
+func agentPictures(t *testing.T) (a *testApp, cookies []*http.Cookie, token, sqid string) {
+ t.Helper()
+ cfg, mailer := newConfig(t)
+ cfg.AllowedAddresses = []string{allowedAddress, otherAddress}
+ cfg.Blobs = dirStore(t)
+ a = newAppWith(t, cfg, mailer)
+ cookies = signedIn(t, a, allowedAddress)
+ token = mintAgent(t, a, cookies, "pictures")
+ return a, cookies, token, apiDeck(t, a, token, "Pictures")
+}
+
+// TestAnAgentUploadsAPictureAndASlideDrawsIt: a PNG, a WebP and a JPEG go up,
+// come back 201 with their hash and size, are registered as the
+// agent's change, are served by the deck's picture route, and are drawn
+// by the slide's HTML and its thumbnail once an image block names them.
+func TestAnAgentUploadsAPictureAndASlideDrawsIt(t *testing.T) {
+ a, cookies, token, sqid := agentPictures(t)
+ for _, pic := range []struct {
+ name string
+ body []byte
+ width, height int
+ }{
+ {"png", onePixelPNG, 1, 1},
+ {"webp", webpPicture(t), 4, 3},
+ {"jpeg", jpegPicture(t, 5, 2), 5, 2},
+ } {
+ alt := "A " + pic.name + " picture"
+ rec := postPicture(t, a, sqid, token, "?alt="+url.QueryEscape(alt), pic.body)
+ if rec.Code != http.StatusCreated {
+ t.Fatalf("%s: status %d, want 201\n%s", pic.name, rec.Code, rec.Body)
+ }
+ out := jsonObject(t, rec)
+ ref := hashOf(pic.body)
+ if out["ref"] != ref || out["width"] != float64(pic.width) || out["height"] != float64(pic.height) {
+ t.Fatalf("%s: answered %v, want ref %s and %dx%d", pic.name, out, ref, pic.width, pic.height)
+ }
+ id, _ := out["id"].(string)
+ if id == "" {
+ t.Fatalf("%s: no asset id in %v", pic.name, out)
+ }
+
+ got, ok := deckAssets(t, a, token, sqid)[id]
+ if !ok || got != (agentAsset{Ref: ref, Name: got.Name, Width: pic.width, Height: pic.height, Alt: alt}) {
+ t.Fatalf("%s: the deck's asset %s is %+v (present %v)", pic.name, id, got, ok)
+ }
+
+ var actor string
+ if err := a.db.G.Raw("SELECT actor FROM deck_updates WHERE deck_id = (SELECT id FROM decks WHERE sqid = ?) ORDER BY seq DESC LIMIT 1", sqid).Scan(&actor).Error; err != nil {
+ t.Fatal(err)
+ }
+ if !strings.HasPrefix(actor, "agent:") {
+ t.Errorf("%s: the registration's actor is %q, want the agent", pic.name, actor)
+ }
+
+ served := mustGet(t, a, "/d/"+sqid+"/assets/"+ref, http.StatusOK, cookies)
+ if !bytes.Equal(served.Body.Bytes(), pic.body) {
+ t.Errorf("%s: the served bytes differ from what went up", pic.name)
+ }
+
+ slide := apiJSON(t, a, http.MethodPost, "/api/v1/decks/"+sqid+"/ops", token,
+ `{"ops":[{"op":"add_slide","layout":"flow","template":"image-full"}]}`, http.StatusOK)
+ slideID := slide["ids"].(map[string]any)["0"].(string)
+ apiJSON(t, a, http.MethodPost, "/api/v1/decks/"+sqid+"/ops", token,
+ fmt.Sprintf(`{"ops":[{"op":"add_block","slide":%q,"type":"image","region":"media","props":{"asset":%q}}]}`,
+ slideID, id), http.StatusOK)
+ page := mustGet(t, a, "/d/"+sqid+"/slides/"+slideID+".html", http.StatusOK, cookies).Body.String()
+ if !strings.Contains(page, `src="/d/`+sqid+`/assets/`+ref+`"`) {
+ t.Errorf("%s: the slide's HTML does not draw the picture:\n%s", pic.name, page)
+ }
+ thumb := mustGet(t, a, "/d/"+sqid+"/slides/"+slideID+".svg", http.StatusOK, cookies).Body.String()
+ // Inlined, since an SVG in an <img> fetches nothing: a WebP as
+ // a PNG, the others as they are.
+ inline := "data:image/png;base64,"
+ if pic.name == "jpeg" {
+ inline = "data:image/jpeg;base64,"
+ }
+ if !strings.Contains(thumb, inline) {
+ t.Errorf("%s: the slide's SVG does not draw the picture:\n%s", pic.name, thumb)
+ }
+ }
+}
+
+// TestTheSamePictureTwiceIsOneAsset: the second upload answers 200 with
+// the first one's ref and id, and the deck still has one asset.
+func TestTheSamePictureTwiceIsOneAsset(t *testing.T) {
+ a, _, token, sqid := agentPictures(t)
+ first := postPicture(t, a, sqid, token, "", onePixelPNG)
+ if first.Code != http.StatusCreated {
+ t.Fatalf("first: status %d\n%s", first.Code, first.Body)
+ }
+ var seq int64
+ readSeq := func() int64 {
+ var s int64
+ if err := a.db.G.Raw("SELECT seq FROM decks WHERE sqid = ?", sqid).Scan(&s).Error; err != nil {
+ t.Fatal(err)
+ }
+ return s
+ }
+ seq = readSeq()
+ second := postPicture(t, a, sqid, token, "?alt=Again", onePixelPNG)
+ if second.Code != http.StatusOK {
+ t.Fatalf("second: status %d, want 200\n%s", second.Code, second.Body)
+ }
+ a1, a2 := jsonObject(t, first), jsonObject(t, second)
+ if a1["ref"] != a2["ref"] || a1["id"] != a2["id"] || a2["width"] != float64(1) {
+ t.Errorf("the duplicate answered %v, the first %v", a2, a1)
+ }
+ if assets := deckAssets(t, a, token, sqid); len(assets) != 1 {
+ t.Errorf("the deck has %d assets after the same picture twice: %+v", len(assets), assets)
+ }
+ if readSeq() != seq {
+ t.Error("the duplicate wrote to the document")
+ }
+}
+
+// TestWhatIsNotAPictureIsRefused: over 20 MiB is 413; anything that is
+// not a PNG, JPEG or WebP that decodes at a size pictures allow is 422.
+// Nothing is registered.
+func TestWhatIsNotAPictureIsRefused(t *testing.T) {
+ a, _, token, sqid := agentPictures(t)
+ big := append(append([]byte{}, onePixelPNG...), bytes.Repeat([]byte{0}, 20<<20)...)
+ // A PNG whose header, checksum right, declares 40000 x 1: it decodes
+ // as far as its size, which is over the 30000 a picture may be.
+ wide := append([]byte{}, onePixelPNG...)
+ wide[16], wide[17], wide[18], wide[19] = 0, 0, 0x9c, 0x40
+ binary.BigEndian.PutUint32(wide[29:33], crc32.ChecksumIEEE(wide[12:29]))
+ if cfg, err := png.DecodeConfig(bytes.NewReader(wide)); err != nil || cfg.Width != 40000 {
+ t.Fatalf("the wide PNG is not a valid header of width 40000: %v %+v", err, cfg)
+ }
+ // 10000 x 10000: each edge allowed, the 100 megapixels together not.
+ square := append([]byte{}, onePixelPNG...)
+ binary.BigEndian.PutUint32(square[16:20], 10000)
+ binary.BigEndian.PutUint32(square[20:24], 10000)
+ binary.BigEndian.PutUint32(square[29:33], crc32.ChecksumIEEE(square[12:29]))
+ if cfg, err := png.DecodeConfig(bytes.NewReader(square)); err != nil || cfg.Width != 10000 {
+ t.Fatalf("the square PNG is not a valid header of 10000 x 10000: %v %+v", err, cfg)
+ }
+ if cfg, err := webp.DecodeConfig(bytes.NewReader(hugeWebP())); err != nil || cfg.Width != 30000 || cfg.Height != 30000 {
+ t.Fatalf("the huge WebP is not a valid header of 30000 x 30000: %v %+v", err, cfg)
+ }
+ for name, c := range map[string]struct {
+ body []byte
+ status int
+ code string
+ }{
+ "too big": {big, http.StatusRequestEntityTooLarge, "too_large"},
+ "too many pixels together": {square, http.StatusUnprocessableEntity, "not_an_image"},
+ "a webp header of 30000 x 30000": {hugeWebP(), http.StatusUnprocessableEntity, "not_an_image"},
+ "text": {[]byte("hello, this is not a picture"), http.StatusUnprocessableEntity, "not_an_image"},
+ "html": {[]byte("<!doctype html><title>x</title>"), http.StatusUnprocessableEntity, "not_an_image"},
+ "svg": {[]byte(`<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>`), http.StatusUnprocessableEntity, "not_an_image"},
+ "fake png": {[]byte("\x89PNG\r\n\x1a\nnot really a png at all"), http.StatusUnprocessableEntity, "not_an_image"},
+ "fake jpeg": {[]byte("\xff\xd8\xff\xe0 not really"), http.StatusUnprocessableEntity, "not_an_image"},
+ "fake webp": {[]byte("RIFF\x00\x00\x00\x00WEBPnot really"), http.StatusUnprocessableEntity, "not_an_image"},
+ "a broken png": {onePixelPNG[:20], http.StatusUnprocessableEntity, "not_an_image"},
+ "empty": {nil, http.StatusUnprocessableEntity, "not_an_image"},
+ "too many pixels": {wide, http.StatusUnprocessableEntity, "not_an_image"},
+ } {
+ rec := postPicture(t, a, sqid, token, "", c.body)
+ if rec.Code != c.status {
+ t.Errorf("%s: status %d, want %d\n%s", name, rec.Code, c.status, rec.Body)
+ continue
+ }
+ out := jsonObject(t, rec)
+ if out["error"] != c.code || out["message"] == nil || out["message"] == "" {
+ t.Errorf("%s: answered %v, want error %s with a message", name, out, c.code)
+ }
+ }
+ if assets := deckAssets(t, a, token, sqid); len(assets) != 0 {
+ t.Errorf("a refused picture was registered: %+v", assets)
+ }
+}
+
+// TestPicturesAreRefusedForDecksThatAreNotYours: another person's deck
+// and a deck that does not exist are 404, a bad token 401, as the rest
+// of the API answers them.
+func TestPicturesAreRefusedForDecksThatAreNotYours(t *testing.T) {
+ a, _, token, sqid := agentPictures(t)
+ theirs := mintAgent(t, a, signedIn(t, a, otherAddress), "theirs")
+ for name, c := range map[string]struct {
+ token, sqid string
+ status int
+ }{
+ "another person's deck": {theirs, sqid, http.StatusNotFound},
+ "no such deck": {token, "zzzzzzzzzz", http.StatusNotFound},
+ "a bad token": {"sl_not-a-real-token", sqid, http.StatusUnauthorized},
+ } {
+ rec := postPicture(t, a, c.sqid, c.token, "", onePixelPNG)
+ if rec.Code != c.status {
+ t.Errorf("%s: status %d, want %d\n%s", name, rec.Code, c.status, rec.Body)
+ }
+ jsonObject(t, rec)
+ }
+ if assets := deckAssets(t, a, token, sqid); len(assets) != 0 {
+ t.Errorf("a refused picture was registered: %+v", assets)
+ }
+}
+
+// TestWithoutAStoreAPictureHasNowhereToGo: 503 no_store.
+func TestWithoutAStoreAPictureHasNowhereToGo(t *testing.T) {
+ a := newApp(t)
+ token := mintAgent(t, a, signedIn(t, a, allowedAddress), "pictures")
+ sqid := apiDeck(t, a, token, "Bare")
+ rec := postPicture(t, a, sqid, token, "", onePixelPNG)
+ if rec.Code != http.StatusServiceUnavailable {
+ t.Fatalf("status %d, want 503\n%s", rec.Code, rec.Body)
+ }
+ if out := jsonObject(t, rec); out["error"] != "no_store" {
+ t.Errorf("answered %v, want no_store", out)
+ }
+}
diff --git a/internal/slidestest/scenes_agent_test.go b/internal/slidestest/scenes_agent_test.go
index 5b99022..79dbc79 100644
--- a/internal/slidestest/scenes_agent_test.go
+++ b/internal/slidestest/scenes_agent_test.go
@@ -286,18 +286,26 @@ func TestAStillIsAPictureOfTheRightSize(t *testing.T) {
if cfg, err := png.DecodeConfig(bytes.NewReader(wide)); err != nil || cfg.Width != 40000 {
t.Fatalf("the wide PNG is not a valid header of width 40000: %v %+v", err, cfg)
}
+ // 10000 x 10000: each edge allowed, the 100 megapixels together over
+ // the budget every decode is held to (svg.MaxDecodePixels).
+ square := append([]byte{}, onePixelPNG...)
+ binary.BigEndian.PutUint32(square[16:20], 10000)
+ binary.BigEndian.PutUint32(square[20:24], 10000)
+ binary.BigEndian.PutUint32(square[29:33], crc32.ChecksumIEEE(square[12:29]))
for name, call := range map[string]struct {
body []byte
status int
code string
}{
- "too big": {big, http.StatusRequestEntityTooLarge, "too_large"},
- "html": {sceneBundle, http.StatusUnprocessableEntity, "not_an_image"},
- "svg": {[]byte(`<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>`), http.StatusUnprocessableEntity, "not_an_image"},
- "jpeg": {[]byte("\xff\xd8\xff\xe0 not really"), http.StatusUnprocessableEntity, "not_an_image"},
- "a broken png": {onePixelPNG[:20], http.StatusUnprocessableEntity, "not_an_image"},
- "empty": {nil, http.StatusUnprocessableEntity, "not_an_image"},
- "too many pixels": {wide, http.StatusUnprocessableEntity, "not_an_image"},
+ "too many pixels together": {square, http.StatusUnprocessableEntity, "not_an_image"},
+ "a webp header of 30000 x 30000": {hugeWebP(), http.StatusUnprocessableEntity, "not_an_image"},
+ "too big": {big, http.StatusRequestEntityTooLarge, "too_large"},
+ "html": {sceneBundle, http.StatusUnprocessableEntity, "not_an_image"},
+ "svg": {[]byte(`<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"/>`), http.StatusUnprocessableEntity, "not_an_image"},
+ "jpeg": {[]byte("\xff\xd8\xff\xe0 not really"), http.StatusUnprocessableEntity, "not_an_image"},
+ "a broken png": {onePixelPNG[:20], http.StatusUnprocessableEntity, "not_an_image"},
+ "empty": {nil, http.StatusUnprocessableEntity, "not_an_image"},
+ "too many pixels": {wide, http.StatusUnprocessableEntity, "not_an_image"},
} {
rec := agentCall(t, a, http.MethodPut, stillURL(sqid, id, "one", made), token, call.body)
if rec.Code != call.status || decode(t, rec)["error"] != call.code {