Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,61 @@ rebrief after five failures. Root synchronizes numbered local/GitHub evidence,
integrates latest main, and closes after PASS, merged delivery, required CI and
the published adoption evidence; verify remote CLOSED. No new results claimed
by this scope-only brief.


## Implementation checkpoint

Luna XHIGH replaces the duplicated observer loop with SDK `waitForPcmRunway`,
preserving aggregate opening/seek/feed/context/refill cleanup choreography and
translating `PcmRunwayError` with reason/source ID/original cause. README and the
existing mismatch assertion are updated. Build, types, format/source policy and
six focused session/runway tests PASS; logs `/tmp/miso-796-audit/adapter101-*`.
Only temporary accepted SDK 0.2.5 node_modules installation is used; no package,
lock or provenance pins change. Implementer reports two opening-race failures
reproducing without this patch under SDK 0.2.5; raw identification is being
collected and full integration acceptance must resolve them. Focused success
is not full-suite or registry acceptance. Root checkpoints this bounded source
tranche before independent Astra MEDIUM review and latest-main integration.

## Independent attempt 1 source review

Fresh Astra MEDIUM independently reviewed source checkpoint `37697f2` (including
implementation `74b66c9`) against the installed SDK 0.2.5 helper contract.
Source-scope verdict: PASS. No production-code correction was needed. Opening
passes source totals/rings, frame zero and generation one; seek passes the
acknowledged target/generation after awaiting producer seek and feed
`prepareSeek`. Both omit `minimumFrames` and retain the two-second timeout.
Context transitions, serialized transport, diagnostics and terminal cleanup
remain at their existing seams. Only `PcmRunwayError` is translated; its original
object is retained as cause, mismatch retains source ID, timeout retains its
separate reason, and other SDK/abort errors retain their cause chain.

The verifier strengthened existing mismatch/deadline tests to assert completed
pump/feed/host/context/lease cleanup and distinguish feed preparation timeout
from SDK runway timeout. Build, test compilation, lint and format checks PASS;
15 focused session tests PASS, including full-generation runway, tail/EOF,
prepare ordering, running restoration, cancellation and terminal cleanup.
Logs: `/tmp/miso-796-audit/verify-adapter101-{build,test-compile,focused,lint,format}.log`.

This is one attempt-1 source verdict, not final package acceptance. Full
`npm run check`, packed-browser, publish-dry-run and fresh-consumer gates remain
pending the combined #95 candidate and published dependency/provenance pins.
The two SDK console-map opening-race tests belong to #95's correction
`9666188`; they must be included in the final full suite. Metadata/lock still
name SDK 0.2.4 at this review checkpoint; no published-adoption claim is made.


## Combined candidate acceptance — 2026-09-14

Fresh Astra MEDIUM independently accepts #101 in the combined adapter 0.5.7
candidate at verification checkpoint `3746df9`: PASS. Registry SDK 0.2.5 is now
pinned exactly; fresh normal-installed tarball resolves one SDK with the archive
integrity recorded in #95. The full `npm run check` passes all 380 tests,
including the formerly failing single-console opening-map races. Corrected
packed-browser and publish-dry-run gates PASS, as do strict fresh-consumer types
and imports. No #101 production fix was needed; SDK runway errors retain their
cause/reason/source and aggregate opening/seek cleanup remains intact. Logs and
candidate archive identity are recorded in #95's independent candidate review.
This completes source/package candidate verification, not release completion:
merged required CI and actual adapter 0.5.7 publication/attestation and issue
synchronization remain required before claiming published adoption or closure.
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,18 @@ Raw logs and the repeatable review probe are preserved outside this worktree in
and `adapter102-adversarial.mjs`. The coordinator owns evidence checkpointing,
merged required CI, GitHub synchronization and ordinary package release. This
review does not claim merged delivery, issue completion or registry availability.


## Source delivery — CLOSED

Latest main advanced to `d2f234aa4a48cd1c37cd9dbde06607f0c1228478` (PR #104,
embedded BLAKE3 SIMD and 0.5.5 release metadata) before landing. Root integrated
it without conflicts at `769de0e5a3deaed360542c3ddf2446b980f4620d`, preserving
all new hashing/build/legal assets. Full updated `npm run check` PASS
(`/tmp/miso-796-audit/adapter102-main-check.log`) and the repeated required
macOS Chromium/WebKit OPFS workflow 34792810150 PASS. PR #105 merged at
`fe96ecb31673e8b2ca4199ba506d7a15549e700d`. Independent attempt-1 PASS evidence
is upstream. Source delivery is complete; published availability is explicitly
assigned to the existing #95 ordinary release cut, which must use an unused
version after the independent 0.5.5 release. No registry availability is claimed
for this correction until that release succeeds.
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,85 @@ Scope amendment only. The old three-method delegation and instruction to retain
adapter measurement ownership are superseded. No new runtime result is claimed.

