Skip to content

Collapse the three runtime bootstraps into shared session assembly - #777

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-6810-collapse-the-three-hand-wired-runtime-bootstraps-2148-line
Sep 4, 2026
Merged

TheGreatAxios merged 1 commit into
mainfrom
cl-6810-collapse-the-three-hand-wired-runtime-bootstraps-2148-line

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Shared session assembly owns the bootstrap wiring runTUI and runExec used to duplicate (trust, permission gate, chat agent, lifecycle, advertised tools, sources)
  • runTUI's closure scope decomposes into prepareTUISession and the plugins-admin backend with explicit inputs
  • runSubAgent consumes the shared layer-1 primitives
  • Callee option types include explicit | undefined so forwarding needs no conditional spreads

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • No behavior change: verbatim moves, same call order, live values stay behind getters

Fixes CL-6810

@linear-code

linear-code Bot commented Sep 4, 2026

Copy link
Copy Markdown

CL-6810

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Primary · Approve

Shared assembly plus live getters. /clear rebuilds against the new workdir; crash finalize and compaction mode follow the loop lets.

Residual, not blocking:

  • Diff is net +752 (1787/1035), so the issue's 300–500 net-negative box stays open.
  • No driven TUI session or headless exec run in this pass — suite only (bun run typecheck / build / test).

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Critic · Comment

No blocking defects on the tree as it stands. Live getWorkdir / getCompactor run inside buildAgent; crash identity rebinds via bindLiveSession.

Not blocking:

  • inactivityTimeoutMs / totalTimeoutMs still snapshot at assemble time. No current path reassigns them before rebuild.
  • createPluginsAdmin has no dedicated tests after the extract (origin had none either).

TUI and exec each hand-wired the same factories; every new runtime
dependency was a three-site edit and a drift source. Shared assembly
keeps live values behind getters so session rotation still hits the
new workdir.
@TheGreatAxios
TheGreatAxios force-pushed the cl-6810-collapse-the-three-hand-wired-runtime-bootstraps-2148-line branch from 8590019 to 264e13d Compare September 4, 2026 06:23
@TheGreatAxios
TheGreatAxios merged commit 4a264d1 into main Sep 4, 2026
5 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.

1 participant