273 Commits

Author SHA1 Message Date
codex
b2fcad4116 refactor(hermes-triage): repair the fixture in-process, not via a spawned Job
The repair action no longer creates a Kubernetes Job and polls it. Ariadne
patches the fixture ConfigMap directly through its own k8s client, which
removes roughly 40 seconds of pod scheduling from the loop, drops the two
failure modes that Job introduced (volume attach and node selection), and
turns an opaque pod log into an Ariadne event.

- execute_repair returns {action, target, succeeded, error} and issues one
  merge patch; no Job, no polling, no injectable clock, never raises
- the patch writes the same terminal value every time, so idempotency needs
  no duplicate guard; one action per incident is still enforced upstream
- orchestrator records {repair, target}; the state machine, rebuild trigger
  and failure path are unchanged
- retires the unused repair-image setting

Ariadne's service account now needs get+patch on that one ConfigMap by name
instead of Job create; the batch/jobs grant and the hermes-demo-repair
service account can be retired.

480 pass in the hermes suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 22:29:57 -03:00
codex
950d014707 feat(hermes-triage): real services get both an issue and a patch proposal
The code path was gated on a single job id, so homegrown services could
never produce a pull request. Escalated incidents on mapped repositories
now additionally attempt a bounded patch proposal, and the filed issue
links it.

- hermes_code_flow.propose_for_incident: additive entry point invoked only
  from the escalation branch, so an auto-remediated failure never also
  gets a patch and a failed Hermes run never spends tokens on one
- three gates before any HTTP call: code enabled, not the legacy demo job,
  and the job has a repo mapping; unmapped jobs make zero calls
- never raises: a failed proposal cannot change the incident outcome or
  break the tick
- issue body links the proposal when a pull request was opened
- propose_code_fix added to the bounded action-label set

The legacy demo-job short-circuit is untouched and all of its tests pass
unchanged.

8 new tests; 480 pass in the hermes suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 21:29:54 -03:00
codex
6da560810f feat(hermes-triage): Gitea issues for escalations, patch proposals for real repos
Two capabilities that make triage useful outside the demo surface.

Issues: when triage concludes a human is needed, file an issue in the
failing service's own repository carrying classification, confidence, the
facts with their sources, the inferences and a Jenkins link, plus a footer
stating Hermes has no write access and nothing was changed. Opt-in per job
via a repo map, deduplicated by job+classification so a repeatedly failing
job yields one issue per kind of failure rather than one per build, and
capped per tick. Disabled by default.

Real-repo patches: candidate files are selected from the console failure
regions (Python, Rust and JS/TS reference patterns), filtered to each
repo's allowed prefixes and suffixes, ranked earliest-failure-first with
source preferred over test files, and fetched whole - never truncated,
because a patch anchor must match exactly. Per-job owner/repo/base-branch
resolution; the patch is validated against the file the model actually
chose, and an unlisted path is rejected.

Legacy single-repo demo behaviour is preserved unchanged.

131 new tests; 472 pass in the hermes suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 21:04:32 -03:00
codex
8c65b7bd60 feat(hermes-triage): retry_transient_infra action for connectivity failures
Second entry in the action registry, proving it is a real extension point.
No cluster mutation: the action is one Jenkins rebuild.

- hermes_infra_signals: reviewable marker set across DNS/connectivity,
  image pull, upstream 5xx and agent-channel loss; Ariadne independently
  confirms a marker in the evidence before any retry, and records which
  marker justified it. "no space left on device" is deliberately excluded
  because a retry lands on the same full volume.
- decision: classification -> action registry (action_classifications),
  falling back to the previous single-classification behavior
- repair: retry_build posts to /build for unparameterized real jobs and
  buildWithParameters for the fixture demo job
- orchestrator: retry path records requested/accepted/executed and moves
  the incident to awaiting_rebuild so the existing success path resolves
  it; one action per incident still enforced, so a retry cannot loop
- events layer split out of the orchestrator to stay under the LOC cap

Motivated by real failures tonight: pip DNS resolution and a Gitea 443
connect timeout, plus live incident metis/271 (SCM checkout timeout).

30 new tests; 368 pass in the hermes suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 20:42:48 -03:00
codex
d401cf56a2 feat(hermes-triage): failure-region console evidence + duplicate-proposal guard
Real-service triage returned "undetermined" because the console tail held
only post-build noise; this Jenkins has no junit or stage-view plugin, so
console text is the only structured evidence available.

