fix(installers): v4.5.0 — reliability audit fixes, v3 adapter, Windows corruption set#90
Merged
Merged
Conversation
…s corruption set Sandboxed 6-agent audit (fresh / v3.37-data upgrade / v4 refresh) confirmed two real data-loss bugs and a Windows corruption set. install.sh + install.ps1 (shared contract): - CLAUDE.md section replace bounded by <!-- cortex:end --> marker; legacy sections anchor on the known final line, NEVER swallow to EOF — user content after the section survives every rerun (was deleted, reproduced twice). - settings.json merge filters cortex hooks at hook level — a user hook sharing a handler entry survives (entry only dropped if empty). - v3->v4 adapter: upgrades from <4 seed .last-learn-count from the existing observation count. install.sh: - Interrupted installs (no version file) warn 'proceeding as repair' instead of silently bypassing the downgrade guard; Step 11 failures no longer abort under set -e. - Pre-push hook installs from .githooks/ (stale githooks/ removed). - reflexes.json migration atomic. install.ps1 (Windows): - Explicit UTF-8 in all embedded Python (cp1252 mojibake fix). - Hooks written with the detected interpreter (python vs python3 — hooks never ran on stock Windows Python). - Backup import matched to sh semantics (memory/reflexes overwrite, rest no-clobber, evolved/ recursed); traversal regex actually rejects ../ (security); $LASTEXITCODE checked after native calls; .repo-path written (drift guard live on Windows); atomic JSON migrations; version floor no longer rewinds 2-part versions. docs/MIGRATION-V4.md: automatic v3-data adaptation section. core/memory.template.json: 3.12.0 -> 4.0.0. test_install 42(44)->49, test_install_ps1 10->18; downgrade/uninstall/ integrity/security/dream green. Audit: 6-agent workflow; code: Codex (gpt-5.5, spec-driven); verified 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.
Origen
Auditoría sandboxeada de 6 agentes contra tres escenarios: instalación fresca, upgrade sobre un árbol de datos v3.37 realista, y refresh v4. La migración de datos v3 salió limpia en runtime (el código v4 auto-sana formatos legacy de forma lazy) — pero aparecieron dos bugs reales de pérdida de datos y un lote de corrupción en Windows. Implementación por Codex (spec cerrado), verificada inline.
Pérdida de datos (confirmada, reproducida)
<!-- cortex:end -->y el replace para ahí; secciones legacy anclan en la última línea conocida y nunca tragan hasta EOF.Fiabilidad
version) avisa "proceeding as repair" en vez de bypassear en silencio el downgrade guard; los fallos del Step 11 ya no abortan a mitad bajoset -e..last-learn-countcon el recuento actual de observaciones (mata el banner de recuento vitalicio).docs/MIGRATION-V4.mddocumenta qué auto-sana, qué se resetea por diseño y qué requiere acción..githooks/(el duplicado obsoletogithooks/de 75 líneas queda eliminado).Windows (install.ps1)
../— corregida + validacióntar -tzfen el prompt.pythonvspython3hardcodeado — en Windows estándar los hooks no corrían nunca).evolved/con-Recurse),$LASTEXITCODEcomprobado tras cada llamada nativa,.repo-pathescrito (drift guard vivo en Windows), migraciones JSON atómicas, y el floor de versión ya no rebobina versiones de 2 partes.Tests
test_install42→49 ·test_install_ps110→18 (corre en windows-latest) · downgrade 5, uninstall 13, integrity 14, security 9, dream 40 — todo verde local. E2E doble en sandbox: marcador presente, un solo bloque Cortex, contenido del usuario tras la sección intacto.🤖 Generated with Claude Code