Coordination entry point: https://github.com/misofm/engine/issues/796 . Independent follow-ups https://github.com/misofm/engine/issues/797 , https://github.com/misofm/engine-web-adapter/issues/101 and https://github.com/misofm/engine-web-adapter/issues/102 do not block this issue or app misofm/app#210.


## First source checkpoint

Luna XHIGH implements borrowed `session.engine`, SDK-owned console/meter/telemetry
paths, removal of adapter HostFeed, the sole legacy peak display projection with
canonical metadata/null preserved, and snapshotted spectrum/collection/limits
forwarding. Build, typecheck and focused compiled console suite 22/22 pass.
The exact accepted local SDK tarball is installed temporarily in node_modules
only; package metadata/lockfiles remain unchanged pending registry #794.
Root checkpoints the six source/test/README paths before final session/packed
proof and published dependency adoption. No independent verdict/publication
is claimed yet. Current adapter main f833303 remains included.


Second Luna XHIGH checkpoint closes compatibility control admission synchronously
at aggregate close start and adds captured-alias regressions. Opening map-race
tests now target the single SDK console acquisition, preserving late settlement
and original failure causes. SDK engine identity, canonical metadata/null and
mutable-option snapshot coverage are added. Compiled console/session tests
67/67, build, types, lint and whitespace checks PASS. Packed baseline passes;
the new collection proof fails before final registry pins, with the temporary
consumer reporting a zero collection-target capacity. No unsupported-product
conclusion is claimed: the runner copies locked dependencies, still 0.2.4, and
final registry 0.2.5 adoption/retest is required. Logs:
`/tmp/miso-796-audit/adapter95-focused-2.log`, `adapter95-lint.log`,
`adapter95-browser-2.log`. Latest main now includes accepted #102 and embedded
BLAKE3 SIMD; root integrates that before the release metadata/proof tranche.


## Independent attempt 1 candidate review — 2026-09-14

Fresh Astra MEDIUM independently reviewed integrated candidate `0bcc74d` and
verification checkpoint `3746df9`: **PASS for the #95 source and 0.5.7 package
candidate**, including combined #101 adoption. No production correction was
needed. The borrowed object is the existing SDK engine, the compatibility
console uses its managed owner, direct/compatibility measurements converge on
SDK leases, canonical metadata and master null survive projection, and aggregate
close preserves admission, late acquisition and source-lifetime cleanup.
Analysis preparation and all three subscription-limit families are copied before
opening awaits; the strengthened existing snapshot test proves singular and
collection forwarding and SDK refusal at original limits after caller mutation.

The verifier corrected the existing packed scenario's evidence: it previously
recorded readiness booleans without requiring delivery. It now requires real SDK
meter/response/spectrum payloads, fresh target-labelled frames after an atomic
selection and a refused selection, stable managed job ownership, running context,
and no meter delivery after completed close. A bounded three-second wait proves
fresh frames rather than assuming a fixed delay. SDK revision advances with each
capture; stable job identity is the appropriate refusal-preservation assertion.
The fixture's 65,536-byte collection budget was correctly refused with result 5:
two targets already require that much for observer and queued dual-mono PCM alone,
before states, bindings and IDs. The two-entry fixture now uses the accepted SDK
browser fixture's finite 1 MiB budget. Production policy is unchanged; native
accounting remains `host-core/src/spectrum.rs::spectrum_capture_collection_resources`.

Independent evidence on Node 22.23.2:

