From 792349b3a59c22c2c9851de835b4cea1188c2875 Mon Sep 17 00:00:00 2001 From: sscodeai Date: Mon, 19 Oct 2026 22:50:05 +0900 Subject: [PATCH] docs: correct the DET-008 probe counts after adding DET-009 The measured row was taken before speaker_notes.py existed, so a clean main checkout reports 107 files / 750 comment lines (169 / 1,456 with --include-build), not 106 / 738. The probe itself is unchanged. --- README.ja.md | 4 ++-- README.md | 2 +- docs/comment-directive-coverage.md | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.ja.md b/README.ja.md index c935cbb..9288512 100644 --- a/README.ja.md +++ b/README.ja.md @@ -209,12 +209,12 @@ aiitg hook pretooluse < payload.json # deny(POL-001): ファイルは | 攻撃コーパス(10 クラス × 3 フレーミング + エージェント向け 2 件。うち 2 件は論文から逐語) | 32/32 検出、29 CRITICAL / 3 HIGH | | 良性コーパス(通常の作業コメント 46 件、5 つのコメント記法) | 誤検知 0 | | 曖昧コーパス(ペイロードと同じ形をした正当なメモ 4 件、テストに固定) | 4/4 検出 — 受け入れた**誤検知クラス**(意図的な fail-closed) | -| 実在ソース走査(`scripts/probe_comment_directive.py`、本プロジェクト + `takumi/packages`、ビルド成果物は除外: 106 ファイル / コメント 738 行) | 検出 0 | +| 実在ソース走査(`scripts/probe_comment_directive.py`、本プロジェクト + `takumi/packages`、ビルド成果物は除外: 107 ファイル / コメント 750 行) | 検出 0 | 曖昧コーパスの 4 件は *正当な* メモであり、それでも報告されます。これは検出ではなく既知の誤検知として計上し、 コーパスが実際よりきれいに見えることはありません。実在ソース走査の数値はコミット済みスクリプトで再現できます(§6)。 以前の「167 ファイル / コメント 4,643 行」はビルド成果物(`dist/`)を含み、コメント行の数え方も緩かったものです—— -`--include-build` で 168 ファイルになりますが、生成物は開発者が読むサードパーティソースではないため既定で除外します。 +`--include-build` で 169 ファイルになりますが、生成物は開発者が読むサードパーティソースではないため既定で除外します。 正直な境界: 論文の 700 件コーパスは HTML と一緒に公開されていないため、この数値は論文の数値の**再現ではありません**。 決定的なパターン検出器は原理的に不完全です(論文自身の最強スクリーナーでも約 1/3 を見逃しています)。 diff --git a/README.md b/README.md index 6984706..7076467 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ Measured on this repository's corpus and on live third-party source, with the bo | Attack corpus (10 classes × 3 framings + 2 agent-directed; 2 payloads verbatim from the paper) | 32/32 detected, 29 CRITICAL / 3 HIGH | | Benign corpus (46 ordinary work comments, five syntax families) | 0 false positives | | Ambiguous corpus (4 legit notes byte-shaped like a payload, pinned in `tests/`) | 4/4 reported — accepted false positives, the deliberate fail-closed choice | -| Live third-party source probe (`scripts/probe_comment_directive.py`: this project + `takumi/packages`, build output excluded: 106 files, 738 comment lines) | 0 findings | +| Live third-party source probe (`scripts/probe_comment_directive.py`: this project + `takumi/packages`, build output excluded: 107 files, 750 comment lines) | 0 findings | Honest boundaries: the paper's 700-item corpus was not released with its HTML, so these figures are **not** a reproduction of the paper's numbers; a deterministic pattern detector is incomplete by diff --git a/docs/comment-directive-coverage.md b/docs/comment-directive-coverage.md index c3dc72f..5d5cdfb 100644 --- a/docs/comment-directive-coverage.md +++ b/docs/comment-directive-coverage.md @@ -98,13 +98,13 @@ Corpus and probe live in `tests/detectors/test_comment_directive.py`, | Attack corpus — 32 payloads: the paper's 10 classes × 3 framings + 2 agent-directed (2 payloads verbatim from the paper; the rest authored in its stated format) | **32/32 detected**, class agreement 32/32, 29 CRITICAL / 3 HIGH | | Benign corpus — 46 ordinary work comments across five comment syntax families | **0 false positives** | | Ambiguous corpus — 4 legit notes byte-shaped like payloads, pinned in the test file | 4/4 reported — **accepted false positives**, the fail-closed choice | -| Live source probe — `scripts/probe_comment_directive.py` over this project + `takumi/packages` (build output excluded): **106 files / 738 comment lines**, via the shipped `run_scan()` | **0 findings** | +| Live source probe — `scripts/probe_comment_directive.py` over this project + `takumi/packages` (build output excluded): **107 files / 750 comment lines**, via the shipped `run_scan()` | **0 findings** | The ambiguous row is the honest one: those four are *legit* notes that are reported anyway. They are counted as a known false-positive class, not as detections, so the corpus can never look cleaner than it is. The live-probe figures are reproducible with the committed script (see §6); the earlier "167 files / 4,643 comment lines" figure came from *including* build output (`dist/`) and from a looser -comment-line definition — `--include-build` restores 168 files, but generated bundles are not +comment-line definition — `--include-build` restores 169 files, but generated bundles are not third-party source a developer reads, so they are excluded by default. Boundaries, stated plainly: @@ -135,7 +135,7 @@ make test # unit + integration + e2e, incl. th pytest tests/detectors/test_comment_directive.py -q # the attack/benign/ambiguous corpora # The live false-positive probe. Build output is excluded by default; pass -# --include-build to reproduce the (older, larger) 168-file figure. +# --include-build to reproduce the (older, larger) 169-file figure. python scripts/probe_comment_directive.py . ../takumi/packages python scripts/probe_comment_directive.py . ../takumi/packages --json ```