Skip to content

Implementation Log: ANU-10 - Prove Anuva Bento Web Feasibility

Changes and decisions

Phase Change or decision Evidence
Baseline Preserved the imported Bento v1.0.8 editor and renderer and added Anuva behavior through isolated entries and adapters. Baseline commit 614da7c95ab904f079caaef8856d4de71cc8c9a0
Plan Girish approved Web clock simulation as sufficient for this issue, deferred Unity/Vuplex and performance work, required external non-font assets, and required embedded fonts. Approved Implementation Plan
Contract Added a provisional version-1 three-surface envelope and player protocol with exact runtime compatibility checks. slides/src/anuva/contract.ts and slides/src/anuva/bridge.ts
Assets Added materialize/dehydrate adapters. Fonts stay embedded; images, SVG, chart data, and media are bound externally and removed again before editor serialization. slides/src/anuva/assets.ts and 29 focused checks
Editor Loaded the representative Main surface into the existing structured editor through a dedicated entry. Browser smoke showed the upstream editor with intro and state slides
Player Added a read-only player with reset, absolute seek, external tick, show, hide, clear, readiness events, and diagnostics. slides/src/anuva/player.ts
Clock Derived all surface state from absolute host time and compared sequential tick with reset plus arbitrary seek. Host self-test passed across Main, Companion, and Emphasis
Offline Added an Anuva-only compile-time hard-offline seam. Update fetches short-circuit and the existing collaboration guard remains active. Original build and Anuva build both passed
Templates Wrapped the existing role/id layout machinery and required an explicit unsafe result for ambiguous mappings. Compatible and ambiguous fixtures passed
Documentation Aligned MkDocs extensions, plugins, hook, and stylesheet with Product Main. mkdocs.yml, hooks.py, and docs/stylesheets.css
Upstream Fetched and rehearsed the current upstream tip in a disposable worktree without changing any remote ref. Upstream 55e4d0fcda49d588ee5620f79b8ac7d0d733cdfc; zero conflicts

Source-change map

Isolated Anuva source

  • slides/src/anuva/ owns the provisional contract, asset adapter, clock, bridge, player, fixtures, editor entry, host entry, and template adapter.
  • slides/anuva-editor.html, slides/anuva-player.html, and slides/anuva-host.html are dedicated spike entries.
  • slides/vite.anuva.config.ts builds those entries separately and forces the Anuva editor/player build offline.
  • slides/public/anuva-assets/ contains external representative image, SVG, chart-data, and generated-audio fixtures.
  • scripts/test-anuva.ts is the focused contract, asset, clock, and template verification suite.

Narrow upstream seam

slides/src/update.ts is the only existing Bento product-source file changed. It recognizes the compile-time __ANUVA_OFFLINE__ flag, keeps offline mode enabled for the Anuva build, and returns before update downloads. When the flag is absent, the original upstream behavior remains unchanged.

The remaining existing-file changes add build scripts, ignored output, and documentation configuration. The editor, renderer, presenter, and document model were not forked or rewritten.

Verification evidence

Check Result
npm ci Passed; 79 packages installed, 0 reported vulnerabilities
npm run build Passed using the unchanged upstream entry
Windows-equivalent single-file build Passed; compressed shell 1,170 KB to 580 KB
node ..\scripts\test-sync.ts Passed; 45,362 checks
npm run test:anuva Passed; 29 checks
npm run build:anuva Passed; editor, player, host, and external WAV emitted
Web host smoke Passed; assets-ready preceded the deterministic replay result
Web editor smoke Passed; existing editor loaded representative Main slides
Simulated clock Passed; sequential tick equaled reset plus absolute seek
Three surfaces Passed; Main and Companion persistent, Emphasis transparent and transient
Font policy Passed; required Fraunces WOFF2 remained an embedded data:font asset
Non-font policy Passed; serialized image/audio/video data URIs rejected; SVG and chart payloads external
Offline policy Passed; public update/collaboration URLs rejected and Anuva update entry short-circuited
Template reapplication Passed; compatible content preserved and ambiguous mapping marked unsafe
Upstream rehearsal Passed; zero conflicts and no effective tree change
Rehearsal regression Normal build, Anuva build, 29 focused checks, and 45,362 sync checks passed

Browser checkpoints exercised time 0, 4,000 ms, and 4,500 ms. At 4,500 ms, Main showed the externally loaded diagram, Companion referenced the external local WAV, and the transparent Emphasis surface showed its transient callout. The font stylesheet contained the embedded WOFF2 payload. No public Bento service was required.

Upstream rehearsal

The local downstream records v1.0.8 at 0c9600d220668a6f447bbd2edf3567558b3652ea. During the spike, git fetch upstream --tags reported that upstream had force-moved main to 55e4d0fcda49d588ee5620f79b8ac7d0d733cdfc and rejected replacing the local v1.0.8 tag. The fetched commit has the same release subject but a rewritten tree that removes README.ja.md, removes README.zh-CN.md, and trims README.md.

A disposable branch merged that exact fetched tip with --no-commit --no-ff. The merge had zero conflicts and produced no effective tree change against the downstream feature branch. The adapter files remained present and all regression checks passed. The merge was aborted after evidence capture, and the disposable worktree and branch were removed. No remote ref was changed.

Deviations, risks, and follow-ups

  • Unity/Vuplex verification is deliberately deferred by the approved plan.
  • Performance, profiling, startup-latency, memory, CPU/GPU, and concurrent-player checks are deliberately deferred.
  • The version-1 envelope and message API are non-normative spike artifacts.
  • SVG is converted to a runtime image element after external fetch; its payload is never written into the Bento document.
  • Chart data is merged only for rendering and recursively removed during dehydration. The production contract should narrow that stripping rule to the final chart schema.
  • Supported transition behavior is deterministic for the representative opacity/visibility/state sequence. Wall-clock effects, morphs, and richer media synchronization require explicit production restrictions or later implementation.
  • Upstream force-moving a release ref is a provenance risk. Future syncs must continue selecting immutable commit identities and rehearsing before merge.