Date: 2026-07-23
Branch: codex/data-rule-execution-m3a-m5
Lifecycle boundary: physical Polars plans are created as compiled; this task
does not add a production promotion API. The real execution test inserts a
published fixture only to exercise the pre-existing Runner publication gate.
Implemented a closed JSON Polars compiler, shared compile/runtime semantic validation, allowlisted LazyFrame reconstruction, server-owned digest-bound Parquet artifact storage, correlation-scoped PostgreSQL artifact handoff, current output-binding re-attestation, separated operation metrics, Runner registration, canonical plan attestations, and a real PostgreSQL + MySQL + MinIO integration through the production repository/resolver/executor path.
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.4 failed, 6 passed before per-plan limits,
upload rollback, full schema contracts, and scoped expiry cleanup existed.3 failed, 11 deselected before timezone,
expression type replay, and lookup target collision checks existed.3 failed, 3 deselected before output-binding
attestation, exact decimal/timestamptz casts, and separated metrics existed.1 failed, 6 deselected before migration
20260723_140 existed.2 failed, 10 deselected before catalog
resolution, re-attestation, and registration existed.1 failed before the CycloneDX JSON document existed.2 failed, 14 deselected before decimal
precision/scale and timestamptz timezone were mandatory.1 failed, 11 deselected before a catalog row's
object key was checked against the requested correlation prefix.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/test_data_rule_schema.py tests/test_data_rule_runtime_sbom.py42 passed in 1.02s.PYTHONPATH=. .venv/bin/pytest -q tests/integration/test_data_rule_polars_execution.py --show-capture=no -o log_cli=false1 passed in 1.01s.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.127.0.0.1:15432.PostgresArtifactResolver, load the
published fixture through PostgresRulePlanRepository, execute through
RulePlanExecutor, normalize → lookup join → assert → deduplicate, register
and reread the output artifact.rules/<test-correlation-id>/ objects were removed. The test
asserted the exact prefix was empty afterward. Test-owned source tables and
canonical platform rows were also removed.PYTHONPATH=. .venv/bin/pytest -q
541 passed, 26 skipped, 59 subtests passed in 4.52s.docker compose -f deploy/docker/docker-compose.yml config --quiet
All checks passed!git diff --check
polars==1.42.1, minio==7.2.10..venv: Polars 1.42.1 and its matching polars-runtime-32==1.42.1.>=3.10; MIT license text.docs/security/data-rule-runtime-sbom.json with versions, licenses,
official sources, package URLs, and runtime purposes.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.pymigrations/versions/20260723_140_rule_run_artifacts.pydocs/security/data-rule-runtime-sbom.jsontests/test_data_rule_runtime_sbom.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.rules/<correlation>/ prefix.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.