← Back to Pull requests

feat(facade): integrate owned Pattern tempo previews #2445

Closed
unknown closed this pull request without merging on Oct 21, 2026 01:31 UTC
View on GitHub
unknown unknown commented on Oct 21, 2026 01:24 UTC
Author

Summary

Add the Facade-owned reversible Pattern tempo preview lifecycle. Preview/cancel retain the actual source and applied clock; one settled save freezes its original command, preserves UNKNOWN across exact retry, adopts the committed revision without resetting phase, and owns one Undo. Stale source, recording/replay, transport and foreign authoring owners remain interlocked.

Integrate original #2416 onto 7910ee1db67537a751c0668de97c14b35b53b5c2, after B1 landed through #2444. A normal merge preserves published head 57c6d47a44908aefd80a983edea3062d586ceac8; the net diff contains only its original 19 paths, with a current integration section added to the plan. The original product/test patches apply unchanged. B3 Web registration and the withdrawn COUNT-IN consumer remain separate.

GitHub rejected retargeting the original stack PR with Cannot change the base branch because the pull request is part of a stack. This main-target integration replacement preserves the original head/history; the original PR stays open until verified merged retention.

Related Issue

Related issue: Relates to #2235
Relates to #2112, #2236, #1973 and #2237. These obligations remain open.

Verification

  • Fresh scripts/core.sh configure dev and owning target builds: PASS. Complete original ctest --preset dev -R '^(facade.sequence_surface.rebase|facade.pattern_transport_switch|facade.pattern_tempo_gateway(_stress)?|facade.pattern_tempo_preview[._].)$' --output-on-failure -V: 9/9 PASS, 12.119s.

  • Fresh TSan configuration/build and complete original ctest --preset tsan -R '^(facade.pattern_tempo_preview[._].|facade.pattern_tempo_gateway_stress|facade.pattern_transport_switch(_stress)?|audio.realtime_spsc_stress)$' --output-on-failure -V: 9/9 PASS, 128.830s. Actual Application, Engine and test compiler flags contain -fsanitize=thread; no ambient sanitizer/DYLD override. Preview stress observed 17 accepted / 16 refused / 25,364 callbacks; B1 stress 256 accepted / 256 refused / 271 callbacks. No sanitizer report.

  • scripts/web-toolchain-conformance.sh build-project-io: PASS, 76.006s, pinned Emscripten 6.0.5 and unchanged 256 KiB stack / 512 MiB heap. Official isolated OPFS WebKit setup: PASS.

  • Complete original OPFS selection Facade tempo preview preserves OPFS|authoring history retains original OPFS, serial Chromium 3/3 PASS (21.050s) and WebKit 3/3 PASS (24.574s), no skip/retry. Native action uses real Wasm/OPFS; it is not an AudioWorklet/device claim. Success traces retain actual full results: preview/cancel/exact retry writes all zero; save revision 3/BPM 240/one Undo, Undo revision 4/BPM 120/one Redo; all four tempo cold reopens match complete checkpoint and WAV identity (24,044 bytes, SHA-256 d9116fe7b5537009d51623ec622a866c6a94be1f4a1d6c761078f2b6e16f6eba), reset in-memory history and report zero physical writers after close. Literal onsets 18,001/40,001/57,001/69,001 and original history retry/Redo/reopen remain asserted. B2 peak stack is 77,992/262,144 bytes.

  • Dependency verification and official diagram generation: PASS. Full Portal result: 179 tests, 53 source pages, 10 diagram sources / 20 outputs, production build and 51 routes/internal links PASS (130.324s). The validation checkout has the exact same staged Git tree, with current-main ancestry for immutable snapshot provenance.

  • Staged ownership 76/76 PASS; final committed ownership/scope and body declaration are checked before push. Source/artifact inventories and owned browser server termination were verified. Original rebuilt semantic negative/restore proof remains historical in the plan; the current integration rebuilt and ran the complete owning selections independently.

  • B3 actual Bridge/Control/SDK/AudioWorklet, Creator 400ms/metronome/S7, complete candidate/full lanes/coverage and physical/hearing acceptance remain UNRUN here. No timeout, threshold, test selection or journey leg changed.
  • Verified head: 9a3603d9ddac0eac37cbb202fc435d16e3025b3b. Raw logs, actual exits and six success traces are retained under /Users/endaye/.codex/task-evidence/merge-2112-20261021/pr2416- and this owned worktree's tests/platform/web/test-results/pr2416-opfs-.

    PR Review

    Independent exact-head review authenticated: trusted review_wait.py exit 0 / eligible: true, GLM run 39527138199, attempt 1, review 5593864880. Five findings were inspected against the complete relevant source and current owning tests, then individually replied to and resolved under the triage skill's false-positive rule: existing Host quiescence/control-owner preconditions, explicit terminal/new-turn identity, the existing throwing unique_ptr factory, serialized observer lifetime, and the fixed settings receipt/retained-command contract. No product fix or automatic repair receipt is claimed. All original review findings remain visible in the five resolved threads; this is not a zero-finding review. Live conversations, conflicts, closing relations and protection are checked again before expected-head squash.

    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 registers Native coverage and matches the existing full rule. Scope selection is not full-lane execution.

    Version Management

    Version impact: additive Application Facade C++ API MINOR debt in #2237.
    Reason: separate typed lifecycle and private ownership, with existing public layouts/vtables/config, Engine/C ABI and persisted formats unchanged. Preserve higher debt; no manifest, Product Build, Assembly or snapshot allocation.

    Documentation Impact

    Documentation impact: required
    Affected portal pages: /core/modules/application-facade/
    Reason: describe the actual typed lifecycle, uncertain commits, interlocks and still-separate Web/Creator consumers, updating the source diagram and official generated outputs.

    Pitfall Impact

    Pitfall impact: none — reason: product ownership/persistence invariants are expressed by actual Native and OPFS regressions. Existing fresh-artifact, writer custody and teardown procedures apply.

    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 update, independent current-head review and squash merge under the owner's request to integrate the 19 open PRs and AGENTS.md standing Task authorization. No release, deployment, Channel or cleanup.

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: endaye Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.52) × (1 − Review Confidence (0.38)). 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: 42% · Reviewer familiarity: 35%
    37%
    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 #2445"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 37.9% 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: 37.9% · Lower = rushed or shallow review
    37.9%
    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: 32.3% · Safe to merge
    32.3%
    Repository