Skip to content

fix(editor): host bridge round-trip stability + host-mode timeline shortcuts - #13

Merged
lightninglu10 merged 4 commits into
stagingfrom
fix/host-shortcuts-roundtrip-5319
Aug 22, 2026
Merged

fix(editor): host bridge round-trip stability + host-mode timeline shortcuts#13
lightninglu10 merged 4 commits into
stagingfrom
fix/host-shortcuts-roundtrip-5319

Conversation

@lightninglu10

@lightninglu10 lightninglu10 commented Aug 22, 2026

Copy link
Copy Markdown

Summary

Two user-facing bug fixes for the CodePress host-embedded surface, plus the host-mode keyboard shortcut mount they depend on.

Commit 1 — fix(editor): keep host bridge round-trip stable for minimal clip items (503c3cc)

Fixes the "Property, effect, or animation edits are unsupported by the host slice" toast on simple clip drags/trims. Root cause: serialization asymmetry in the host bridge round trip — stableSerialize treated a present-but-undefined key as different from a missing key, and frameItemToNativeComparable unconditionally emitted volume/speed/opacity/transform keys (plus an always-present text style: {}). Host snapshots that omit those optional fields failed metadataUnchanged after a drag, and synthesized sourceStart/sourceEnd keys made untouched clips leak into changed[] on multi-clip timelines ("Multiple or ambiguous timeline changes").

  • stableSerialize skips undefined-valued object entries.
  • frameItemToNativeComparable emits optional keys only when set; plain-text style only when non-empty; opacity-only native transforms round-trip as the top-level opacity the host sent.
  • commandIdsForChanges compares clips with synthesized source bounds on both sides.
  • deriveSupportedHostEdit batches one remove_item per removed item (bounded by MAX_COMMANDS_PER_OPERATION = 64) instead of only handling exactly one removal — enables multi-select delete.

Commit 2 — feat(editor): mount host-safe timeline shortcuts in host mode (01a80ab)

TimelineShortcutsController was only rendered outside host mode, so Delete/Backspace/Space/J/K/L/arrows did nothing in the embed. Adds useHostTimelineShortcuts mounted via a new HostTimelineShortcutsController when hostRuntime is present:

  • Mounted: playback/navigation (Space, J/K/L, arrows, Home/End, snap points), tool switching (V/T/C/R, Shift+C split flows through the bridge as split_item), Delete/Backspace (flows through the bridge as remove_item, now batched for multi-select), zoom/snap (S, Shift+S, Mod+=/−, \).
  • Gated off in host mode: undo/redo (temporal-store mutation without host commands), ripple delete, clipboard, markers, in/out points, nudges, join, freeze frame, clear-keyframes.

Implementation: Delete/Backspace extracted into a shared useDeleteShortcuts; useUIShortcuts gains an enableHistory option (default true). The editor→timeline edge stays within budget (73/73) by exporting from the existing use-timeline-shortcuts module.

User-reported bugs addressed

  • "Property, effect, or animation edits are unsupported by the host slice" toast when dragging a clip
  • Delete key not removing clips in the embedded surface
  • Space not toggling playback in the embedded surface

Test evidence

  • src/features/editor/host/controller.test.ts: 17/17 (7 new round-trip tests: store-level drag → move_item, trim → trim_item, multi-clip timeline with untouched clips excluded, default-color text item, opacity-carrying clip, multi-remove batch, >64-removal bounded rejection). Red/green verified: all new tests fail without the fix.
  • src/features/timeline/hooks/use-host-timeline-shortcuts.test.tsx: 5/5 (real keydown dispatch: Space toggles playback; Delete removes selected items incl. multi-select; Mod+Z does not undo in host mode; control test proves Mod+Z undoes with full shortcuts).
  • Existing use-editing-shortcuts.test.tsx suite passes against the extracted-hook refactor (verified with an environment workaround for the inherited localStorage issue below).
  • Full gate set results in the canonical QA report comment.

Inherited baseline failures (disclosed, reproduced at base)

Full test:run on this machine (Node 26) has widespread jsdom localStorage failures (TypeError: Cannot read properties of undefined (reading 'setItem') from zustand persist middleware) — the failing-test set is byte-identical at base a188efa2; zero new failures introduced. Details in the QA report.

stableSerialize treated a present-but-undefined key as different from a
missing key, and frameItemToNativeComparable unconditionally emitted
volume/speed/opacity/transform keys (plus an always-present text style
object). Host snapshots that omit those optional fields failed
metadataUnchanged after a simple drag or trim, landing in the
unsupported-edit branch, and untouched clips leaked into changed[] on
multi-clip timelines.

- stableSerialize now skips undefined-valued object entries.
- frameItemToNativeComparable emits volume/speed/opacity/transform only
  when set, and the plain-text style key only when non-empty; an
  opacity-only native transform round-trips as the top-level opacity
  field the host sent.
- commandIdsForChanges compares clips with synthesized source bounds on
  both sides so host items without sourceStart/sourceEnd do not appear
  changed after the native bridge fills its defaults.
- deriveSupportedHostEdit batches one remove_item command per removed
  item (bounded by MAX_COMMANDS_PER_OPERATION) instead of only handling
  exactly one removal.

Round-trip tests install host snapshots through the real runtime,
perform store move/trim/remove operations, and assert the derived host
command batches.
TimelineShortcutsController was only rendered outside host mode, so
Delete/Backspace/Space/J/K/L and friends did nothing in the
host-embedded surface.

Add useHostTimelineShortcuts (composed in use-timeline-shortcuts.ts) and
mount it via a HostTimelineShortcutsController when hostRuntime is
present. The composition mounts only bindings that never mutate the
host-owned document outside the bridge:

- Playback/navigation and tool switching mount as-is (local UI state;
  Shift+C split crosses the bridge as a supported split_item command).
- Delete/Backspace are extracted into a shared useDeleteShortcuts hook;
  item removal flows through the bridge as remove_item commands, now
  batched for multi-select.
- useUIShortcuts gains an enableHistory option (default true) so host
  mode mounts zoom/snap without undo/redo, which would mutate the
  temporal store without emitting host commands.

Ripple delete, clipboard, markers, in/out points, nudges, join, freeze
frame, and clear-keyframes stay unmounted in host mode.

The editor -> timeline edge stays within budget by exporting the new
hook from the existing use-timeline-shortcuts module.
nativeTransformToFrame fills every key, so the ?? 0 fallbacks were dead
branches that tripped the fallow changed-health complexity gate.
@lightninglu10

Copy link
Copy Markdown
Author

@codepress /judge-verification can you judge this verification?

Canonical QA Report

Host bridge round-trip stability fix (drag/trim/delete rejection toasts) + host-mode timeline shortcuts (Space/J/K/L/arrows/Delete/tools/zoom; undo/redo, ripple delete, clipboard, markers, nudges gated off in host mode). Three commits: 503c3cc round-trip fix, 01a80ab shortcut mount, c679db1 fallow-gate cleanup.

Verifier revision binding

base: a188efa (origin/staging)
head: c679db1
git rev-parse HEAD -> c679db1
git status --porcelain -> (empty)