- Full `npm run check`: 380/380 tests PASS, both reproducible hash Wasm assets,
source/decoder/types/package policy PASS (247 packaged files).
- Corrected `npm run test:browser`: PASS, Chromium 153.0.8010.12. Sparse session
delivered 11 SDK meter updates, a 16-point response, and output/track/retained
track spectrum end samples 2304, 14720, 16768. One sparse read and lease close;
fourteen assets, zero console errors or failed requests. Existing dense
cold/warm, seek, terminal cleanup and BLAKE3 fixture assertions also PASS.
- `npm run publish:dry-run`, fresh normal tarball dependency installation,
strict public-surface compilation (including absent borrowed `close`) and
imports PASS. Fresh lock resolves exactly one SDK, registry `0.2.5`, with
integrity `sha512-cNMuslg9t7NAkBrYFMl8jcd1fOy5/fN+FEeDE+WdiMj+8+DkWTkvbWvMo1UMWgC+MrnX4BKhYz2QrKmAstIWwQ==`.
- Candidate metadata/lock/workflow consistently use adapter `0.5.7`, SDK `0.2.5`,
full source `1646a6a1bd0011cc2b5480283bf498b27be460e5` and SDK archive SHA256
`c26208470b5409ad789085d251d94bdf1117b32dcd3b5e544f8696dffffe3d4d`.

Logs are `/tmp/miso-796-audit/verify-adapter95-*`; the passing browser record is
`verify-adapter95-final-browser-bounded.log`. Earlier fixture/refusal diagnostics
are retained separately and are not passing runs. Final candidate archive is
`/tmp/engine-web-adapter-browser-DIvKBi/misofm-engine-web-adapter-0.5.7.tgz`, SHA256
`8a0b8ad2cc9f0973514c28b1b5d195a56485879835b5797299dc234a8e433c35`, integrity
`sha512-XXAarTN8Wh2ENIujHTCKh07a+EXYgP4hVPsW2g2KoqNHliEzmOPAXadV3BWYf4L7zy/BM8vbiJDrGLw1BTAYzQ==`.
This is candidate acceptance, not registry publication: merged required CI,
trusted publish/verify, adapter registry integrity and attestation proof, then
GitHub synchronization/closure remain coordinator-owned delivery gates.
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ concurrency:

env:
PACKAGE_NAME: "@misofm/engine-web-adapter"
PACKAGE_VERSION: "0.5.6"
PACKAGE_VERSION: "0.5.7"
NPM_CONFIG_REGISTRY: "https://registry.npmjs.org"

jobs:
publish:
name: ${{ inputs.mode }} @misofm/engine-web-adapter 0.5.6
name: ${{ inputs.mode }} @misofm/engine-web-adapter 0.5.7
runs-on: ubuntu-24.04
steps:
- name: Refuse a non-main or mismatched dispatch
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
[[ "$(node -p "require('./package.json').version")" == "$PACKAGE_VERSION" ]]
[[ "$(node -p "require('./package-lock.json').name")" == "$PACKAGE_NAME" ]]
[[ "$(node -p "require('./package-lock.json').version")" == "$PACKAGE_VERSION" ]]
[[ "$(node -p "require('./package.json').dependencies['@misofm/engine']")" == "0.2.4" ]]
[[ "$(node -p "require('./package.json').dependencies['@misofm/engine']")" == "0.2.5" ]]
[[ "$(node -p "require('./package.json').repository.url")" == "git+https://github.com/misofm/engine-web-adapter.git" ]]

- name: Install dependencies
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
[[ "$attempt" == 60 ]] && { echo "registry did not converge" >&2; exit 1; }
sleep 5
done
[[ "$(npm view "$PACKAGE_NAME@$PACKAGE_VERSION" dependencies.@misofm/engine)" == "0.2.4" ]]
[[ "$(npm view "$PACKAGE_NAME@$PACKAGE_VERSION" dependencies.@misofm/engine)" == "0.2.5" ]]
consumer=$(mktemp -d)
trap 'rm -rf -- "$consumer"' EXIT
cd "$consumer"
Expand Down
6 changes: 3 additions & 3 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@misofm/engine-web-adapter
Copyright 2026 Miso

This product depends on @misofm/engine@0.2.4. The reviewed integration archive
This product depends on @misofm/engine@0.2.5. The reviewed integration archive
was packed from misofm/engine commit
64018c1a97ea84224362b0c659f06756a186e3b7 with SHA256
5a8b3e37d6b2718efe2063ae7a20b8cbbfe233db46606eb402658f86b07c2b15.
1646a6a1bd0011cc2b5480283bf498b27be460e5 with SHA256
c26208470b5409ad789085d251d94bdf1117b32dcd3b5e544f8696dffffe3d4d.
This records reviewed source/archive identity, not registry publication.

The transport SHA-256 implementation and verified-store/session-gate invariants
Expand Down
47 changes: 41 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @misofm/engine-web-adapter

