fix(laws): v4.3.1 — retired laws cascade to instincts instead of archive-only death#88
Merged
Merged
Conversation
…ive-only death Operator feedback on v4.3.0: retiring a law removed the knowledge from BOTH layers at once (promotion had archived the source instinct to prevent double injection; retirement archived the law). - _restore_backing_instinct(): shared by the auto-swap retirement and demote_law_to_domain. Victim's backing YAML returns to instincts/global/ with law_eligible:false (no re-promotion ping-pong), so the knowledge keeps injecting via PreToolUse and ages out through normal instinct decay if it truly stopped mattering. - _find_backing_instinct_yaml(): also fixes demote_law_to_domain's lookup, which searched instincts/archive/<id>.yaml while every v4 promotion archives as instincts/global/archive/<id>.promoted-to-law- <date>.yaml — different name AND directory; v4-promoted laws could never be demoted back. - No-backing laws (manually seeded, no trigger) stay archive-only: a trigger is never invented. Logged as retired-archive-only. test_distill_v4 10->12; law_tier/runner/integrity/security/dream green. 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é arregla
Feedback del operador sobre v4.3.0: al jubilar una law, el conocimiento desaparecía de las dos capas a la vez — la promoción ya había archivado el instinct fuente (anti doble-inyección v4.2.0) y la jubilación archivaba la law. Resultado: conocimiento probado muerto en
laws/archive/.Cascada en vez de muerte
_restore_backing_instinct()(compartido por la jubilación del auto-swap ydemote_law_to_domain): el YAML de respaldo de la víctima vuelve ainstincts/global/conlaw_eligible: false— sigue inyectando por trigger en PreToolUse y, si de verdad dejó de importar, cae sola por el decay normal de instincts. El flag bloquea el ping-pong de re-promoción (auto_promote_to_lawlo salta).demote_law_to_domainbuscabainstincts/archive/<id>.yaml, pero toda promoción v4 archiva comoinstincts/global/archive/<id>.promoted-to-law-<fecha>.yaml(nombre Y directorio distintos) — ninguna law promovida desde v4.0 podía degradarse._find_backing_instinct_yaml()cubre las tres rutas (viva, archivo de promoción con newest-wins, legacy).retired-archive-only.Caso real:
loop-reorient(jubilada hoy por el primer auto-swap) no tiene YAML de respaldo → se queda en archive, recuperable a mano.Tests
test_distill_v410→12: cascada con respaldo (YAML restaurado,law_eligible: false, trigger intacto, archivo de promoción consumido) y víctima sin respaldo (swap OK, nada inventado)🤖 Generated with Claude Code