- hermes_console_evidence: scan the full console for failure markers
  (pytest, build, tool gates, k8s/agent), capture context windows, merge
  overlaps, collapse repeats, and prefer the earliest regions under a byte
  budget; bundle gains jenkins.console_failures and console_truncated
- evidence: fetch the full console (head + tail bounded at 2MB) instead of
  the last 8KB; signature detection now also scans regions
- prompt: one line explaining that the earliest region usually holds the
  first enforced failure
- code flow: check for an already-open hermes-repair/* pull request before
  spending model tokens; fail open so a Gitea error cannot suppress work

Verified on a synthetic 4018-line pipeline: the real failure at line 7 is
now captured where the previous tail-only slice missed it entirely.

95 new tests; 281 pass in the hermes suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 20:16:49 -03:00
codex
2cb5d50fa8 feat(hermes-code): bounded source-patch proposal path
Hermes proposes a minimal anchored patch; Ariadne validates it structurally
and opens a pull request for human review. Nothing merges automatically and
Hermes never holds Git credentials or executes anything.

- hermes_code_patch: response parsing + patch validation (path prefix/suffix
  allowlist, size and changed-line caps, exact-single-occurrence anchor,
  replacement-differs) and exact application
- hermes_code_repair: Gitea contents-API client (fetch, branch push with
  hermes-repair/<build> prefix and base-branch refusal, PR creation)
- hermes_code_flow: proposal orchestration + audit event, no patch bodies
  or tokens recorded
- hermes_autotriage: code-path branch for the configured repo job; a PR
  records human_required/code_fix_proposed, never auto-resolution, and is
  kept out of the fixture-action accounting
- settings: ARIADNE_HERMES_CODE_* configuration, disabled by default

74 new tests; 214 pass in the hermes suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 19:18:26 -03:00
codex
e89de924c0 feat(hermes-autotriage): restart-safe incident gauge rehydration
Gauges are process-local, so a pod restart could silently drop an active
human_required signal before the vmalert hold window elapsed. Metrics move
to hermes_autotriage_metrics; every tick republishes gauges from stored
incident state, and an incident superseded by a newer successful build is
zeroed so the alert clears once the job is green again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 18:06:17 -03:00
codex
1cbed3f6a5 refactor(hermes-autotriage): repair via ConfigMap patch, not PVC write
Longhorn RWO attach latency and per-node engine availability made the
PVC fixture unreliable for a fast repeatable demo. The fixture is now a
ConfigMap; the repair Job runs bitnami/kubectl under the least-privilege
hermes-demo-repair SA and patches state=healthy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 17:42:00 -03:00
codex
8314bd1843 fix(hermes-autotriage): pin repair Job to Longhorn-ready worker nodes
Non-worker nodes (titan-2x lane) are not Longhorn-ready; volume attach
fails there. Same constraint as the demo test-runner.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 17:17:52 -03:00
codex
c8d9ab2015 feat(hermes-autotriage): closed-loop demo triage via Hermes Agent API
Adds the automated failure-to-repair loop for the hermes-triage-demo
Jenkins job:

- hermes_autotriage_logs: bounded kube-* OpenSearch evidence (fixed query,
  incident-ID correlation with window fallback, sanitization, byte caps)
- hermes_agent_client: async /v1/runs client (bearer auth, poll, auto-deny
  approvals, lost-run and timeout handling)
- hermes_autotriage_decision: frozen response schema parser + nine-gate
  action authorization (allowlist, confidence, idempotency, kill switch)
- hermes_autotriage_evidence: Jenkins wfapi/testReport/console bundle
  assembly + failure-signature detection
- hermes_autotriage_repair: hardcoded repair Job executor + one rebuild
  with SEED_FAILURE=false
- hermes_autotriage: orchestrator state machine (detected -> diagnosed ->
  repairing -> awaiting_rebuild -> resolved | human_required | failed),
  bounded-label triage metrics, incident dedupe via storage events
- settings/app: ARIADNE_HERMES_* config (default off) + 1m schedule task

126 new tests; all quality gates pass locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 17:06:16 -03:00
codex
3b45e57625 test(triage): cover malformed metric values 2026-08-03 04:09:17 -03:00
codex
c8daa610cf fix(triage): report actionable incidents only 2026-08-03 03:58:05 -03:00
codex
9d90700d54 feat(triage): include retained Jenkins evidence 2026-08-02 17:44:50 -03:00
codex
51e198ee79 test(game-mode): cover Ollama handoff client 2026-08-01 22:35:59 -03:00
codex
e96614ef9b feat(game-mode): hand off titan-24 inference safely 2026-08-01 22:31:39 -03:00
0f13066275 Update README.md 2026-06-19 21:27:06 +00:00
codex
22a93abda8 docs: note ariadne bring-up dependencies 2026-06-19 17:53:25 -03:00
e67c057a52 Update README.md 2026-06-19 20:43:38 +00:00
codex
02858ccafa docs: add concise ariadne README 2026-06-19 15:54:59 -03:00
codex
c22579b74c game-stream: allow portal admin access 2026-05-22 02:19:16 -03:00
codex
bae07675cf quality(game-stream): split Wolf route registration 2026-05-21 16:40:00 -03:00
codex
df1af03791 test(game-stream): cover Wolf route edges 2026-05-21 16:23:26 -03:00
codex
c927d38f75 game-stream: add Wolf portal APIs 2026-05-21 15:53:17 -03:00
codex
0bbcdfb7a7 auth: allow Wolf OIDC audience 2026-05-21 06:59:32 -03:00
codex
a1e197b4e3 game-mode: report scaled-to-zero workload active 2026-05-21 05:59:40 -03:00
codex
4392df8d0c game-stream: add Wolf control dashboard 2026-05-21 05:40:15 -03:00
codex
dc0fccbbc6 game-stream: align Ariadne Wolf support with current app 2026-05-21 02:29:20 -03:00
codex
2687ac441e game-stream: add Wolf orchestration groundwork 2026-05-21 02:04:19 -03:00
codex
76499d46e3 style(ariadne): document testing triage scope helpers 2026-05-20 06:16:23 -03:00
codex
f86f591db2 triage: split testing scope helpers 2026-05-20 06:06:07 -03:00
codex
e04bb57c26 test(ariadne): align triage scope fixtures 2026-05-20 05:57:47 -03:00
codex
e83ffca7c6 triage: limit testing evidence to active suite scope 2026-05-20 05:51:23 -03:00
codex
8c95a1be4f ci(ariadne): retry image publish 2026-05-20 05:28:18 -03:00
codex
a511bb8119 triage: satisfy diagnosis lint gate 2026-05-20 05:11:08 -03:00
codex
ac91e16f16 triage: sanitize local model diagnoses 2026-05-20 04:57:58 -03:00
codex
d8fea14e51 triage: constrain local diagnosis schema 2026-05-20 04:04:54 -03:00
codex
ef29eb1b8f test(ariadne): cover triage diagnosis edge cases 2026-05-20 03:39:09 -03:00
codex
f42a147391 triage: document model diagnosis toggle 2026-05-20 03:34:07 -03:00
codex
594f106146 triage: split local diagnosis module 2026-05-20 03:24:27 -03:00
codex
9e6dd16cb0 triage: add local model diagnosis 2026-05-20 03:13:53 -03:00
codex
42acfcc436 fix(ariadne): hydrate schedule success history 2026-05-20 02:59:09 -03:00
codex
69d543b963 ci(ariadne): initialize refreshed sonar analysis id 2026-05-20 02:32:29 -03:00
codex
82780651f7 ci(ariadne): wait for refreshed sonar gate 2026-05-20 02:31:01 -03:00
codex
38327e36e6 fix(ariadne): avoid insecure triage URL literal 2026-05-20 02:12:30 -03:00
codex
a3b4b303b9 ci: scope ariadne sonar to app sources 2026-05-20 01:21:51 -03:00
codex
4fbb1fa23d ci: refresh sonarqube after coverage xml 2026-05-20 01:10:02 -03:00
codex
38a5e924fe test: cover ariadne triage evidence helpers 2026-05-20 00:54:31 -03:00
codex
69a5baa955 ci: allow ariadne image builds on jetson lane 2026-05-20 00:28:59 -03:00
codex
92c83f831c ci: keep ariadne image builds on rpi5 2026-05-20 00:26:56 -03:00
codex
40ab2b6081 ci: retrigger ariadne image build 2026-05-20 00:23:08 -03:00