Drop contexts resource; bump runtime; drop direct nvisy-schema dep - #161
Merged
Conversation
Upstream runtime dropped the nvisy-context crate and the `contexts` parameter from `Engine::analyze_document`, so the server's contexts resource has no backing engine support. Remove it end to end: - DB: drop the workspace_contexts table and the workspace_pipeline_contexts join; delete their model, query, and constraint modules; regenerate schema.rs. - Server: delete the contexts handler, request/response DTOs, routes, the Contexts builtin module, the ViewContexts/ManageContexts permissions, the OpenAPI tag, and the pipeline/run context references (context_slugs, resolve_contexts, the analyze_document contexts argument). Reorder migrations so pipelines (045014) run before policies (045015), and move the workspace_pipeline_policies join into the policies migration where both parent tables exist. The full up/down chain applies and reverts cleanly. Bump the runtime git dep to 4e8f32d4 and drop the direct nvisy-schema dependency: nvisy-engine now re-exports file/plan/policy, so the server consumes those types through nvisy_engine instead. nvisy-schema remains only as a transitive dependency of the engine. Co-Authored-By: Claude Opus 4.8 <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
Upstream runtime dropped the
nvisy-contextcrate and thecontextsparameter fromEngine::analyze_document, leaving the server's contexts resource with no backing engine support. This PR removes that resource end to end, reorders the pipeline/policy migrations, bumps the runtime dependency, and drops the now-redundant directnvisy-schemadependency.Changes
Remove the contexts resource
workspace_contextstable and theworkspace_pipeline_contextsjoin; delete their model, query, and constraint modules; regenerateschema.rs(zero context-table references remain).Contextsbuiltin module, theViewContexts/ManageContextspermissions, the OpenAPIContextstag, and all pipeline/run context references (context_slugs,resolve_contexts, theanalyze_documentcontexts argument).Reorder migrations
045014) now run before policies (045015).workspace_pipeline_policiesjoin moves into the policies migration, where both parent tables (workspace_pipelines,workspace_policies) exist.Runtime + dependency
4e8f32d4.nvisy-schemadependency —nvisy-enginere-exportsfile/plan/policy, so the server consumes those types throughnvisy_engine.nvisy-schemaremains only as a transitive dep of the engine.Verification
cargo check --all-features --workspace✅cargo clippy --all-targets --all-features --workspace -- -D warnings✅cargo +nightly fmt --all -- --check✅RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --workspace✅cargo test --all-features --workspace✅ (all suites pass)🤖 Generated with Claude Code