← Back to Pull requests

feat(web): integrate stereo output measurement #2430

Closed
unknown closed this pull request without merging on Oct 21, 2026 00:09 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 15:39 UTC
Author

Summary

native product post-FX → shared tap → monitor gain → destination
                           ├─ bounded meter owner/peak/ACK → outputMeter()
                           └─ exact started/batch/stop → capture progress
native cue/click ───────────────────→ monitor gain
saved metadata → separate bounded query/retirement

Integrate the approved stereo meter producer while preserving current-main
capture progress, optional telemetry isolation and saved-metadata ownership.
Meter measures each real L/R sample before monitor gain, independently of
capture, and reports explicit unavailable states using the actual context clock.
Creator meter UI remains separate #2384 work.

Related Issue

Related issue: Relates to #2231
Part of #2112; refs #2135/#2228/#2237. Consumer, full candidate, device/hearing
and umbrella acceptance remain open. Original Draft #2383 is retained unchanged.

Evidence

  • Initial producer7101 and review-isolation fix7a765145 remain in published

  • history. The latter fixes valid old-owner ACK failure and synthetic generic
    error admission, with original independent RED/603 Node and full real-audio
    receipts retained. It does not yet have a successful repair publisher receipt.
  • Main advanced to19e8ce3c through saved metadata and capture progress2440/2441.

  • Live PR then became CONFLICTING; independent merge-tree named four real
    conflicts. Follow-up36d69a94 is a normal two-parent merge, preserving both
    published histories with no amend/force. The four resolutions retain both
    capabilities and both safety-cleanup calls. Main's optional-read fixes and
    independent metadata queue remain intact.
  • Automatic test union632 PASS; final full633 adds one real-processor VM

  • composition journey. Meter owner replacement preserves4800 delivered frames,
    Stop includes1216 final frames and closed-form6016 rendered frames, then
    meter ownerB continues after capture stops. This is Node VM evidence, not
    physical capture or acoustic acceptance.
  • Correct a stale Portal sentence: capture-ready already requires the exact

  • started ACK; meter traffic cannot stand in for it. All20 diagram outputs
    remain byte-identical after official rendering.

    Verification

    Current head: 36d69a94c7cc982d35ec3bb1dd6bf6c8d18b1624
    Parent heads:7a765145a4df8ed6baee4252da5bfa4b777204d8 and
    19e8ce3c5e84cf98dd3dd8fac9348585018002de.
    Net main-relative scope:17 files (original16 plus integration plan).

  • node --test packages/web-runtime-platform/test/*.test.mjs:633/633 PASS1.852s,

  • no skips. Includes all main metadata/retirement/capture isolation and meter
    owner/fault regressions. Owning capture34/34 passes separately.
  • Four existing actual mutations: all-frame peak, pending-start demux, foreign

  • owner and actual audio-clock freshness each RED1 at its owning assertion;
    byte-identical fresh-mtime restore each GREEN0, then complete633 PASS.
  • Strict SDK tsc and Creator tsc pass; npm test -- --run

  • test/perform_surface.test.tsx
    :170/170 PASS12.235s. Core dependencies, Runtime
    and explicit-root Host source boundaries and pitfall15 pass. Source/spec syntax
    checks pass; no threshold, timeout, packet, graph/gain or test selection change.
  • npm --prefix apps/docs-site run diagrams keeps all20 output hashes unchanged.

  • scripts/docs-site.sh check:179tests/53pages/51routes+links PASS59.951s.
  • Staged ownership76 PASS9.267s; committed ownership76 PASS9.607s. Committed

  • focused scope resolved; original precommit full result inspected old HEAD and
    is not the final main-relative inventory.
  • Official pinned6.0.5/Node26 Creator configure/build/package on clean36d69a94

  • PASS55.402s. All8 assets and complete10-file inventory match length/SHA;
    compiled/packaged Wasm match;512MiB/conformanceOFF/no test global. Both public
    getters are present; clean source HEAD/hashes are unchanged before/after.
    Production manifest has no revision field.
  • Complete unchanged normal+actual-render-fault meter journeys2/2 PASS43.377s,

  • zero skips/flaky/retry: real unequal PCM/absolute oracles, FX, zero monitor
    with nonzero pre-monitor samples, capture/Stop/seal, actual click PCM with
    contiguous zero tap windows, real suspend/return/accepted voice/new owner,
    passive reads and genuine trusted render-fault/direct-monitor audio recovery.
    Derived fault candidate has verified distinct manifest and complete asset
    identities; no synthetic processorerror, offline bypass or product fault hook.
    Default built-in MacBook Pro Speakers observed at both ends, no acoustic claim.
  • Full current-main Perform+touch: 27/27 PASS358.280s (wrapper359.246s), no skip/flaky/retry or expected failure.

  • New-head capture progress has22016/16896 actual frames@48000, final partial2816/2496, full WAV88108/67628 bytes with SHA matched to port batches, distinct IDs/generations, default null binding, exact Stop ACKs, terminal cleanup and close/reopen idle.
  • Both original graph and polling-alias RED/restored full GREEN receipts remain

  • bound to7101;603 and original normal/fault receipts remain bound to7a.
    New-head full29 and633 results are separately recorded. No historical failure
    is relabelled or old pass reported as a new-head run.

    The merge imports83 upstream/conflict/plan paths relative to7a; every upstream-only
    blob is byte-identical to main19e8ce3c. Net PR has no frozen release/workflow path
    and no scope/CI/protection change. Original mono/stereo/HOLD/transition/event,
    interrupted130, actual clock alias and repair-publisher failures remain retained.
    Whole candidate/full batches/coverage/ASan/fullTSan, real Safari/iPad/MIDI,
    35-screen and hearing/business acceptance remain unverified.

    PR Review

    Authenticated exact-head GLM5593308271 / run39518412685 attempt1 is eligible,
    helper exit0, findings0. Complete-input call prompt1006649/completion1156.
    DeepSeek made two calls then returned internal_error/not-reviewed; raw finite
    diagnostics and unavailable usage/cost are retained, not clean review evidence.

    Both original valid fixed threads are now automatically resolved by the actual
    repair publisher at36d69a94, with retained receipts and authenticated reply
    readback (author41898282, exact parent comments, current head and request hash):

  • F1 original4327049345 → reply4331623853, request SHA

  • bdb3f2b1a8a1ad11d0c555f18d646bed687cf7160236ff9d7c9745f12cc4138d.
  • F2 original4327049365 → reply4331625565, request SHA

  • f1413da6c45df15ae89d05d0ecbb89102a7945a83f596401934c6067cda10614.

    These are source-only rechecks; they do not claim tests ran. Actual633/29 tests
    are separate receipts above. All three live threads are resolved: the two fixes
    by automatic repair, the earlier intentional old-token advisory by recorded
    reasoned rejection. No author hand-resolution of fixes or owner waiver was used;
    the earlier requested owner exception is no longer needed for these threads.
    Prior original-quote-anchor refusals and this run's queued/in-progress helper
    observations are retained; none are relabelled as successful current evidence.
    All paginated reviews, closing relations, conflicts and live protection remain
    final separate checks before expected-head squash.

    CI Scope

    Expected mode: focused
    Expected selected lanes: ci_contract creator docs_static portal web_runtime_host web_toolchain
    ci:full required: no
    Reason: actual committed main-relative shared SDK/Worklet/type/browser and Portal
    paths plus preserved original pitfall recurrence. Scope is ownership, not a claim
    that six complete lanes ran. Lowest owning checks and full declared journeys
    above cover this conflict-composition Task; remaining complete lanes deferred.
    Authenticated remote effective focused scope is ci_contract, creator,
    docs_static, portal, web_runtime_host, web_runtime_lab, web_toolchain. The local
    quick inventory above is distinct. AI test:none never subtracts the floor;
    Lab42/server/active-tree was separately verified PASS0.473s. No gate or
    workflow/selector/threshold/budget/protection/scheduling change.

    Version Management

    Version impact: existing compatible additive Web Runtime Platform JS API MINOR
    debt in #2237; composition adds no further public shape or allocation. Keep
    higher Audio Runtime ABI MAJOR/other debt. No Native layout, persistence,
    cross-language Contract, manifest/Product/Assembly/Build/Channel/snapshot change.

    Documentation Impact

    Documentation impact: required
    Affected portal pages: /core/modules/web-runtime-platform/ /platform/web-runtime/
    Reason: preserve combined meter/metadata/capture ownership facts and correct
    stale started-ACK statement; source diagram and unrelated outputs unchanged.

    Pitfall Impact

    Pitfall impact: bumped
    Preserve original live-phase-polling-alias recurrence2 and escalation #2382,
    open/exit none. This Task introduces no new recurrence or generic cadence gate.

    Release Impact

    Release impact: none
    Candidate tag: none
    Profile: none
    Channel: none
    Intent disposition: none
    Release assets: none
    Release gates: none
    Reason: ordinary feature integration; fixed candidate8c361623f and release-owned
    paths remain frozen. Upstream imports do not change the net frozen-path diff.

    Transition authority

    Authorized sequential ordinary integration and safe postmerge cleanup. Task
    verification, new current-head review, all findings/conversations, conflicts and
    live protection remain required. Original Draft refs and dirty WIPs retained.
    No auto-merge, published-history rewrite, tag/Release/Runtime deploy/Channel.

    Merge Danger

    Door: two-way

    Blast Radius: WebAudio

    Always-on meter shares the capture port. The composition retains separate
    owners, bounded ACK traffic, exact capture lifecycle, query retirement and
    native fallback; all required journey legs and budgets are preserved.

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: endaye Review duration: 510m
    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 #2430"
    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