← Back to Pull requests

test(transport): verify recording-switch cold recovery #2489

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

Summary

Current clean head 82444c7c6ceffb3b018b49e547302a74a254c347 now passes the unchanged complete 9-case OPFS entrypoint after the user reported restarting system audio. The earlier 0/9 result and independent browser/native failures remain historical evidence below; no root-cause closure is claimed.

The existing segment failures reconstructed an owner and retried its saved request. Add actual process death followed by fresh recovery, plus two real Creator renderer-crash journeys.

selected durable call → SIGSTOP → SIGKILL → fresh Application → exact Truth → reopen
real held OPFS switch → renderer crash → new page → Keep recording → exact Truth → reopen

Relates to #2112. Relates to #2233. Relates to #2237.

Evidence

  • Before: clean main d244fdc3e9d00ca6c5b977a4d1109d823b78967c passes its original segment component and all seven official OPFS cases. Its existing fourteen failure/reconstruction cases retain the original work request; its packaged cases release the original held flush. They do not prove the new cold recovery transitions.

  • After: 32 actual Native SIGKILL boundaries pass: before/after seven segment writes, target candidate, cutoff, and seven close steps through active-Journal removal. Independent literal whole-Project events and exact revisions survive fresh Application recovery and a second Application reopen; reapplying the consumed identity fails without mutation.

  • Both mounted immediate/COUNT-IN crash cases pass against the genuine base conformance artifact before the source commit. Source input stays A-owned after actual B applies; renderer crash/new page/real Keep and full Truth, asset inventory, empty recovery and repeated reopen are all asserted.
  • Verification

  • cmake --build build/core/dev --target lmdj_pattern_transport_segment_tests --parallel 6: PASS.

  • ctest --test-dir build/core/dev --output-on-failure -R '^facade.pattern_transport_segment(_restart)?$': original component and complete 32-case restart group plus three cleanup probes PASS (5.47s / 8.88s); unchanged 30s CTest budgets. Bare binary traverses the union: PASS (14.013s). Actual CTest command/labels/timeout readback and all 32 distinct successful kill/recovery labels retained.

  • Every child is a fresh process image using the existing spawn helper. Exact marker, actual SIGSTOP and reaped SIGKILL are mandatory. Before/after means before the selected storage effect or after its real positive result; this is process-death evidence, not disk-power-loss evidence.

  • ASan target build and the same complete two registrations: PASS (11.40s original / 19.91s restart, original sanitizer-adjusted budgets); all 32 actual kill/recovery labels retained and actual compiler flags include address instrumentation. This is the owning Native selection, not a full sanitizer lane.

  • Source/target input, pending flush, manifest/receipt, target switch/profile, target candidate and terminal cutoff/close are covered. A fresh Application uses normal recovery listing/apply, never a saved I/O request. Completed pre-removal Journals may legitimately be removed by the real listing; require their actual completed state and full Truth.

  • scripts/creator-count-in-io-proof.sh proof: initial-source evidence, PASS on clean 32fba2f04d162a7ddccd12b400d81a3743f955c2; 9/9 (all original seven plus two new), 119.008s browser / 165.887s full entrypoint, zero skips/flaky/expected failures. Both named cold-recovery JSON files match their framework path attachments byte-for-byte; actual recovered/reopened whole Truth and complete file inventories match the independent expectation. Official package/manifest/toolchain bindings retained.

  • Historical current-head browser failure (before the user-reported audio restart): 82444c7c exits 1 after 323.134s, all 9 fail before their recording/recovery steps at unchanged audio.activate HOST_TIMEOUT / Audio inactive. All ten packaged product files (paths, byte lengths and SHA256) equal the earlier passing package, and both browser specs/fixtures are unchanged by this follow-up. An isolated real default-output Web Audio context also stalls at 0.005333s despite running state; production activation observes the same stall before its original one-second RPC timeout. Built-in MacBook Pro Speakers at 48kHz remains the observed default. This isolates a browser/backend health failure outside the new cleanup code but does not establish its exact root cause or clear current proof debt. Preserve traces, raw RPCs and both independent health failures; do not increase deadlines, swap to fake output or call this current head browser-verified.

  • Current clean-head browser revalidation: scripts/creator-count-in-io-proof.sh proof on clean 82444c7c6ceffb3b018b49e547302a74a254c347: 9/9 PASS, 122.658s browser / 149.842s complete observed entrypoint, zero skips/flaky/expected failures. Same original selection, assertions, deadlines, pinned full Chromium and real default-output MacBook Pro Speakers at start/end. Independent original-config clock advances to 0.064s at 48kHz within its original 1s bound. Both named cold-recovery reports equal their path attachments byte-for-byte; whole recovered/reopened Project Truth and all 31 file identities match. All ten packaged path/length/SHA256 identities verified. The native probe before restart failed AudioQueueStart (-66681) after a real 15s client callback wait; it was not rerun as part of this proof. The service readback still shows PID601/runs1, so the user action and observed recovery do not prove the service actually restarted or establish a causal fix. #2358 remains open.

  • Node syntax and staged python3 tests/build/ci_change_scope_test.py: PASS (77/77). Committed-range ownership and final body declaration are checked again before publication.

  • Initial missing local npm prerequisite, unsupported CMake tier and incorrect pre-removal test expectation remain nonzero historical diagnostics. They were corrected without changing production behavior or widening deadlines. No old scenario/assertion/journey was removed.

  • Complete full13/candidate/Creator/platform checks, other OPFS physical fault points, #2237 version/snapshot and #1221 35-screen/device/Safari/listening acceptance remain separate and unverified by this Task. Historical live/control failures and Host TSan timeout remain.
  • 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: deterministic ownership floor; this selects lanes and does not execute them or add a universal full-CI merge gate.

    Version Management

    Version impact: none
    Reason: tests and existing test-target registration only; no production API/ABI/Contract/persistence, manifest/Product/Assembly/Build/snapshot change. Existing #2237 debts remain.

    Documentation Impact

    Documentation impact: none
    Reason: tests and their plan; no Portal page, current product source fact, diagram or identity changes.

    Pitfall Impact

    Pitfall impact: none — reason: use existing original-identity, real-side-effect, complete-journey and named-artifact procedures; all newly established behavior is expressed by the test journeys.

    PR Review

    Initial source 32fba2f0 received authenticated DeepSeek review40079016032/1 with three findings. The unexpected-stop cleanup gap was reproduced after an actual rebuild (the new probe fails at already_reaped), then fixed in a separate atomic follow-up. The three real SIGTSTP/early-exit/SIGTERM probes now assert the observed stop signal, exact final status and ECHILD from a second wait; the guard cleans up even during its deliberate red proof. A returned normal/signaled wait status already reaped the child, so no second kill is sent to that potentially reused PID. Both full Native/ASan selections and bare union pass again. The other two findings were rejected using the existing async helper's try/catch (also exercised with an actual rejection) and the actual bare union/CMake command readback; replies and resolved flags are retained. Published history is preserved. Current head 82444c7c6ceffb3b018b49e547302a74a254c347 has authenticated GLM re-review40080944245/1, eligible with zero new findings (helper exit0). All three historical threads have verified dispositions and resolved flags. The earlier audio-activation failure remains in the historical record. The unchanged full9 revalidation above clears this Task-specific browser hold; no waiver. Current-main 8bd15ac4fa52d237651f0728c260f33a62617d87 adds only the unrelated Sample preparation-failure copy Task, with no overlap in these four Task files; no rebase or history rewrite is required.

    Release Impact

    Release impact: none
    Candidate tag: none
    Profile: none
    Channel: none
    Intent disposition: none
    Release assets: none
    Release gates: none
    Reason: test artifacts only; no frozen CI/release control-plane changes.

    Merge Danger

    Door: two-way

    Blast Radius: Tests

    The original component group keeps its own registration and all scenarios; a separate restart registration executes the new matrix. The existing browser spec remains under the separate conformance entrypoint. Ordinary product behavior and build targets are unchanged.

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