Skip to content

Consolidate RailsManager to use RailOutcome #2281

Description

@tgasser-nv

I can see that IORails does need a manager-level envelope for the triggering rail and accumulated execution records, but it does not need another verdict representation. a cleaner shape would be:

  @dataclass(frozen=True)
  class RailResult:
      outcome: RailOutcome
      triggered_rail: str | None = None
      records: tuple[RailCallRecord, ...] = ()

      @property
      def is_safe(self) -> bool:
          return not self.outcome.is_blocked

then RailOutcome remains the source of truth.

Originally posted by @Pouyanpi in #2261 (comment)

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions