perf(registry): compile component parameter schemas - #1557
Merged
ricardo-devis-agullo merged 2 commits intoAug 24, 2026
Conversation
Compile immutable component-version parameter metadata once per schema identity and fuse request-time defaulting, sanitization and validation into a single scan with an empty-schema fast lane. Cache compiled schemas in a WeakMap keyed by component.oc.parameters identity so hot reload (new manifest object) recompiles naturally and evicted manifests do not stay alive, preserving the Plan 005 cache bound. Preserve defaults/mutation, coercion, enum, reserved-param removal and error ordering semantics with table-driven and identity characterization tests.
Keep sanitization case-sensitive while retaining normalized validation, reject malformed descriptors instead of forwarding them, and preserve array-shaped request handling from the original pipeline. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Implements plan 007.
component.oc.parametersidentity viaWeakMap(empty schema uses shared singleton).__ocAcceptLanguage, bypasses validation machinery.Test:
npm --workspace packages/oc run buildandnpm --workspace packages/oc run test-silent(1091 passing).Plan:
plans/007-compiled-parameter-schema.mdDepends on: #1556 (006 synchronous render lane)