[DO NOT MERGE] POC: Tessar query materialization - #6085
Draft
christse wants to merge 12 commits into
Draft
Conversation
Contributor
Preview deploymentsHost Test Results 1 files 1 suites 2h 12m 22s ⏱️ Results for commit fead7a1. Realm Server Test Results 1 files 210 suites 1h 14m 13s ⏱️ Results for commit fead7a1. For more details on these errors, see this check. |
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.
Background and Goal
Tessar is a DO NOT MERGE experiment for shared dashboard lists and statistics. Opted-in card definitions use existing Boxel queries and
computeVia; the indexer persists query watches and computed outputs, while readers consume complete snapshots without reconstructing the input graph. Pending or failed work cannot appear as a current successful result.The final guarded build passes 20 connected Chromium reads and nine mutations on 12,550 fabricated records: 800 ms median / 831 ms p95 interactive readiness, zero input-card/search requests, and at most 5,222 ms acknowledgement-to-display delay across those mutations. Worker interruptions before and after source publication recover within the fixed 10-second deadline; a new authenticated browser opened during pending publication also passes, without stale initial HTML. Seven focused browser tests / 80 assertions, six Postgres cases, four generator/browser-oracle tests, the sliding-sync regression, and modified-package lint/type checks pass.
This is an implementation checkpoint, not a completed POC. A preceding matched stable-data series observed 674 ms median for Tessar versus 13,576 ms for the corrected getCards reference, but the reference fails write freshness, so this is not a qualified overall speedup. The complete 10× HTML rebuild still has one Chrome render timeout after bounded prewarming fixed an earlier worker heap failure. JSON-path measurements are explicitly labeled; controlled 1× and larger matching-set runs, broader lifecycle coverage, and full application workflows remain. No additional AI-generation capacity is claimed.
Where to start
docs/tessar-query-materialization-plan.mdrecords scope and unfinished gates.docs/tessar-performance-report.md, its exportable chart, and sanitized results preserve the evidence and failed runs.packages/runtime-common/tessar-index-publication.tsconnects reverse matching, concrete dependencies, durable dirty state and guarded publication to the existing index transaction. The first-watch registration race has a failing-before/passing-after regression.packages/runtime-common/tessar-materialization.ts, base snapshot support and the host store implement the versioned read contract. Initial HTML shares the readiness/revision checks; HTML-only rendering consumes published values, while indexing still computes.scripts/tessar/contains deterministic generation, independent full-output oracles, real Chromium checks, concurrent reads, worker interruptions and benchmark tools. Presets are smoke, 1× (1,255 records) and 10× (12,550); no production records are inputs.Key decisions and non-obvious mechanics
no-storeinstead of deployment-ETag validation. Explicit drill-down can hydrate a selected source; ordinary snapshot display does not.