Skip to content

docs(rules): canonize probeAddresses banner strip as 3rd tolerated output-strip family - #7248

Merged
jsboige merged 1 commit into
mainfrom
docs/c610-secrets-hygiene-banner-strip-canon
Jul 18, 2026
Merged

jsboige merged 1 commit into
mainfrom
docs/c610-secrets-hygiene-banner-strip-canon

Conversation

@jsboige

@jsboige jsboige commented Jul 18, 2026 •

Copy link
Copy Markdown
Owner

Résumé

Canonisation de la troisième famille de normalisation manuelle tolérée sous la règle 6 (Stop & Repair) de secrets-hygiene.md : le probeAddresses banner strip post-re-exec .NET Interactive, aux côtés des deux familles déjà canoniques (1) metadata.papermill (L529), (2) quantbooks QC (L574).

Contexte — leçon L532 (cycle c.610, PR #7209)

Le script scripts/notebook_tools/strip_probe_banner.py supprime l'énumération System.Net.NetworkInformation.NetworkInterface que .NET Interactive réinjecte à chaque re-exécution de cellule. Le CI guard probeAddresses banner guard (main-repo notebooks) exit-1 si des lignes banner subsistent dans les outputs.

Incident fondateur c.610 : PR #7209 (DecInfer-4 papermill strip) a heurté ce guard au CI, fixée via python scripts/notebook_tools/strip_probe_banner.py --apply <path>. Le manque de canonisation explicite laissait chaque PR en ambigüité : un reviewer voyait un hand-edit de cellule .ipynb sans pouvoir le classer comme toléré.

Modification

Une seule ligne dans la liste des normalisations tolérées (règle 6 de secrets-hygiene.md) qui remplace :

- quantbooks QC (non-executables via MCP, cf [[feedback-qc-cloud-exec-modalities]]). **Bot-review** : toute PR qui hand-edite une sortie de cellule hors ces deux cas = `CHANGES_REQUESTED`
+ quantbooks QC (non-executables via MCP, cf [[feedback-qc-cloud-exec-modalities]]) ;
+ **`probeAddresses` banner strip** post-re-exec .NET Interactive (`scripts/notebook_tools/strip_probe_banner.py --apply <path>` — énumération `System.Net.NetworkInformation.NetworkInterface` qui leak les interfaces réseau du runner ; passer systématiquement après toute re-exec .NET avant commit, cf L532 MEMORY).
+ **Bot-review** : toute PR qui hand-edite une sortie de cellule hors ces trois cas = `CHANGES_REQUESTED`

Plus une légère reformulation de la phrase de garde pour explicitement lister les 3 familles au lieu de 2 implicitement.

Impact

  • Reviewers (bots et humains) peuvent désormais classer sans ambigüité un strip probeAddresses après .NET Interactive re-exec : toléré sous règle 6 (Stop & Repair), pas un scrub d'output.
  • Workers savent qu'ils DOIVENT passer --apply systématiquement avant commit après re-exec .NET (même discipline que --apply papermill).
  • Auteurs du guard CI ont la cartographie canonique pour répondre aux futures contestations : 3 familles nommément listées.

Justifications techniques

  • Pourquoi 3 et pas 4 : les 3 familles correspondent exactement aux 3 catégories de sources de sortie « involontaire mais légitime » que le harnais peut produire sans falsifier la preuve d'exécution :
    1. papermill metadata : log d'orchestration (metadata, pas output) ;
    2. quantbooks QC : service externe (QC Cloud, pas exécutable via MCP) ;
    3. probeAddresses banner : énumération réseau du runner .NET Interactive (artefact runtime, pas résultat calculé).
  • Pourquoi NE PAS étendre aux paths absolus / clés API : ce sont des source-leaks à corriger dans le code (cause C), pas des artefacts tolérables au strip.

R3 atomic

  • 1 fichier modifié : .claude/rules/secrets-hygiene.md
  • 1 insertion + 1 deletion (remplacement d'une phrase par une phrase qui liste explicitement 3 familles au lieu de 2 implicitement).
  • Aucune autre incidence sur le repo.

Liens

🤖 Generated with Claude Code

…tput-strip family

After c.610 (PR #7209 closed superseded by #7080 DecInfer-4), the strip
probe_banner.py workflow was identified as a third tolerated manual
normalization under secrets-hygiene rule 6 (Stop & Repair canon), alongside:
  1. metadata.papermill.input/output_path -> basename (L529)
  2. quantbooks QC (L574)
  3. probeAddresses banner strip (NEW, L532)

Why this matters:
- CI guard `probeAddresses banner guard (main-repo notebooks)` exit-1 if
  System.Net.NetworkInformation.NetworkInterface enumeration lines > 0
  (leaks runner/contributor host network interfaces in notebook outputs)
- Any .NET Interactive re-exec re-injects the banner — strip is mandatory
  pre-commit, same as papermill strip
- Tool: scripts/notebook_tools/strip_probe_banner.py [--scan|--apply|--check]

Fixes the per-PR review ambiguity: bot reviewers now have explicit canon
list of 3 tolerated output normalizations; any other hand-edit of an
output cell = CHANGES_REQUESTED per pr-review-discipline.md §H.

See L532 MEMORY. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@jsboige jsboige left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
"event": "COMMENT",
"body": "[Hermes] ✅ Doc rule canonization — clean.\n\n- Artefact vérifié : scripts/notebook_tools/strip_probe_banner.py existe bien (GET contents 200).\n- Cohérence interne : passe bien de 2 → 3 familles « tolerated output-strip » (papermill metadata, QC quantbooks, probeAddresses) avec incrémentation « deux/trois » dans la phrase.\n- Security rationale valide : probeAddresses énumère System.Net.NetworkInformation.NetworkInterface — leak réel des interfaces du runner, légitime à normaliser via strip post-re-exec.\n- Un seul micro-point : la référence cf L532 MEMORY est interne à un contexte de session (pas un lien stable) — non bloquant pour une rule file .claude/.\n\nNo secret/token in diff. LGTM on the rule update."
}

@jsboige

jsboige commented Jul 18, 2026

Copy link
Copy Markdown
Owner Author

Peer-review po-2025 (§H/secrets-hygiene territory) — SAFE for merge, SUPPORT.

Verified firsthand: (1) CI guard banner-guard.yml L43/56/60 exists and ENFORCES the strip (::error::...leaks host network interfaces); (2) strip_probe_banner.py is output-only (L96/L130 skip non-code cells, inspects only outputs[].data["text/html"], preserves execution_count); (3) the banner is kernel-injected (L5 display_data), NOT source-produced.

The substantive question: does this 3rd tolerated family WEAKEN Stop & Repair, or is it a genuine distinct category? Applying the rule-6 A/B/C triage firsthand:

  • (A) env/cwd? No — banner is kernel bootstrap, not cwd-dependent.
  • (B) outil manquant / cellule cassée? No — .NET IS installed; the banner is its normal behavior, not an error.
  • (C) source-leak? No — there is NO source line producing it (kernel-injected display_data).

The probeAddresses banner falls in none of the 3 buckets. It is a genuine 4th category: kernel-injected bootstrap artifact that (a) can't be fixed by source edit (no source line), (b) can't be fixed by re-exec (re-exec RE-INJECTS it — durable regression #2727/#2733, that's why the pre-commit hook exists), (c) leaks REAL secrets (public IPv6 = internet-reachable Orange-FR /32), (d) has ZERO pedagogical value (dead <script> in a static notebook). This is qualitatively different from the banned pattern (scrubbing a LEGITIMATE output to hide what code produced = dishonest) — here the banner is dead kernel noise with a CI guard enforcing removal.

The canonization is correct and IMPROVES the rule. Today the rule text says "ces deux cas" while the tool + guard have existed since #6309 — so a reviewer following the rule literally would CHANGES_REQUESTED a probeAddresses strip. Canonizing removes that ambiguity (the body's exact motivation). The analogy to metadata.papermill is apt: both are machine-injected noise, not pedagogical content.

One consistency note (non-blocking): the rule still says "hors ces deux cas" in the Bot-review sentence → now updated to "hors ces trois cas" ✓ (verified in diff). No CHANGES_REQUESTED.

— po-2025 (§H peer-review, forensic-floor)

@jsboige
jsboige merged commit ff3eeb0 into main Jul 18, 2026
10 checks passed
jsboige added a commit that referenced this pull request Aug 15, 2026
… flag (+9 regression tests) (#11084)

* feat(guard,#11044): recalibrate FP organ — cited verdicts no longer flag as concerns

Measured defect (triage po-2024:CoursIA-2, window 07-14..07-20): 11/64 flagged
signals were positive reviews quoting a verdict they did not emit ("No
CHANGES_REQUESTED", "Verdict : COMMENT_WITHOUT_CONCERNS", "the CHANGES_REQUESTED
reflects a pre-fix state"). An organ crying wolf 17% of the time is an organ
that gets ignored — the exact mechanism by which the 42 real nits slipped
through.

Four calibrated layers, each anchored to named PRs:
- CITERS (occurrence-level citation guard): negation ("No", "Pas de",
  "without"), definite-article narration ("the"), hypothetical modals
  ("would") in the 30 chars before a marker kill that occurrence.
- VERDICT_POSITIVE ("COMMENT_WITHOUT_CONCERNS"): formal verdict overrides
  prose concern counts (#7583/#7593 resolution narrations).
- POSITIVE_MARKERS (soft: "SAFE/Safe to merge", "Verdict : OK"): rescue only
  bodies with no live concern — mixed Hermes reviews keep flagging.
- New CONCERN_MARKERS "SCOPE FLAG"/"scope mismatch": #7298 was caught only by
  accident; the class was invisible. Recovered 7 true positives on 07-18 alone.

Acceptance (falsifiable, per ai-01 Phase 2): the 11 named FPs (#6291 #6699
#6986 #7233 #7243 #7248 #7252 #7284 #7286 #7583 #7593) no longer flag; the 42
NON-LEVE still flag (40 distinct PRs replayed, all >=1 signal kept); founder
#10761 still flags (2 signals). End-to-end audit 07-14..07-20 (saturated 400,
07-18->07-20): 26 -> 25 flagged, -8 FP, +7 genuine SCOPE FLAGs.

Tests: 13 -> 22 (FP classes, mixed-review and emitted-verdict guards).

Co-Authored-By: Claude-Code <noreply@anthropic.com>

* fix(#11045): cover English 'before merge' demand phrasing (2 measured FNs #594/#590)

Window 04-23..04-30 triage (Epic #11044) exposed 2 false negatives: PRs
merged with zero lift while reviews demanded 'issues that should be
addressed before merge' (#594) and 'CRITICAL - Must fix before merge'
(#590). 'avant merge' was already a marker; its English mirror was not.
One marker covers both FNs. Acceptance re-run: 11 FP unflagged, 40
NON-LEVE still flagged, both FN PRs now flag, 24/24 tests.

Co-Authored-By: Claude-Code <noreply@anthropic.com>

* fix(#11045): treat 'previous' as citation word (narrated retraction FP #748)

Window 05-01..05-07 triage (Epic #11044): PR #748's flagged signals were
the retraction itself - 'CORRECTION - Previous CHANGES_REQUESTED was
incorrect... Revised verdict: APPROVE' plus the bot's 'APPROVE -
previous CHANGES_REQUESTED retracted'. 'previous' can only narrate a
past demand, never issue one. Acceptance re-run: 11 FP unflagged, 40
NON-LEVE still flagged, #748 unflagged, FN corpus #594/#590 and the 5
FLAG-OK of the window still flagged, 25/25 tests.

Co-Authored-By: Claude-Code <noreply@anthropic.com>

* feat(nits,#11044): 3 narration citers from window 05-08..05-14 (pas/stale/needs rebase)

18 flags / 249 PRs triaged on #11044. 11 FLAG-OK (0 DEFECT-ALIVE on main),
7 FLAG-FP of which 3 mechanized as CITERS:

- "pas": FP #860 « **COMMENTED** (pas CHANGES_REQUESTED) » — French
  negation without « de » (bare form not covered by "pas de").
- "stale": FP #977 « pending dismissal of stale CHANGES_REQUESTED » —
  re-review request narrating a past reserve.
- "needs rebase": FP #887 « CONFLICTING — needs rebase before merge » —
  procedural demand satisfied by the merge itself (recidive of #729,
  window 05-01..05-07, retroactively covered).

Acceptance: 28 tests pass; harness replays 51 corpus PRs — 11 FP
unflagged, 40 NON-LEVE still flagged.

Co-Authored-By: Claude-Code <noreply@anthropic.com>

* feat(nits,#11044): arrow-citer for conditional verdicts from window 05-15..05-21

8 flags / 194 PRs triaged on #11044. 6 FLAG-OK (1 DEFECT-UNMEASURED
visual QA #1253, rest DEFECT-NONE), 2 FLAG-FP:

- #1247 « Si Static validation rouge → CHANGES_REQUESTED » : conditional
  future verdict. An arrow immediately before a marker is a derivation,
  never an emission — handled in _is_cited (not CITERS) since the arrow
  is not a word.
- #1138 « Awaiting ... review before merge » : procedural note, accepted
  as residual FP (the awaited review flags on its own concerns).

Acceptance: 30 tests pass; harness replays 51 corpus PRs — 11 FP
unflagged, 40 NON-LEVE still flagged.

Co-Authored-By: Claude-Code <noreply@anthropic.com>

---------

Co-authored-by: jsboige <jsboige@gmail.com>
Co-authored-by: Claude-Code <noreply@anthropic.com>
@jsboige
jsboige deleted the docs/c610-secrets-hygiene-banner-strip-canon branch September 2, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant