Skip to content

Runner split step 1: seam ctx + watchdogs module (#1447, stacked on #1454) - #1456

Merged
currentbits merged 3 commits into
mainfrom
coder/runner-split-step-1-ctx-watchdogs-39333f
Oct 5, 2026
Merged

currentbits merged 3 commits into
mainfrom
coder/runner-split-step-1-ctx-watchdogs-39333f

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Round 3, step 1 of the createRunner split (#1447), following docs/superpowers/specs/2026-10-04-runner-split-design.md.

Stacked on #1454. Merge that first; GitHub then retargets this PR to main.

What changes

  • A seam ctx inside createRunner. It's built once, after createRunner's own state. For now it holds only what the first seam uses: store, active, nowFn, resolveProvider, appendMessage, pushDetail, pushThreadsChanged. Later steps extend it.
  • Seam 1, watchdogs → electron/runner-watchdogs.js. checkStalls, heartbeatActiveLanes and the 15 s stallTimer (with its .unref() and the "never break the runner" try/catch) move verbatim behind a const {…} = ctx. The module owns the timer; stopAll calls its dispose(). The timer still starts at the same point during boot: after the crew sweep, before refreshAllQuotaWaits().
  • The template every later step copies, documented in the module header:
    • One flat file per seam: electron/runner-<seam>.js, exporting create<Seam>(ctx).
    • Destructure only what already exists when the factory runs. Read anything added later lazily, e.g. ctx.startRun(...).
    • The factory owns its Maps and timers and returns a dispose() for any timer.
    • Never require("./runner.js") from a seam.
  • Why flat files rather than an electron/runner/ folder: package-app.sh and package-cross.sh copy only electron/*.js, so files in a subfolder would be missing from the packaged app. The design note is corrected here to match.
  • The return object of createRunner and module.exports are unchanged.

Checked

  • Ignoring indentation, the moved code is verbatim. The only new lines are the ctx wiring, requires and dispose.
  • Full electron suite (CI-like env) 4109/4109; npm run typecheck clean.

🤖 Generated with Claude Code

Willem and others added 3 commits October 4, 2026 20:26
One ctx object built after createRunner's owned state, so seam modules
(electron/runner-<seam>.js, create<Seam>(ctx)) can destructure their deps.
Holds only what the first seam consumes; later steps extend it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…1447)

Seam 1 of the createRunner split. checkStalls, heartbeatActiveLanes and
the 15s stallTimer move verbatim behind a ctx destructure; the module
owns the timer and stopAll calls its dispose(). The return object and
module.exports are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The packagers copy only electron/*.js, so the electron/runner/ folder the
note proposed would be dropped from the packaged app.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits deleted the branch main October 5, 2026 11:00
@currentbits currentbits closed this Oct 5, 2026
@currentbits currentbits reopened this Oct 5, 2026
@currentbits
currentbits changed the base branch from coder/refactor-g-lift-createrunner-helpers-spl-ad7272 to main October 5, 2026 11:01
@currentbits
currentbits merged commit aa0f033 into main Oct 5, 2026
16 of 18 checks passed
currentbits added a commit that referenced this pull request Oct 5, 2026
…5-dfc14a

Runner split steps 2–5: ask/btw, turn setup, subagents, session recording (#1447, stacked on #1456)
@currentbits
currentbits deleted the coder/runner-split-step-1-ctx-watchdogs-39333f branch October 5, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant