Skip to content

fix(maintain): reset learn markers in Step 7 — kill the permanent obs banner (v4.2.2)#86

Merged
fermonterom merged 1 commit into
mainfrom
fix/cx-maintain-learn-markers
Jul 5, 2026
Merged

fix(maintain): reset learn markers in Step 7 — kill the permanent obs banner (v4.2.2)#86
fermonterom merged 1 commit into
mainfrom
fix/cx-maintain-learn-markers

Conversation

@fermonterom

Copy link
Copy Markdown
Owner

Problema

observe.py toca .learn-pending cada LEARN_THRESHOLD observaciones, pero desde que /cx-analyze se retiró en v4 nada lo limpiaba: el banner de SessionStart "N+ new observations, run /cx-maintain" insistía para siempre, incluso justo después de una pasada de mantenimiento (reproducido hoy: sesión arranca con "100+ new observations" y .learn-pending presente).

Fix

Step 7 de /cx-maintain (commands/cx-maintain.md + bin/cx-maintain.sh, mismo script embebido, paridad verificada):

  • Snapshot del total de observaciones a .last-learn-count (escritura atómica tmp+rename)
  • .obs-count a 0
  • Borra .learn-pending

Con eso check_learn_pending() vuelve a medir "desde el último mantenimiento".

Tests

  • test_cx_maintain_runner 9→10: siembra markers + 3 observaciones en sandbox hermético y verifica el reset end-to-end tras el primer run
  • La suite queda además inventariada en la tabla de tests de FEATURES.md (fila ausente desde v4.0.0)
  • Verificado: integrity 14/14, security 9/9, dream 40/40, bash -n en installer/runner/test
  • Quad-sync v4.2.2: install.sh, install.ps1, CHANGELOG.md, docs/FEATURES.md (header + fila comando + tabla tests + historial)

🤖 Generated with Claude Code

… banner (v4.2.2)

observe.py touches .learn-pending every LEARN_THRESHOLD observations,
but nothing cleared it after /cx-analyze retired in v4 — SessionStart's
'N+ new observations, run /cx-maintain' banner nagged forever, even
right after a maintenance pass.

Step 7 (commands/cx-maintain.md + bin/cx-maintain.sh, same embedded
script) now snapshots the obs total into .last-learn-count (atomic
tmp+rename), zeroes .obs-count and drops .learn-pending, so
check_learn_pending() measures 'since last maintenance' again.

test_cx_maintain_runner 9->10 (seeded markers reset e2e); suite also
inventoried in the FEATURES.md tests table (missing since v4.0.0).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fermonterom
fermonterom merged commit bff9af7 into main Jul 5, 2026
11 checks passed
@fermonterom
fermonterom deleted the fix/cx-maintain-learn-markers branch July 5, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant