Date: 2026-07-23
Branch: codex/data-rule-execution-m3a-m5
Lifecycle boundary: physical Polars plans are persisted as compiled; this task does not publish them.
Implemented a closed JSON Polars compiler, allowlisted LazyFrame reconstruction, server-owned digest-bound Parquet artifact storage, PostgreSQL-backed artifact binding resolution, Runner registration, canonical plan attestations, and a real PostgreSQL + MySQL + MinIO integration.
The plan contains canonical RuleVersion, SchemaSnapshot, and DatasetBinding hashes plus dataops-polars-1.42.1 provenance. It contains no Python source, pickle, callable, module, client path, arbitrary URL, secret, or Polars internal serialized plan.
RED evidence was captured before each production slice:
5 failed because app.core.data_rules.compilers.polars did not exist.8 failed because the modules did not exist.2 failed because the registry rejected cross-source artifacts.1 failed because correlation was not forwarded.1 failed because correlation_id was not accepted.2 failed because the API/settings were absent.1 failed because MinIO returns an HTTPHeaderDict, not a plain dict, for metadata.1 failed because write returned before rereading and digest-validating the stored object.3 failed because tampered identifiers/flags were not rejected.1 failed because all URI-shaped Parquet refs were previously rejected.1 failed because compiler input rejected the canonical binding_hash.GREEN:
PYTHONPATH=. .venv/bin/pytest -q tests/core/data_rules/test_polars_compiler.py tests/runner/test_rule_polars.py tests/runner/test_artifacts.py tests/integration/test_data_rule_polars_execution.py23 passed in 0.95s.197 passed, then 75 passed after repository hardening.The integration used runtime values discovered from deploy/docker/docker-compose.yml; credentials were not copied into the test source.
127.0.0.1:25432.127.0.0.1:23306.127.0.0.1:19000.rules/<test-correlation-id>/ objects were removed. The test asserted the exact prefix was empty afterward. Test-owned PostgreSQL/MySQL tables were also dropped.PYTHONPATH=. .venv/bin/pytest -q
527 passed, 26 skipped, 59 subtests passed in 4.69s.docker compose -f deploy/docker/docker-compose.yml config --quiet
All checks passed!git diff --check
polars==1.42.1..venv: Polars 1.42.1 and its matching polars-runtime-32==1.42.1.>=3.10; MIT license text.Created:
app/core/data_rules/compilers/polars.pyapp/runner/artifacts.pyapp/runner/rule_polars.pytests/core/data_rules/test_polars_compiler.pytests/runner/test_artifacts.pytests/runner/test_rule_polars.pytests/integration/test_data_rule_polars_execution.pyModified:
requirements.txtapp/core/data_rules/compilers/__init__.pyapp/core/data_rules/execution_contracts.pyapp/core/data_rules/repository.pyapp/runner/api.pyapp/runner/bootstrap.pyapp/runner/nodes.pyapp/runner/rules.pydeploy/docker/docker-compose.ymltests/core/data_rules/test_execution_contracts.pytests/runner/test_bootstrap.pypolars backend.rules/<correlation-id>/<artifact-id>.parquet.repr=False and never enter refs, logs, or plans.RulePlanExecutor correctly refuses compiled plans in the published runtime path.quality_check remains fail-closed through the existing adapter; this task did not claim a new artifact-backed quality-check implementation.