Skip to content

Drop contexts resource; bump runtime; drop direct nvisy-schema dep - #161

Merged
martsokha merged 1 commit into
mainfrom
chore/update-runtime-drop-contexts
Jul 28, 2026
Merged

Drop contexts resource; bump runtime; drop direct nvisy-schema dep#161
martsokha merged 1 commit into
mainfrom
chore/update-runtime-drop-contexts

Conversation

@martsokha

Copy link
Copy Markdown
Member

Summary

Upstream runtime dropped the nvisy-context crate and the contexts parameter from Engine::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 direct nvisy-schema dependency.

Changes

Remove the contexts resource

  • DB: drop the workspace_contexts table and the workspace_pipeline_contexts join; delete their model, query, and constraint modules; regenerate schema.rs (zero context-table references remain).
  • Server: delete the contexts handler, request/response DTOs, and routes; remove the Contexts builtin module, the ViewContexts/ManageContexts permissions, the OpenAPI Contexts tag, and all pipeline/run context references (context_slugs, resolve_contexts, the analyze_document contexts argument).

Reorder migrations

  • Pipelines (045014) now run before policies (045015).
  • The workspace_pipeline_policies join moves into the policies migration, where both parent tables (workspace_pipelines, workspace_policies) exist.
  • The full up/down chain applies and reverts cleanly (verified against a live DB).

Runtime + dependency

  • Bump the runtime git dep to 4e8f32d4.
  • Drop the direct nvisy-schema dependency — nvisy-engine re-exports file/plan/policy, so the server consumes those types through nvisy_engine. nvisy-schema remains 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)
  • Migrations regenerated; full up/down chain verified against a live Postgres.

🤖 Generated with Claude Code

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>
@martsokha martsokha self-assigned this Jul 28, 2026
@martsokha martsokha added chore maintenance, dependency updates, code cleanup postgres ORM, models, queries, migrations server API handlers, middleware, auth labels Jul 28, 2026
@martsokha
martsokha merged commit 9ff5f92 into main Jul 28, 2026
7 checks passed
@martsokha
martsokha deleted the chore/update-runtime-drop-contexts branch July 28, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore maintenance, dependency updates, code cleanup postgres ORM, models, queries, migrations server API handlers, middleware, auth

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant