Repository navigation
fix(runtime): drain result caches through resident owner - #924
Draft
Haoming9527 wants to merge 3 commits into
Draft
Haoming9527 wants to merge 3 commits into
Haoming9527 wants to merge 3 commits into
Conversation
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.
Part of #872. Stacked on #923.
What was wrong
Session result-cache cleanup started additional one-shot host workers during teardown. Root disposal could also withdraw the current policy lookup before pending cleanup finished. Migrating concurrent expiry directly to the resident connection exposed its unchanged 32-request limit: forty simultaneous Session expiries completed only 32 purges.
The change
Send the existing typed result/purge envelope through the owning resident client. Retain public policy and sandbox dependencies through cleanup, resolve current authority before and after grant preparation, and preserve native storage/no-follow checks. Stop ordinary admission, join pending Session cleanup, then close the connection. Sequence only each owner's existing cache cleanup section; refusal releases the next Session. Missing authority, changed grants or incomplete cleanup remain explicitly deferred without a replacement worker.
Package-root and standalone integrations use the same lifecycle. Bilingual docs and changelog describe the boundary and remaining #872 requirements.
Validation
3fd7253d, build and size checks passed; 19 checks / 3 focused suites passed (publication boundary, moved session provider, real cleanup), followed by the updated cancellation fixture 1/1 on Windows. Its POSIX resident-purge assertion will run in the new cross-platform CI.Combined worker SHA-256:
9b25fceacb73ab1abe53b64b291b89d8ee8896cb9d8df6cfa7a1983f993715c0.Latest pull-request CI: Cross-platform validation / CI required — passed all 10 jobs for
943c5bc9. The earlier run reported the upstream publication-boundary violation and a stale POSIX cancellation fixture expecting a one-shot purge. The ordinary upstream merge and test-only followup address those separately; the failed evidence is retained. This is a draft slice, not full #872 acceptance.Environment
Windows x64, Node v26.12.1, locked development dependencies. Stacked on #923; includes upstream composition fix
3fd7253dthrough ordinary merge8a2cbeb9, followed by test-only commit943c5bc9. No dependency, version, model-facing schema or prompt changes.