← Back to Pull requests

feat(web-runtime): expose native tempo preview ownership #2455

Closed
unknown closed this pull request without merging on Oct 21, 2026 08:29 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 08:10 UTC
Author

Summary

Expose the complete Pattern tempo preview producer through the Native Web Control/Bridge and sealed pre.js transport. Preserve prepared sources across every publication family, adopt same-BPM revision changes before preview, retain the original save command through an unknown response, and wait for physical callback retirement. Ordinary Suspend preserves its terminal receipt and immutable source so the same Session can later begin a fresh preview.

This is the first of two dependency Tasks for original #2418/#2419 and replacement #2447. The 13 product/build/test paths are byte-identical to corrected candidate 40c78f9f28dd384529e5f6074cb68b01ebb16c09; six documentation/diagram/plan paths describe the Native boundary. The successor owns the complete protocol, typed SDK and all original real browser journeys. Both original PRs remain open until both Tasks are merged and their full combined scope is verified.

The old 28-path review attempts failed before producing a review. Read-only offline rendering measured 7,098,904 bytes and 1,651,788 stock o200k tokens, against configured context limits of 1,048,576. This is diagnostic tokenizer evidence, not provider-reported usage or proof of the exact service error. The dependency split preserves every original product change, test, deadline and journey; it changes no review configuration, gate or budget.

Related Issue

Related issue: Relates to #2235
Relates to #2112, #2236, #1973 and #2237. SDK completion, Creator tempo/metronome, composition acceptance and version obligations remain open.

Verification

  • Complete node --test packages/web-runtime-platform/test/.test.mjs: 710/710 PASS, no skips, including the actual sealed pre.js transport cases. apps/creator-web/node_modules/.bin/tsc --noEmit -p apps/creator-web/tsconfig.json: PASS.

  • Fresh owning Native build, then the complete original ctest --test-dir build/core/dev --output-on-failure -V -R 'pattern_tempo|^host\.web_control_runtime$': 25/25 PASS (150.440s); existing full Control completed in 113.30s within its unchanged 120s limit. All seven gateway/Facade and 18 Web/Control cases remain included.

  • Fresh ASan/UBSan build and ctest --preset asan --output-on-failure -V -R '^(host.web_pattern_tempo_preview\..|stress.web_pattern_tempo_(preview|publications))$': 17/17 PASS (80.223s). Fresh TSan build and ctest --preset tsan --output-on-failure -V -R pattern_tempo: 24/24 PASS (227.115s), retaining all four owning stresses. Actual Application, Engine, Control and dedicated test compiler flags were checked; no ambient sanitizer options or sanitizer report. TSan observed 64 admissions/refusals/cancellations with 114,629 callbacks and 32 edits/previews/restores with 167,462 callbacks.

  • bash scripts/web-toolchain-conformance.sh build-audio-runtime: PASS (94.622s), pinned Emscripten 6.0.5. All three formal Native Wasm outputs are retained with SHA-256 and byte length. This proves the Native producer compile; the complete real SDK/AudioWorklet acceptance remains in the successor Task.

  • bash scripts/docs-site.sh check: 179/179 tests, 53 current pages, 10 diagram sources/20 outputs, production build and 51 routes/internal links PASS (125.454s).

  • Dependency and active-tree checks PASS; Core entrypoint tests 17/17 PASS; staged and committed ownership 77/77 PASS. A fresh comparison preserves classifications for all 5,748 paths at main 10d656507ccc15ebe582379913234ca9edb4dcdc and independently checks the new Native test's eight owning lanes. Exact 19-file scope and staged diff checks PASS; final worktree clean.
  • Retained failed result: the first complete Native run was 24 PASS / 1 Timeout (exit8): existing Control reached its unchanged 120-second limit while this 8-core host was running the real CI stress repetition suite. That is observed association, not a proven environmental root cause or a claimed repair. After the actual CI test/build children ended and three resource observations showed about 70% CPU idle, the one bounded complete recheck above passed. No source, assertion, deadline, stress budget or selected test changed. The same four retained Native binaries have matching before/after SHA-256; their mtimes/ctimes predate the first result. Both outcomes and host observations remain retained.

    Verified source commit: b1633eb512a8ee889622e7691fb2d3779e6bc0b0; its complete tree 75797fac482df6d0cedd1bc7a24ae6d993a35bf9 is exactly the tree used for the above checks. Evidence is retained in /Users/endaye/.codex/task-evidence/merge-2112-20261021/tempo-native-*. The original corrected-union results and rebuilt negative/restore proofs remain historical, distinct evidence.

    Full SDK/browser acceptance is pending the successor Task. Creator I2c/400ms/metronome/S7, complete candidate/full/coverage lanes and physical/hearing acceptance remain UNRUN here. No B3 completion, deployment or release is claimed by this producer Task.

    PR Review

    Independent current-head review: authenticated DeepSeek review run 39567259229, attempt 1, review 5596759382, for b1633eb512a8ee889622e7691fb2d3779e6bc0b0; trusted helper returned eligible true. Eight findings received individual source/test-backed dispositions in their review threads; all eight are resolved. This was an eligible review with findings, not an empty clean review. No source change or owner waiver was used. Complete live conversation/protection/conflict checks remain part of the immediate premerge readback. The failed #2447 attempts remain visible and do not count as review evidence for this Task.

    Additional exact-head Native diagnostic: compiled an external probe against unchanged dev objects (compile/link/run exit 0; run 3.572s). All four paused-callback lifecycle combinations (Suspend/close, bound-preview/source-adoption) returned bounded HOST_TIMEOUT at a supplied 100ms caller deadline, retained physical ownership until actual callback join, then reported source_lost with no durable writes. UNKNOWN deliberately remained unresolved after join; only original-command reconciliation released it, without extra storage writes. This is diagnostic Native evidence, not SDK/browser acceptance. The existing production deadlines and source are unchanged.

    CI Scope

    Expected mode: full
    Expected selected lanes: ci_contract core_asan core_coverage core_macos core_ubuntu creator deploy_contract docs_static package portal web_runtime_host web_runtime_lab web_toolchain
    Expected skipped lanes: none
    ci:full required: no
    Reason: root CMake matches the existing full rule. Scope selection does not claim all complete lanes ran. The exact-file routing addition preserves prior routing and supplies ownership for the Native test; no workflow/release/deployment path changes.

    Version Management

    Version impact: additive Application Facade and Web Runtime Platform MINOR debt in #2237, with same-domain Suspend PATCH deduplicated under the higher debt.
    Reason: compatible nonvirtual Facade APIs and Native operations; no Product Build, Assembly, manifest or snapshot allocation, and no persisted-format migration.

    Documentation Impact

    Documentation impact: required
    Affected portal pages: /core/modules/application-facade/ /core/modules/web-runtime-platform/
    Reason: describe the Native producer, retained sources and terminal receipts, with the SDK boundary explicitly pending; update the official architecture source and generated outputs.

    Pitfall Impact

    Pitfall impact: none — reason: source ownership and terminal/persistence defects are expressed by the original Native regression suite. The dependency boundary and measured input size are recorded without changing review policy or introducing a new gate.

    Release Impact

    Release impact: none
    Candidate tag: none
    Profile: none
    Channel: none
    Intent disposition: none
    Release assets: none
    Release gates: none
    Reason: ordinary Task integration only.

    Transition authority

    Authorized transitions: commit, push, PR, independent current-head review and squash merge under the owner's 19-PR integration request and AGENTS.md standing Task authorization. No release, deployment, Channel or cleanup.

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: endaye Review duration: 18m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2455"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%
    Repository