How badaadata/semantic-risk-engine-action works
Semantic Risk Engine is a GitHub Action client for detecting semantic risk in dbt SQL changes; the analysis engine itself is a hosted service, not part of this repository. The principal workflow compares compiled SQL for changed models, sends qualifying changes to the HTTPS API, then formats the verdict and posts or updates a pull-request comment. The README also documents critical-model prioritization, downstream impact, and shadow-mode failure handling. The action wiring and some runtime steps are documented but not sampled, so those links cite the README; internal analysis details are intentionally represented as an external service.
Main entry points: post_comment.py Comment formatter · action.yml Action entry · build_payload.py Payload builder · call_api.py API client
Components 12
PR entry
- Action entry
action.yml
Change preparation
- dbt compile
- Compiled SQL
- Payload builder
scripts/build_payload.py - Analysis payload
Risk analysis
- Hosted risk engine
- API client
scripts/call_api.py - Analysis response
PR reporting
- Comment formatter
scripts/post_comment.py - dbt manifest
- GitHub PR comments
Other components
- Pull request
Connections 12
- Pull request → Action entry: triggers
README.md - Action entry → dbt compile: uses compiled output
README.md - dbt compile → Compiled SQL: produces
README.md - Compiled SQL → Payload builder: reads SQL
scripts/build_payload.py - Payload builder → Analysis payload: builds
scripts/build_payload.py - Analysis payload → API client: posts payload
README.md - API client → Hosted risk engine: sends HTTPS request
scripts/call_api.py - Hosted risk engine → Analysis response: returns analysis
README.md - Analysis response → Comment formatter: formats response
scripts/post_comment.py - dbt manifest → Comment formatter: provides model metadata
scripts/post_comment.py - Comment formatter → GitHub PR comments: posts comment
scripts/post_comment.py - GitHub PR comments → Pull request: shows verdict
README.md