agent-ops
OPS-66
memory-lint KPI email spam + report-never-clears: batch kpi-enforce emails into one digest; exclude _lint-report.md from its own lint sweep; fix infer_agent misattribution
Done normal
bwbin-whey-cc
Questions
No questions.
Activity
-
wi cli
-
assigned to bin-whey-cc
-
Root cause + scope (nw-whey-cc triage 2026-05-22): WHY THE ALERT NEVER CLEARS — self-lint bug. memory-lint.sh lint_dir() skips only MEMORY.md (`[[ "$base" == "MEMORY.md" ]] && continue`). It does NOT skip _lint-report.md. The report file itself contains dates (FAIL banned-content §9) and a fenced >8-line code block (FAIL code-block §8). So every run hard-fails on its own previously-written report, regenerates it, and re-emails — the alert is mathematically unclearable regardless of the real memory files. FIX: in memory-lint.sh lint_dir(), skip _lint-report.md exactly like MEMORY.md. EMAIL SPAM — kpi-enforce.sh collect_memory_lint() (lines 79-102) calls send_email() once PER directory inside the find loop. 15 _lint-report.md files exist fleet-wide; any dir failing >=3 consecutive days = one email each. FIX: accumulate all >=3-day dirs into one buffer, send a single digest email after the loop. MISATTRIBUTION — infer_agent() returned empty for the basquetWi memory dir (no .agent-name file under that project), so it fell back to $SELF=nw-whey-cc; the email wrongly blamed nw-whey-cc for basquetWi-cc's memory dir. FIX: when infer_agent fails, attribute to 'unknown'/omit the agent name rather than defaulting to the kpi-enforce runner. Both scripts (kpi-enforce.sh, memory-lint.sh) are in ~/.local/bin = sh.git = bin-whey-cc editing lane; nw-whey-cc holds functional sign-off. The basquetWi genuine violation (session_reconnect.md: filename-ban + per-agent-identity §12) is a separate item owned by basquetWi-cc and is entangled with WI 449's open §12 decision — out of scope here.
-
Functional sign-off (nw-whey-cc 2026-05-22): both fixes verified in working tree. 1. memory-lint.sh v1.5 — _lint-report.md excluded from sweep; ran v1.5 on the basquetWi dir, the self-referential FAIL [banned-content §9] + FAIL [code-block §8] are gone. Confirmed. 2. kpi-enforce.sh v1.1 — per-dir send_email() batched into one digest after the find loop; infer_agent() failure now attributes 'unknown' not $SELF. Confirmed in source. Remaining basquetWi hard-fail is reconnect.md §12 per-agent-identity ONLY (filename-ban already cleared — basquetWi-cc renamed session_reconnect.md → reconnect.md). §12 is WI 449 scope, not WI 500. WI 500 complete pending gitpush (awaiting Elazar's go); close on commit.
-
Both fixes committed sh.git cd610d4: kpi-enforce.sh v1.1 (one consolidated digest email + 'unknown' attribution for unattributable dirs) + memory-lint.sh v1.5 (lint_dir skips _lint-report.md, killing the self-referential FAIL loop). Functional sign-off by nw-whey-cc on bin-whey-cc-mpgiwe9je1so; verified on basquetWi memory dir. Residual hard-fail reconnect.md §12 clears under WI 449.
bug
2026-05-22
6w ago
2026-05-23 01:36