Skip to content

Detect host sleep interruptions in benchmark evidence #193

Description

@deverman

User outcome

Release and reliability benchmark operators immediately learn that host sleep invalidated a run, instead of spending time diagnosing apparent Bridge timeouts after the suite finishes.

Validation impact

performance

User-facing acceptance journey

  1. Start a benchmark profile with a recorded host power-state baseline.
  2. The Mac sleeps or enters clamshell sleep during a measured phase.
  3. The suite records the interruption and fails closed with a direct host-sleep diagnosis.
  4. The summary explains that caffeinate cannot override lid-close sleep and states the safe retry requirement.

Observed sanitized evidence

A frozen-candidate release profile reported one Bridge timeout in each tool phase. Power-management logs aligned those failures with clamshell and maintenance sleep, including a roughly 660-second sleep corresponding to a roughly 665-second call. The caffeinate process held system and idle-sleep assertions, but lid-close sleep still occurred.

No OmniFocus content, identifiers, or client transcript is included.

Requirements

  • Record enough monotonic and wall-clock timing to detect a suspension gap during every benchmark phase.
  • Capture a sanitized pre/post power-state or sleep/wake marker without requiring raw system logs in published evidence.
  • Fail closed with a distinct host_sleep_interruption classification when suspension overlaps warmup or measured coverage.
  • Preserve the original call failure and timeout evidence; do not relabel a genuine timeout when no suspension overlaps it.
  • Explain in the CLI summary and release checklist that caffeinate prevents idle sleep but not clamshell sleep.
  • Keep raw artifacts under .build/benchmarks; commit only intentional documentation.

Tests

  • Deterministic injected-clock test classifies a suspension gap.
  • Ordinary slow Bridge calls without a wall/monotonic discontinuity remain Bridge timeouts.
  • Result validation rejects a suite containing a host-sleep interruption.
  • Sanitized summaries contain no request payloads or OmniFocus data.

Non-goals

  • Preventing macOS clamshell sleep
  • Automatically retrying a failed suite
  • Weakening fail-closed release criteria
  • Changing production Bridge deadlines or request handling

Activity

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 workingpriority:P2High-priority defect to fix before release

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions