# Release: Time's Up v2.5.3

**Release Date:** 2026-05-03
**Status:** Draft
**Manifest Version:** 3

## Release Summary

v2.5.3 fixes a tracking-accuracy regression where continuous viewing (e.g. watching a long YouTube video uninterrupted) credited only ~50% of wall-clock time on devices in low-power or battery-saver mode. The fix preserves the existing sleep-safety invariant: a closed lid for an hour still credits at most 5 minutes per BUG-006 AC-5.

## What Changed

### Continuous-active credit bypass (BUG-006 follow-up)

`background.js` — `creditElapsed` now accepts an opt-in `domainsContinuouslyActive` set. Domains in that set bypass the existing `MAX_CREDIT_MIN = 5` clamp **only if** the elapsed gap is ≤ `BYPASS_GAP_LIMIT_MIN = 10 minutes`. Larger gaps fall back to the 5-min cap.

The `onTick` caller passes the result of `collectActiveDomains()` (the active-now set) as `domainsContinuouslyActive`. The gap-size gate is what makes this proxy safe: for plausible MV3 alarm-throttle gaps, the active-now set is a reasonable approximation of "active throughout the gap"; for sleep-class gaps, the bypass is refused regardless of what the wake-time probe finds.

### Why this fixes the 50% credit-loss symptom

Chrome MV3 silently throttles `chrome.alarms` under low-power / battery-saver / energy-saver conditions. The requested `periodInMinutes: 1` can stretch to 5–10 min between fires. Before this change, every gap > 5 min was clamped to 5 min by `MAX_CREDIT_MIN` — so a 10-min gap with continuous viewing only credited 5 min. Now the same 10-min gap credits the full 10 min, while a 60-min gap (almost certainly sleep) still credits only 5.

### What didn't change

- `MAX_CREDIT_MIN = 5` — preserved as the sleep-safety clamp for non-continuous and out-of-window cases.
- The 1-hour-lid-closed scenario continues to credit ≤ 5 min (BUG-006 AC-5).
- `collectActiveDomains` semantics — still active+focused OR audible+unmuted, sampled fresh each tick.
- `chrome.idle` is still not used (removed in v2.4.0).

## Test Coverage Added

5 unit tests in `tests/unit/background/creditElapsed.test.js`:

- Continuously-active domain credits the full elapsed time (10-min gap → 10 min)
- Domain not flagged continuous still caps at `MAX_CREDIT_MIN` (10-min gap → 5 min)
- Mixed populations: continuous-flagged bypasses cap, others still capped
- Bypass refused for gaps just past `BYPASS_GAP_LIMIT_MIN` (11-min gap → 5 min)
- Bypass refused for sleep-class gaps with continuous flag set (60-min gap → 5 min, AC-5 invariant)

All 230 unit tests pass.

## Migration Notes

No user action required. The fix is in tracking arithmetic only — no permission changes, no new UI, no schema changes. Existing `usage_*` storage keys continue to work as before.
