feat(maintain): v4.3.0 zero-touch — auto-swap laws at cap, 30d proposal TTL, informative badge#87
Merged
Merged
Conversation
…al TTL, informative badge
The pipeline never waits on a human anymore. Reverts the v4.2 'human
prunes' model at the operator's explicit request:
- auto_promote_to_law(): when the cap is the sole failing gate, retire
the least-impactful law (useful/(1+noise) 14d) and promote atomically.
Guards: victim age >= 30d, max 2 swaps/run, productive cohorts never
lose a law. Runs via _swap_promote_unlocked (extracted from
manual_swap_promote — the locked wrapper would deadlock on the
maintain pass's own flock).
- expire_stale_proposals(): pending human-gated proposals > 30d
auto-reject as cx-maintain-ttl, tombstoned in both runtimes.
- SessionStart badge informative ('[cx] maintain: ...', 48h TTL);
imperative '[REVIEW] N items' badge removed. /cx-review reframed as
optional veto pass in command spec + README.
- _archive_promoted_instinct_source dedups 3 archive sites.
test_distill_v4 6->10, test_session_start 7->11, test_session_learner
60->61, runner report carries swapped=/expired=. Implementation by
Codex GPT-5.3 (spec-driven), reviewed inline.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué cambia
Modo zero-touch: el pipeline de aprendizaje deja de esperar decisiones humanas en cualquier punto. Revierte a petición del operador el modelo v4.2 de "constitución curada, poda humana".
1. Auto-swap de laws con el cupo saturado
Cuando un instinct pasa TODOS los gates de madurez (conf ≥0.95, 3+ proyectos, occurrences_v4 ≥10, 0 ruido 14d, sin duplicado Jaccard) y el único bloqueo es el cap 15/15,
auto_promote_to_lawjubila la law de menor impacto (useful/(1+noise)14d) y promueve en una operación atómica. Guardas: víctima con ≥30 días de vida (LAW_AUTO_SWAP_MIN_AGE_DAYS), máximo 2 swaps por pasada, cohortes productivas (ratio >1.0) nunca pierden una law. Víctima alaws/archive/(reversible).Nota de implementación: ejecuta vía
_swap_promote_unlocked, extraído demanual_swap_promote— llamar al wrapper@_write_lockeddesde dentro del engine pass (que ya sostiene el flock) sería deadlock.2. Caducidad de propuestas (TTL 30d)
expire_stale_proposals(): pendientes human-gated condetected>30 días →rejected_by: cx-maintain-ttl, añadido a las dos whitelists de tombstones (Python + JS) para que nunca resuciten. Sin fecha parseable → nunca caduca a ciegas.3. Badge informativo, no imperativo
[REVIEW] 34 items pendientes -> /cx-reviewdesaparece. Ahora:[cx] maintain: +law (jubilada X), N propuestas caducadas, M en cola (caducan a 30d) — detalle opcional: /cx-review, silenciado a las 48h de la pasada. Tolerante con digests antiguos/malformados (SessionStart nunca crashea).4. /cx-review reframed
Pasa de "weekly, the only command with judgment" a veto opcional (spec + README). No correrlo nunca es un modo soportado.
Tests
test_distill_v46→10 (swap happy path, bloqueo por edad, TTL, dry-run inerte)test_session_start7→11 (badge, staleness 48h, digest malformado)test_session_learner60→61 (tombstonecx-maintain-ttl)bin/cx-maintain.sh↔commands/cx-maintain.mdverificados en syncImplementación delegada a Codex GPT-5.3 con spec cerrado; revisión inline del diff completo.
🤖 Generated with Claude Code