Skip to content

Parallel detectors with highest-severity short-circuit #59

Description

@susheem-k

Summary

Detectors currently run sequentially; all signals are collected, then sorted by severity (TRIP > WARN > OK) and enforced in order. Slow detectors block higher-severity outcomes unnecessarily.

Area: Governor.pre_call / observe / _enforce

Desired behavior

  • Run detectors in parallel (thread/async pool as appropriate).
  • First highest-severity outcome can cancel/ignore the rest (short-circuit): e.g. any TRIP wins and remaining detector work is aborted when practical.
  • Preserve deterministic tie-break (policy priority / name order) when severities equal.
  • Keep unit tests deterministic (fake executor or ordered barrier in tests).

Acceptance sketch

  • Semantics documented; TRIP from one detector does not wait on slow detectors unnecessarily.
  • No flaky tests from scheduling.

Reference: docs/notes/2026-07-23-design-fix-notes.md §16

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions