Repository navigation
Conversation
Signed-off-by: aihop <4408344+hhyykk@users.noreply.github.com>
hhyykk
requested review from
huangruiteng,
loopx-agent and
songoow
as code owners
October 21, 2026 08:13
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal And Delivered Outcome
A bounded Goal portfolio read currently ends the status request scope before reading each registered Agent's quota. The remaining native decisions repeatedly rescan the same TS executable tree. This makes one evidence read pay for code-identity resolution many times.
Reuse the existing
effect_runtime_request_scopeatbuild_goal_portfolio, the shared interface consumed by CLI, Chat context and manager inspection. Nested status scopes join it. The next portfolio read resolves current code again; registry/provider/history data remain live reads.Basis: TypeScript control-plane migration RFC Stage 3 caller adoption at
d98804591271380db9737443ed5345e3f4e5b890. Base:main. No semantic migration or R1–R3 completion is claimed.Author Declaration
Implemented against
Specification:
docs/architecture/rfcs/typescript-control-plane-migration-v0.md, revisiond98804591271380db9737443ed5345e3f4e5b890.build_goal_portfoliorequest; real File/SQLite and normal CLISelf-check: clean-code-guard, test-guard and docs-guard; related entrypoint/caller tests, real providers, baseline-sensitive regression and installed artifacts. Real models and live external delivery were not invoked.
Scope And Continuation
ChatRuntimeControllerworkers already hold an outer scope. These nested reads join it; no additional speedup is claimed for already-scoped Chat turns. The measured gain is for previously unscoped programmatic reads and the portfolio CLI.goal_portfolio.pyortests/test_goal_portfolio.py. perf(cli): reuse selected dispatch for manager Inbox commands #6989 changes Inbox CLI dispatch; perf(control-plane): reuse acceptance reads within one Todo snapshot #6984/refactor(todos): compose full readback in one TypeScript transaction #6874 change Todo reads; refactor(collaboration): converge return delivery and restart recovery in TypeScript #6855 changes return delivery/recovery. Shared RFC edits are distinct paragraphs. This PR is independently applicable and does not stack on perf(cli): reuse selected dispatch for manager Inbox commands #6989.Validation
79c8cf80e290fc3bf5fd8614b5e6566dfaf00efc.Matched complete-read performance
Pinned main
d98804591271380db9737443ed5345e3f4e5b890versus this HEAD. Linux, Python 3.11, Node 24.21.0 / SQLite 3.53.4. Both arms use the same disposable fixtures, sequential execution, 15 samples/arm/profile and warm managed native runtimes. Full CLI starts a fresh Python process every sample, includes imports/parser/registry/typed reads/output, and verifies actual Python and TS source roots. Bytecode writing is disabled equally in both arms. Warm direct-reader times include the complete portfolio function.All retained semantic fields match across arms and samples. Wall-clock observation fields and their derived snapshot/source hashes are excluded from cross-run equality; each raw portfolio snapshot hash is independently recomputed. Registry revision, persisted source metadata revisions, scope, coverage, Agents, warnings, progress and limitations remain in the comparison. Every raw local observation is retained privately. Native method sequences/counts are unchanged: this removes redundant executable-tree scans, not RPCs or source reads.
The early exploratory probe used an incomplete registry and a cold first arm; it is excluded from these numbers. These results measure local evidence-read overhead with empty canonical work queues, not model quality, task completion, large Todo/history workloads, cold native startup or all of LoopX.
Portable reproduction harness
Save the script below outside both checkouts. Install Python dependencies and run
npm ciin both checkouts. Select the same Python interpreter and a qualified Node version (24.21.0 / SQLite 3.53.4 above). Use empty output directories and run sequentially on an idle host:The fixture directory is deliberately shared between arms, so registry bytes and persisted file-metadata revisions can be compared. The script asserts verified source quality, checks snapshot hashes, records all timings/native methods and emits per-subprocess import proofs. Source fixtures are synthetic; usage pings are disabled. The process stops its own managed runtime.
Harness SHA256:
08cf6157c173dc73fb280665cb65194b3247cdb0822238a0f8cf69b14a574076.Coverage/gaps: no TS product diff; related Python/native real-path tests cover the affected read and lifetime. Full repository suite, Windows, PostgreSQL, browser/model roundtrips and live providers were not run. Hosted CI is separate from these local checks. Already-scoped callers retain their prior performance expectations.
Frontend / Visual Evidence
UI impact: none. Existing evidence interfaces and schemas stay unchanged; no screen or new user capability is introduced.
Change Area
Technical Direction
Existing TypeScript control-plane migration, Stage 3; shared code-revision owner remains
effect_runtime.py. Provider and domain semantic owners are unchanged.Shared-authority RFC fixture impact
Boundary Checklist