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:54
This was referenced Oct 21, 2026
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 public quota read composes several existing typed decisions. When the caller has no outer executable-revision scope, each decision rescans the TS code tree. Global summaries and Todo views pay this cost repeatedly, although the runtime already supports a bounded request scope.
Put that existing scope at
build_quota_should_run, the shared public decision interface. The compatibility facade and global-view adapters inherit it. Status remains a caller-supplied snapshot; provider/callback reads retain their existing behavior. No decision result or source fact is cached by this change.Basis: TypeScript control-plane migration RFC Stage 3 caller adoption at
1a9933cce84d9ad94d3eb83490b4404741c7834a; targetmain. Observable before → after: repeated code-identity scans become one per quota read while native calls, decisions, pause/refusal signals and view coverage remain unchanged.Author Declaration
Implemented against
Specification:
docs/architecture/rfcs/typescript-control-plane-migration-v0.md, revision1a9933cce84d9ad94d3eb83490b4404741c7834a.quota/should_run.pyinterface; facade/global viewsSelf-check: production/test/docs guard review, related tests, real disposable providers, historical regression sensitivity and normal installed artifacts. No live task or external provider execution was launched.
Scope And Continuation
quota should-run, Chat workers and the proposed perf(portfolio): share executable revision across one evidence read #6990 portfolio outer scope already provide this lifetime; their gains are not counted here. The benchmark uses previously unscoped global views on main without perf(cli): reuse selected dispatch for manager Inbox commands #6989/perf(portfolio): share executable revision across one evidence read #6990.should_run.pybut changes acceptance guard logic; it adds no executable request scope. Its related acceptance hunks are already represented on this base. perf(portfolio): share executable revision across one evidence read #6990 changes the portfolio parent lifetime, perf(cli): reuse selected dispatch for manager Inbox commands #6989 changes Inbox CLI dispatch, Add projection envelopes to global todos and risks #5598 changes global projection envelopes, and refactor(todos): compose full readback in one TypeScript transaction #6874/perf(control-plane): reuse acceptance reads within one Todo snapshot #6984 change Todo reads. This changes distinct production/test hunks and does not repeat those implementations. Shared RFC edits are separate paragraphs.Validation
cdc0c89e13c13a7f53427b60ad881c18583d6049ona590609a357f7cde17289b5ceba9f85a9fcb46cc. Performance dataset predates this Lark-only rebase; measured quota/native/global/CLI files have unchanged hashes. The 189 related tests and installed artifacts were rerun on this final head.Early fixture/test construction failures were corrected before qualification. Incomplete artificial frontier rows, missing run-artifact profiles and small exploratory timings are excluded; the final fixture uses native public Todo creation and real observation files. No failing scenario was removed to obtain a passing result.
Complete-command performance
Pinned main
1a9933cce84d9ad94d3eb83490b4404741c7834aversus this HEAD; Linux, Python 3.11, Node 24.21.0 / SQLite 3.53.4. Same disposable fixture and sequential arms, 15 samples per arm; nearest-index p95. Each sample starts a new Python CLI process and includes startup/imports, parser, real status/quota reads, public source scanning, view projection and output. The managed native runtime is warm.Both complete packages are precompiled with the same interpreter and get one untimed CLI warmup; bytecode writing is disabled during timed CLI children. Compiled module sets are checked equal. This measures a prepared installation/cache state, not first-ever compilation or cold native startup. Each CLI proves its actual Python and TS roots.
Initial CLI timings had four extra setup-module bytecode files in the candidate and are excluded from gain claims. The primary row is the controlled rerun. Earlier post-import view timings remain supporting experiments; all their behavior and method observations remain in parity checks.
Global views still perform their status read and final envelope sealing separately; this does not claim one scan for the whole view. Native method sequences/counts are unchanged. The speedup removes repeated executable-tree IO, not RPCs, state reads or scheduling checks.
Every public output matches across arms and samples after normalizing only the top-level observation timestamp and projection-envelope read/serve clocks and elapsed-age fields. Null clock/age values remain null. Persisted progress timestamps, source-updated times, freshness/coverage/alert flags, Goals/Todos, reasons, omissions and boundary fields remain in the comparison. The unconfigured local global-directory source is disclosed identically by both views; no all-healthy or complete global-inventory claim is made. Raw local samples remain private.
This measures local evidence-read overhead, not long-horizon task quality, model/token savings, cold native startup, PostgreSQL or all of LoopX. Already-scoped consumers should not be credited with another equivalent speedup.
Portable reproduction
Save the three scripts outside both checkouts. Install their Python test dependencies and run
npm ciin both checkouts. Select the same Python and qualified Node version, use empty output directories, and run sequentially on an idle host:The fixture directory is shared deliberately so persisted source bytes and identities remain comparable. Setup creates synthetic canonical stores and public Todos only; it performs no work attempt. The qualifier disables usage pings, records every sample/native method/source proof and stops its managed runtime. A small explicit public scan directory keeps unrelated repository scans out of both arms.
setup_goals.pySHA256:338c2b0e33b541107bbb41b43dd6b5fc375fc10c61a91c147745d640f0b71165.qualify_global.pySHA256:e9e8343c7c7cf5e243adbfdd756b0cd1101bcd796ef2f9b54f66a2fb79cf07af.qualify_cli.pySHA256:a30c0ad45b31f3c9eb16c0fdcb8cee023a45448af78cf1047d048bac8cd290ef.Coverage/gaps: full repository suite, Windows, PostgreSQL, browser/model roundtrips, live provider delivery and hosted CI results are separate and were not claimed by the local checks. No TS semantic implementation changed; real typed transport and affected Python callers were exercised.
Frontend / Visual Evidence
UI impact: none. Existing read interfaces and output shapes remain unchanged; no new capability or screen is introduced.
Change Area
Technical Direction
TypeScript migration Stage 3, existing executable request-scope owner. Domain/authority owners and provider routing remain unchanged.
Shared-authority RFC fixture impact
Boundary Checklist