Skip to content

refactor: extract run admission runtime - #133

Merged
ByBrawe merged 5 commits into
mainfrom
refactor/run-admission-runtime
Aug 21, 2026
Merged

refactor: extract run admission runtime#133
ByBrawe merged 5 commits into
mainfrom
refactor/run-admission-runtime

Conversation

@ByBrawe

@ByBrawe ByBrawe commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

Continue the V1 executor modularization by moving due selection and pre-dispatch admission policy out of runtime/executor.js.

  • add runtime/run-admission.js for due-job selection, max-runtime stop, stop-file stop, --until, and preflight safe/failure handling;
  • keep executor focused on active-run ownership, session/compaction coordination, branch/compaction setup, dispatch state, and recovery;
  • preserve the existing executor injection surface by forwarding workspace/host/process dependencies into the admission runtime;
  • add direct cross-platform regressions for due selection, stop conditions, dangerous preflight rejection, failing preflight, and successful admission.

Behavior-preserving source modularization only; no runtime state schema or user-visible command behavior change. The committed generated src/index.js remains behavior-equivalent and unchanged in this source-only slice; the Bundle Gate regenerated the exact source head and exercised that generated bundle against real OpenCode on Linux and Windows.

Verification

Exact head d1203ea998267731014ab4e9c0340d9911d42729:

  • CI: success after one unchanged retry of the Ubuntu test job. Its first attempt hit a timing-sensitive comprehensive-harness assertion; Windows, both compatibility lanes, both real-host lanes, and the generated-bundle regression suite were already green. The Ubuntu retry passed unchanged.
  • Single-file Bundle Gate: success on Linux and Windows, including source regeneration, generated entry import, real-host Loop/queued-Goal canaries, and generated-bundle regression suite.
  • V2 Lifecycle Contract: success.

The first branch head also exposed a Windows-only path expectation in the new stop-file unit fixture; the fixture was corrected to compare against the platform-resolved path. No production runtime change was needed for that failure.

@ByBrawe
ByBrawe marked this pull request as ready for review August 21, 2026 06:20
Copilot AI lite review requested due to automatic review settings August 21, 2026 06:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ByBrawe
ByBrawe merged commit 56a4813 into main Aug 21, 2026
15 of 16 checks passed
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.

2 participants