feat(vnext): validate relation catalog data - #192
Merged
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Adds a vnext “relation catalog boundary” that captures a caller-owned provider as a this-free closure, decodes untrusted provider data into bounded frozen values, and validates dialect-legal canonical/completion paths before they can affect completion rendering.
Changes:
- Enforce
this: voidprovider callback contracts at the type level and add a d.ts regression test for receiver-dependent callbacks. - Introduce
relation-catalog-boundarydecoding/validation utilities (provider capture, request/response decoding, invalidation decoding, epoch comparison) with strict resource limits. - Add extensive unit tests and a Vitest benchmark plus a new
bench:catalog-boundaryscript; document semantics in ADR 0005.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/vnext-types/marimo-relation-completion.test-d.ts | Adds type-level coverage ensuring provider callbacks are this-free closures. |
| src/vnext/relation-completion-types.ts | Updates provider callback types to require this: void for search and subscribe. |
| src/vnext/relation-catalog-boundary.ts | New boundary module: captures providers and decodes/validates catalog requests/responses with budgets and dialect checks. |
| src/vnext/tests/relation-catalog-boundary.test.ts | Comprehensive unit tests for capture/decoding behavior, hostile shapes, and resource limits. |
| src/vnext/tests/relation-catalog-boundary.bench.ts | Benchmark suite for common and worst-case boundary decode scenarios. |
| package.json | Adds bench:catalog-boundary script. |
| docs/adr/0005-parser-independent-relation-completion.md | Documents provider ownership, atomic page semantics, epoch handling, and updated limits. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Light2Dark
force-pushed
the
codex/vnext-catalog-boundary
branch
from
July 25, 2026 04:49
6c8f255 to
b9f6d3e
Compare
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.
Summary
Why
Catalog metadata crosses an asynchronous host boundary and cannot be trusted as typed data at runtime. This slice gives the upcoming coordinator a small, deterministic input surface without coupling catalog providers to sessions, CodeMirror, DOM state, or provider-supplied SQL.
Validation
Part of #169.