rules

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rules holds the deterministic checks that mcp-reliability runs over a loaded trace. Every rule cites the normative text it enforces. A rule must never report a violation where the cited standard does not require the behavior; "SHOULD" level text produces WARN, "MUST"/"Required" produces FAIL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Rule     string
	Severity Severity
	Message  string
	Spans    []string // span ids that are the evidence
	Ref      string   // URL of the normative text
}

Finding is one detected problem with evidence pointing at concrete spans.

func Run

func Run(spans []trace.Span) []Finding

Run executes all rules and returns findings sorted by severity (highest first).

type Severity

type Severity int

Severity of a finding.

const (
	Info Severity = iota
	Warn
	Fail
)

func (Severity) String

func (s Severity) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL