Repository navigation
Conversation
The decorator now checks each field's type against its marker, the constructor, and the plan with the engine's own reader. The EQL resolver is the Go guest's targets.rs, compiled in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A constructor that lacks a field is now its own error, apart from the decorator order. Pydantic aliases are read from Pydantic. A test covers a relationship to a class defined later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
This branch has not been deployed
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
@stackencrypt.modelnow checks what a declaration means, at the class statement. It refuses a field type that does not match its marker, a constructordecryptcould not call, and a plan the engine refuses. So a wrong model fails at import, before any database call.A marker such as
TextEqnames an EQL type. EQL is CipherStash's encrypted column format in PostgreSQL.Changes
Decorator checks (
_declaration.py), after rule A:declaration_unproducible: the engine cannot produce the marker yet.declaration_type_mismatch: the value type is not exactly the kind's Python type, such asstrforTextEq.declaration_not_outermost: the decorator ran below@dataclass, so the class had no constructor yet.declaration_constructor_missing_field: the constructor does not take a field's name, such as withinit=Falseor a Pydantic alias.declaration_ignore_required: anIgnorefield has no default.DeclarationErrorwith the engine's code, such asstack_encrypt_dynamic_plan.Engine check.
crates/core/src/plan.rsbuilds the plan frame and runs the engine'splan_with. The EQL resolver is the Go guest'stargets.rs, compiled in place through#[path], so both SDKs run one resolver.eql-bindingsis a new path dependency. Its lock entries match the EQL workspace's versions.CI.
tests-python.ymlalso runs on changes toeql-bindingsandtargets.rs.python-ci.test.mjschecks that the filter selects every#[path]file.Verification
cargo test, clippy,cargo fmt --check, mypy strict, and pyright are clean.pnpm run test:scripts: 83 of 83 files pass.python-cichecks fail when the new filter entries are removed.eqlfeature stops with the intendedcompile_error!.Related
Closes #1387. Part of #1341.
Review notes
_check_value_typeand_check_constructor, thenplan.rs.#[path]means the Python crate must list every dependency oftargets.rs. A Go change that adds one failstests-python.ymlat once.JsonSearchhas no Python type in v1, so it fails withdeclaration_type_mismatch."type"key. The encrypt ticket can add one.🤖 Generated with Claude Code