Repository navigation
Fixes #37806: DQ: Historical run details display current tolerance instead of the tolerance used at execution - #37809
Conversation
…m it Selecting an older data-quality run showed the test case's *current* tolerance beside that run's stored verdict, so an edit to the threshold could make a historical result contradict itself: a run that passed with 3% failing rows under a 5% tolerance read "Success, 3% failed, threshold 1%" once the test case was tightened. The agent now records the tolerance it applied with the result it took the verdict under, and the card reads the run's snapshot rather than the test case: - `TestCaseResult`/`TestCaseDimensionResult` gain `appliedThreshold` (value and unit) plus `configuredMinBound`/`configuredMaxBound`, the window a statistical test asked for before the threshold widened it into the already-recorded `minBound`/`maxBound`. - The snapshot is taken in the validator, from the parameters the evaluator itself read -- not re-read on the server when the result arrives, where an intervening edit would be attributed to the run. An aborted run took no verdict and records none, and neither does a test whose `threshold` is not a tolerance (`tableCustomSQLQuery`, whose threshold is its expected result). - Every dimension of a run shares the run's threshold; the server copies it onto the dimension results it stores, as it already does the evaluation scope. - `getRunThresholdData()` reads the tolerance and the configured bound from the result. A run that recorded neither -- one from an agent that predates the snapshot -- shows its threshold as unavailable instead of claiming the current setting was applied. Co-Authored-By: Claude Opus 5 <[email protected]>
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
ShaileshParmar11
left a comment
There was a problem hiding this comment.
UI-side review only. The approach looks right: the card and getRunThresholdData read the tolerance and the configured bounds from the run rather than from the test case. The generated types match the schema, and the tests cover tightened and loosened edits, zero tolerance, and runs with no recorded threshold. Locally, testCaseThreshold.utils.test.ts (89 tests) and RunDetailsCard.threshold.test.tsx (13 tests) pass.
One issue to fix before I'd approve the UI side: whether a run shows a threshold section at all still follows the current matchEnum (inline comment). The other two comments are nits.
ShaileshParmar11
left a comment
There was a problem hiding this comment.
Approving the UI side at 2bac2fc. My inline comments are addressed: run applicability now comes from the run's own snapshot (applied) instead of the current matchEnum, ThresholdUnit re-exports the generated enum, and unknown values read "Unavailable" consistently. Checked locally: the threshold utils, RunDetailsCard threshold and configuration card suites pass (142 tests), and ESLint is clean on the changed sources. This approval covers only the UI files.
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsPersisting execution-time tolerances and bounds changes data-quality result records; errors could misstate why a historical run passed or failed. Historical DQ run details now read the tolerance and configured bounds recorded at execution time instead of the current test case setting, with a ✅ 1 closed✅ Quality: New appliedThreshold/configured-bound result contract has no decision record
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
* Seed the applied threshold on FailureThreshold's seeded runs Since #37809 the run details card reads the tolerance a run recorded (appliedThreshold) instead of the test case's current setting, and a run without that snapshot shows its threshold as "Unavailable". The spec seeded results with no snapshot, so the strict run read "Unavailable" instead of "No tolerance" and the relative run lost its percentage unit. Seed each run with the snapshot an agent would write: 0 ABSOLUTE for the strict test, 5 PERCENTAGE for the relative one. * Describe FailureThreshold's displayed threshold as the run's recorded one
What olivaw checked (machine-observed, §8.2/A.1)
d47d0c5f208bdb9ff6f8d73603b6747169b0e4ee9567f1e2e38e99cd72526e23e109c8419eb8ad05No build or test command is configured for this workspace, so only the diff's existence was checked. Set
run_config.build_cmd/test_cmdto have olivaw verify its own work.What the agent says it did (unverified)


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issues were found.Summary
Historical runs now keep the tolerance and bounds used during execution instead of showing today’s settings.
Reviews (5) · Last reviewed commit: "fix: persist bounds for table count vali..." · Reviewed by Greptile