ci(metaharness): weekly cron summary surfaces timing.path (iter 97)

iter 96 surfaced timing.path in the drift-from-history CLI's
human-readable table mode. The same field is also useful in the
weekly cron's GITHUB_STEP_SUMMARY — it confirms which fastpath the
cron actually used.

Why this matters operationally:
   - iter 79 wired the cron to use --baseline-file fastpath
   - Expected wall: ~1.4s (iter 67's measured baseline)
   - If a future bug accidentally falls through to the slow path,
     wall would balloon to ~26s but the WORKFLOW WOULD STILL PASS
     (just slower). The summary's Path: line makes the regression
     visible at the Actions-UI level.

WHAT SHIPPED — .github/workflows/oia-audit-weekly.yml

Drift step's summary block extended:

   ## Drift vs prior week: `near-identical` (similarity=1)
   Alert status: `OK`
   Path: `file (wall 1342ms)`                      ◀ NEW (iter 97)

The PATH_TAKEN extraction reads:
   - timing.path  ('file' / 'key' / 'slow' / 'unknown' fallback)
   - timing.parallelWallMs  ('?'  fallback if missing)

If a future drift-from-history version drops these fields, the
summary still renders cleanly with 'unknown' / '?'.

SMOKE STEP 17z60 anchors:
  - PATH_TAKEN variable definition
  - t.path || 'unknown' fallback
  - t.parallelWallMs extraction
  - echo "Path:" line written to $GITHUB_STEP_SUMMARY

GATES THIS ITER
   smoke:    99 → 100 (step 17z60 green; 100-step milestone)
   yaml:     python yaml.safe_load passes
   cron:     summary now includes path observability

ITER 65 + 66 + 67 + 79 + 95 + 96 + 97 — FAST-PATH OBSERVABILITY ARC

   65 — timing.parallelSpeedup field
   66 — --baseline-key flag (~14x speedup)
   67 — --baseline-file flag (~19x speedup)
   79 — weekly cron uses --baseline-file
   95 — derived timing.path field
   96 — CLI table mode surfaces Path:
   97 — weekly cron summary surfaces Path:   ◀ this iter

The fast-path is now observable at every consumption layer: JSON,
table mode, and the CI Actions summary.

Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
ruv committed 2026-06-17 00:14:49 -04:00
1 parent 1e856ab967
commit de8b3e44e8
2 files changed
+18

No files matched your search

+9
View File
@@ -135,8 +135,17 @@ jobs:
const j = JSON.parse(require('fs').readFileSync('/tmp/drift-trend.json'));
console.log(j.alert?.triggered ? 'TRIGGERED' : 'OK');
")
# iter 97 — also surface the fast-path label so the Actions UI
# shows which iter-66/67 path executed. Confirms cron used the
# baseline-file path (expected ~1.4s) and not slow path (~26s).
PATH_TAKEN=$(node -e "
const j = JSON.parse(require('fs').readFileSync('/tmp/drift-trend.json'));
const t = j.timing || {};
console.log((t.path || 'unknown') + ' (wall ' + (t.parallelWallMs ?? '?') + 'ms)');
")
echo "## Drift vs prior week: \`$VERDICT\` (similarity=$OVERALL)" >> $GITHUB_STEP_SUMMARY
echo "Alert status: \`$ALERT\`" >> $GITHUB_STEP_SUMMARY
echo "Path: \`$PATH_TAKEN\`" >> $GITHUB_STEP_SUMMARY
- name: Upload drift trend artifact
# iter 70 — same always() pattern; the trend artifact is most
@@ -191,6 +191,15 @@ 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 "17z60. weekly cron summary surfaces timing.path (iter 97)"
miss=""
W="$ROOT/../../.github/workflows/oia-audit-weekly.yml"
grep -q "PATH_TAKEN" "$W" 2>/dev/null || miss="$miss no-path-taken-var"
grep -q "t.path || 'unknown'" "$W" 2>/dev/null || miss="$miss no-path-extraction"
grep -q "t.parallelWallMs" "$W" 2>/dev/null || miss="$miss no-wall-extraction"
grep -q 'echo "Path: \\`\$PATH_TAKEN\\`"' "$W" 2>/dev/null || miss="$miss no-path-summary-line"
[[ -z "$miss" ]] && ok || bad "$miss"
step "17z59. drift-from-history table output shows path + wall (iter 96)"
miss=""
F="$ROOT/scripts/drift-from-history.mjs"