Skip to content

Diagnose intermittent watch snapshot transition test timeout #564

Open

Description

@HemSoft

Description

Hosted run 42961997119, head 83e1264, failed iOS validation only in DashboardAndSettingsTests.testWatchSnapshotCoordinatorClearsPausedAccountsWhenFreeResolvesBeforeInitialResults. Its one-second publication expectation expired, followed by three snapshot assertions at CodexBarIOSTests/DashboardAndSettingsTests.swift:2440-2442. The method took 3.905 seconds. The suite executed 1110 tests; all other methods passed. Four other quality jobs passed.

The test, WatchSnapshotCoordinator and its supporting production sources are unchanged from base 53e5383. The same test passed at ffab46d and 65881b4. This is an intermittent baseline failure, not a verified issue562 regression. Its root cause is not established. See independent exact-head review.

Why

The failure blocks guarded merge of PR563, despite the requested 13 metric tile and 20 Claude reset tests passing. Repeated green-seeking runs would hide the instability.

Goal

Establish the cause and make the existing watch snapshot transition regression deterministic without weakening its publication/account-isolation assertions or extending into release, pricing, purchase or account operations.

Acceptance Criteria

  • Capture a reproducible failure or evidence-backed scheduling/interference cause.
  • Preserve unresolved-startup retention and free-transition clearing assertions, including snapshot count and force flags.
  • No deadline increase, skip, retry-for-green or product behavior change is used to conceal the failure.
  • Any fix is scoped and reviewed independently; no automatic CI workload or trigger changes.

Definition of Done

  • Issue-linked PR with regression proof and exact-head hosted validation.
  • Retain original failure and report actual validation limits.
  • Required current-head independent review and no red current-head checks before merge.

Validation

  • Inspect original iOS diagnostics artifact CodexBarIOSTests-42961997119-1; preserved on Mini at /tmp/ios562-83e1264-ios-diagnostics/pro-native/ios/{xcodebuild.log,summary.log}.
  • Reproduce through the existing hosted manual iOS validation runner, not a real Mac or live account.
  • Confirm the named method and full affected suite execute with every assertion intact; explain why the repair catches the original failure.

Filing records evidence only. It grants no release, signing, installation, live provider/auth, pricing or App Store Connect authority. Duplicate search covered the exact method and watch snapshot timeout; #470 is a prohibited release item and is not this test diagnosis.