Headless, framework-neutral browser session hosting for
`@misofm/engine@0.2.4`. Version 0.5 identifies canonical PCM with BLAKE3-256 and streams standards-compliant native FLAC
`@misofm/engine@0.2.5`. Version 0.5 identifies canonical PCM with BLAKE3-256 and streams standards-compliant native FLAC
through bounded HTTP ranges and a one-stem universal `@misofm/codec@0.1.1`
Wasm Worker, verifies
canonical PCM into OPFS, then feeds the Engine through bounded shared-memory
Expand All @@ -10,15 +10,15 @@ rings. URL, authentication, and request mapping remain caller-owned.
## Install

```sh
npm install @misofm/engine-web-adapter@0.5.1 @misofm/engine@0.2.4
npm install @misofm/engine-web-adapter@0.5.7 @misofm/engine@0.2.5
```

The package is ESM-only and remains pinned to exactly Engine `0.2.4` and
The package is ESM-only and remains pinned to exactly Engine `0.2.5` and
`@misofm/codec` `0.1.1`. The codec currently supports Node `>=22.23.2 <23`
and Bun `>=1.4.2 <1.5`; browser consumers use the bundled public codec asset.
The integration uses the published Engine 0.2.4 archive
from commit `64018c1a97ea84224362b0c659f06756a186e3b7`, SHA256
`5a8b3e37d6b2718efe2063ae7a20b8cbbfe233db46606eb402658f86b07c2b15`.
The integration uses the published Engine 0.2.5 archive
from commit `1646a6a1bd0011cc2b5480283bf498b27be460e5`, SHA256
`c26208470b5409ad789085d251d94bdf1117b32dcd3b5e544f8696dffffe3d4d`.
This release adds indexed full-response stem acquisition: active FLAC chunks are
decoded once into verified sparse PCM, and timeline gaps are generated as zeroes
when the Engine reads them. The existing native-FLAC path remains available.
Expand Down Expand Up @@ -121,6 +121,39 @@ allocated by the raw host, so direct `session.host` calls no longer collide with
console, meter, or telemetry operations. Prefer the typed adapter surfaces when
possible.

## Use the SDK Engine directly

`session.engine` is a borrowed view of the same SDK Engine that owns the
session's host, console, measurements, response queries, spectrum queries, and
managed observation subscriptions. It is object-identical to the Engine used
for playback; the adapter only retains `session.close()` as the aggregate close
operation. Do not call `session.engine.close()` or start new work after closing
the session.

```ts
const sdk = session.engine
const stopMeters = await sdk.subscribeMeters((update) => {
for (const [trackId, meter] of update.tracks) draw(trackId, meter.peakLeft)
})
const response = await sdk.queryTrackResponse({
trackId: "kick",
grid: { kind: "linear", points: 256, minimumHz: 20, maximumHz: 20_000 },
})
const spectrum = await sdk.querySpectrum({
target: { kind: "output", outputId: "master" },
})
stopMeters()
await session.close()
```

Pass SDK `spectrum`, `spectrumCollection`, and observation, response, or
spectrum subscription limits in the open options when those capabilities are
needed. The values are snapshotted before source preparation begins and are
forwarded to this same Engine. The older `session.meters` and
`session.telemetry` methods remain deprecated compatibility paths; their meter
updates add only the legacy `peak` field while retaining the SDK generation,
validity, loss, span, and nullable master gain-reduction fields.

## Deployment requirements

Serve over HTTPS (or localhost) with cross-origin isolation enabled:
Expand Down Expand Up @@ -443,6 +476,8 @@ before ready. Initial opening and seek completion require a contiguous full-gene
across every source's 64 shared-ring slots, or that source's exact shorter remaining tail. At
48 kHz with 128-frame quanta this is about 171 ms. Seek preparation remains suspended, including
running seeks; the adapter restores running state only after every source passes that gate.
The generic ring proof is delegated to the SDK's `waitForPcmRunway`; source preparation, feed seek
preparation, refill and context lifecycle remain owned by the adapter.

Pass `onError(error)` to observe a terminal playback-worker failure after opening. The adapter
marks the session closed immediately, interrupts pending lifecycle calls, and completes cleanup
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@misofm/engine-web-adapter",
"version": "0.5.6",
"version": "0.5.7",
"description": "Bounded FLAC browser session adapter for @misofm/engine using @misofm/codec",
"license": "Apache-2.0",
"repository": {
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"dependencies": {
"@misofm/codec": "0.1.1",
"@misofm/engine": "0.2.4",
"@misofm/engine": "0.2.5",
"effect": "4.0.0-rc.112",
"hash-wasm": "4.12.0"
},
Expand Down
Loading
Loading