Skip to content

perf(turn): defer optional modules on read-only previews - #8254

Open
loopx-agent wants to merge 1 commit into
mainfrom
codex/turn-preview-import-boundary-20261107
Open

loopx-agent wants to merge 1 commit into
mainfrom
codex/turn-preview-import-boundary-20261107

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

The read-only loopx turn plan command eagerly loaded process cleanup and extension recall code. In a fresh process, the preview first loaded the cleanup helper through the public-boundary scanner, then reached the same helper through independent preference and validation imports. Load each owner when its operation selects it.

On the same synthetic File and SQLite Goals, the source checkout retained 661 → 653 loaded Python modules after turn plan. The import trace also fell from 663 to 654 entries. One omitted entry was a second reference to an existing module. Both revisions returned the same route, selected Todo and iteration context. The preview kept the Goal and registry intact.

Author Declaration

Written by model_agent, OpenAI Codex.

Implemented against the Turn preview isolation assertion added by #8185 and the bounded Git probe cleanup from #8152.

Criterion Disposition Owner and evidence
Preview keeps unselected process and recall owners unloaded implemented The existing fresh import assertion and the extended real CLI test detect the original failure.
Git timeout and cancellation stop the owned process group implemented The public-boundary scanner loads cleanup at retirement. Existing timeout, ownership and cancellation tests pass.
Validation retains process cleanup and input policy implemented Caller validation selects cleanup before launch. Real timeout, cancellation and validation receipt tests pass.
Public preference APIs and configured providers resolve their original owners implemented The five public exports retain object identity. Existing configured extension tests pass.

Scope And Continuation

The patch covers the Python import paths of the CLI preview and their selected operations. It can be reviewed and reverted independently of the complete Turn cutover. The comparison measures loaded modules in fresh source-checkout processes.

Validation

  • Base 8e86f173f08bd55eb833d8cdf42360f93bf989fe
  • Tested revision c65486ef2af5e5d46ce31517bd284507a0b8888a
  • Run state finished with synthetic fixtures
Check kind Result Public-safe evidence
real_entrypoint passed Fresh loopx turn plan on isolated File and SQLite fixtures. Both reject the baseline's eager imports and pass at this head. The public CLI scan agrees for both revisions on clean files and tracked private-state refusal.
integration passed 214 passed, with one Windows stdin case skipped on macOS. Two additional configured semantic-preference extension cases passed.
static passed Focused Ruff and explicit public-boundary scan. The scan reports the same non-literal credential-pattern advisory as the baseline.
static failed Standard premerge passed six direct checks and 16 of 17 selected checks. The existing first-connect smoke reads should_run from the progressive navigation header and fails identically at base and head. Following the returned reader yields should_run=true and effective_action=normal_run at both revisions.

Evidence covers local source-checkout execution. Installed application and model-level performance remain unmeasured.

Frontend / Visual Evidence

UI impact none. The CLI output and app presentation are unchanged by this import-path change.

中文:默认 Turn 预览延迟加载进程清理及语义偏好召回模块。File 和 SQLite 实测各少加载 8 个 Python 模块,计划和公开边界扫描结果一致。原 Git 与校验进程的超时、取消测试继续通过。

Keep process-tree cleanup and semantic preference recall on their selected paths. Exercise the normal Turn plan entrypoint in fresh File and SQLite fixture processes and preserve bounded Git and validation cleanup.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

This branch has not been deployed

No deployments
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