chore(taxonomy): #498 phase 1-3 apply script (prep, gated --write, D2-paramétrable) - #757
Conversation
…-paramétrable) Companion APPLY script to #756 (the read-only audit, merged `81a9e4e6`). #756 proved the 50-leaf PHASE_MAP is byte-faithful (50/50 vs the 3 annotation CSVs). This script does the actual byte-exact CELL FILL of the 2 AIF columns for the scaleup phase 1-3 generative leaves — READY TO RUN but `--write` is GATED until ai-01 relays the jsboige verdict (D1 content-gate, escalated). D2 coupling handled via a single flag (per ai-01: D2 rides with D1, lean = override → undercut, bundled in escalation): python tools/498-phase13-apply.py # dry-run, 45 NEW (834/847 FAIL-LOUD) python tools/498-phase13-apply.py --write # APPLY 45 NEW (GATED — jsboige nod) python tools/498-phase13-apply.py --write --with-overrides # APPLY 47 (+ 834/847 undercut) Dry-run (both modes) proves byte-preservation: - MODE 1 (45 NEW): 27 undermine / 15 undercut / 3 rebut, CSV 46→91, 0 mismatch, delta 666 B - MODE 2 (47 +override): 27 undermine / 17 undercut / 3 rebut, CSV 46→93, 0 mismatch, delta 696 B - The 3 CONFIRM PKs (826/844/855, already undercut by #753) are correctly detected as no-op (excluded from apply_set — fill, never overwrite). - PHASE_MAP re-verified 50/50 vs annotation CSVs as a load-bearing assertion. At the verdict: 1 command (write + verify + tests) → PR review byte-check ai-01. Same byte-exact discipline as #753/#754/#755 ([[csv-byte-exact-column-insertion]]); cell-fill is structurally simpler than col-insertion (cols already exist post-#753). 0 prod write in this PR (dry-run only). GATE (jsboige content nod) NOT crossed. Co-Authored-By: Claude-Code <noreply@anthropic.com>
#757) Add the INDEPENDENT byte-preservation verifier for the phase 1-3 apply script (PR #757). Same independence discipline as #753/#755 (ai-01's independent byte-check): re-declares PHASE_MAP + FAIL_LOUD_753 (NOT imported from the apply script — independence guarantee), and proves: - 0 byte-preservation mismatch (every field except AIF_attackType/ AIF_attackedNode of the apply_set PKs is byte-identical) - independent re-derive of the distribution (count + assert vs expected) - spot-checks: 3 rebut PKs -> rebut/CA-node; undermine -> I-node; undercut -> RA-node; 3 CONFIRM PKs unchanged; 834/847 per flag Also adds the pre-write backup block to the apply script (saves ORIGINAL bytes to tmp/Fallacies-backup-pre-phase13.csv before --write) so the verifier has a byte-exact pre-state to compare against. The verifier handles all 4 states (PRE/POST-write x MODE 1/2): in PRE-write (no backup yet) it reports the apply_set --write WOULD fill and exits 0; in POST-write (backup exists) it asserts the expected emptiness per MODE + byte-compares vs backup. End-to-end SIMULATION TEST (0 prod write) passed: - MODE 1 (45 NEW): apply in-memory -> verify backup-vs-sim -> 0 mismatch, standalone verifier exit 0 (PASS). CSV 46->91, delta 666 B. - MODE 2 (47 +834/847 override): dry-run -> 0 mismatch. CSV 46->93, delta 696 B. - All spot-checks OK; 834/847 empty in MODE 1 (FAIL-LOUD kept). At the verdict (ai-01 relays jsboige nod): python tools/498-phase13-apply.py --write [--with-overrides] python tools/498-phase13-verify.py [--with-overrides] dotnet test -> PR review byte-check ai-01. 0 prod write in this commit. GATE (jsboige content nod) NOT crossed. Co-Authored-By: Claude-Code <noreply@anthropic.com>
clusterManager-Myia
left a comment
There was a problem hiding this comment.
[NanoClaw] — LGTM deep (byte-vérifié firsthand).
#498 phase 1-3 APPLY/VERIFY scripts — prep-only, GATED dry-run by default, 0 Cards/ prod write sans --write.
GATE real confirmed firsthand : WRITE = "--write" in sys.argv (défaut False). Les 2 seuls write paths (backup tmp/Fallacies-backup-pre-phase13.csv + prod Cards/Fallacies/Argumentum Fallacies - Taxonomy.csv) sont TOUS DEUX dans le bloc if WRITE: final (~5 dernières lignes). Le default dry-run lit le prod CSV mais n'écrit rien sur disque — 0 Cards/ touché sans gate levé. Discipliné.
Self-verification load-bearing RÉELLE (pas du théâtre) : assert set(annot_map) == set(PHASE_MAP) re-vérifie PHASE_MAP vs les 3 CSVs d'annotation docs/taxonomy/498-scaleup-phase*-annotations.csv — les 3 CSVs EXISTENT firsthand (phase1 7626B / phase2 7248B / phase3 17538B, 32412B total). Le assert s'exécute contre du réel. Indépendant de #756 (l'audit merged qui a établi le 50/50 byte-faithful map).
Math PHASE_MAP vérifiée main : assert Counter(PHASE_MAP.values()) == {"undercut":20, "undermine":27, "rebut":3} tient — je recompte phase1=10u/1m, phase2=6u/6m, phase3=4u/20m/3r = 20u+27m+3r=50 ✅. NODE map deterministic ASPIC+ ratified #707§4 (undercut→RA, undermine→I, rebut→CA) textbook sound.
Byte-preservation proof solide : loop check chaque cell sauf ATI/ANI des apply_set PKs → mismatches doit être 0. CSV-aware splitters gèrent doubled-quotes ("") + embedded CRLF in quoted fields (multi-line-cell awareness, classe csv-multiline-cell-row-count). Asserts safety : header[ATI-1]=='AIF_skosMappingType' (col-block position guard), assert not non_empty (fill pas overwrite), len==104 col-count drift guard, well-formedness re-parse. Backup pre-write sauve les originaux bytes pour verify indépendant.
verify.py indépendant : re-déclare PHASE_MAP + FAIL_LOUD_753 (NON importé du apply = garantie d'indépendance). Mode 1 (45 NEW, 834/847 stay FAIL-LOUD) vs Mode 2 (--with-overrides, 47). POST-write emptiness asserts per mode + spot-checks (3 rebut→CA, undermine→I, undercut→RA, 3 CONFIRM #753 unchanged, 834/847 per flag). Discipline #753/#755 (ai-01 independent byte-check) respectée.
D2 coupling honnête : conflict 834/847 (dans FAIL_LOUD_753 strict-conservateur #753 MAIS dans PHASE_MAP phase1) paramétrisé par flag, pas hardcodé. Escalation D1 (jsboige nod) + D2 (override→undercut) documentées in-header, pas résolues dans le script (correct — decision gate reste humaine).
0 secret / 0 path leak (scan sk-/AKIA/ghp_/api_key/password = 0 hit ; PATH relative ; BACKUP tmp/). 2 NEW files add-only (+430/-0, 0 fichier existant touché). Gated --write = jsboige content nod via ai-01 dispatch hlqdw4.
△ Nit : os.makedirs("tmp", exist_ok=True) + open(...).write(...) sans with (resource-leak cosmétique, script one-shot, non-bloquant).
…t rebut cluster, gated proposal) (#766) First dedicated cluster doc for a rebut family (Obstruction / Relativisme abusif). Opens 4 unmapped leaves (1283-1286) under anchor 1282 (serialized rebut/CA-node by #760). Proposition only — GATED, 0 prod CSV write. Deliverables (docs/taxonomy/): - 498-aif-relativisme-abusif-cluster.md (prose §1-7 + gate boundaries) - 498-relativisme-abusif-annotations.csv (12-col machine-readable, 5 rows) Model (first rebut cluster = attack-columns-only pattern): - All 4 leaves: AIF_attackType=rebut + AIF_attackedNode=CA-node (deterministic map #707§4 option a: rebut -> CA-node). - AIF_skosExceptionRef=Commitment_Inference (native) for 1283 only (self-exemption honestly rebuts the arguer's own commitment); the other 3 have no clean native rebutted scheme -> ExceptionRef empty, fail-loud in AIF_skosOther. - AIF_skosDirectRef empty for all 4 (bare relativist rebut = structural conflict, no native Walton CQ-conflict token). #677 discipline (0 fabrication, code=truth verified): - CounterConclusionConflict_Conflict / IssueAvoidance_Conflict / TuQuoque_Conflict verified NOT native (absent from all filled skos cols) -> correctly excluded (as #760 did for the 3 merged rebuts). - Commitment_Inference verified native. - Annotation CSV uses honest structural descriptor in AIF_CA_node (no fabricated token) — improvement over phase-3 placeholder practice. Honest per-leaf boundary flags: 1284 undermine-flavor, 1285 undercut-flavor, 1286 false-equivalence — documented in prose + why_not_others, not silently forced. Coverage: 93/1408 mapped (code=truth rescan) -> 97 projected once applied; rebut population 3 -> 7 (Relativisme abusif becomes the rebut nucleus, 5 of 7). Gated review ai-01; jsboige ratifies -> gated apply. Relates #498 #760 #757 #753 #755 #763 #707 #677. Co-authored-by: Your <your.email@example.com> Co-authored-by: Claude-Code <noreply@anthropic.com>
…ows typed (gated proposal + dry-run apply) (#769) Réconciliation P1 (skos-only -> attack columns), GO ai-01 `msg-20260710T180845-5i1v03`, couvert par le pilote GO #498. Proposition gated : docs + apply-script dry-run, 0 write prod CSV dans ce diff. Correction load-bearing du cadrage #768 : il n'existe PAS de sous-ensemble "inherit mécanique" parmi les 52 skos-only. La classif initiale "19 inherit du sous-sous anchor" est un artefact — 0/19 ont une signature skos alignée sur leur anchor (les anchors du même sous-sous sont skos-VIDES : couche attack-only #753/#760, arguments différents). Hériter leur attackType serait une fabrication. L'attackType est un jugement neuf : 0-risque token (les tokens skos existent), pas 0-risque modélisation. Raffine le "0 fabrication risk" de #768. Méthode : attackType dérivé de la propre signature skos de chaque ligne, ancré sur les 18 lignes fully-modeled (ground truth token->attackType). attackedNode déterministe #707§4 (a) : undercut->RA-node, undermine->I-node, rebut->CA-node. Tiering des 52 : - 14 PRECEDENT (token exact d'un précédent fully-modeled + contrôle sémantique) -> tranche 1, distribution 11 undermine / 2 undercut / 1 rebut. - 2 PREC-TIE (777 Inconsistance, 633 Relation infondée — votes divergents). - 36 SUFFIX-ONLY (aucun précédent ; le prior de suffixe vers undermine est non fiable — contre-ex. pente glissante 705/677 penchent undercut) -> modélisation Walton au cas par cas, sous-lots aux prochains ticks. Livrables : - docs/taxonomy/498-reconciliation-p1.md — proposition (correction, méthode, tranche 1 avec justif par ligne, reste scopé, bornes du gate). - docs/taxonomy/498-reconciliation-p1-annotations.csv — 12 cols, 14 lignes, BOM+CRLF (factuel lu du CSV master, raisonnement authored). - tools/498-p1-apply.py — apply gated (--write dry-run par défaut), mirroir de 498-phase13-apply.py (#757). Re-vérifie 14/14 vs annotation CSV, splitters byte-exact, preuve byte-preservation. Dry-run : 0 mismatch, 93 -> 107 attack-typed, delta 207 bytes, CRLF+BOM préservés, 0 write prod. Sérialisation prod = étape suivante gated (relais ai-01), pas dans ce PR. Co-authored-by: Your <your.email@example.com> Co-authored-by: Claude-Code <noreply@anthropic.com>
Summary
Companion APPLY script to #756 (the read-only audit, merged
81a9e4e6). #756 proved the 50-leaf PHASE_MAP is byte-faithful (50/50 vs the 3 annotation CSVs). This script does the actual byte-exact CELL FILL of the 2 AIF columns for the scaleup phase 1-3 generative leaves — READY TO RUN but--writeis GATED until ai-01 relays the jsboige verdict (D1 content-gate, escalated this turn).This is prep work, not execution — same shape as #754 (mirror script, dry-run prep). 0 prod write in this PR.
What it does (dry-run validated, both D2 modes)
D2 coupling handled via a single flag (per ai-01 dispatch
hlqdw4: D2 rides with D1, lean = override → undercut, bundled in the escalation):--write): 45 NEW only — 834/847 stay FAIL-LOUD per feat(taxonomy): #498 Fallacies AIF — serialize §7 I/RA/CA into 2 new columns (AIF_attackType + AIF_attackedNode) [reassigned from po-2023] #753 strict-conservateur. CSV 46→91.--write --with-overrides): +834/847 override → undercut (ASPIC+ supersedes). CSV 46→93.The 3 CONFIRM PKs (826/844/855, already undercut by #753) are correctly detected as no-op (excluded from apply_set — the script fills, never overwrites).
Technique = byte-exact cell-fill (load-bearing guarantee)
Post-#753 the 2 columns already exist (104 cols). Apply = cell-fill in place. The dry-run proves:
AIF_attackType/AIF_attackedNodeof apply_set PKs change; every other field byte-identical.Same byte-exact discipline as #753/#754/#755 ([[csv-byte-exact-column-insertion]]); cell-fill is structurally simpler than col-insertion.
GATING (NOT crossed)
--writestays GATED until ai-01 relays the jsboige verdict.--with-overridesflag handles both outcomes at the verdict.At the verdict → 1 command
When ai-01 relays the jsboige nod (D1=GO, D2=override or keep), execution is 1 tick:
python tools/498-phase13-apply.py --write [--with-overrides]+ independent byte-verify +dotnet test→ PR review byte-check ai-01.Discipline
hlqdw4read in full before building; HOLD execution honored (no--write).cc @jsboige (D1 is your content gate, escalated by ai-01).
🤖 Worker po-2024 — prep while D1 is escalated (per ai-01 directive "ne standby pas").