perf(runtime): batch exact source fingerprint reads - #5323
Draft
huangruiteng wants to merge 1 commit into
Draft
huangruiteng wants to merge 1 commit into
huangruiteng wants to merge 1 commit into
Conversation
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
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
Fresh CLI processes read every packaged TypeScript/JSON source serially before using the managed runtime. Reuse the existing bounded ordered file reader to overlap those reads while hashing the same relative names and original bytes. Public text scanning shares the queue; no new cache or domain decision owner is added.
This advances the shared-authority retirement cadence's B lane (caller-cost qualification). It does not select a default provider, close D2, truncate a Goal response or authorize legacy-writer deletion. Base:
mainat3fae8cc40.Scope And Continuation
file_text_readsmodule withfile_reads; both active consumers use it. Binary errors propagate, partial fingerprints never become cache entries, topology retry and request-scoped freshness stay intact. Python remains the existing filesystem/managed-process adapter; TypeScript policy is unchanged.Validation
6e36f43725632b7265c63feda565adfc3a02cef9test_runtime_source_read_batching.py,test_public_boundary_parallel_reads.py, and Effect request-scope/restart/integration suites. Original bytes, changed/deleted source, errors, bounded scheduling, private exclusion and real subprocess recovery.entrypoint.main, identical source directory; 20 paired responses differed only at enumerated observation-time fields. Raw state/traces stay private.semantic-vocabulary-drift-smoke.pyfails four pre-existinghistory.pyregistry-census locations on both immutable base and head; #5321 owns that repair. No passing quality/readiness claim.The initial frontend build lacked local npm dependencies; after
npm ci, bundle and final wheel builds passed. The prototype's two mypy errors were fixed before the final tests/build.On macOS arm64, Python 3.13.13 and Node 24.21.0, nine alternating post-warmup fresh-process samples per variant used 246 TS/JSON files (3,003,024 bytes):
OS caches were not flushed; command timings vary and are not provider-throughput claims. Counterexample: repeated same-process hashing with memoization explicitly cleared regressed from 9.3 to 17.7 ms. Normal unchanged requests still use the existing memoization. This is local evidence, not universal platform/fleet qualification. Public tests reproduce semantic invariants; private snapshot timings are not a public benchmark.
Frontend / Shared-Authority Impact
UI impact: none. No frontend, renderer, payload-selection or provider-state logic changed; complete File/SQLite response comparisons cover records and metadata. The shipped frontend bundle was built/verified, but no new visual journey or PostgreSQL performance claim is made. No migration, runtime route or persisted contract changes.
Boundary Checklist