mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 06:06:02 +09:00
Pre-iter-109 the cron's policy thresholds (--threshold 0.85,
--alert-on-new-severity high) were hardcoded. To test stricter or
looser gates ad-hoc, maintainers had to:
1. Edit oia-audit-weekly.yml
2. Commit
3. Push
4. Wait for the workflow trigger
5. Revert
Iter 109 adds workflow_dispatch inputs so maintainers can test
different thresholds via the Actions UI's "Run workflow" form without
touching the YAML.
WHAT SHIPPED — oia-audit-weekly.yml
workflow_dispatch:
inputs:
threshold:
description: 'Structural similarity threshold (default 0.85 —
scheduled). Lower = stricter drift alert.'
type: string
default: '0.85'
alert_on_new_severity:
description: 'Alert on any introduced finding ≥ this severity'
type: choice
options: [info, low, medium, warn, high, error, critical]
default: high
Drift step uses the inputs via fallback expressions:
THRESHOLD="${{ inputs.threshold || '0.85' }}"
ALERT_SEV="${{ inputs.alert_on_new_severity || 'high' }}"
Scheduled runs (no manual input) get the hardcoded defaults
(0.85 / high) — same behavior as pre-iter-109.
USAGE EXAMPLES
- Standard weekly run (Sundays 04:17 UTC):
Uses 0.85 + high (defaults)
- Ad-hoc stricter check via Actions UI "Run workflow":
threshold: 0.95
alert_on_new_severity: medium
→ Alerts on smaller drift + any new MEDIUM-or-higher finding
- Permissive ad-hoc check (e.g., investigating a known-noisy week):
threshold: 0.50
alert_on_new_severity: critical
→ Only structural collapse (overall < 0.5) OR a critical finding fires
The enum for alert_on_new_severity matches iter-78's MCP enum
(iter-92's smoke step keeps these aligned).
SMOKE STEP 17z72 anchors:
- threshold + alert_on_new_severity inputs present
- Both have safe defaults (scheduled runs preserved)
- Drift step uses the inputs via $THRESHOLD / $ALERT_SEV vars
- Choice list contains all 7 severity values from iter-78
PLUS iter-79's smoke step 17z42 relaxed: now accepts either the
pre-iter-109 literal `--alert-on-new-severity high` OR the post-iter-109
parameterized form `--alert-on-new-severity "$ALERT_SEV"`. Same forward-
compat pattern as iter-60's relaxation in iter 84.
GATES THIS ITER
smoke: 111 → 112 (step 17z72 green; 17z42 grep relaxed)
yaml: python yaml.safe_load passes
cron: scheduled run behavior unchanged; ad-hoc tuning unlocked
OBSERVATION
Iters 78+79+108+109 are the policy-control arc:
78 — added --alert-on-new-severity flag at script + MCP
79 — wired it into cron (hardcoded 'high')
108 — hard-fail when fastpath label drifts away from 'file'
109 — parameterize the policy thresholds via dispatch inputs
The cron now has hardcoded SAFETY invariants (path === 'file') and
TUNABLE POLICY (threshold + alert severity). The split reflects what
each value's purpose is: safety = static, policy = dynamic.
Co-Authored-By: RuFlo <ruv@ruv.net>