Gate results

# Gate Result Evidence
1 Head binding ✅ PASS npm run qa:binding -- --check -> "OK: clean tree, head descends from base"
2 Type check ✅ PASS npm run check -> no warnings/lint/type errors in 2441 files
3 Lint ✅ PASS npm run lint -> 0 warnings, 0 errors on 2444 files (dist built via gate 15 first)
4 Unit tests ❌ FAIL (inherited) npm run test:run -> 584 failed / 4267 passed (4851); sorted failure list byte-identical at base a188efa (Node 26 jsdom localStorage, see below). Focused: vp test run src/features/editor/host/controller.test.ts src/features/timeline/hooks/use-host-timeline-shortcuts.test.tsx -> 22/22 PASS
5 Build ✅ PASS npm run build -> built in 4.47s, exit 0
6 Feature boundaries ✅ PASS npm run check:boundaries -> no direct cross-feature imports (1674 files)
7 Deps contract boundaries ✅ PASS npm run check:deps-contracts -> 161 deps files, 297 contracts
8 Legacy lib imports ✅ PASS npm run check:legacy-lib-imports -> no unauthorized @/lib/* imports
9 Deps wrapper health ✅ PASS npm run check:deps-wrapper-health -> 46 pass-through wrappers, 0 unused
10 Unused exports ❌ FAIL (inherited) npm run check:unused-exports -> 129 findings, 10 new, 3 stale; identical output reproduced on detached base a188efa; all findings in files untouched by this PR
11 Unused class members ❌ FAIL (inherited) npm run check:unused-class-members -> 83 findings, 0 new, 2 stale; identical at base a188efa
12 Changed-health ✅ PASS npm run check:changed-health -> introduced dead_code=0, complexity=0, duplication=0
13 Edge budgets ✅ PASS npm run check:edge-budgets -> 8/8 seams PASS; editor->timeline held at 73/73 by exporting the new hook from the existing use-timeline-shortcuts module
14 Provenance/reproducibility ✅ PASS npm run verify:provenance exit 0; npm run package:reproducible -> artifacts/freecut-4d62e8082c5eb387a96275bcbd323d28f6e41a62.tar.gz (51583025 bytes, sha256 8f5cf3abf924aac96e5ffed933e170f7b6c4b426f9111ad2902110d8803a0142); not published
15 Editor-surface package build ✅ PASS npm run build:editor-surface -> built in 8.56s, exit 0
16 Installed consumer smoke ✅ PASS npm run test:editor-surface:consumer -> tarball packed, fresh temp consumer, consumer-smoke passed; no publish
17 Headless contract tests (Node) ✅ PASS npm run headless:test:node -> exit 0
18 Browser QA ✅ PASS npm run qa:browser -- --skip-build -> renderFrame ok, frame width match, PNG >1KB; artifacts/qa/browser-c679db10040b/ (frame.png, harness.png, console.log, manifest.json)
19 Full headless browser suite ✅ PASS npm run headless:test:chrome -> all 19 edit operation contracts + lifecycle HTTP/CLI checks passed
20 Redaction ✅ PASS npm run check:qa-redaction -> 7 files scanned (incl. new artifacts/qa output), no findings; fail-closed self-tests reject negative fixtures (generic path, tmp path, Windows path, short data URI)

Inherited baseline failures

  • gate 4 (unit tests): FAIL at base a188efa — Node 26 exposes no usable jsdom localStorage ("localStorage is not available because --localstorage-file was not provided"), so zustand persist-middleware setState throws TypeError: Cannot read properties of undefined (reading 'setItem'). Full-suite sorted FAIL list is byte-identical between base and head (591 lines each, diff clean); zero new failures. The 12 new tests pass: they install a guarded vi.hoisted localStorage stub (no-op where a real localStorage exists, e.g. CI).
  • gate 10 (unused exports): FAIL at base a188efa with identical findings (129 findings / 10 new / 3 stale, all in files untouched by this PR, e.g. TextAnimationSection, JoinIndicators, useCurrentFrame) — reproduced on a detached base checkout.
  • gate 11 (unused class members): FAIL at base a188efa with identical findings (0 new, 2 stale Clock.ts allowlist entries) — reproduced on a detached base checkout.

Environment blockers

  • None. Browser gates 18–19 found a real browser session and passed.

Visual / browser artifacts

  • artifacts/qa/browser-c679db10040b/manifest.json (+ frame.png, harness.png, console.log) — local repo-relative paths, gitignored.

Red/green evidence for the fix

  • With only the two source files (host/controller.ts, host/document.ts) stashed, the 6 new round-trip tests in controller.test.ts FAIL (rejection toasts reproduced); with the fixes, 17/17 PASS.
  • Host shortcut tests: Mod+Z does not mutate the timeline store with useHostTimelineShortcuts mounted, while the same dispatch DOES undo with the full useTimelineShortcuts (control) — 5/5 PASS.

Caveats

  • Full-suite gate 4 cannot go green on this machine (inherited Node 26 localStorage issue, predates this PR); CI environments with working localStorage are unaffected. The new-test localStorage stub is guarded and a no-op there.
  • Known residual edge case (fails closed): a host clip carrying a fully-default explicit identity transform is indistinguishable at the native layer from an opacity-only transform; dragging such a clip would be rejected with the unsupported-edit toast rather than mis-edited. No current host snapshot shape produces this.

Overall

✅ PASS — PENDING JUDGE

No merge until trusted judge PASS.

@codepress-dev

codepress-dev Bot commented Aug 22, 2026

Copy link
Copy Markdown

👋 Hey @lightninglu10! Spawning a verification judge session to help with your request. View session

@codepress-dev

codepress-dev Bot commented Aug 22, 2026

Copy link
Copy Markdown

@Terminal @lightninglu10

Dispatched by judge-verification.

This judgment is READY TO MERGE at the current head. If the PR is still a draft, transition it to ready for review now with the guarded readiness transaction: codepress-policy ready-for-review --repo . --pr 13 (or node packages/delivery-policy/dist/cli.js ready-for-review --repo . --pr 13 when the CLI is not on PATH). It re-validates current-head QA and judge evidence, reconciles the delivery-status marker, and marks the PR ready so the native reviewer can dispatch. Do not call gh pr ready directly, and do not merge; merge authorization still requires the reviewer gate.

Verification Judgment — PR #13 (local)

Verdict: ✅ READY TO MERGE

PR Head SHA: c679db10040bc1a1739f49916ef7f5afdbca378a

Summary: The report is bound to the live PR head, the changed host bridge paths are covered by runtime-backed focused tests, and the host shortcut composition is wired to the real host editor mount. The three reported baseline failures are immaterial to this diff and are explicitly waived; the browser artifact path has a publication caveat only.

Revision binding

  • Classification: SAME-SHA LATE BINDING
  • Report head: c679db10040bc1a1739f49916ef7f5afdbca378a
  • Live PR head: c679db10040bc1a1739f49916ef7f5afdbca378a
  • Audited checkout: clean detached checkout at c679db10040bc1a1739f49916ef7f5afdbca378a
  • Concrete evidence: The verifier captured git rev-parse HEAD -> c679db1; git status --porcelain -> (empty). The judge independently audited a detached checkout with git rev-parse HEAD -> c679db1; git status --porcelain -> (empty); the reported base is an ancestor of the audited head.
  • Rows carried forward: none
  • Rows reverified at live head: none
  • Rows still requiring verification: none
  • Publication timing: GitHub's timeline records the canonical report comment at 2026-08-22T02:07:50Z; the PR still named the same live head at audit time. This confirms ordering only, not verifier checkout provenance.

Diff trigger inventory

Surface Location Coverage
Host bridge round-trip equality for optional fields, synthesized source bounds, default text styling, and opacity-only transforms src/features/editor/host/controller.ts:39-83,199-219; src/features/editor/host/document.ts:254-324 D1
Supported move, trim, multi-remove, and bounded host command derivation src/features/editor/host/controller.ts:275-425 D2
Host-only shortcut controller wiring and dependency export src/features/editor/components/editor.tsx:433-438,756-758; src/features/editor/deps/timeline-hooks-contract.ts:6-9 D3
Positive host shortcut bindings and preserved local delete behavior src/features/timeline/hooks/use-timeline-shortcuts.ts:46-66; src/features/timeline/hooks/shortcuts/use-delete-shortcuts.ts; src/features/timeline/hooks/shortcuts/use-editing-shortcuts.ts D4
Negative host-mode mutation boundaries for history and unsupported shortcut families src/features/timeline/hooks/use-timeline-shortcuts.ts:58-66; src/features/timeline/hooks/shortcuts/use-ui-shortcuts.ts:31-65 D5
Adverse gate findings and the local browser artifact publication caveat Canonical verification report, gates 4, 10, 11, and 18 Q4, Q10, Q11, Q18

Per-item

# Verifier said Judgment Evidence
D1 PASS ✅ PASS The focused controller suite passed 17/17, including runtime-backed move and trim operations for minimal clips, default-color text, top-level opacity, synthesized source bounds, and exclusion of an untouched clip. The report's red/green check reproduced the six round-trip regressions with the two bridge source files stashed and passed with the fixes.
D2 PASS ✅ PASS The same focused suite covers one remove_item command per removed item, one runtime-forwarded multi-select batch, and fail-closed rejection above the 64-command limit. The diff uses the shared MAX_COMMANDS_PER_OPERATION bound and preserves per-item preconditions.
D3 PASS ✅ PASS The live diff mounts HostTimelineShortcutsController exactly when hostRuntime is present and exports the hook through the existing editor dependency contract. The type check and build passed, and the focused host shortcut suite exercised real keydown dispatches through the hook mount.
D4 PASS ✅ PASS The focused shortcut suite passed 5/5: Space toggled playback, Delete removed single and multi-selected items, and the existing full shortcut control remained functional. The extracted delete hook is still mounted by useEditingShortcuts; the PR also reports the existing editing-shortcut suite passing after extraction.
D5 PASS ✅ PASS useHostTimelineShortcuts composes only playback, delete, tools, and UI shortcuts; history is explicitly disabled with enabled: false, while editing/ripple, clipboard, marker, in/out, source-monitor, and nudge hooks are not composed. The Mod+Z host/control test proves the key negative boundary and the source composition proves the remaining exclusions.
Q4 FAIL (inherited) ✅ WAIVED The report reproduced the 584/4851 unit-test failures at base a188efa286d74de5a8219d0bfc89a9c62fa47720; the sorted failure list was byte-identical and attributed to the Node 26 jsdom localStorage environment. The changed focused tests passed 22/22, so this baseline failure does not affect the inventoried surfaces.
Q10 FAIL (inherited) ✅ WAIVED The unused-export findings were reproduced with identical output at the detached base and are reported in files untouched by this PR. This is an inherited health finding, not a defect in the changed host bridge or shortcut paths.
Q11 FAIL (inherited) ✅ WAIVED The unused-class-member findings were reproduced at the detached base with no new findings attributable to the PR and concern stale Clock.ts allowlist entries. They do not affect the inventoried surfaces.
Q18 PASS ✅ PASS (FORM CAVEAT) Browser QA passed its render/frame checks in a real browser session. The cited artifacts/qa/browser-c679db10040b/ files are local repo-relative artifacts and no durable visual-evidence URL was published; that limits independent visual inspection but does not contradict the behavioral evidence or block this code judgment.

Overall status check

  • Verifier said: PASS
  • Result: READY TO MERGE

What stood up

  • The live head and verifier report head are identical, with explicit verifier revision and cleanliness capture.
  • The changed bridge behavior is covered through the embedded runtime and host adapter, not only by testing the pure derivation helper.
  • Host mode now mounts the safe shortcut slice while disabling local-only history and unsupported editing families.
  • Build, type, lint, boundary, package-consumer, headless, browser, and redaction gates passed; the three inherited failures are waived solely because their base reproduction and changed-file impact are established.

MediaElementAudioSourceNode silences cross-origin media served without
CORS approval (HTML spec), so host-mode playback through the Web Audio
clip graph was muted.  Route cross-origin sources around the graph:
applyVideoElementAudioState and NativePitchCorrectedAudio now drive the
media element's volume/muted directly when the source is not
WebAudio-safe (isWebAudioSafeMediaSource: same-origin, blob:, data:),
with reactive volume/mute propagation on the direct path.  EQ remains
graph-only and is skipped on the direct path.

Host runtime hardening: reset the persisted playback mute/volume on
mount (the monitor volume UI is hidden in host mode, so a persisted
mute silently zeroed embedded audio), and keep resilient
pointerdown/keydown listeners for the whole host session that resume
the shared preview AudioContext when it starts suspended.
@lightninglu10

Copy link
Copy Markdown
Author

@codepress /judge-verification can you judge this verification?

Canonical QA Report

Re-bind of the canonical QA to the new head. Previous report (comment 5377278393) covered c679db1: host bridge round-trip stability fix + host-mode timeline shortcuts. Delta c679db1..bf0f298 is ONE commit, bf0f298 fix(preview): keep host-provided cross-origin media audible (9 files, +464/-3): cross-origin host media is routed around the Web Audio clip graph (MediaElementAudioSourceNode silences non-CORS cross-origin media per HTML spec) onto direct element volume/muted in both applyVideoElementAudioState and NativePitchCorrectedAudio; host runtime resets persisted playback mute/volume on mount; resilient pointerdown/keydown listeners resume the shared preview AudioContext for the whole host session.

Verifier revision binding

base: a188efa (origin/staging)
head: bf0f298
git rev-parse HEAD -> bf0f298
git status --porcelain -> (empty)
gh pr view 13 headRefOid -> bf0f298 (draft, open)

Gate results

# Gate Result Evidence
1 Head binding ✅ PASS npm run qa:binding -- --check -> "OK: clean tree, head descends from base"
2 Type check ✅ PASS npm run check -> no warnings/lint/type errors in 2445 files
3 Lint ✅ PASS npm run lint -> 0 warnings, 0 errors on 2448 files (dist built via gate 15 first)
4 Unit tests ❌ FAIL (inherited) npm run test:run -> 584 failed / 4278 passed (4862); sorted 591-line FAIL list byte-identical to base a188efa list (diff clean; Node 26 jsdom localStorage, see below). Focused: vp test run src/runtime/composition-runtime/utils/media-source-origin.test.ts src/runtime/composition-runtime/components/video-audio-context.test.ts src/runtime/composition-runtime/components/pitch-corrected-audio.test.tsx src/features/editor/host/runtime.test.tsx src/features/editor/host/controller.test.ts src/features/timeline/hooks/use-host-timeline-shortcuts.test.tsx -> 40/40 PASS
5 Build ✅ PASS npm run build -> built in 18.22s, exit 0
6 Feature boundaries ✅ PASS npm run check:boundaries -> no direct cross-feature imports (1675 files)
7 Deps contract boundaries ✅ PASS npm run check:deps-contracts -> 161 deps files, 297 contracts
8 Legacy lib imports ✅ PASS npm run check:legacy-lib-imports -> no unauthorized @/lib/* imports
9 Deps wrapper health ✅ PASS npm run check:deps-wrapper-health -> 46 pass-through wrappers, 0 unused
10 Unused exports ❌ FAIL (inherited) npm run check:unused-exports -> 129 findings, 119 allowlisted, 10 new, 3 stale; output identical to the detached-base a188efa reproduction from the previous report; all findings in files untouched by this PR
11 Unused class members ❌ FAIL (inherited) npm run check:unused-class-members -> 83 findings, 83 allowlisted, 0 new, 2 stale; identical to the detached-base reproduction from the previous report
12 Changed-health ✅ PASS npm run check:changed-health -> introduced dead_code=0, complexity=0, duplication=0
13 Edge budgets ✅ PASS npm run check:edge-budgets -> 8/8 seams PASS; new peekSharedPreviewAudioContext export rides the existing editor deps barrel, editor->timeline unchanged at 73/73
14 Provenance/reproducibility ✅ PASS npm run verify:provenance exit 0; npm run package:reproducible -> artifacts/freecut-4d62e8082c5eb387a96275bcbd323d28f6e41a62.tar.gz (51584309 bytes, sha256 829778ef3a8122676dcb35788673f435aa43533c5ce1a77cf700129444119e88); not published
15 Editor-surface package build ✅ PASS npm run build:editor-surface -> built in 30.77s, exit 0
16 Installed consumer smoke ✅ PASS npm run test:editor-surface:consumer -> tarball packed, fresh temp consumer, consumer-smoke passed; no publish
17 Headless contract tests (Node) ✅ PASS npm run headless:test:node -> 43/43 pass, 0 fail
18 Browser QA ✅ PASS npm run qa:browser -- --skip-build -> harness ready, renderFrame ok, frame width match, PNG >1KB; artifacts/qa/browser-bf0f29866067/ (frame.png, harness.png, console.log, manifest.json)
19 Full headless browser suite ✅ PASS npm run headless:test:chrome -> all 19 edit operation contracts + lifecycle HTTP/CLI checks passed
20 Redaction ✅ PASS npm run check:qa-redaction -> 11 files scanned (incl. new artifacts/qa output), no findings; fail-closed self-tests reject negative fixtures (generic path, tmp path, Windows path, short data URI)

Delta disclosure: c679db1..bf0f298 (audio fix)

  • bf0f298 fix(preview): keep host-provided cross-origin media audible — 9 files, +464/-3:
    • New src/runtime/composition-runtime/utils/media-source-origin.ts: isWebAudioSafeMediaSource (same-origin, blob:, data:, empty, SSR-safe; try/catch fail-safe).
    • video-audio-context.ts: cross-origin sources short-circuit to direct video.volume instead of the silenced MediaElementAudioSourceNode graph; reactive volume updates still propagate. No crossOrigin='anonymous' added anywhere. EQ is graph-only and skipped on the direct path (documented in code).
    • pitch-corrected-audio.tsx: same guard in NativePitchCorrectedAudio; gain-sync effect drives element volume/muted directly when no graph exists.
    • host/runtime.ts: mountStores resets persisted muted:false, volume:1 (monitor volume UI hidden in host mode); resilient pointerdown/keydown listeners resume a suspended shared preview AudioContext; removed in unmountStores.
    • Deps contract barrel gains peekSharedPreviewAudioContext re-export (existing barrel, no new counted feature edge).
    • Tests: media-source-origin (4), video-audio-context (3), host/runtime (2), pitch-corrected-audio (+2).
  • Red/green evidence: with only the three source files (video-audio-context.ts, pitch-corrected-audio.tsx, host/runtime.ts) stashed, the 4 new behavior tests FAIL (cross-origin takes the graph path; mute not reset; no gesture resume); with the fixes, 40/40 focused PASS.

Inherited baseline failures

  • gate 4 (unit tests): FAIL at base a188efa — Node 26 exposes no usable jsdom localStorage ("localStorage is not available because --localstorage-file was not provided"), so zustand persist-middleware setState throws TypeError: Cannot read properties of undefined (reading 'setItem'). Sorted 591-line FAIL list at bf0f298 is byte-identical to the base list captured in the previous round (diff clean); zero new failures. The 11 new tests pass: host/runtime.test.tsx installs the same guarded vi.hoisted localStorage stub (no-op where a real localStorage exists, e.g. CI).
  • gate 10 (unused exports): FAIL at base a188efa with identical findings (129 findings / 10 new / 3 stale, all in files untouched by this PR) — output at this head matches the detached-base reproduction from the previous report.
  • gate 11 (unused class members): FAIL at base a188efa with identical findings (0 new, 2 stale Clock.ts allowlist entries) — output at this head matches the detached-base reproduction from the previous report.

Environment blockers

  • None. Browser gates 18–19 found a real browser session and passed.

Visual / browser artifacts

  • artifacts/qa/browser-bf0f29866067/manifest.json (+ frame.png, harness.png, console.log) — local repo-relative paths, gitignored.

Caveats

  • Full-suite gate 4 cannot go green on this machine (inherited Node 26 localStorage issue, predates this PR); CI environments with working localStorage are unaffected. The new-test localStorage stub is guarded and a no-op there.
  • Known residual edge case (fails closed, carried over): a host clip carrying a fully-default explicit identity transform is indistinguishable at the native layer from an opacity-only transform; dragging such a clip would be rejected with the unsupported-edit toast rather than mis-edited. No current host snapshot shape produces this.
  • The cross-origin direct path skips EQ (graph-only); documented in code comments. Accepting this because host-provided signed URLs cannot use the graph at all without CORS approval.

Overall

✅ PASS — PENDING JUDGE

No merge until trusted judge PASS.

@codepress-dev

codepress-dev Bot commented Aug 22, 2026

Copy link
Copy Markdown

👋 Hey @lightninglu10! Spawning a verification judge session to help with your request. View session

@codepress-dev

codepress-dev Bot commented Aug 22, 2026

Copy link
Copy Markdown

@Terminal @lightninglu10

Dispatched by judge-verification.

This judgment is READY TO MERGE at the current head. If the PR is still a draft, transition it to ready for review now with the guarded readiness transaction: codepress-policy ready-for-review --repo . --pr 13 (or node packages/delivery-policy/dist/cli.js ready-for-review --repo . --pr 13 when the CLI is not on PATH). It re-validates current-head QA and judge evidence, reconciles the delivery-status marker, and marks the PR ready so the native reviewer can dispatch. Do not call gh pr ready directly, and do not merge; merge authorization still requires the reviewer gate.

Verification Judgment — PR #13 (local)

Verdict: ✅ READY TO MERGE

PR Head SHA: bf0f29866067674b7e0710286675eb0b03c501aa

Summary: The current PR head is safe to merge based on the bound verification evidence and the audited diff. The host bridge and host-mode shortcut behavior remain covered by runtime-backed focused tests, and the new cross-origin audio paths are covered at both the video-element and native audio-component boundaries. The three reported full-suite health failures reproduce at the base and do not touch the changed surfaces; the browser artifact citation has a publication-only caveat.

Revision binding

  • Classification: SAME-SHA LATE BINDING
  • Report head: bf0f29866067674b7e0710286675eb0b03c501aa
  • Live PR head: bf0f29866067674b7e0710286675eb0b03c501aa
  • Audited checkout: clean detached checkout at bf0f29866067674b7e0710286675eb0b03c501aa
  • Concrete evidence: The verifier captured git rev-parse HEAD -> bf0f29866067674b7e0710286675eb0b03c501aa; git status --porcelain -> (empty). A separate judge checkout independently reported the same HEAD with empty porcelain status; git merge-base confirmed a188efa286d74de5a8219d0bfc89a9c62fa47720 is an ancestor. Live gh pr view 13 reports the same head on staging and the PR is open/draft.
  • Rows carried forward: none
  • Rows reverified at live head: none
  • Rows still requiring verification: none
  • Publication timing: The canonical report comment was created at 2026-08-22T02:47:03Z; the final head commit was committed at 2026-08-22T02:34:29Z, and GitHub still reports the same live head. This establishes ordering only, not verifier checkout provenance.

Diff trigger inventory

Surface Location Coverage
Host bridge round-trip equality for optional fields, synthesized source bounds, default text styling, and opacity-only transforms src/features/editor/host/controller.ts:39-83,199-219; src/features/editor/host/document.ts:254-324 D1
Supported move, trim, multi-remove, and bounded host command derivation src/features/editor/host/controller.ts:235-425 D2
Host editor mount wiring and dependency-contract export src/features/editor/components/editor.tsx:436-438,756-758; src/features/editor/deps/timeline-hooks-contract.ts:6-9 D3
Positive host-mode playback, navigation, delete, tool, and UI shortcut bindings src/features/timeline/hooks/use-timeline-shortcuts.ts:45-67; src/features/timeline/hooks/shortcuts/use-delete-shortcuts.ts:20-89 D4
Host-mode negative shortcut boundaries, especially history and unsupported editing families src/features/timeline/hooks/shortcuts/use-ui-shortcuts.ts:18-65; src/features/timeline/hooks/use-timeline-shortcuts.ts:48-67 D5
Cross-origin video routing around the Web Audio clip graph with same-origin/blob controls src/runtime/composition-runtime/utils/media-source-origin.ts:10-19; src/runtime/composition-runtime/components/video-audio-context.ts:37-86 D6
Cross-origin NativePitchCorrectedAudio direct volume/mute behavior with graph-path control src/runtime/composition-runtime/components/pitch-corrected-audio.tsx:147-303 D7
Host audio initialization, persisted playback-state reset, gesture resume, and listener cleanup src/features/editor/host/runtime.ts:78-130 D8
Reported inherited health findings and browser artifact provenance Canonical verification report, gates 4, 10, 11, and 18 Q4,Q10,Q11,Q18

Per-item

# Verifier said Judgment Evidence
D1 PASS ✅ PASS The prior canonical report's focused controller suite passed 17/17, including runtime-mounted minimal-clip move/trim operations, default-color text, top-level opacity, synthesized source bounds, and exclusion of an untouched clip. Its red/green check reproduced the six round-trip failures with the bridge source files stashed; the live diff contains the corresponding normalization changes.
D2 PASS ✅ PASS The focused suite covers one remove_item command per removed item, runtime-forwarded multi-select removal, and fail-closed rejection above the shared 64-command limit, with per-item preconditions retained. The full headless contract suite also passed all 19 edit-operation contracts.
D3 PASS ✅ PASS The live diff mounts HostTimelineShortcutsController only when hostRuntime is present and exports the hook through the existing editor dependency contract. Type checking and build passed, and the focused shortcut tests dispatch real keydown events through the mounted hook.
D4 PASS ✅ PASS The focused host shortcut coverage passed: Space toggles playback, Delete removes selected items including multi-select, and the existing full-shortcut control remains functional. The host composition includes the existing playback, tool, delete, and UI bindings, with split changes observed by the host runtime reconciliation path.
D5 PASS ✅ PASS Host mode composes no marker, in/out, clipboard, source-monitor, ripple-delete, nudge, join, freeze-frame, or keyframe-clearing hooks; useUIShortcuts disables undo/redo with enableHistory: false. The host/control Mod+Z test proves the negative history boundary.
D6 PASS ✅ PASS The new origin helper tests cover same-origin, relative, blob/data, empty, and cross-origin inputs. applyVideoElementAudioState tests observe cross-origin direct video.volume updates without graph creation, while same-origin and blob sources still create the graph. The report's red/green run made the cross-origin behavior test fail when this source fix was stashed and pass with it present.
D7 PASS ✅ PASS The rendered NativePitchCorrectedAudio test acquires a cross-origin element, observes direct volume and mute updates on rerender, and confirms no graph/source-node attachment; the blob control confirms the Web Audio path remains active. The focused audio suite is included in the reported 40/40 pass.
D8 PASS ✅ PASS The new tests mount the real EmbeddedEditorHostRuntime, verify persisted mute/volume reset, verify repeated pointerdown/keydown resume of a suspended shared context, leave a running context alone, and verify listeners are removed on unmount. The report's red/green run made these host-runtime behaviors fail with the source fix stashed.
Q4 FAIL (inherited) ✅ WAIVED The 584/4862 full-suite failure result is reported byte-identical to the detached-base reproduction and attributed to the Node 26 jsdom localStorage environment. All changed focused tests passed 40/40, so this inherited failure does not affect the inventoried surfaces.
Q10 FAIL (inherited) ✅ WAIVED The 129 unused-export findings, including the stated 10 new and 3 stale entries, match the detached-base output; the report identifies every finding as outside files changed by this PR. This is an inherited health finding, not a defect in the audited paths.
Q11 FAIL (inherited) ✅ WAIVED The 83 unused-class-member findings match the detached-base output, with zero new findings and stale Clock.ts allowlist entries outside the diff. They do not affect the audited behavior.
Q18 PASS ✅ PASS (FORM CAVEAT) Browser QA used a real browser and passed the harness/render/frame checks. The cited artifacts/qa/browser-bf0f29866067/ path is local-only and no durable https:// visual-evidence URL was published, so independent visual inspection is limited; this is a publication form caveat and does not contradict the behavioral evidence.

Overall status check

  • Verifier said: PASS
  • Result: READY TO MERGE

What stood up

  • The verifier's full SHA and clean-tree capture match the live PR head, and an independent detached checkout is clean at that SHA.
  • The bridge and shortcut evidence exercises runtime-backed store behavior; the new audio evidence covers both direct cross-origin paths and preserved graph-safe paths.
  • The report transparently records that cross-origin direct playback skips EQ and that a fully-default explicit identity transform remains fail-closed; neither caveat permits silent mis-editing or contradicts the current host snapshot contract.

@lightninglu10

Copy link
Copy Markdown
Author

@codepress /judge-verification can you judge this verification?

Local Verification

PR Head SHA: bf0f29866067674b7e0710286675eb0b03c501aa

Scope: FreeCut host-embedding hardening across four commits on fix/host-shortcuts-roundtrip-5319: 503c3cc1 host bridge round-trip stability (drag/trim/delete rejection toasts stay stable for minimal clip items), 01a80ab0 host-mode timeline shortcuts (Space/J/K/L/arrows/Delete/tools/zoom; undo/redo, ripple delete, clipboard, markers, nudges gated off in host mode), c679db10 fallow-gate cleanup, bf0f2986 host-mode no-audio fix (cross-origin host media routed around the Web Audio clip graph — MediaElementAudioSourceNode silences non-CORS cross-origin media per HTML spec — onto direct element volume/muted; host runtime resets persisted playback mute/volume on mount; resilient pointerdown/keydown listeners resume a suspended shared preview AudioContext). This report supersedes the previous canonical report bound to c679db1 (comment 5377278393); the delta c679db1..bf0f298 is exactly the audio-fix commit (9 files, +464/-3).

Diff Trigger Inventory

git diff --stat a188efa2...HEAD (base = origin/staging a188efa286d74de5a8219d0bfc89a9c62fa47720) — 19 files, 1075 insertions(+), 116 deletions(-):

  • src/features/editor/host/controller.ts, document.ts — round-trip stability for minimal clip items (+ tests, 238 lines)
  • src/features/editor/host/runtime.ts (+ new runtime.test.tsx) — playback mute/volume reset on mount, gesture-driven AudioContext resume
  • src/features/editor/components/editor.tsx, deps/composition-runtime-contract.ts, deps/timeline-hooks-contract.ts — host shortcut mount + barrel re-exports (existing barrels, no new counted feature edge)
  • src/features/timeline/hooks/shortcuts/*, use-timeline-shortcuts.ts (+ new use-host-timeline-shortcuts.test.tsx) — host-safe shortcut split
  • src/runtime/composition-runtime/components/video-audio-context.ts, pitch-corrected-audio.tsx, new utils/media-source-origin.ts (+ 3 test files) — cross-origin audio routing guard

Blast radius: preview audio path (video + audio elements) and host-mode store mounting. Same-origin and blob:/data: sources keep the existing Web Audio graph behavior unchanged (guarded by isWebAudioSafeMediaSource); EQ remains graph-only and is skipped on the direct path (documented in code).

Verification Contract Results

Canonical 20-gate set from docs/qa/README.md, all executed at the bound head in worktree /Users/lightninglu10/Q5/.worktrees/freecut/host-shortcuts-roundtrip-5319:

# Gate Result Evidence
1 Head binding ✅ PASS npm run qa:binding -- --check -> "OK: clean tree, head descends from base"
2 Type check ✅ PASS npm run check -> no warnings/lint/type errors in 2445 files
3 Lint ✅ PASS npm run lint -> 0 warnings, 0 errors on 2448 files (dist built via gate 15 first)
4 Unit tests ⚠️ environment-limited (inherited) npm run test:run -> 584 failed / 4278 passed (4862); sorted 591-line FAIL list byte-identical to base a188efa (diff clean against the captured base list; Node 26 jsdom localStorage, disclosed below). Focused delta suites: vp test run on the 6 touched test files -> 40/40 PASS
5 Build ✅ PASS npm run build -> built in 18.22s, exit 0
6 Feature boundaries ✅ PASS npm run check:boundaries -> no direct cross-feature imports (1675 files)
7 Deps contract boundaries ✅ PASS npm run check:deps-contracts -> 161 deps files, 297 contracts
8 Legacy lib imports ✅ PASS npm run check:legacy-lib-imports -> no unauthorized @/lib/* imports
9 Deps wrapper health ✅ PASS npm run check:deps-wrapper-health -> 46 pass-through wrappers, 0 unused
10 Unused exports ⚠️ environment-limited (inherited) npm run check:unused-exports -> 129 findings, 119 allowlisted, 10 new, 3 stale; output identical to the detached-base a188efa reproduction (previous round); all findings in files untouched by this PR
11 Unused class members ⚠️ environment-limited (inherited) npm run check:unused-class-members -> 83 findings, 83 allowlisted, 0 new, 2 stale; identical to the detached-base reproduction
12 Changed-health ✅ PASS npm run check:changed-health -> introduced dead_code=0, complexity=0, duplication=0
13 Edge budgets ✅ PASS npm run check:edge-budgets -> 8/8 seams PASS; editor->timeline unchanged at 73/73
14 Provenance/reproducibility ✅ PASS npm run verify:provenance exit 0; npm run package:reproducible -> artifacts/freecut-4d62e8082c5eb387a96275bcbd323d28f6e41a62.tar.gz (51584309 bytes, sha256 829778ef3a8122676dcb35788673f435aa43533c5ce1a77cf700129444119e88); not published
15 Editor-surface package build ✅ PASS npm run build:editor-surface -> built in 30.77s, exit 0
16 Installed consumer smoke ✅ PASS npm run test:editor-surface:consumer -> tarball packed, fresh temp consumer, consumer-smoke passed; no publish
17 Headless contract tests (Node) ✅ PASS npm run headless:test:node -> 43/43 pass, 0 fail
18 Browser QA ✅ PASS npm run qa:browser -- --skip-build -> harness ready, renderFrame ok, frame width match, PNG >1KB; artifacts/qa/browser-bf0f29866067/ (frame.png, harness.png, console.log, manifest.json)
19 Full headless browser suite ✅ PASS npm run headless:test:chrome -> all 19 edit operation contracts + lifecycle HTTP/CLI checks passed
20 Redaction ✅ PASS npm run check:qa-redaction -> 11 files scanned (incl. new artifacts/qa output), no findings; fail-closed self-tests reject negative fixtures (generic path, tmp path, Windows path, short data URI)

Red/green evidence for the delta fixes:

  • Audio fix (bf0f298): with only the three source files (video-audio-context.ts, pitch-corrected-audio.tsx, host/runtime.ts) stashed, the 4 new behavior tests FAIL (cross-origin src takes the silenced graph path; persisted mute not reset; no gesture resume); with the fixes, all focused suites PASS.
  • Round-trip fix (503c3cc, prior round): with host/controller.ts + host/document.ts stashed, the 6 round-trip tests FAIL (rejection toasts reproduced); with the fixes, 17/17 PASS.
  • Shortcut gating (01a80ab, prior round): Mod+Z does not mutate the timeline store with useHostTimelineShortcuts mounted, while the same dispatch undoes with the full useTimelineShortcuts control — 5/5 PASS.

Head/tree binding captured after all gates:

$ git rev-parse HEAD
bf0f29866067674b7e0710286675eb0b03c501aa
$ git status --porcelain
(empty)
$ gh pr view 13 --json headRefOid,isDraft,state
bf0f29866067674b7e0710286675eb0b03c501aa draft=true state=OPEN

Disclosed caveats (inherited, environment-limited)

  • Gate 4 (full unit suite): the 584 failures reproduce byte-identically at base a188efa (sorted 591-line FAIL lists diff clean) — Node 26 on this machine exposes no usable jsdom localStorage ("--localstorage-file was not provided"), so zustand persist-middleware setState throws. Zero new failures vs base; the 11 new tests install a guarded vi.hoisted localStorage stub that is a no-op where a real localStorage exists (e.g. CI), and pass.
  • Gates 10–11 (fallow unused exports/class members): findings identical to detached-base reproductions from the previous round; all in files untouched by this PR; 0 new class-member findings.
  • Gate 4 cannot go green on this machine (predates this PR); CI environments with working localStorage are unaffected.
  • Residual edge case (fails closed): a host clip with a fully-default explicit identity transform is indistinguishable natively from an opacity-only transform; dragging it is rejected with the unsupported-edit toast rather than mis-edited. No current host snapshot shape produces this.
  • The cross-origin direct audio path skips EQ (graph-only); host-signed URLs cannot use the graph without CORS approval, so this is the intended trade-off.

Browser artifacts: artifacts/qa/browser-bf0f29866067/ (manifest.json, frame.png, harness.png, console.log) — local repo-relative paths, gitignored.

Overall: PASS

@codepress-dev

codepress-dev Bot commented Aug 22, 2026

Copy link
Copy Markdown

👋 Hey @lightninglu10! Spawning a verification judge session to help with your request. View session

@codepress-dev

codepress-dev Bot commented Aug 22, 2026

Copy link
Copy Markdown

@Terminal @lightninglu10

Dispatched by judge-verification.

This judgment is READY TO MERGE at the current head. If the PR is still a draft, transition it to ready for review now with the guarded readiness transaction: codepress-policy ready-for-review --repo . --pr 13 (or node packages/delivery-policy/dist/cli.js ready-for-review --repo . --pr 13 when the CLI is not on PATH). It re-validates current-head QA and judge evidence, reconciles the delivery-status marker, and marks the PR ready so the native reviewer can dispatch. Do not call gh pr ready directly, and do not merge; merge authorization still requires the reviewer gate.

Verification Judgment — PR #13 (local)

Verdict: ✅ READY TO MERGE

PR Head SHA: bf0f29866067674b7e0710286675eb0b03c501aa

Summary: The current PR head is safe to merge based on the exact-head verification report and the audited diff. The host bridge and host-mode shortcut behavior remain covered by runtime-backed focused tests, and the new cross-origin audio paths are covered at both the video-element and native audio-component boundaries. The inherited unit/fallow findings are reproduced at base and do not touch the changed surfaces; the browser artifact citation carries a publication-only caveat.

Revision binding

  • Classification: SAME-SHA LATE BINDING
  • Report head: bf0f29866067674b7e0710286675eb0b03c501aa
  • Live PR head: bf0f29866067674b7e0710286675eb0b03c501aa
  • Audited checkout: clean detached checkout at bf0f29866067674b7e0710286675eb0b03c501aa
  • Concrete evidence: The verifier captured git rev-parse HEAD -> bf0f29866067674b7e0710286675eb0b03c501aa; git status --porcelain -> (empty). The judge independently audited a detached checkout with git rev-parse HEAD -> bf0f29866067674b7e0710286675eb0b03c501aa; git status --porcelain -> (empty); git merge-base confirmed a188efa286d74de5a8219d0bfc89a9c62fa47720 is an ancestor.
  • Rows carried forward: none
  • Rows reverified at live head: none
  • Rows still requiring verification: none
  • Publication timing: GitHub's timeline records the canonical report comment at 2026-08-22T03:05:45Z; the bf0f29866067674b7e0710286675eb0b03c501aa commit event precedes that comment, and gh pr view 13 still reports the same live head on staging. This establishes ordering only, not verifier checkout provenance.

Diff trigger inventory

Surface Location Coverage
Host bridge round-trip equality for optional fields, synthesized source bounds, default text styling, and opacity-only transforms src/features/editor/host/controller.ts:39-83,199-219; src/features/editor/host/document.ts:57-67,254-324 D1
Supported move, trim, multi-remove, bounded command derivation, and authoritative restoration src/features/editor/host/controller.ts:235-425; src/features/editor/host/runtime.ts:225-281 D2
Host editor mount wiring and dependency-contract export src/features/editor/components/editor.tsx:436-438,756-758; src/features/editor/deps/timeline-hooks-contract.ts:7 D3
Positive host-mode playback, navigation, delete, tool, and UI shortcut bindings src/features/timeline/hooks/use-timeline-shortcuts.ts:46-67; src/features/timeline/hooks/shortcuts/use-delete-shortcuts.ts:20-89 D4
Host-mode negative shortcut boundaries, especially history and unsupported editing families src/features/timeline/hooks/use-timeline-shortcuts.ts:48-67; src/features/timeline/hooks/shortcuts/use-ui-shortcuts.ts:13-65 D5
Cross-origin video routing around the Web Audio clip graph with same-origin/blob controls src/runtime/composition-runtime/utils/media-source-origin.ts:10-19; src/runtime/composition-runtime/components/video-audio-context.ts:37-100 D6
Cross-origin NativePitchCorrectedAudio direct volume/mute behavior with graph-path control src/runtime/composition-runtime/components/pitch-corrected-audio.tsx:147-305 D7
Host audio initialization, persisted playback-state reset, gesture resume, and listener cleanup src/features/editor/host/runtime.ts:78-130 D8
Reported inherited health findings and browser artifact provenance Canonical verification report, gates 4, 10, 11, and 18 Q4, Q10, Q11, Q18

Per-item

# Verifier said Judgment Evidence
D1 PASS ✅ PASS The report's focused controller suite passed 17/17, including runtime-mounted minimal-clip move/trim operations, default-color text, top-level opacity, synthesized source bounds, and exclusion of an untouched clip. Its red/green check reproduced the six round-trip failures with the bridge source files stashed and passed with the fixes; the audited diff contains the corresponding normalization changes.
D2 PASS ✅ PASS The focused suite covers one remove_item command per removed item, runtime-forwarded multi-select removal, and fail-closed rejection above the shared 64-command limit, with per-item preconditions retained. The full headless contract suite also passed all 19 edit-operation contracts.
D3 PASS ✅ PASS The live diff mounts HostTimelineShortcutsController only when hostRuntime is present and exports the hook through the existing editor dependency contract. Type checking and build passed, and the focused host shortcut tests dispatch real keydown events through the mounted hook.
D4 PASS ✅ PASS The focused host shortcut coverage passed 5/5: Space toggles playback, Delete removes selected items including multi-select, and the existing full-shortcut control remains functional. The host composition includes the existing playback, tool, delete, and UI bindings, while supported store mutations are observed by the host runtime reconciliation path.
D5 PASS ✅ PASS Host mode composes no marker, in/out, clipboard, source-monitor, ripple-delete, nudge, join, freeze-frame, or keyframe-clearing hooks; useUIShortcuts disables undo/redo with enableHistory: false. The Mod+Z host/control test proves the negative history boundary, and the source composition proves the remaining exclusions.
D6 PASS ✅ PASS The new origin-helper tests cover same-origin, relative, blob/data, empty, and cross-origin inputs. applyVideoElementAudioState observes cross-origin direct video.volume updates without graph creation, while same-origin and blob sources still create the graph. The report's red/green run made the cross-origin behavior tests fail with the source fix stashed and pass with it present.
D7 PASS ✅ PASS The rendered NativePitchCorrectedAudio test acquires a cross-origin element, observes direct volume and mute updates on rerender, and confirms no graph/source-node attachment; the blob control confirms the Web Audio path remains active. The focused audio suites are included in the reported 40/40 pass.
D8 PASS ✅ PASS The new tests mount the real EmbeddedEditorHostRuntime, verify persisted mute/volume reset, verify repeated pointerdown/keydown resume of a suspended shared context, leave a running context alone, and verify listeners are removed on unmount. The report's red/green run made these host-runtime behaviors fail with the source fix stashed and pass with it present.
Q4 ⚠️ environment-limited (inherited) ✅ WAIVED The 584 full-suite failures are reported byte-identical to the detached-base reproduction and attributed to the Node 26 jsdom localStorage environment. All changed focused tests passed 40/40, so this inherited failure does not affect the inventoried surfaces.
Q10 ⚠️ environment-limited (inherited) ✅ WAIVED The unused-export findings were reproduced with identical output at the detached base; the report identifies them in files untouched by this PR. This is an inherited health finding, not a defect in the audited host bridge, shortcut, or audio paths.
Q11 ⚠️ environment-limited (inherited) ✅ WAIVED The unused-class-member findings were reproduced at the detached base with zero new findings attributable to the PR and stale allowlist entries outside the diff. They do not affect the audited behavior.
Q18 PASS ✅ PASS (FORM CAVEAT) Browser QA used a real browser and passed the harness/render/frame checks. The cited artifacts/qa/browser-bf0f29866067/ files are local-only and no durable https:// visual-evidence URL was published, so independent visual inspection is limited; this is a publication form caveat and does not contradict the behavioral evidence.

Overall status check

  • Verifier said: PASS
  • Result: READY TO MERGE

What stood up

  • The verifier's full SHA and clean-tree capture match the live PR head, and an independent detached checkout is clean at that SHA.
  • The bridge and shortcut evidence exercises runtime-backed store behavior; the new audio evidence covers both direct cross-origin paths and preserved graph-safe paths.
  • The report transparently records that cross-origin direct playback skips EQ and that a fully-default explicit identity transform remains fail-closed; neither caveat permits silent mis-editing or contradicts the current host snapshot contract.

@lightninglu10
lightninglu10 marked this pull request as ready for review August 22, 2026 03:19
@codepress-reviewer-dev

Copy link
Copy Markdown

Starting initial review of bf0f2986 from baseline a188efa2... 👀

View automation run

@codepress-reviewer-dev codepress-reviewer-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

The host remains the authoritative timeline owner: local timeline changes are still reduced to bounded host commands and unsupported mutations restore the authoritative snapshot. The new host shortcut slice respects that boundary by leaving local-only history and unsupported editing families unmounted.

The round-trip normalization, batched removals, and cross-origin direct-audio fallback are coherent with that model. I found no actionable correctness, security, or production-risk issues in the supplied diff.

Reviewed `a188efa2`...`bf0f2986`. Diff collection and GitHub posting were handled by the automation.

View automation run

@codepress-reviewer-dev

Copy link
Copy Markdown

Review head bf0f29866067674b7e0710286675eb0b03c501aa; round 1; 19 reviewed file(s), 0 pending/skipped file(s). 0 subsystem record(s) retained; 0 omitted.

View automation run

@lightninglu10
lightninglu10 merged commit c3615a3 into staging Aug 22, 2026
3 checks passed
lightninglu10 added a commit that referenced this pull request Aug 22, 2026
* chore(release): freecut-editor-surface 0.3.2

Version bump so the 0.3.2 npmjs publish is reproducible from a real
repo commit (provenance gate). Content delta vs 0.3.1 is PR #13:
host bridge round-trip stability, host-mode timeline shortcuts, and
the host-mode cross-origin audio fix.

* chore(release): document and script the manual npmjs release path

The package manifest keeps publishConfig pointed at GitHub Packages (the
CI tag/dispatch target, enforced by package-editor-surface.mjs), but
CodePress consumes @quantfive/freecut-editor-surface from npmjs and the
repo has no NPM_TOKEN secret, so npmjs releases are a manual maintainer
step.  Add scripts/publish-editor-surface-npmjs.mjs (root script
publish:editor-surface:npmjs) that runs the provenance + deterministic
pack + fresh-consumer smoke preflight and then publishes the exact
tarball to https://registry.npmjs.org with --access=public; --dry-run
validates without publishing.  Document both release targets in the
package README and refresh the provenance package.json checksums.

* chore(release): make public npmjs the canonical release target

Per maintainer direction the editor surface is a public package now.
publishConfig targets https://registry.npmjs.org with public access and
package-editor-surface.mjs enforces exactly that; the tag/dispatch
workflow publishes to npmjs with NODE_AUTH_TOKEN from the NPM_TOKEN
repo secret (a repo admin must add it before tag publishes work).  The
manual maintainer path (publish:editor-surface:npmjs) stays as the
fallback and drops its registry/access overrides now that the manifest
is canonical.  README release docs updated; GitHub Packages is no
longer a target.

* chore(release): guard npmjs publish to the merged staging revision

Reviewer finding: the manual publish script rebuilt and preflighted
without checking the worktree or release ref, so uncommitted source
could ship as the official public version.  The script now requires an
explicit --ref <sha> (or --ref HEAD) and refuses before any build step
— in dry-run mode too — unless the tree is clean, HEAD equals --ref,
and --ref is an ancestor of origin/staging.  Guard behavior is covered
by scripts/publish-editor-surface-npmjs.test.mjs (node --test, 7 cases:
clean/match/ancestor acceptance, dirty tree, HEAD mismatch,
non-staging ref, missing ref, unresolvable ref) wired as
test:publish-editor-surface-guards.  README documents the --ref flow;
provenance checksums refreshed for the root manifest change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant