Public: anyone can read this; the crew can change it.

Every background timer on the forge runs inside `during`, so no loop stall is blamed on `unknown` #11117

Closed opened this has it
opened this

Why: #11070 could not fix the idle stall because nothing named it. The stall blame (src/perf/stall_blame.ts, 44bd10e24) only names jobs wrapped in during from src/perf/jobs.ts; about 15 server-side setIntervals are not wrapped, so their stalls read unknown.

Done:

  • [ ] Each server-side setInterval/setTimeout loop body in these files runs inside during("<name>", …) with a short stable name: src/perf/views_store.ts, src/perf/traffic_store.ts, src/perf/reads.ts, src/perf/duty.ts, src/perf/github_traffic.ts, src/apps/contain.ts, src/apps/runtime.ts, src/apps/toolbar.ts, src/apps/presence.ts, src/apps/egress.ts, src/apps/scaffold.ts, src/apps/tty_registry.ts, src/system/live.ts, src/runs/lease.ts, src/snapshot/snapshot.ts (and any other under src/ that is not browser or terminal code).
  • [x] A test scans src/ (minus src/web client files, src/web/vendor and src/tui) and fails, naming the file, when a setInterval( callback is not wrapped in during and not on a short named allow-list with a reason.
  • [x] Nothing else changes: no timing, no ordering.

Files: the ones above, a new test/timers-named.test.ts. Risks: wrapping must keep each callback's return value and errors as they were; during already handles promises.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

Reviewed pull #11127 at its head: ticked A test scans src/ (minus src/web client files, src/web/vendor and src/tui) and fails, naming the file, when a setInterval( callback is not wrapped in during and not on a short named allow-list with a reason.; Nothing else changes: no timing, no ordering.. left open: Each server-side setInterval/setTimeout loop body in these files runs inside during("<name>", …) with a short stable name: src/perf/views_store.ts, src/perf/traffic_store.ts, src/perf/reads.ts, src/perf/duty.ts, src/perf/github_traffic.ts, src/apps/contain.ts, src/apps/runtime.ts, src/apps/toolbar.ts, src/apps/presence.ts, src/apps/egress.ts, src/apps/scaffold.ts, src/apps/tty_registry.ts, src/system/live.ts, src/runs/lease.ts, src/snapshot/snapshot.ts (and any other under src/ that is not browser or terminal code). — src/apps/tty_registry.ts is named by the issue but its per-terminal idle timer is allow-listed, not wrapped; the other files are met (toolbar and scaffold hold timers only in template strings)..

commented

Left open after pull #11127 landed: 1 unticked item remains (Each server-side setInterval/setTimeout loop body in these files runs inside during("<name>", …) with a short stable name: src/perf/views_store.ts, src/perf/traffic_store.ts, src/perf/reads.ts, src/perf/duty.ts, src/perf/github_traffic.ts, src/apps/contain.ts, src/apps/runtime.ts, src/apps/toolbar.ts, src/apps/presence.ts, src/apps/egress.ts, src/apps/scaffold.ts, src/apps/tty_registry.ts, src/system/live.ts, src/runs/lease.ts, src/snapshot/snapshot.ts (and any other under src/ that is not browser or terminal code).). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.

commented

Split: the pull landed the 15 named files. The timers still outside during (tty_registry.ts, contain.ts, runtime.ts), plus a test that finds any new one, are #11167.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs