Skip to content

Make IQ Scanner check #6 (data source count) configurable with safe-composition warning band - #225

Open
wscalioni wants to merge 1 commit into
databricks-solutions:mainfrom
wscalioni:feature/212-soft-cap-data-source-count
Open

wscalioni wants to merge 1 commit into
databricks-solutions:mainfrom
wscalioni:feature/212-soft-cap-data-source-count

Conversation

@wscalioni

Copy link
Copy Markdown

Resolves #212. Sub-task of Epic #199.

Replaces the hard binary "1-12" data-source gate in IQ Scanner check #6 with three env-var-driven thresholds:

  • GSO_MAX_SAFE_DATA_SOURCES (default 12) — the soft cap
  • GSO_MAX_WIDE_TABLE_COLUMNS (default 60) — what counts as a wide raw table
  • GSO_MIN_METRIC_VIEW_RATIO (default 0.5) — qualifier for the warning band

Defaults reproduce the original behaviour exactly. Above the cap, a space qualifies for severity="warning" (passed=True) when its composition is safe (metric-view ratio at-or-above min, zero wide raw tables); otherwise it stays at severity="fail" (passed=False) as before.

get_maturity_label() gates on passed, not severity, so the warning band correctly unblocks Ready-to-Optimize / Trusted tiers without weakening the ranking. The advisory text lands in warnings / warning_next_steps (not findings), so Quick Fix stays quiet for safe over-cap spaces.

Same warning-band pattern is already used by check #9 (entity matching).

The check label is renamed from "Data source count 1-12" to "Data source count" since the range is now configurable; historical scans persist the original label string so the history view is unaffected.

Testing

  • 7 new unit-test cases in TestDataSourceCountSoftCap (warning-band pass, wide-table fail, low-ratio fail, env-var raise/lower of all three knobs, maturity-unblock proof via get_maturity_label directly)
  • All 87 backend/tests/test_scanner.py tests pass
  • All 6 backend/tests/test_scanner_parity.py tests pass
  • 437 passes / 0 failures across all scan/scor/check_6/data_source tests

…igurable with safe-composition warning band

Resolves databricks-solutions#212. Sub-task of Epic databricks-solutions#199.

Replaces the hard binary "1-12" gate with three env-var-driven thresholds:
- GSO_MAX_SAFE_DATA_SOURCES (default 12) — the soft cap
- GSO_MAX_WIDE_TABLE_COLUMNS (default 60) — what counts as a wide raw table
- GSO_MIN_METRIC_VIEW_RATIO (default 0.5) — qualifier for the warning band

Defaults reproduce the original behaviour exactly. Above the cap, a space
qualifies for severity="warning" (passed=True) when its composition is safe
(metric-view ratio at-or-above min, zero wide raw tables); otherwise it stays
at severity="fail" (passed=False) as before.

get_maturity_label() gates on `passed`, not `severity`, so the warning band
correctly unblocks Ready-to-Optimize / Trusted tiers without weakening the
ranking. The advisory text lands in `warnings` / `warning_next_steps` (not
`findings`), so Quick Fix stays quiet for safe over-cap spaces.

Same warning-band pattern is already used by check databricks-solutions#9 (entity matching).

The check label is renamed from "Data source count 1-12" to "Data source
count" since the range is now configurable; historical scans persist the
original label string so the history view is unaffected.

Tested:
- 7 new unit-test cases in TestDataSourceCountSoftCap (warning-band pass,
  wide-table fail, low-ratio fail, env-var raise/lower of all three knobs,
  maturity-unblock proof via get_maturity_label directly)
- All 87 backend/tests/test_scanner.py tests pass
- All 6 backend/tests/test_scanner_parity.py tests pass
- 437 passes / 0 failures across all scan/scor/check_6/data_source tests

Filed by Will Scalioni (Databricks SA) using personal github wscalioni
because EMU accounts cannot write to external public repos.

Co-authored-by: Isaac

This branch has not been deployed

No deployments
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.

Soft-cap check #6 (data source count) when other safety signals indicate well-modelled spaces

1 participant