Skip to content

fix: validate on_low_score trust-gate policies - #350

Open
1cbyc wants to merge 1 commit into
FreshCode-Org:mainfrom
1cbyc:1cbyc/345-validate-low-score-policy
Open

1cbyc wants to merge 1 commit into
FreshCode-Org:mainfrom
1cbyc:1cbyc/345-validate-low-score-policy

Conversation

@1cbyc

@1cbyc 1cbyc commented Sep 14, 2026

Copy link
Copy Markdown

Closes #345

on_low_score is a typed literal, but values loaded from configuration bypass static checks. A typo could silently skip both failure and skip handling.

This validates the policy before gating and at Airflow, Dagster, and dbt configuration boundaries, with focused regression coverage and an Unreleased changelog entry.

Validation:

  • PYTHONPATH=src python -m pytest --no-cov -q tests/test_integrations/test_core.py tests/test_integrations/test_airflow.py tests/test_integrations/test_dagster.py tests/test_integrations/test_dbt.py (34 passed)
  • ruff check src/freshdata/integrations tests/test_integrations
  • mypy src/freshdata/integrations

Reject invalid on_low_score values at integration boundaries so configuration typos cannot silently bypass failure handling.

Co-authored-by: insisong <emmanuelisaacnsisong@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: fbef3fb5-d594-4e90-997b-fb2465d091b7


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

evaluate_trust_gate accepts any on_low_score; a typo silently downgrades 'fail' to warn

1 participant