Repository navigation
feat(runtime): keep tier 2 query results live - #436
Conversation
Astra reviewReviewed StandardsNo merge-blocking method or YAGNI findings. Spec[P1] Keep rerun slots until the hosted invocation settlesThe new query adapter calls When that outer timeout fires, the scheduler decrements its company and patch counters and starts another rerun before the first releases its snapshot. Slow cancellation therefore lets reruns exceed the connection budget and compete with writes. #403 requires "Bounds and scheduling as on tier 1: the re-run caps"; #384 §8 specifies "At most 2 of a company's connections run re-runs" and "1 re-run per patch at a time." Reproduced with the real Keep the scheduler slot until invocation settlement releases or destroys its resources, including after timeout or document disconnect. Reuse the invocation's deadline and settlement ownership rather than timing out only its waiter. Cover delayed cancellation in the rerun-cap regression test. Standards: 0 blockers. Spec: 1 blocker, rerun slots released before invocation cleanup finishes. |
Opus reviewTwo blocking findings, most severe first. 1. A timed-out tier 2 re-run releases its re-run slot before the invocation settles
When it fires, the pump's Fix: don't apply the outer timeout to 2. The tier 2 fence trusts client-supplied vector keysOn install, Consequences:
Fix: in Checked, not blockingI checked the following and found nothing blocking:
CLI-init timeouts: these are not caused by this diff. It touches no CLI or init code. Run in isolation on this branch, both |
|
Addressed the review blockers in 6a6649b. Fixed
Updated the API contract and development verification docs. Kept as is
I checked conversation comments, review bodies, and inline review comments again after the push. There are no additional findings, and no Grok review was present in those channels. Neither blocking finding was dismissed. Verification
GitHub reports no separately configured required checks for this stacked target. All eight reported checks pass, and the PR is |
7c3ffa9 to
fdb23ba
Compare
Implement #403 with host-traced dependencies, query-only server subscriptions, recoverable refusals, final authority fences, and the existing shared scheduler. Connect generated queries to useQuery through the installed Preact runtime and cover published stream recovery and packaging.
Keep hosted rerun slots until invocation settlement, including after document disconnect, and retry unknown query outcomes. Filter resume fences to the loaded version's declared canonical resources before revision lookup. Cover delayed cleanup, concurrency bounds, forged resume keys, and recovery.
6a6649b to
39a7c23
Compare
Tier 2 pages can call server queries, but their results do not stay in sync when a colleague changes the data.
Enable generated query
.subscribeanduseQuerythrough the existing document stream and scheduler. The host tracks resources read by each query, preserves the last value through refusals, and recovers on reshare. Permanent failures end only the affected subscription; loss of document authority stops the document. The installed SDK uses one Preact runtime in optimized development and production builds.Stacked on #435,
tier2/402-init-tier2. This PR targets that branch and adds only the query-subscription work for #403.Closes #403.
Verification
The full offline suite is not green: 123/125 files passed, with four timeout failures. Postgres mapping passed in isolation, and refresh passed with a longer diagnostic deadline. Both unchanged CLI-init cases still timed out. No diagnostic edits or timeout changes are included.
Implemented with OpenAI GPT-6 Astra using the omp harness.