Skip to content

Verify a writable-WASM write actually lands (reproducible TinyGo fixture + write-landing test) #311

Description

@adnaan

Verify a writable-WASM write actually lands (reproducible TinyGo fixture + write test)

Follow-up from #216 / #310 (M5 Phase 3). CLI parity for WASM sources landed: tinkerdown cli now constructs wasm sources, list works, and a read-only module correctly refuses a write. But the piece #216 is actually named for — a successful write through a module that exports write — has zero automated coverage in any transport (CLI or WebSocket).

Why it's not covered yet

What to build (in a TinyGo-available environment)

  • A write-exporting WASM fixture (a minimal TinyGo module exporting write alongside fetch), with its tinygo build wired into make so the .wasm is reproducible from source — never a committed mystery binary.
  • A test that lands a write and observes the effect, over both transports: tinkerdown cli … add and the live WebSocket/serve path.
  • Then close feat: writable WASM sources (Phase C2) #216 with the write path demonstrated end-to-end.

Verified today (so this issue is scoped to the gap, not the whole feature)

  • WasmSource.WriteItem exists and enforces the readonly guard (internal/wasm/source.go).
  • createCLISource constructs wasm; tinkerdown cli … list quotes returns rows; tinkerdown cli … add on the read-only module returns "source is read-only".

🤖 Generated with Claude Code

https://claude.ai/code/session_018M9pJSPmG6i1D8s6rpEV4h

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions