Skip to content

T27 OS: idle CPU 19% with a page open -- find and remove the busy redraw #11419

Closed

Description

@gHashTag

Supersedes #11335 (re-filed 2026-10-20 so the Queen, which takes the newest issue first, picks the priority work).

Part of epic #11275 (T27 OS). Owner 2026-10-20: the swarm does the remaining work on free models; see the 'Swarm focus' section in AGENTS.md.

Boundary

  • specs/t27os/frame_gate.t27
  • specs/t27os/glass_window.t27

User Scenarios

  • Given a letter page open and no input, when 60 s pass with GOD MODE off, then T27OS uses under 2% CPU (ps), including when the Queen dashboard is open.

Requirements

  • FR-001: background polls (kanban 60 s, bench 10 s, card scan) MUST NOT force redraws when their data did not change.
  • FR-002: a clock-only key change MUST redraw the visible time but MUST NOT restart the frame gate's active quiet interval.

Success Criteria

  • ps -o %cpu -p <T27OS pid> under 2 after 60 s idle on a letter page with GOD MODE off.
  • t27b test specs/t27os/frame_gate.t27 passes the clock-only quiet-period regression test.
  • t27b test specs/t27os/glass_window.t27 passes all tests.

Activity

  1. added
    P1Queen takes before unlabelled work (priority.t27 HIGH)
    on Oct 20, 2026
  2. gHashTag commented on Oct 20, 2026

    @gHashTag
    CollaboratorAuthor

    Same lane as #11335 (superseded by this issue): branch claude/evolve-lane-11335-playras-MacBook-Pro on playras-MacBook-Pro, tests 10/10, rule only; the ps %cpu criterion needs the window wiring lane.

  3. gHashTag commented on Oct 20, 2026

    @gHashTag
    CollaboratorAuthor

    hourly, playras-MacBook-Pro: done #9010, #9024, #11335 (rule only), #11034, #11026 (branches pushed). Blocker: tri does not build on master (cli/tri/src/seals.rs:350 match misses SealsCmd::Changed and MergeDriver), so work is manual. Next: #11033, #11289.

  4. gHashTag commented on Oct 20, 2026

    @gHashTag
    CollaboratorAuthor

    playras-MacBook-Pro hourly: done #11033, #11032, #11035 (lanes pushed). Blocker: tri does not build on master (cli/tri seals.rs:350 non-exhaustive match), so no tri queen tick; manual briefs continue.

  5. gHashTag commented on Oct 25, 2026

    @gHashTag
    CollaboratorAuthor

    Fresh evidence from the idle-CPU investigation on this Mac, filed by the owner's agent on 2026-10-25 (the same record lives in the T27 OS park alongside the parked watchman LaunchAgent). It is the finding half of this issue -- what the busy redraw is and why the frame gates cannot see it. The FR list is a runnable translation of it.

    // SPDX-License-Identifier: Apache-2.0

    T27 OS: the idle panel burns CPU redrawing continuously (measured 34-78%), and the frame gates cannot see why

    The panel on the owner's Gaia Mac spends a clear CPU share at idle. Measured: ps -o %cpu read 78%
    (T27OS.app, 2026-10-24 16:07, pointer away from the window) and 34% (2026-10-25 19:35). A 3 s
    sample of the process (2026-10-24 16:05) puts nearly the whole main thread inside the paint path:
    main -> hdr_right -> on_qd_area -> draw_ground -> CGContextFillRect (argb32_mark / DplusDM) --
    whole-window fill rects, continuously. The live-pane exemption does not explain it: the pane
    records (80 bytes) are 28 h old, no bytes flow, so no terminal pane is live.

    On top of that, the machine sat for two days with Pages free + inactive + speculative at
    1.4-1.9 GB against the kernel's spawn floor of 2048 MB (FLOOR 1536 + RESUME_MARGIN 512), while
    macOS's own availability scale (kern.memorystatus_level) read 35-46%. Both observations have the
    same shape: a large resident set (the window, open editors, a browser) plus a redraw path that
    never settles keeps the Queen's tick in the memory hold, so this Mac starts zero lanes while the
    swarm runs on playras.

    Note: the same machine also crashed watchman (facebook file watcher) repeatedly for two days;
    libfolly.0.58.0-dev.dylib could not load libboost_system.dylib after the Homebrew boost 1.90.0_1
    update. I parked the user LaunchAgent so the crash loop stops; the file lands in the T27 OS park.

    Boundary

    • specs/t27os/frame_gate.t27
    • specs/t27os/glass_window.t27
    • specs/t27f/petal_menu.t27

    User Scenarios

    • Given the panel is open with no live pane and the pointer away, when 60 s pass, then
      the panel's per-frame key stays folded and the main thread paints at most the quiet law allows,
      visible in a sample of the process as a single small paint span.
    • Given the memory floor applies with the machine's resident baseline, when the tick reads
      its own vm_stat text, then it refuses to read a lower availability than the OS reports, so
      the hold matches the machine the OS itself sees.

    Requirements

    • FR-001: the frame gate MUST fold the whole shown frame into one key and skip the draw while the
      key repeats, and the forced-draw cadence (FG_FORCE) MUST stay within 0.5 s.
    • FR-002: an idle panel with no live pane MUST NOT hold the 30/60 fps frame wait; it MUST sit at
      FG_IDLE_S (0.5 s) between events.
    • FR-003: the wide redraws a sample shows (draw_ground whole-window fills at a point when no
      pane is live) MUST be named by a runnable probe the lane adds, so the next occurrence carries
      its own evidence.

    Success Criteria

    • A sample T27OS 10 taken with the pointer away prints the main thread at under 20% over all
      samples, and the frame gate's test runs with exit 0.
    • The probe or spec change lands as a .t27 law with the measured before/after in the commit
      message, and the tick on this machine reads availability consistent with macOS
      (kern.memorystatus_level), the probe's own printed rows, with exit 0.
  6. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec exists and passes typecheck + tests. M10 milestone complete.

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

    P1Queen takes before unlabelled work (priority.t27 HIGH)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions