From bd6c0678d87cb0e0865a79b696afd7b2b9055e1b Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 7 Aug 2026 01:44:03 -0300 Subject: [PATCH] feat(demo): provoke the triage tick instead of waiting a minute for it Both demos went quiet for up to a minute between the build turning red and the monitor reacting, because Ariadne's tick is on cron. The scripts now run that tick immediately over the pod's own loopback - nothing exposed outside the cluster - and print what it saw, so the pause becomes a visible step rather than dead air. Falls back to silence rather than failure: if the request does not land the scheduler still picks the build up within the minute, which is exactly the old behaviour. Co-Authored-By: Claude Opus 5 --- scripts/ops/hermes_code_demo.sh | 4 ++++ scripts/ops/hermes_demo_lib.sh | 18 ++++++++++++++++++ scripts/ops/hermes_triage_demo.sh | 4 ++++ 3 files changed, 26 insertions(+) diff --git a/scripts/ops/hermes_code_demo.sh b/scripts/ops/hermes_code_demo.sh index d5131e8f3..7638ce52c 100755 --- a/scripts/ops/hermes_code_demo.sh +++ b/scripts/ops/hermes_code_demo.sh @@ -175,6 +175,10 @@ PY note "HTTP $(jenkins_post "/job/$CODE_JOB/build")" note "result: $(wait_for_build "$CODE_JOB" "$next_num")" + say "Asking Ariadne to look now rather than on its next minute" + note "\$ POST /api/internal/hermes/autotriage/run" + note "$(poke_ariadne)" + say "Ariadne collects evidence and asks Hermes for a minimal patch" note "Hermes returns an anchored patch as data; Ariadne validates path, size," note "changed lines, and that the anchor is unique, then pushes hermes-repair/$next_num" diff --git a/scripts/ops/hermes_demo_lib.sh b/scripts/ops/hermes_demo_lib.sh index 468a3dfde..fa664cab4 100644 --- a/scripts/ops/hermes_demo_lib.sh +++ b/scripts/ops/hermes_demo_lib.sh @@ -92,6 +92,24 @@ wait_for_build() { # job number [max_seconds] -> prints result printf 'TIMEOUT' } +# Ariadne's triage tick is on cron, which cannot fire more often than once a +# minute. That minute is the largest gap between a build going red and the +# system visibly reacting, and it is pure dead air on stage. This runs the same +# tick immediately over the pod's own loopback, so nothing is exposed outside +# the cluster. The tick is idempotent - incidents dedupe on job and build +# number - so provoking it can only ever be a no-op, never a second incident. +poke_ariadne() { + kubectl -n maintenance exec deploy/ariadne -c ariadne -- python3 -c " +import json, urllib.request +req = urllib.request.Request( + 'http://127.0.0.1:8080/api/internal/hermes/autotriage/run', method='POST') +body = json.load(urllib.request.urlopen(req, timeout=120)) +jobs = body.get('jobs') or {} +print(body.get('status', 'ok'), '|', ', '.join( + f\"{name}={info.get('status')}\" for name, info in jobs.items()) or 'no jobs') +" 2>/dev/null || echo "tick request failed; the scheduler will pick it up within a minute" +} + ariadne_ticks() { # tail the autotriage decisions in human-readable form kubectl -n maintenance logs deploy/ariadne -c ariadne --tail="${1:-400}" 2>/dev/null | grep 'hermes autotriage tick' | diff --git a/scripts/ops/hermes_triage_demo.sh b/scripts/ops/hermes_triage_demo.sh index a9e9341d8..5181b942e 100755 --- a/scripts/ops/hermes_triage_demo.sh +++ b/scripts/ops/hermes_triage_demo.sh @@ -68,6 +68,10 @@ cmd_run() { say "Waiting for the seeded build to fail" note "result: $(wait_for_build "$FIXTURE_JOB" "$next_num")" + say "Asking Ariadne to look now rather than on its next minute" + note "\$ POST /api/internal/hermes/autotriage/run" + note "$(poke_ariadne)" + say "Ariadne detects, gathers evidence, asks Hermes, authorizes, repairs" note "the repair is a single in-process ConfigMap patch, so watch the fixture" for _ in $(seq 1 40); do