On call, "capture stayed unverified" sounds after 15 minutes about half the time, not 10

Closed
#211 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #239 by @JWhite212 — merged

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
36/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
macos, swift

Research direction

Read HealthAlarmPlan.swift:174-180, 226, 262 and AppDelegate.swift:621-630 to trace the unverified fault threshold and wake follow-up. Then review HealthAlarmPlanTests.swift:478-479, 493-497 and the timer constraint in SetupWiringTests:1643; done means the jittered-ask and wake behavior meet the chosen bounds while the listed pins still hold. The owner says to hold the change until v1.1.0 is tagged.

Written by the indexing model from the issue text.

Description

bug

Audit row: B18, Defects (added by #193). Line numbers are those of 4553590. Owner decision: the fix changes what two tests assert.

What is wrong. On call, "capture stayed unverified" sounds after 15 minutes about half the time, where docs/troubleshooting.md:486 promises "after 10 minutes, or 2 minutes after the Mac has woken".

  • unknownSince is stamped at the first unknown ask (HealthAlarmPlan.swift:226), and isUnverifiedFault asks for >= 600 with no slack (:174-180). The third ask comes 600 s later, give or take the self-test's own run time, so it is as often just short of the bound as past it, and the fault then waits a whole interval more.
  • The beep's repeat has beepSlack (15 s) for this exact jitter (:262); this bound has none.
  • After a wake, the 2-minute bound needs an ask at +120 s, and refreshHealthAndFollowUp arms that only when the last self-test passed (AppDelegate.swift:621-630).
  • A scratch program over the real HealthAlarmPlan, 10,000 runs of asks at 300 s plus 5 to 120 ms each: the first beep came at 10 minutes 5,019 times and at 15 minutes 4,981 times.

Options

  1. (Recommended) The fault is due at the bound less beepSlack, as the beep's repeat is, and the wake follow-up is armed whatever the last self-test did, by the existing follow-up timer. The sanctioned test edits are HealthAlarmPlanTests.swift:478-479 and :493-497, which assert that 599 s is not a fault and 600 s is; they would assert the same around 585 s. Nothing else in a test changes.
  2. The pages say "10 to 15 minutes" and "2 to 5 minutes after a wake", and the code stays.

Pins:

  • grep -rn 'isUnverifiedFault' Tests Scripts | wc -l → 12, and 'unverifiedBound' → 5.
  • testTheBeepAndTheFunctionTheIconAsksAgreeToTheSecond must still hold.
  • grep -c 'Timer(' Sources/SignalLadder/AppDelegate.swift → 5, held by SetupWiringTests:1643, so the wake ask reuses the follow-up timer.

Hold: not merged before v1.1.0 is tagged (owner, 2026-11-06).

Prevention: Guard added: a test with jittered asks that the fault sounds at the ask nearest 10 minutes.

Size: S.

Dominant language
Swift
Stars
2
Forks
0
Avg merge
1h 7m
Merged PRs (30d)
152

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JWhite212/SignalLadder

All issues in JWhite212/SignalLadder

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.