feat(cert): cerrar el determinismo del acta (D3 invariante IA + D4 reproducibilidad)#62
Merged
Merged
Conversation
…otal + key_id (D3/D4) D3 — La invariante "la IA nunca produce un veredicto favorable" colgaba de un solo booleano (requires_approval=True en resolve_tiebreaks); compute_verdict no miraba llm_assisted. Ahora es ESTRUCTURAL: cualquier categoría asistida por IA degrada a "apto-con-reservas" con independencia de requires_approval → nunca un "apto" rotundo. D4 — Reproducibilidad del acta: - Orden TOTAL de la evidencia: get_triage_for_run ordenaba por created_at (empata en el insert transaccional → orden físico arbitrario); ahora (created_at, failure_id) → el array evidence es byte-reproducible. - key_id + algorithm en identity: el verificador sabe qué clave/algoritmo usar (habilita rotación; certificados viejos siguen verificando con su clave). key_id = SHA-256 truncado de la clave pública, determinista. Claude-Session: https://claude.ai/code/session_01X1fZebDm9ABFwLU2v3mq46
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Contexto
Sprint 2 (parte 2) de
docs/auditoria/2026-07-02-siguiente-nivel/. Hace la tesis del certificado literal y a prueba de escépticos. Basado enmain(con Sprint 1+2 ya mergeados).Cambios
D3 — El invariante "la IA nunca favorece un apto" ahora es ESTRUCTURAL
Antes, lo único que impedía que un desempate LLM (categoría "flaky"/"infra") contara hacia
aptoerarequires_approval=Truehardcodeado enresolve_tiebreaks;compute_verdictno miraballm_assisted. El día que se añadiera "aprobar un tiebreak humano" (requires_approval=False), un veredicto elegido por la IA podía fluir aapto.compute_verdict: cualquier verdictllm_assisteddegrada aapto-con-reservascon independencia derequires_approval. La IA no puede producir unaptorotundo — por diseño, no por un booleano.D4 — Reproducibilidad del acta
get_triage_for_runordenaba porcreated_at, que empata en el insert transaccional → orden físico arbitrario → el arrayevidencepodía reordenarse entre regeneraciones. AhoraORDER BY created_at, failure_id(único) → byte-reproducible.key_id+algorithmenidentity: un verificador tercero sabe qué algoritmo y qué clave usar; habilita rotación (certificados viejos siguen verificando con su clave).key_id= SHA-256 truncado de la clave pública, determinista. Aditivo (schema siguemnemo.cert.v2).Test plan
test_verdict_llm_assisted_never_yields_clean_apto: llm_assisted + requires_approval=False →apto-con-reservas; equivalente determinista →apto.test_key_id_is_deterministic_and_scoped+ el acta incluyealgorithm/key_id.Pendiente (lo más profundo de D4, su propio PR)
json.dumpsde Python.evidence_bundle(las señales) en la evidencia firmada → un tercero puede re-derivar la categoría, no solo re-verificar la agregación.ai_evalcomo anotación no firmada.https://claude.ai/code/session_01X1fZebDm9ABFwLU2v3mq46