agentsclimarketplace

Maddy validation debugger

Skill omonuj/claude-horizon-skills/skills/maddy-delivery-split-brain/maddy-validation-debugger

Claude Code Agent Skills for building, red-teaming and tuning agentic RL evaluation environments — a four-skill pattern (guardian, validation-debugger, score-tuner, iteration-loop) plus a 24-point adversarial reviewer.

Install
npx -y skills add omonuj/claude-horizon-skills --skill maddy-validation-debugger

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

3 things to look at

  • 16 days oldThe repository was created 16 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Fetches and interprets validation logs (No-Op and Oracle) for the maddy-delivery-split-brain task (<TASK_ID>). Maps observed log patterns to root causes and the smallest safe fix. Use after a validation fails to understand why it failed before editing anything.

SKILL.md

13.1 KB, ~3.4k tokens by cl100k_base, as published. Nobody here has run it

maddy-validation-debugger

Execution Mode — FULLY AUTONOMOUS

NEVER ask the user for confirmation. Fetch logs, interpret results, propose and apply fixes immediately. The only user-facing handoff in the loop is triggering rollouts in the Horizon UI (owned by maddy-iteration-loop). This skill never has user-facing handoffs.

Goal

Turn an Oracle or No-Op failure into a specific root cause with a specific fix, using only the log evidence — not guesswork. If you cannot map the observed log pattern to one of the rows below with confidence, escalate to horizon-agentic-reviewer for a live probe before changing any file.

Trigger

Use this skill when:

  • Oracle returned anything other than score: 1.0, passed: true
  • No-Op returned a score > 0 (false positive — grader passed on a broken setup)
  • The grader crashed with a Python exception
  • result.json shows feedback: null (container/setup crash before grader ran)
  • You are about to edit setup.sh, solution.sh, or grader.py in response to a validation failure

Do not use this skill for rollout failures (use maddy-score-tuner). Oracle/No-Op are validation; rollouts are evaluation.

Task Identity

FieldValue
Task UUID<TASK_ID>
Task slugmaddy-delivery-split-brain
Local pathtasks/maddy-delivery-split-brain/
Subscoresdelivery_consistency (0.5) + observability_governance (0.5), both binary
Horizon root/Users/mac/Documents/tasks
Venvsource /Users/mac/Documents/tasks/horizon_env/bin/activate

How to read a validation result (read once, internalise)

Oracle runs setup.sh → solution.sh → grader.py. No-Op runs setup.sh → grader.py (no solution). The four result shapes:

scorepassedfeedbackMeaningWhere to look
0falsenullContainer/setup crashed before grader ranoutput.txt for the crash trace
0falsenon-nullGrader ran end-to-end, both subscores failedgrader feedback for the specific check that fired
0.5falsenon-nullOne subscore passed, the other failedfeedback names which is 1 vs 0
1.0truenon-nullBoth passednothing to debug

For No-Op, anything other than score: 0 is a problem — the grader should never pass without solution.sh having run.

The grader feedback string is delivery_consistency: <detail>; observability_governance: <detail> — read both halves; each names the exact layer that fired.


Step 1 — Fetch the logs

cd /Users/mac/Documents/tasks && source horizon_env/bin/activate
horizon tasks validate-logs -a oracle tasks/maddy-delivery-split-brain 2>&1
# No-Op only when iteration-loop says to run it:
horizon tasks validate-logs -a noop tasks/maddy-delivery-split-brain 2>&1

Logs persist under tasks/maddy-delivery-split-brain/.validation/<build_id>/{output.txt,result.json}.

Step 2 — Read result.json first

cat tasks/maddy-delivery-split-brain/.validation/*/result.json 2>/dev/null | python3 -m json.tool

The four-row table tells you which branch to follow. Do not skip to output.txt without checking result.json first.

Step 3 — Map symptom → cause → fix

Branch A. feedback: null / score: 0 — setup crash

Pattern in output.txtRoot causeFix
k3s is not ready after 180 secondsENABLE_ISTIO_BLEATER=true in DockerfileRemove it entirely
Error from server (Forbidden) on kubectl get nodesdata/ubuntu-user-rbac.yaml not copied / wrong pathRestore the COPY data/ubuntu-user-rbac.yaml ... line
Setup hangs at Waiting for bleater-env namespacebleater-env namespace never appears in this imageThe base image must provision bleater-env; if it doesn't, gate the ENV_RECONCILER block on a bounded wait + `
failed to pull image for a drift/maddy podA pod references an external registryUse ${SIDECAR_IMAGE} (derived from a live bleater deployment); cluster is air-gapped
setup.sh: line N: syntax errorBash errorbash -n setup.sh, fix that line
Setup stalls to hosted timeout with no errora kubectl rollout status / kubectl wait hangingConfirm ENABLE_ISTIO_BLEATER absent; add --timeout= to any unbounded wait

NOTE: setup.sh waits for bleater-env with until kubectl get namespace bleater-env ...; do sleep 2; done (no timeout). If the base image does not create bleater-env, this is an infinite hang → setup-timeout crash. Verify the namespace exists on the live container (Step 4b of guardian). If it doesn't, that loop needs a bound.

Branch B. No-Op returned score > 0 — false positive

Subscore that passed on No-OpWhy it shouldn't haveFix
delivery_consistency = 1 on No-OpThe split-brain didn't form — maddy-legacy didn't deploy, OR no app=maddy pod mounts maddy-config-legacykubectl get deploy maddy-legacy -n bleater (must exist, replicas≥1) and confirm its pod template mounts maddy-config-legacy
observability_governance = 1 on No-OpDrift controllers didn't deploy, OR the GitOps source isn't stale, OR the per-pod-rule check is too laxConfirm all three drift deployments exist (kube-system/bleater-env/bleater-canary), maddy-gitops-source says replicas: 1/mode: direct, and the maddy template has NO POD_NAME env at setup time

If setup claims it deployed everything but the cluster is missing pieces, add set -ex to setup.sh temporarily, push, re-run No-Op for a verbose trace. The fault-injection section can fail silently on || true paths.

Branch C. Oracle score: 0.5delivery_consistency failed (governance passed)

solution.sh stopped the drift and fixed observability, but the converged-delivery state didn't hold. The feedback string names the layer:

Feedback fragmentRoot causeFix in solution.sh
pod ... still mounts legacy config maddy-config-legacyA drift controller re-created the legacy replica during the windowsolution.sh must stop all three drift sources BEFORE deleting maddy-legacy. Confirm it discovers + deletes: kube-system reconciler (annotation), bleater-env reconciler (annotation), canary config-pinner. A missed source re-spawns the legacy pod.
legacy Deployment maddy-legacy still runningmaddy-legacy not deleted, or re-created by driftkubectl delete deployment maddy-legacy -n bleater AFTER stopping drift
maddy rollout not converged (spec=.., updated=.., ready=..)maddy not scaled to 2, or pods not Ready in timeScale maddy to 2 and kubectl rollout status deployment/maddy -n bleater --timeout=180s before the grader probes
only N ready maddy pods on the smarthost configFewer than 2 Ready pods mount maddy-configEnsure the converged maddy Deployment mounts maddy-config and reaches 2 Ready
maddy-config is not the smarthost relay configThe smarthost ConfigMap got clobberedDo not edit maddy-config; it should already be smarthost. If a drift source rewrites it, that's a setup bug

Branch D. Oracle score: 0.5observability_governance failed (consistency passed)

Feedback fragmentRoot causeFix in solution.sh
maddy container does not expose pod identity via the downward APINo POD_NAME env with fieldRef metadata.name on the converged maddy DeploymentAdd env: [{name: POD_NAME, valueFrom: {fieldRef: {fieldPath: metadata.name}}}] to the maddy container
maddy-gitops-source still declares direct-delivery routing / does not declare replicas: 2GitOps ConfigMap not reconciledkubectl apply the maddy-gitops-source CM with values.yaml containing replicas: 2 and relay.mode: smarthost
no per-pod maddy delivery/divergence rule foundThe rule ConfigMap is missing OR lacks a real PromQL by (pod) expressionCreate a ConfigMap whose data has a - record:/- alert:/expr: rule that mentions maddy, a signal word (rate/success/delivery/divergence), AND a per-pod dimension by (pod). Bare keywords in comments do NOT pass.
active drift would re-introduce the skew: <name>@kube-systemkube-system reconciler still has replicas>0Discover by annotation bleater.io/purpose=maddy rollout convergence, delete/scale to 0
active drift in bleater-env ...@bleater-envbleater-env reconciler still running — OR agent could not reach bleater-envIf solution.sh can't even get -n bleater-env, this is the ALLOWED_NAMESPACES structural risk → fix Dockerfile (guardian Step 0), not solution.sh
<canary> mutation capability not fully neutralizedconfig-pinner sidecar AND <canary>-runtime RBAC both still presentDelete the canary Deployment OR remove the -runtime SA/Role/RoleBinding (either suffices)

Branch E. Oracle score: 0 with non-null feedback — both subscores failed

Both ran and failed cleanly. Read each half of the feedback independently and follow Branch C for delivery_consistency and Branch D for observability_governance in parallel. If Oracle stays 0 after fixing what feedback says, re-run No-Op to isolate a setup-side contamination.

Branch F. Grader crashed with a Python exception

grep -A 5 "Traceback\|Exception\|Error" /tmp/oracle_log.txt | head -40
ExceptionLikely causeFix in grader.py
json.JSONDecodeErrorkubectl ... -o json returned empty/non-JSONAlready guarded by kubectl_json; if a raw run_kubectl path crept in, wrap it
KeyErrorassumed a dict key present in all cluster statesUse .get(key, default)
subprocess.TimeoutExpireda kubectl call hungrun_kubectl has a finite timeout; check no unbounded shell pipeline was added
FileNotFoundError /opt/grader-scenario.jsonscenario file not written by setup<grader-check-fn> already falls back to defaults — if it's crashing, the try/except was removed; restore it

These are grader bugs — fix in place; they are not in the hard-constraint list.


Step 4 — Pre-fix safety checklist

Before applying any fix:

  1. Dockerfile + namespace invariants still hold — see maddy-task-guardian Step 0 (especially bleater-env reachability)
  2. Syntax cleanbash -n setup.sh && bash -n solution.sh && python3 -m py_compile grader.py
  3. The change is in maddy-score-tuner's safe-lever table if it touches scoring difficulty
  4. You can articulate the why in one sentence

Then hand off:

If your fix isHand off to
setup.sh fault-injection bugmaddy-task-guardian Step 3 (push) directly
solution.sh bug (Branch C/D)maddy-task-guardian Step 3 directly — solution.sh is not a tuning surface
grader.py exception (Branch F)maddy-task-guardian Step 3 directly
Anything affecting subscore difficultymaddy-score-tuner for diagnosis first
Anything you cannot map to a row abovehorizon-agentic-reviewer for a live probe

Known non-issue patterns (do NOT fix these)

PatternWhy it isn't a bug
Quality check v1_feedback section returns FAILLLM reviewer can't read the heredoc baseline config / incident notes; objects to annotation-based discovery. Permanent, accepted — see maddy-task-guardian Step 2
No-Op returns score: 0 with detailed feedbackThe grader working correctly — feedback names the missing dimensions
observability_governance failing on rollouts because agents only audited bleaterThis is the cross-namespace (kube-system + bleater-env) discovery axis working as intended
Agents miss the bleater-env reconciler specificallyIntended — it has an innocuous non-maddy name; only the annotation links it. Discovery cost is the design

Verification cheat sheet

HypothesisProbe
"Setup deployed all three drift sources"`grep -E "RECONCILER=
"solution.sh stops drift BEFORE deleting maddy-legacy"Read solution.sh — the annotation/config-pinner discovery+delete block must appear above kubectl delete deployment maddy-legacy
"solution.sh adds POD_NAME + gitops + per-pod rule"`grep -E "fieldPath: metadata.name
"Per-pod-rule gate hasn't been loosened"`grep -E "by (pod)
"wait_consistent hasn't drifted past ceiling"grep -E "wait_consistent" grader.py — consistency passes=5, gap=8, timeout=220; governance passes=5, gap=8, timeout=200
"bleater-env wait is bounded (no infinite hang)"grep -n "Waiting for bleater-env" setup.sh then read the loop — if it's an unbounded until, confirm the namespace truly exists on the live image

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.