Skip to content

fix(meta): preserve prior quarantine when critical check errors on full run (#680) - #686

Merged
kstonekuan merged 3 commits into
Hebbian-Robotics:mainfrom
shobhitagnihotri69:fix/680-errored-critical-check-quarantine
Oct 4, 2026
Merged

kstonekuan merged 3 commits into
Hebbian-Robotics:mainfrom
shobhitagnihotri69:fix/680-errored-critical-check-quarantine

Conversation

@shobhitagnihotri69

Copy link
Copy Markdown
Contributor

Resolves #680

Summary

On a full meta stage run, when a critical check encounters an infrastructure crash or error (run.result is None), the previous quarantine tags were inadvertently dropped from episodes_latest. This occurred because the quarantine carry-over block in src/hflow/app.py was only executed if Stage.META not in enabled_stages or if running a step subset (SelectedRegisteredSteps).

Per maintainer guidance in #680:

  • On a full meta run, carry over only the quarantined:<name> tags whose check ran in this invocation and errored (run.result is None).
  • Tags for checks no longer registered in the pipeline are dropped on full runs rather than preserved forever.
  • If a check produces a passing verdict (verdict=True), the quarantine is cleared as expected.

Changes

  • src/hflow/app.py:
    • Track errored_check_names = {run.check.name for run in report.checks if run.result is None}.
    • On full meta runs where checks errored, inspect QuarantineHistory and retain only quarantined:<name> tags where name in errored_check_names.
  • tests/test_run_profiles.py:
    • Added test_full_meta_run_preserves_quarantine_when_critical_check_crashes: verifies the quarantined -> crashed -> still quarantined cycle, ensures downstream stages are skipped with SkippedByQuarantine, and tests quarantine clearing upon a passing verdict.
    • Added test_full_meta_run_drops_quarantine_for_unregistered_checks: verifies that unregistered check quarantine tags are not retained indefinitely on full runs.

Verification

  • uv run ruff check & uv run ruff format --check passed cleanly.
  • Full test suite passed: 2,467 passed, 49 skipped.

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes quarantine preservation logic during check failures.

The PR appears safe to merge; no outstanding issue was found.

What we checked:

  • Superseded check keeps quarantine: No. A full run carries an old tag only when the check is critical and has an error status.
  • Non-critical check blocks work: No. The carry-over filter requires the current check to be critical, and the test confirms that its old tag clears.
Summary

Full meta runs now keep a prior quarantine only when its matching critical check errors, while passing or no-longer-active checks clear old tags. This keeps an infrastructure crash from letting downstream enrichment run under a quarantine that was already recorded.

  • Partial runs keep their existing quarantine carry-over behavior.
  • Tests cover crashes, passing checks, and tags for checks that are removed, superseded, or no longer critical.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Full meta run] --> B{Critical check errored?}
  B -- Yes --> C[Keep its prior quarantine tag]
  B -- No --> D[Do not carry its prior tag]
  C --> E[Save current quarantine state]
  D --> E
Loading

Reviews (3) · Last reviewed commit: "test(profiles): assert catalog_entry is ..."

Comment thread src/hflow/app.py Outdated
Comment thread src/hflow/app.py Outdated

@kstonekuan kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for covering the retired, non-critical, and superseded cases. Merging.

@kstonekuan
kstonekuan merged commit edff2cc into Hebbian-Robotics:main Oct 4, 2026
3 checks passed
@shobhitagnihotri69

Copy link
Copy Markdown
Contributor Author

Thanks for merging this one , looking forward to contribute more and more

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.

bug(meta): crashed critical check silently clears existing quarantine in episodes_latest on full meta runs

2 participants