Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

ci(metaharness): weekly cron exposes policy thresholds via workflow_dispatch inputs (iter 109)

ruv51db9b381ec3
diff --git a/.github/workflows/oia-audit-weekly.yml b/.github/workflows/oia-audit-weekly.yml
index e1e4ed6456..abebefb11e 100644
--- a/.github/workflows/oia-audit-weekly.yml
+++ b/.github/workflows/oia-audit-weekly.yml
@@ -21,6 +21,27 @@ on:
schedule:
- cron: '17 4 * * 0' # Sundays at 04:17 UTC
workflow_dispatch: # manual trigger for ad-hoc audits
+ # iter 109 β€” parameterize the policy thresholds so ad-hoc runs can
+ # explore stricter/looser gates without editing YAML.
+ inputs:
+ threshold:
+ description: 'Structural similarity threshold (default 0.85 β€” scheduled). Lower = stricter drift alert.'
+ type: string
+ default: '0.85'
+ required: false
+ alert_on_new_severity:
+ description: 'Alert on any introduced finding β‰₯ this severity'
+ type: choice
+ options:
+ - info
+ - low
+ - medium
+ - warn
+ - high
+ - error
+ - critical
+ default: high
+ required: false
push:
branches: [main]
paths:
@@ -115,11 +136,15 @@ jobs:
# iter 79 β€” also gate on new HIGH-severity findings. Catches the
# case where structure stayed similar but a security regression
# appeared (e.g., new mcp-scan HIGH finding). Either gate can fire.
+ # iter 109 β€” parameterized policy thresholds via workflow_dispatch
+ # inputs. Scheduled runs fall back to 0.85 / high.
+ THRESHOLD="${{ inputs.threshold || '0.85' }}"
+ ALERT_SEV="${{ inputs.alert_on_new_severity || 'high' }}"
node plugins/ruflo-metaharness/scripts/drift-from-history.mjs \
--baseline-file /tmp/prior/oia-audit.json \
--dry-run \
- --threshold 0.85 \
- --alert-on-new-severity high \
+ --threshold "$THRESHOLD" \
+ --alert-on-new-severity "$ALERT_SEV" \
--format json \
> /tmp/drift-trend.json || true
# Extract verdict for the workflow summary
diff --git a/plugins/ruflo-metaharness/scripts/smoke.sh b/plugins/ruflo-metaharness/scripts/smoke.sh
index a037955c8b..eedd585056 100755
--- a/plugins/ruflo-metaharness/scripts/smoke.sh
+++ b/plugins/ruflo-metaharness/scripts/smoke.sh
@@ -191,6 +191,26 @@ grep -q "execCli(\[\s*'-y'\s*,\s*'metaharness@latest'" "$F" 2>/dev/null || \
grep -q "cwd: opts" "$F" || miss="$miss no-cwd-passthrough"
[[ -z "$miss" ]] && ok || bad "$miss"
+step "17z72. weekly cron exposes workflow_dispatch inputs for policy tuning (iter 109)"
+miss=""
+W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"
+# workflow_dispatch.inputs block present
+grep -q "threshold:" "$W" 2>/dev/null || miss="$miss no-threshold-input"
+grep -q "alert_on_new_severity:" "$W" 2>/dev/null || miss="$miss no-alert-sev-input"
+# Both inputs have safe defaults (scheduled runs work without manual entry)
+grep -q "default: '0.85'" "$W" 2>/dev/null || miss="$miss no-threshold-default"
+grep -q "default: high" "$W" 2>/dev/null || miss="$miss no-sev-default"
+# Drift step uses the inputs via "$THRESHOLD" / "$ALERT_SEV"
+grep -q 'THRESHOLD="${{ inputs.threshold' "$W" 2>/dev/null || miss="$miss no-threshold-var"
+grep -q 'ALERT_SEV="${{ inputs.alert_on_new_severity' "$W" 2>/dev/null || miss="$miss no-alert-sev-var"
+grep -q -- '--threshold "\$THRESHOLD"' "$W" 2>/dev/null || miss="$miss no-threshold-passthrough"
+grep -q -- '--alert-on-new-severity "\$ALERT_SEV"' "$W" 2>/dev/null || miss="$miss no-alert-sev-passthrough"
+# Choice type lists all 7 severity values from iter-78 enum
+for sev in info low medium warn high error critical; do
+ grep -q " - ${sev}" "$W" 2>/dev/null || miss="$miss no-choice-${sev}"
+done
+[[ -z "$miss" ]] && ok || bad "$miss"
+
step "17z71. weekly cron drift step fails on slow-path regression (iter 108)"
miss=""
W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"
@@ -803,7 +823,9 @@ step "17z42. weekly cron uses --alert-on-new-severity + Stage 12 verifies (iter
miss=""
# Weekly cron wires the gate
W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"
-grep -q -- "--alert-on-new-severity high" "$W" 2>/dev/null || miss="$miss no-cron-wired"
+# iter 109 β€” accept either literal `high` (pre-iter-109) or parameterized
+# `"$ALERT_SEV"` (post-iter-109 with workflow_dispatch input).
+grep -qE -- '--alert-on-new-severity (high|"\$ALERT_SEV")' "$W" 2>/dev/null || miss="$miss no-cron-wired"
# Roundtrip Stage 12 added
F="$ROOT/scripts/test-pipeline-roundtrip.mjs"
grep -q "Stage 12 β€” --alert-on-new-severity orthogonal gate" "$F" 2>/dev/null || miss="$miss no-stage-12"