Activity

  1. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    Authorized issue564 diagnostic continuation

    Same Laptop worker and claim now explicitly own test-only issue564 as the blocker to issue562. Duplicate/evidence check reuses #564. Commit f766923 instruments the original one-second expectation with synchronous access-emission/state evidence and a main-actor task-entry witness. It adds a synchronous explicit-publication control that preserves unresolved retention and free-transition clearing, snapshot counts, force flags, account isolation and secrets. Production behavior and deadlines are unchanged. This is diagnostic instrumentation, not a claimed repair or established scheduler cause.

    Hypotheses: missing/superseded access subscription; unexpected fixture state; delayed task execution. Trace [ios564-transition] distinguishes synchronous emission/commit, main-actor entry, sender publication and wait return. Current diagnostic hosted run: https://github.com/hemsoft-dev/codexbar-ios/actions/runs/42965056884. It runs the named method, control and full affected suite through the existing manual runner. Earlier failure and ordinary receipt remain immutable. Independent Laptop exact-head review pending. No sleep/retry-for-green, timeout increase, skip or automatic-CI change.

    Issue564 is referenced, not claimed fixed. No merge or release. Same owner retains diagnosis, final validation/review/merge/safe sync/cleanup and matching claim release.

  2. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    First diagnostic result and matched control

    Run42965056884 at f766923 failed only the original watch transition expectation. The trace shows one resolved-Free emission at3.16ms, committed state at3.17ms, main-actor witness at3.28ms, then sender publication at1.6606s and wait return at1.6606s. The other snapshot assertions passed once publication arrived. The synchronous direct-publication control passed. Four other quality jobs and the named SwiftPM suites passed.

    This rules out a missing transition or incorrect Free state in this sample. It does not distinguish timer wakeup from later actor interference, and no repair is claimed. Original diagnostics retained at /tmp/ios564-f766923-diagnostics and /tmp/ios564-f766923-failed.log on Mini.

    Commit1e97206a5d03d323d211786ea1c836ed02bcaed2 adds a matched zero-coalescing-delay control. Both named tests call the same helper with the same one-second wait, event trace, startup retention, account/secret isolation, snapshot count and force assertions. The original5ms case remains intact. Only the injected fixture coalescing duration differs. This is a counter-control experiment, not a retry-for-green or claimed test fix.

    Existing manual hosted run https://github.com/hemsoft-dev/codexbar-ios/actions/runs/42966503947 qualifies both cases and full affected suite. Old-head review was stopped as superseded; fresh current-head independent Laptop review is pending. No production behavior/deadline/automatic-CI change.

  3. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    R8 diagnostic limitation accepted

    R8 comment6788179991 is accepted: the zero-delay test is a duration-only control, not a separate scheduler path. One zero pass with one timed failure cannot establish causation for an intermittent stall. No such result will be treated as a fix. The f766923 wait itself returned after its deadline, and real shared WatchConnectivity sender logs are possible interference evidence, not a proved cause.

    Run42966503947 is still executing iOS tests; all four other quality jobs passed. Preserve that actual outcome before another diagnostic dispatch. If the trace remains insufficient, add global-executor and main-queue witnesses to distinguish the unobserved interval, keeping all original deadlines/assertions intact. No source edit, duplicate run or new review started in response to R8.

  4. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    Executor-witness diagnostic after the duration control

    Run42966503947 at1e97206 completed FAILURE. Both watch transition cases passed:5ms published at12.22ms; zero published at3.91ms. This supplies no causal contrast and is not a fix. The ordinary iOS suite passed all1112 tests. Failure occurred later in native-commerce:22 of25 tests failed with StoreKit verification/purchase errors. This distinct unchanged commerce failure is retained, not bypassed or repaired under the test-only564 allocation. Four other quality jobs passed.

    Artifacts retained on Mini: /tmp/ios564-1e97206-diagnostics and /tmp/ios564-1e97206-failed.log. R8 limitation accepted: duration-only passes do not identify a cause; earlier real shared WatchConnectivity publications are possible interference, not proof.

    Head3b1628a64b734badef2e5d5c34108b2840ea1215 adds thread-safe immediate trace records for a detached global-executor entry, a main-queue callback, one synthetic5ms timer on the global executor, and its return to MainActor. The timer is a one-shot witness, not a wait/retry used to satisfy an assertion. The original one-second expectations,5ms case,zero-duration control and every snapshot/account/force assertion remain. No production source or automatic CI changes.

    New evidence run https://github.com/hemsoft-dev/codexbar-ios/actions/runs/42970337329 uses the existing manual runner. Root cause and safe test-only repair are still unestablished; neither a passing sample nor added probes close564. Fresh independent exact-head Laptop review pending. Same claim/owner; no merge or release.

  5. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    R9 probe correction, awaiting existing run

    R9 P3 is addressed in e4ee11e: the detached witness now uses Task.currentPriority, and an independent DispatchQueue.main.asyncAfter 5ms sample no longer depends on that global timer. The trace includes a wall-clock anchor, priority and timer cancellation. Records are buffered under the existing lock and printed after the original expectation returns, reducing output in the measured interval. No deadline/assertion/production change; no established564 repair.

    Run42970337329 at preceding head3b1628a remains in progress with iOS pending and the other four quality jobs passed. Preserve its actual completion evidence before dispatching the corrected diagnostic. No replacement run or review started yet. Fresh exact-head hosted qualification and independent review will be required for e4ee11e; R9 is earlier-head provenance only. Same Laptop claim/owner retained.

  6. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    Preserved prior outcome; corrected probes now qualifying

    Run42970337329 at3b1628a completed FAILURE in native-commerce StoreKitProSubscriptionTests.testBillingGraceMapsVerifiedStatusAndKeepsAccess. Ordinary iOS and both watch cases passed. The5ms case published at74.79ms; zero at37.96ms. These passing samples do not establish cause or repair564. Prior R9 limitations remain: witnesses had unmatched priority and no independent delayed main-queue sample. Logs/artifacts retained at /tmp/ios564-3b1628a-failed.log and /tmp/ios564-3b1628a-diagnostics.

    Currenthead e4ee11e fixes that probe design only: inherited test priority, independent main-queue5ms timer, buffered trace, wall anchor and cancellation record. Newactualrun https://github.com/hemsoft-dev/codexbar-ios/actions/runs/42974788943 now qualifies that changed head and gathers the corrected evidence. This is not an unchanged rerun for green. Same original1s deadline and assertions. Native-commerce behavior remains unmodified and its failures cannot be bypassed.

    Fresh independent Laptop exact-head review pending. Same claim/owner; no merge, release or established564 fix.

  7. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    R10 trace limitation accepted

    R10 comment6789390070 is accepted. The timer-cancellation record cannot appear in the printed trace because cancellation occurs in teardown after printing. Earlier descriptions in comments6788735081 and6789114618 overstated that output. Cancellation is not an available diagnostic signal at this head and is not used in any cause inference. Remove that unused record during diagnostic cleanup; do not await the witness before printing.

    The per-line printing in3b1628a also perturbed main-thread timing. Its74.79ms and37.96ms values are probe-affected passing samples, not evidence of production latency or a causal comparison. The earlier f7669231.66s failure used one print after the wait and remains original failure evidence. Current e4ee11e buffers records until after the unchanged wait.

    Run42974788943 remains in progress with only iOS pending; the other four jobs passed. Preserve its actual completion before another source revision or hosted diagnostic. No duplicate run/review or readiness claim.

  8. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    Diagnostic retention repaired after cancellation

    Run 42974788943 at e4ee11e was cancelled during native-germany after the ordinary iOS phase. Diagnostics upload then failed with ENOENT on the in-progress xcresult Staging testmanagerd.log. No iOS artifact was published. The compact corrected watch trace is therefore unavailable; no exact-head watch pass, cause or repair is inferred. Other four quality jobs passed. Retained Mini job log: /tmp/ios564-e4ee11e-ios-job.log.

    Head 2f09173 repairs this evidence path only: the existing manual runner emits bounded synthetic ios564 trace lines immediately after ordinary iOS xcodebuild returns, before later commerce phases and artifact upload. Full test/gate execution, deadlines, cancellation, failure handling and automatic workloads remain intact. Three counter-controls prove later failure cannot erase emitted output, unrelated log lines are excluded, and oversize/missing diagnostics are rejected. All 54 affected manual-runner, CI-policy and shard Python tests passed on Mini. R10's unobservable cancellation record is removed; nothing waits for the witness before printing.

    Current diagnostic run: https://github.com/hemsoft-dev/codexbar-ios/actions/runs/42983035068. Fresh independent Laptop review pending. The underlying #564 cause and any safe test-only synchronization repair remain unestablished. No deadline increase, skip, relaxed assertion, protected commerce modification or unchanged retry-for-green.

  9. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    R11 integration finding addressed with mutation proof

    Commit06aab1b043ae1eb4ed37fb626f3f1b92d29b0540 adds two RunnerCommandFailureTests that execute phase('ios') with OS process calls mocked. They assert trace output before result inspection/later failure and preserve xcodebuild65 when trace emission fails. On Mini the full affected Python suite passes. Deleting the phase hook makes the first new test fail; changing its error precedence to overwrite exit65 makes the second fail. Exact-head source, both mutations and logs retained at /tmp/ios564-06aab1b-proof-4m613gg5. This corrects the earlier helper-only proof limitation.

    Run42983035068 at preceding2f09173 remains the registered hosted attempt. Preserve its actual completion before a new dispatch. Currenthead changes only test coverage. Fresh independent exact-head Laptop review is requested; no current-head hosted pass is claimed.

    The e4ee11e job reached its existing45-minute limit, then upload failed on the changingxcresult stagingfile. That was timeout cancellation, not a human cancellation. No deadline increase, automaticwork change, skippedgate or retry-forgreen.

    Issue564 cause and repair remain unestablished. Sameowner/claim, no merge/release.

  10. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    R12 missing success-path failure control addressed

    Head9b7061966c2f38991b90a7153ffdb34e804c2873 adds the requested realphase('ios') case: successful xcodebuild plus nine trace lines must produce PhaseFailure1,receipt exit1,recordedwatchTransitionTraceError and exactlyone test invocation. It also asserts the original xcodecommand exited0. The full affected Python suite passes on Mini. All three mutations now fail their matching integration tests: deletedhook, maskedprimary65, and recorded-but-suppressedtracefailure. Source/mutations/logs retained at /tmp/ios564-9b70619-proof-i_dft55y.

    Fresh independent current-head review is running. No new hosted attempt was dispatched: run42983035068 atpreceding2f09173 remains the actual bound attempt. Preserve its final trace/outcome first. Currenthead only changes Python test coverage; no qualified564cause or repair is claimed, and it still needs applicable fresh hosted qualification after that outcome. No timeout/gate/assertion/production/automaticCI change.

  11. HemSoft commented on Nov 11, 2026

    @HemSoft
    CollaboratorAuthor

    Bounded diagnosis outcome: repair not established

    Same Laptop worker retains claim chief-dispatch-0c08ab71-ios562 and PR563 at9b7061966c2f38991b90a7153ffdb34e804c2873. R13 independent Laptop Claude Opus5.5 xhigh review is clean (comment6790980500), and the reviewed Python command passed58 tests. Required SwiftLint passed. No hosted run exists for this current test-only-coverage head.

    The completed diagnostic run42983035068 at2f09173 is FAILURE. Its ordinary iOS phase passed1112of1112 tests with0skips. The corrected watch probes are now retained in the job log:5ms case state committed2.57ms, independentmain timer8.90ms, globaltimer8.95ms, snapshot9.03ms; zero case snapshot4.22ms. These are healthy samples and do not explain the original f766923 publication at1.66seconds. There is no evidence-backed synchronization correction to apply under the no-deadline/no-assertion-relaxation/test-only limits. #564 remains open and is not claimed repaired.

    The job failed later in unchanged native-commerce:23of25 passed, two failed (StoreKit billinggrace and exactrenewalmetadata). Protected commerce/release behavior was not modified. No red failure was bypassed and no unchanged retry-forgreen was dispatched. Current-head hosted qualification remains pending rather than inferred from older source-equivalent Swift.

    The156MBartifact download first failed on Mini tmpfsquota; retry used a newly created owner-specific Mini disk directory, not another validation run. Complete evidence now retained at /home/franz/ios562-0c08ab71-evidence-RzPKpy/run42983035068. Earlier failures, controls and mutationproofs remain retained under their recorded Mini paths. Cancellation42974788943 was the existing45minute joblimit followed by xcresultuploadENOENT, not human cancellation.

    No merge/main delivery/sync/cleanup/claimrelease/absence proof is claimed. The branch/worktree remain clean and retained; all original release/auth/account/device/production/automaticCI prohibitions hold. The same Laptop worker remains owner of every unfinished item. No run or reviewer is pending, no newtimer or replacementowner. Next useful trigger requires a qualified failing watch sample with the corrected probes or a scoped decision about the independent protected native-commerce blocker. Further identical validation solely for green is prohibited. Report this evidence/scope boundary to both requesting sweeps; neither is asked to take over PR/CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions