feat(schema): implement Phase 14 LazySchema for recursive types#25
Merged
viniciusdacal merged 1 commit intomainfrom Feb 6, 2026
Merged
feat(schema): implement Phase 14 LazySchema for recursive types#25viniciusdacal merged 1 commit intomainfrom
viniciusdacal merged 1 commit intomainfrom
Conversation
Add LazySchema with deferred resolution for recursive type definitions. Getter is called lazily on first use, not at construction time. Works with .id() for JSON Schema $ref output and validates deeply nested recursive data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
viniciusdacal
commented
Feb 6, 2026
Contributor
Author
viniciusdacal
left a comment
There was a problem hiding this comment.
Post-PR Review
Overview: Phase 14 adds LazySchema for recursive type definitions. Clean, minimal implementation (40 lines) that leverages existing infrastructure.
Code Quality: LazySchema follows established patterns — extends Schema, implements _parse/_schemaType/_toJSONSchema/_clone. Uses memoized getter pattern for deferred resolution.
Test Coverage: 5 tests covering deferred resolution, recursive parsing, JSON Schema $ref output, deep nesting, and error path validation. All 249 tests pass.
No issues found. The implementation is elegant — LazySchema simply delegates to the resolved inner schema, and the existing infrastructure handles everything else (recursive $ref, error paths, pipeline execution).
viniciusdacal
added a commit
that referenced
this pull request
Feb 22, 2026
Add LazySchema with deferred resolution for recursive type definitions. Getter is called lazily on first use, not at construction time. Works with .id() for JSON Schema $ref output and validates deeply nested recursive data. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
viniciusdacal
added a commit
that referenced
this pull request
Apr 5, 2026
…2053) Phase 1 of runtime feature parity tests: - Test skeleton: main.rs, common.rs (shared helpers), checklist_meta.rs (report validation) - HTTP serving tests: API delegation (#5), proxy rules (#6), logging middleware (#7) - Compilation tests: import.meta.env (#19), CSS→JS (#20), tsconfig paths (#22), /@deps endpoint (#23), /@css endpoint (#24), theme CSS injection (#25) - PARITY_REPORT.md with all 55 included + 12 deferred feature rows - Test fixtures: env-app, css-app, tsconfig-paths-app, theme-app Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
viniciusdacal
added a commit
that referenced
this pull request
Apr 5, 2026
* test(runtime): add Phase 1 parity tests — infra, HTTP, compilation (#2053) Phase 1 of runtime feature parity tests: - Test skeleton: main.rs, common.rs (shared helpers), checklist_meta.rs (report validation) - HTTP serving tests: API delegation (#5), proxy rules (#6), logging middleware (#7) - Compilation tests: import.meta.env (#19), CSS→JS (#20), tsconfig paths (#22), /@deps endpoint (#23), /@css endpoint (#24), theme CSS injection (#25) - PARITY_REPORT.md with all 55 included + 12 deferred feature rows - Test fixtures: env-app, css-app, tsconfig-paths-app, theme-app Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(runtime): add Phase 2 parity tests — SSR, HMR, watcher, module graph (#2053) Phase 2 of runtime feature parity tests: - SSR: verify SSR-enabled server serves HTML shell for page routes (#34) - HMR Tier 1: WebSocket update message delivery via hmr_hub.broadcast (#37) - HMR Tier 1: CSS-only update message (not full-reload) (#38) - HMR Tier 2: FileWatcher detects entry file changes in tempdir (#39) - Module graph: transitive dependency invalidation A→B→C (#40) - Shared helpers: copy_fixture() for tempdir-based watcher tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test(runtime): add Phase 3 parity tests — errors, diagnostics, MCP, auto features (#2053) Phase 3 of runtime feature parity tests: - Error overlay: client error reporting via POST endpoint (#47) - Console log: ring buffer endpoint returns stored entries (#50) - MCP: Streamable HTTP responds to tools/list with 7 registered tools (#51) - MCP: tool invocation returns diagnostics result (#52) - MCP: events WebSocket delivers initial server status (#53) - Auto-install: blacklist/dedup coordination logic (#54) - Dep watcher: detects file changes in linked package dist/ (#55) All 22 parity tests passing. Full cargo test --all clean. Clippy clean. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(runtime): address review findings in parity tests (#2053) - Fix ~25 incorrect EXISTING test location references in PARITY_REPORT.md to match actual function names in static_serving.rs, client_render.rs, ssr_render.rs, and error_overlay.rs - Rename misleading ssr_redirect_returns_302_with_location_header to ssr_enabled_server_returns_html_shell_for_page_routes (test asserts 200, not 302) - Add import.meta.env.SECRET_KEY reference to env-app fixture so the non-public env var assertion actually validates the code path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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.
Summary
.id()for$ref/$defsTest plan
$reffor named lazy schemas🤖 Generated with Claude Code