Repository navigation
Advice per table, and advice/data_classes in the Node.js and .NET clients (#291, #294) - #313
Merged
Merged
Conversation
…mary (#293) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Dec 3, 2026
Closed
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.
Finishes the client and per-table parts of #291 and #294.
What it adds
Advice.tables: columns used per physical table and clause (projected,filtered,joined,grouped,ordered,in_functions), resolved the wayGuard.explain()resolves columns (aliases, correlated subqueries, unqualified columns through the policyschema). It reuses that machinery instead of a second resolver.columns(as written) stays.ExplainResultlists the optionaladviceanddata_classes.tests/conformance/test_explain_extras.py), and validates against the schema.Explanation.adviceand.data_classesare typed. .NET:ExplainResult.Advice(QueryAdvice?) and.DataClasses, added as computed properties so the 1.0 positional record is not changed; parsing is manual (no reflection).Found on the way
The Node.js generated types were stale:
Policywas missingadvice,data_classes,column_classesandnot_sensitive(from #306 and #309), and CI did not notice. Regenerating fixes it, so TypeScript users of the local mode can pass those sections.Tested
Python: 5 new per-table tests (aliases, schema-resolved columns, subqueries, stars, correlated subqueries, an ambiguous column left out) and 4 conformance tests; full suite, ruff, mypy and strict docs pass. Node: typecheck and the full suite (97). .NET: the full suite (110), including 2 new tests. All run locally.
Not done
The embedded engine binaries that the clients download are built from a release; this PR does not rebuild them, so local-mode clients get
adviceonce a release ships it. Remote mode (HTTP) already returns it.🤖 Generated with Claude Code