Cache protocol manifests and recover retired-page live streams - #274
Open
patrickleet wants to merge 3 commits into
Open
patrickleet wants to merge 3 commits into
patrickleet wants to merge 3 commits into
Conversation
Retain engine-owned selected exports and share compiled metadata across request seeds. Principal, preset values, scope tokens and visibility authorization remain per request. Public manifests remain independent clones. Validated 1052 library and43 protocol integration tests. In the retained Forge runtime, repeated authenticated GraphQL fell from about1.1s to14–22ms; warm page DOM times fell from3–7s to97–291ms. Cold dev compilation remains separately documented.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Preserve pre-disposal frame fencing, then reopen only the blocked receiver beyond the retirement boundary. Keep unrelated layout subscriptions active. Refs Forge repository preparing incident; all403 JS tests and actual fresh repository live transition pass.
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.
Cause and fix
Every verified-principal query/subscription constructed a projection request seed that rebuilt the entire selected client manifest. Native sampling of Forge identified manifest projection lowering on that path; a trivial authenticated query cost about 1.1 seconds.
Retain the exact selected export built by the engine and cache its immutable manifest in an export-owned Arc/OnceLock. Clones share metadata; public manifest callers receive independent copies. No global cache and no actor, session, token, row, preset value or authorization decision caching. Principal/surface selection, preset validation, scope HMAC, issuance time and visibility checks remain per request.
Targets v5 at 6217944, which is the current Forge pin and open PR227 baseline. No application generation/schema contract changes intended.
Validation
Measured result
Same authenticated user and routes in the retained local Forge stack:
Three direct authenticated GraphQL queries: 1143/1135/1072ms before; 22/15/14ms after. Observations are not timing assertions or SLA claims. The first repository load after development restart still took 18.7 seconds; cold development cost remains documented separately.
No user-facing copy changes. See docs/protocol-manifest-reuse.md for scope and evidence.
Retired-page live ownership recovery (c3040a2)
Forge repository creation exposed a second measured client defect: a preparation snapshot stream started before the old creation page retired its shared relationship ownership. Confirmed records advanced while root membership remained fenced forever. Preserve rejection of the old queued frames, but reopen only the receiver blocked by that retired owner with a fresh stream start. Still-active owners, scope fences, stale callbacks and unrelated retained layout subscriptions remain intact. Recovery is bounded by the retirement transition, not every blocked frame.
See docs/live-retired-owner-handoff.md. Forge adopts exact c3040a2 in its existing PR1; this framework PR remains unmerged.
Reload delivery follow-up
Commit
6579a5bcfixes a startup/reload failure found during retained Forge inventory verification. A typedApplicationReloadingerror now maps to retryable retain-and-stop at both service admission paths: NAK exact delivery and surface the error to the host's bounded retry. Real permanent business rejections retain their existing settlement. HTTP reports503. No lifecycle gate bypass, blanket Stop policy, event discard or cursor reset.Validation:
cargo test -p distributed --lib --features http,metrics—816passed,0failed (40.20s), including reload→NAK/stop→activation→same-event success and permanent business rejection classification. General infrastructure-outage NAK backoff is unchanged and remains a separate follow-up.