%% Automatic test failure triage and response.
%% Hermes reads and recommends. Ariadne validates and performs every write.
%% Relationships carry the detail; node text stays concise.
%%{init: {"flowchart": {"defaultRenderer": "elk", "curve": "stepAfter", "nodeSpacing": 32, "rankSpacing": 48, "useMaxWidth": false}, "elk": {"mergeEdges": true, "nodePlacementStrategy": "LINEAR_SEGMENTS", "forceNodeModelOrder": true, "considerModelOrder": "NODES_AND_EDGES"}, "themeVariables": {"background": "#000000"}, "themeCSS": "& { background-color: #000000 !important; }"}}%%
flowchart TD
subgraph system["Hermes Test Failure Triage"]
direction TB
subgraph main_row["Main flow"]
direction TB
subgraph upper_flow["Evidence and analysis"]
direction LR
subgraph reference["Legend"]
direction TB
key_build["Blue
Build and validation"]:::build
key_evidence["Green
Evidence"]:::evidence
key_ariadne["Teal
Ariadne orchestration"]:::ariadne
key_hermes["Purple
Hermes"]:::hermes
key_policy["Gold
Policy and action"]:::policy
key_human["Red
Human required"]:::human
key_limit["Dashed gray
Current boundary"]:::limited
end
subgraph intake["Detect and gather"]
direction TB
detector["Jenkins detector
Allowlisted jobs
Terminal failures only"]:::ariadne
evidence_sources["Evidence sources
Jenkins and OpenSearch
Metrics, Kubernetes, Flux
Gitea and Grafana"]:::evidence
collector["Console reader
Full console
2 MB cap"]:::ariadne
failure_ranker["Failure ranker
Strong evidence first
Tool output alone is neutral"]:::ariadne
context_filter["Context filter
Passing quotes removed
Repeats and overlaps merged"]:::ariadne
bundle["Incident bundle
Failures, logs, metrics
Health, revisions, links"]:::evidence
detector --> evidence_sources
evidence_sources --> collector
collector --> failure_ranker
failure_ranker --> context_filter
context_filter --> bundle
end
subgraph hermes_plane["Hermes analysis"]
direction TB
hermes_access["Read-only access
Jenkins, metrics, Kubernetes
Flux, Gitea, Grafana
Investigation by incident ID"]:::hermes
model_gate["Model gate
openai-codex/gpt-5.6-terra
local gpt-oss:20b fallback"]:::model
skills["Triage skills
Jenkins evidence
Quality and cluster health
Flux and Git correlation"]:::skill
recommendation["Structured recommendation
Classification and confidence
Sourced facts
Action request or patch data"]:::hermes
tool_stream["Agent event stream
Evidence and tool calls"]:::audit
hermes_access --> skills
model_gate -.-> skills
skills --> recommendation
hermes_access -.-> tool_stream
end
end
subgraph lower_flow["Policy and response"]
direction LR
subgraph controls["Ariadne policy gates"]
direction TB
response_check["Response check
Schema, incident, sources
Confidence and action"]:::policy
repair_guard["Scoped repair guard
Classification and action
must match the owning job"]:::policy
marker_check["Transient marker check
DNS, connection, TLS
image pull, upstream 5xx
Disk full is excluded"]:::policy
authorizer["Action authorizer
Allowlist, evidence, confidence
One action, kill switch"]:::policy
response_check -->|scoped repair| repair_guard
repair_guard --> authorizer
response_check -->|transient claim| marker_check
marker_check -->|marker confirmed| authorizer
response_check -->|other result| authorizer
end
subgraph response["Ariadne response"]
direction LR
subgraph response_paths["Response paths"]
direction TB
route{"Policy result"}:::decision
subgraph immediate_paths["Action or escalation"]
direction LR
subgraph operational_path["Allowlisted action"]
direction TB
registry["Action registry"]:::policy
repair_fixture["Scoped ConfigMap repair
In-process patch
No pod created"]:::action
retry_infra["Transient retry
One Jenkins rebuild
No cluster write"]:::action
operational_result["Action result
One attempt
One validation build"]:::action
registry --> repair_fixture
registry --> retry_infra
repair_fixture --> operational_result
retry_infra --> operational_result
end
subgraph escalation_path["Human-required response"]
direction TB
human_required["Diagnosis and next checks
Incident stays human required"]:::human
gitea_issue["Ariadne opens an issue
Evidence and suggested fix"]:::human
human_required --> gitea_issue
end
end
route -->|authorized action| registry
route -->|human required| human_required
operational_result -->|action failed| human_required
end
subgraph code_path["Optional source proposal"]
direction TB
subgraph proposal_stage["Prepare and check"]
direction TB
duplicate_guard["Open proposal check
Existing repair branch"]:::policy
candidate_files["Candidate files
Path and line hints
Read failing test"]:::evidence
source_target["Patch target
Follow test imports
Tests remain read only"]:::policy
patch_proposal["Hermes patch data
Path, anchor, replacement
Reason"]:::hermes
patch_validator["Patch validator
Allowed path and branch
20 lines, 4 KB
Exact anchor"]:::policy
duplicate_guard --> candidate_files
candidate_files --> source_target
source_target --> patch_proposal
patch_proposal --> patch_validator
end
subgraph pr_stage["Deliver for review"]
direction TB
gitea_pr["Ariadne opens a pull request
hermes-repair branch
Ariadne holds the token"]:::git
branch_build["Branch validation
Configured repositories only"]:::limited
human_merge["Human review and merge
No automatic merge"]:::human
flux_delivery["Flux delivery
After human merge"]:::git
gitea_pr -.->|where configured| branch_build
branch_build --> human_merge
gitea_pr -->|otherwise| human_merge
human_merge --> flux_delivery
end
patch_validator -->|validated patch| gitea_pr
end
response_paths -.->|eligible source defect| code_path
end
subgraph outputs["Inspectable outputs"]
direction TB
output_entry["Ariadne records every outcome"]:::audit
audit_events["Audit events
Incident, diagnosis, action
Patch proposal and agent IDs"]:::audit
metrics_output["Triage metrics
VictoriaMetrics and Grafana"]:::metrics
alert_output["Narrow alerts
Failed repair
Escalation untouched for six hours"]:::metrics
issue_output["Gitea issue
Human-required incident
Written by Ariadne"]:::git
pr_output["Gitea pull request
Source proposal
Written by Ariadne"]:::git
output_entry --> audit_events
output_entry --> metrics_output
metrics_output --> alert_output
end
end
reference ~~~ intake
intake ==>|incident bundle| hermes_plane
controls ==>|policy result| response
response ==>|records and artifacts| outputs
upper_flow ==>|recommendation| lower_flow
end
end
classDef build fill:#16324f,stroke:#6cb6ff,color:#ffffff
classDef evidence fill:#173f2b,stroke:#61d095,color:#ffffff
classDef ariadne fill:#24414a,stroke:#69c5d1,color:#ffffff
classDef hermes fill:#3c3155,stroke:#c1a7ff,color:#ffffff
classDef skill fill:#42345b,stroke:#c1a7ff,color:#ffffff
classDef model fill:#342b4f,stroke:#a78bfa,color:#ffffff
classDef policy fill:#3d3525,stroke:#e4bd55,color:#ffffff
classDef decision fill:#47391c,stroke:#e4bd55,color:#ffffff,stroke-width:3px
classDef action fill:#4a3b16,stroke:#e4bd55,color:#ffffff
classDef human fill:#4a2428,stroke:#ff6b78,color:#ffffff
classDef git fill:#253f35,stroke:#78c89a,color:#ffffff
classDef metrics fill:#243750,stroke:#65a9e8,color:#ffffff
classDef audit fill:#353125,stroke:#d9b55b,color:#ffffff
classDef limited fill:#1f2227,stroke:#9ba4b1,color:#c4c9d1,stroke-width:2px,stroke-dasharray:8 6
style system fill:#030303,stroke:#6b7280,stroke-width:3px
style main_row fill:#050607,stroke:#6b7280,stroke-width:2px
style upper_flow fill:#050607,stroke:#61d095,stroke-width:2px
style lower_flow fill:#070605,stroke:#e4bd55,stroke-width:2px
style reference fill:#07090c,stroke:#9ba4b1,stroke-width:2px
style intake fill:#070d09,stroke:#61d095,stroke-width:2px
style hermes_plane fill:#0c0912,stroke:#c1a7ff,stroke-width:3px
style controls fill:#0d0b07,stroke:#e4bd55,stroke-width:2px
style response fill:#090806,stroke:#e4bd55,stroke-width:3px
style response_paths fill:#070707,stroke:#6b7280,stroke-width:1px
style immediate_paths fill:#080706,stroke:#8b8170,stroke-width:1px
style operational_path fill:#0d0b07,stroke:#e4bd55,stroke-width:2px
style escalation_path fill:#0d090a,stroke:#ff6b78,stroke-width:2px
style code_path fill:#0b090d,stroke:#c1a7ff,stroke-width:2px
style proposal_stage fill:#09080b,stroke:#9f86da,stroke-width:1px
style pr_stage fill:#07100a,stroke:#78c89a,stroke-width:1px
style outputs fill:#07100d,stroke:#78c89a,stroke-width:2px