Files
improvise/harness/opfs-contract/Cargo.toml
T
Edward Langley 12714c7527 feat(browser): a boot failure is a state with a reason, not silence
improvise-1wft and the five beads it blocked were one failure: nothing
carried a boot failure's REASON from the worker to the page. The channel
is one rule -- a protocol frame crosses the port as a STRING, a shell
notice as an OBJECT -- so it needs no protocol change and the
discriminator is total.

A boot failure is a STATE, not a rejected promise. A document another
context holds the exclusive handle to now OPENS read-only: measured first
(harness probe, Chromium + Firefox), getFile() reads the bytes while the
handle is held, with the second-handle refusal asserted so the probe
cannot pass vacuously.

- improvise-1wft  the channel: Notice/NoticeKind, boot_notice, take_notice
- improvise-i0v9  read-only boot over vfs::ReadOnly + OpfsFs::read_unattached
- improvise-86nw  start() rejecting for any reason now posts BootFailed
- improvise-9cma  boot::document_name -- and a/b/c.improv was ACCEPTED as
                  c.improv, not rejected, which is worse than the report
- improvise-iobc  vfs::Origin: a seed error is a notice only when the
                  document really had to be created without it
- improvise-vep8  the watchdog arms BEFORE transport.ready; its message
                  stopped claiming the connection was accepted
- improvise-7gip  DedicatedWorkerGlobalScope (needs a web-sys feature)
- improvise-zre1  a persist that fails raises a notice; the trigger is the
                  dirty flag surviving, observed rather than predicted
- improvise-7gf8  the render breaker trips once instead of retrying forever
- improvise-ociy  non-OPEN sends are loud; a viewport announcement is not
- improvise-y01k  the three ws-server drops are logged
- improvise-r4nf  serde failures throw instead of reading as "nothing to send"

Every notice routes through shell.fail, so gotcha 48's disarm half is not
re-broken. Two comments in shell.spec.js stated the opposite of the new
arming order and were corrected rather than left.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
2026-09-21 14:51:34 -07:00

51 lines
1.5 KiB
TOML

[package]
name = "opfs-contract"
version = "0.0.0"
edition = "2024"
description = "Runs improvise-io's storage_contract against OpfsFs in a real browser"
license = "Apache-2.0"
publish = false
# Deliberately NOT a workspace member. It builds only for wasm32 — it names
# `improvise_io::opfs`, which is `cfg(target_arch = "wasm32")` — so a member
# would break `cargo test --workspace` and `cargo clippy --workspace`. An empty
# `[workspace]` table makes it its own root, which is what keeps it out without
# editing the root manifest (and without a Cargo.toml conflict with every other
# agent).
[workspace]
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
improvise-io = { path = "../../crates/improvise-io" }
anyhow = "1"
js-sys = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
# Only in order to CREATE a directory in OPFS, which `OpfsFs` never does.
# `keys()` yields directories alongside files and one must not be listed as a
# document; without this the fix for that would be argued rather than tested.
[dependencies.web-sys]
version = "0.3"
features = [
"Blob",
"DedicatedWorkerGlobalScope",
"File",
"FileSystemDirectoryHandle",
"FileSystemFileHandle",
"FileSystemGetDirectoryOptions",
"FileSystemRemoveOptions",
"FileSystemSyncAccessHandle",
"Navigator",
"StorageManager",
"WorkerGlobalScope",
"WorkerNavigator",
]
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]