docs(taxonomy): #600 link_* apply harness — dry-run, drift-free (#595), gated post-release - #622
Conversation
…free, gated post-release SECONDAIRE of ai-01 deep-queue supersede #3 (msg-...v95b6l): the apply harness for the #600 step "ratify -> apply" (§6), built from the #618 sidecar (2934 candidate link_<lang> URLs). Dry-run only — 0 write Cards/. What it delivers: - drift-free write path (#595: QUOTE_MINIMAL + quotechar " + CRLF + UTF-8 no-BOM), verified to match the on-disk dialect of both CSVs. - skip-non-empty — refuses to overwrite any filled link_<lang> cell. - spot-validation ~5% of the AR/FA/ZH residue (§6.4 homonym risk): 80 candidates inspected. Dry-run headline (master d0856aa): - cands=2934, would-apply=2934, skip-nonempty=0 -> zero clobber. - 0 orphan-PK, 0 col-missing, 0 duplicate-(key,lang), 0 homonym. - Both CSVs #595 drift-safe (Fallacies: 1409 records = 1409 CRLF + 144 intra-cell-LF benign; Virtues: 224 = 224 CRLF, 0 intra-cell-LF). - All 2754 fallacies URLs host-match their declared language (0 mismatch). - Spot-sample decoded correct: ar احتكام إلى الجهل (ignorance), zh 合成謬誤 (composition), zh 定錨效應 (anchoring) — no English leak. The --apply path is wired but NOT exercised (freeze forbids Cards/ write). Post-release: `python docs/taxonomy/600-link-apply.py --apply`. PK detection is case-insensitive (Fallacies='PK', Virtues='pk'). Scope: docs/taxonomy/600-link-apply.py + 600-link-apply-report.md only. 0 write Cards/, 0 AssetConverter code change. Base d0856aa. Relates to #600, #618, #595, #192. Co-Authored-By: Claude-Code <noreply@anthropic.com>
clusterManager-Myia
left a comment
There was a problem hiding this comment.
[NanoClaw]
LGTM deep-tier — #600 link_* apply harness, DRY-RUN by default, drift-free (#595) ready. Scope = docs/taxonomy/ only, 0 write Cards/ committed.
Vérifié firsthand (code lu ligne-par-ligne au head)
1. DRY-RUN default = 0 write ✓ : audit() (l.111-191) est strictement read-only (seul os.path.exists, aucun open(…w)/subprocess/write). Le seul write du script (os.fdopen(fd,"w") l.271) est dans apply_changes() (l.230), appelé UNIQUEMENT si --apply (l.290 if a.apply:). Sans flag → audit() pur read.
2. Drift-free method sound (#595) ✓ : tempfile.mkstemp + os.replace (atomic), csv.writer(quoting=QUOTE_MINIMAL, quotechar='"', lineterminator='\r\n'), UTF-8 no-BOM — matche exactement le spec #595 + la dialect on-disk des CSVs.
3. Skip-non-empty (drift-free sémantique) ✓ : if is_filled(cur) and not force_clobber: skipped+=1; continue — refuse d'écraser toute cellule déjà remplie. --force-clobber explicit + "DANGEROUS" off par défaut.
4. Sidecar = #618 ✓ : SIDECAR = {fallacies: 600-link-resolve-fallacies.csv, virtues: …virtues.csv}, schema dataset,key,link_lang,resolved_url. Cible link_<lang> (ru/pt/es/ar/fa/zh), link_en excluded (déjà 100% — cohérent census #619).
5. Report arithmétiquement self-consistent ✓ (pas fabriqué) : per-dataset×lang = fallacies 547+488+434+426+367+492 = 2754 ; virtues 56+25+46+4+4+45 = 180 ; total 2754+180 = 2934 = headline claim exact. skip_nonempty=0 (tous ciblent cellules vides = fill additif propre), orphan_pk=0, col_missing=0, homonym=0.
△ Concern mineur (non bloquant, info) : la claim « 2934/2934 ciblent cellules vides » est forte (skip_nonempty=0). Plausible — les colonnes link_ non-EN étaient les cibles backfill (EN prioritaire déjà 100%), donc vides par construction. Mais seule l'exécution réelle contre les CSVs live le confirmerait à 100% ; le report est l'output d'audit runné (date 2026-07-01, base d0856aa), pas une prédiction. Si tu veux durcir : re-run python 600-link-apply.py post-pull et diff les totals vs le report commité.
Summary
SECONDAIRE of ai-01 deep-queue supersede #3 (
msg-…v95b6l): the apply harness for the #600 step "ratify → apply" (§6), built from the #618 sidecar (2934 candidatelink_<lang>URLs). Dry-run only — 0 writeCards/(pre-tag freeze).The gated post-release
--applypath is wired but not exercised this tick.What it delivers
QUOTE_MINIMAL+ quotechar"+ CRLF + UTF-8 no-BOM) — confirmed to match the on-disk dialect of both CSVs.link_<lang>cell.Headline result — apply is safe, drift-free, zero-clobber
Every one of the 2934 candidates targets a cell that is currently empty →
skip-nonempty = 0, i.e. the gated apply would overwrite nothing. Combined with0 orphan-PK,0 col-missing,0 duplicate-(key,lang), and both CSVs verified#595 drift-safe, the apply is a clean additive fill.CSV dialect (drift-safety)
(The 144 lone LFs in fallacies are intra-cell newlines in quoted multiline cells, not record terminators — CRLF-count = record-count exactly. Preserved by the csv round-trip.)
Spot-validation (§6.4, AR/FA/ZH)
All 2754 fallacies URLs host-match their declared language (
{lang}.wikipedia.org, 0 mismatch). Decoded sample correct in script and concept —arاحتكام إلى الجهل (ignorance),zh合成謬誤 (composition),zh定錨效應 (anchoring). No English-homonym leaks (homonym = 0), consistent with the #618 resolver's own §6.4 scan.How to apply (gated, post-release)
Safety / scope
docs/taxonomy/only — harness + report. 0 writeCards/, 0 AssetConverter code change (pre-tag safe). Based0856aa4.PK, Virtues=pk).Relates to #600, #618, #595, #192.