Skip to content

Restrict Salsa dependencies during source resolution - #1415

Open
lionel- wants to merge 4 commits into
oak-query/file-readerfrom
oak-query/hardening
Open

lionel- wants to merge 4 commits into
oak-query/file-readerfrom
oak-query/hardening

Conversation

@lionel-

@lionel- lionel- commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Part of #1409

This PR introduces stronger safety invariants by splitting database access into narrower capabilities:

  • SourceDb exposes source text, syntax, workspace membership, and package metadata. Recovery fallbacks receive this interface, so they can't call back into semantic queries.

  • ResolverDb wraps the full database but exposes only the three recursive queries the resolver needs: exports, attached packages, and cross-file layers. All three have explicit cycle handlers.

  • Db marks unrestricted database access and is required by the remaining semantic queries.

This doesn't remove the recursive parts of source resolution, but it makes them explicit and prevents unrelated semantic queries from being reached accidentally.

Positron Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

@lionel-
lionel- added this pull request to stack #1412 September 18, 2026 18:21
@lionel-
lionel- force-pushed the oak-query/hardening branch from 9b615db to 43c7f75 Compare September 20, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant