Skip to content

fix(measure): scope self-declaring guard to one sentence (harness internal, no observable impact) - #1939

Merged
smileygames merged 2 commits into
mainfrom
1938-self-declaration-sentence-scope
Sep 10, 2026
Merged

smileygames merged 2 commits into
mainfrom
1938-self-declaration-sentence-scope

Conversation

@smileygames

Copy link
Copy Markdown
Member

Closes #1938

何を変えたか

scripts/measure_rule_effect.py の自己申告ガードを、語単独の一致から「同一文内に自己言及と run 語彙が併存する」判定へ 上げた。issue の軸 (a')。

this rule / this skill / this section意図的に外した。Li+ の散文ではこれらは「本文が何であるか」ではなく「本文が何について書かれているか」を指すことが同じくらい多く、This rule names the removal test. のような文を弾いてしまう。それは本 issue が報告した過剰棄却を名詞ひとつ隣で再発させることになる。根拠になった実測例は成果物としての自己指示("the file was a copy made for a trial")なので、そちら側の集合だけを残した。

受入条件の実測

# 内容 結果
0 plan-conduct-1.json(書き下ろし arm B, 23,192 B)が --dry-run を通る EXIT=0(両 arm を構築し contrast 検証まで通過)
1 This file is a copy made for a trial; its verdict is not for production use. が弾かれる PlanError: inserted text says this body is a copy made for the run: 'trial'
2 skills/evolution-rule-effect-measurement/SKILL.md 全文が通る 通過。しかも由来免除を切った状態(source_root=None)でも通ることをテストで固定した
3 実在ファイル本文+自己申告 1 行が弾かれる PlanError(免除は全文一致でないため効かず、追加行が併存判定に掛かる)

過剰棄却の掃き出し測定として、rules/ / skills/ / adapter/ / docs/ の全 markdown 本文を免除なしで新ガードに掛けたところ 0 件

テスト

tests/test_measure_rule_effect.py に受入条件 0-3 を固定した。tests/test_measure_rule_effect.py 単体で 56 passed / 16 subtests。受入条件 0 はリポジトリ外のファイルを読まず、同じ語彙(variants / probe / test / tested)を持つ書き下ろし本文を埋め込む形にしてある。

旧テストのうち、語単独棄却を前提にしていた入力(variant B / test fixture / 検証用の記述 等)は自己言及を伴う形に書き換えた。これは軸の変更そのものであって、退行ではない。

リリース種別

patch と判断する。変更対象は計測ハーネスの内部コードとそのテストのみで、rules/ / skills/ / adapter/ には触れていない。利用者や実行系から観測できる振る舞いの変化はなく、rules/operations/release-version-rule.md の「user/system observable impact なし」に当たる。

Refs #1938

… both halves

The guard rejected inserted text on a bare run-vocabulary word
(experiment|variant|test|probe|harness|trial). The provenance exemption
added in #1936 only passes text byte-identical to the repository file at
the edit's own path, so a body written from scratch could not clear it.
That is the input in #1938: arm B of plan-conduct-1.json, 23,298 B, present
in no repository file, carrying `variants` / `probe` / `test` as the L2
layer's own domain vocabulary and never declaring what it is.

The check now requires both halves in one sentence: a deictic naming this
body (SELF_REFERENCE) and a run-vocabulary word. Either half alone passes.
The provenance exemption is kept and runs first.

ガードの根拠になった実測例(`This file is a copy made for a trial` 相当)は
自己言及と run 語彙を同一文に持つため、引き続き弾かれる。語彙リストと免除は
そのまま残し、判定の窓だけを語から文へ上げた軸 (a') を採った。

Refs #1938

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@smileygames

Copy link
Copy Markdown
Member Author

Adjudicate each finding below by checking its literal against the source at the revision its path:line is given at, and adopt or drop it on that. No count enters that judgment, and no axis is exempt from it: the fixed impression-literal axis is adjudicated the same way, on the flagged phrase against the removal test its own spec fixes (skills/evolution-impression-literal-detection/SKILL.md), and it fixes no threshold.

Axis A — issue requirement

所見なし。issue #1938 本文全文(gh issue view 1938 --repo Liplus-Project/liplus-language --json body,comments、受入条件コメント含む)と、PR #1939 本文(gh pr view 1939 --repo Liplus-Project/liplus-language --json body)および gh pr diff 1939 の全文を突き合わせ、両者が一致することを確認した。target files 列挙(scripts/measure_rule_effect.py / tests/test_measure_rule_effect.py)どおりの2ファイルのみが変更され、skills/** / rules/** には触れていない。受入条件 1(This file is a copy made for a trial; ... が弾かれる)・2(SKILL.md 全文が由来免除なしでも通る)・3(実在ファイル+自己申告1行が弾かれる)は追加テストでそれぞれ固定されている(tests/test_measure_rule_effect.py:148test_inserted_text_may_not_say_this_body_is_made_for_the_run)、:272test_the_guards_own_skill_passes_without_the_exemption)、:256test_a_partial_match_is_not_exempted)。python -m pytest tests/test_measure_rule_effect.py -q を自分のクローンで再実行し 56 passed / 16 subtests を確認)。受入条件 0(plan-conduct-1.json--dry-run 通過)は PR 本文が EXIT=0 と申告するのみで diff には現れず、issue の target files 列挙もこの外部 plan ファイルを含んでいないため、diff 側の記述として判定できる材料がない。

Axis B — rule violation

所見なし。diff が変更・追加した全行(scripts/measure_rule_effect.py 該当ハンク、tests/test_measure_rule_effect.py 該当ハンク)を、rules/**skills/** の該当しうる語彙で突き合わせた。

  • 英語パターン: grep -rniE "self.declar|provenance exempt|sentence boundary|run vocabulary" rules/ skills/ → 1件ヒット(rules/model/trigger-check-gate.md:38、無関係な "self-declaration trigger" への言及で本 diff の対象外)。
  • 日本語パターン: grep -rlP "[\x{3040}-\x{30ff}\x{4e00}-\x{9fff}]" rules/ skills/ → 0ファイル(rules/ skills/ に日本語を含むファイルは存在せず、rules/model/liplus-coding-rule.md Source Language の英語限定と整合)。
  • skills/evolution-rule-effect-measurement/SKILL.md 全文を確認したが、SELF_DECLARING / RUN_VOCABULARY / 語彙リストの具体的な正規表現を縛る記述はなく、Containment when a file is placed は「stage 1 でファイルを物理的に置く場合」の人間・エージェント側の手順であり、本 diff のガード実装とは別対象。
  • rules/evolution/initiator-autonomy.md:36,48 により scripts/** / tests/** は「executed code a check stands behind」に分類され、backstop は tests/** で、その check(pytest)は green(自クローンで再実行し確認)。

Fixed axis — impression-literal detection

所見なし。本 diff がスコープとする Li+ source(rules/**/*.md, skills/**/SKILL.md, adapter/**/*, Li+update.md)に該当する追加・変更行は 0 行。diff の変更対象は scripts/measure_rule_effect.pytests/test_measure_rule_effect.py のみで、いずれもこの軸のスコープ外。

@smileygames smileygames left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

親セルフレビュー(brake 1 exit 後) — fail

brake 1 round 1 は三軸とも所見なしで返り、step 4 の clean 分岐で exit した(N=1 / 往復 1 / 採用 0 / 却下 0 / 運用コピー適用なし——対象が scripts/** + tests/** で subagent の常時ロード面に注入されないため、step 5 の復元も skip)。

その上で、step 9 で親が実物に当てたところ受入不可の欠陥が出たので、merge しない。

欠陥: 根拠になった実測文言が通り抜ける

skills/evolution-rule-effect-measurement/SKILL.md:187 が本ガードの根拠として持っている実測は、次の綴りで書かれている。

Measured: an arm read a note inside its own source saying the file was a copy made for a trial, and added that its verdict was therefore not for production use.

the file であって this file ではない。本 PR の SELF_REFERENCEthis\s+(file|copy|document|text|body|arm|version|draft) を要求するため、この文は自己言及側に当たらず通過する。

実測(本 PR の _reject_self_declaring を直接呼んだ結果):

PASS   | The file was a copy made for a trial.
REJECT | This file was a copy made for a trial.
PASS   | Note: the file is a copy made for a trial, so the verdict is not for production use.

現行 main(build-2026-09-10.3)の語単独判定はこの文を trial で弾いている。 本 PR は偽陽性を狭める代わりに、ガードの存在理由そのものに偽陰性を入れる。この一点で受け入れられない。

なぜ brake 1 が捕まえられなかったか(評価者の落ち度ではない)

受入条件 1 を #1938 のコメントに書いたのは親であり、そこで実測文言を This file is a copy made for a trial; ...言い換えていた。実装はその言い換えに対して正しく実装し、軸 A は diff を issue 本文と突き合わせて一致を確認した。照合対象の issue 本文が言い換えを持っていたので、鎖のどの環も止まらない。

#1935 で記録したのと同じ形が一段上で再発している(#1938 本文「受入条件」節の導入文がまさにこの再発を防ぐために書かれていた)。実測文言は引用であって要約ではない、という一行が受入条件側に無かった。

併せて測れた残余(欠陥の程度は上記より軽い)

偽陽性側——自己申告していないのに弾かれる:

REJECT | This file states the removal test.
REJECT | This document fixes what the harness enforces structurally.
REJECT | This text is quoted from the probe specification.
REJECT | Read this body against the test the spec fixes.

偽陰性側——自己申告しているのに通る:

PASS   | 本ファイルは試験用の複製である。      (`本ファイル` が指示語集合に無い。実装者が uncertainty 1 で自ら申告済み)
PASS   | この写しは試行のために作られた。      (`試行` が語彙に無い)
PASS   | That copy was produced by an experiment.

rules/ skills/ adapter/ docs/ 全 md の掃引が 0 件だったことは事実だが、構成に数秒しかかからない形に対する証拠にはならない——これは実装者自身が this rule を指示語集合から外した時に立てた論理であり、同じ論理がここにも当たる。

評価するもの

実装者は自分の不確かな点を 3 件、聞かれる前に申告している(日本語指示語が未掃引であること、skills/** 側の記述と厳しさが食い違うこと、e.g. の文分割が偽陰性方向であること)。うち 1 件(日本語側)が実際に欠陥として現れた。申告どおりの場所が壊れていた。

rule effect measurement

unmeasured。理由 = 発火条件の外。 統治面(rules/** / skills/** / adapter/**)への変更は 0 追加 / 0 削除で、変更は scripts/**tests/** のみ。

rules/operations/main-agent-procedures.md PR review の self-review fail -> fix and recommit に従い、同 PR 上で修正を回す。修正後は新しい SHA に対して brake 1 を再度回す。

🤖 Generated with Claude Code

… word

The co-occurrence shape shipped in 9b6c74f let through the very sentence
the guard's grounds rest on. `skills/evolution-rule-effect-measurement/
SKILL.md` Containment when a file is placed reads "the file was a copy
made for a trial" - determiner `the`, not `this` - so a check requiring
`this <noun>` did not reach it, and the bare-word shape on main did. The
PR was a regression on its own grounding case.

Widening the deictic to `the file` is not the repair: `the file` is
ordinary prose. The predicate now matches the claim itself, under three
constraints. The artifact term is the sentence subject, which separates
the claim from a report of it (the SKILL.md sentence's subject is the
arm). The predicate is copular or passive with a copy / making / run word
in its complement slot, at most two words off the copula. A run word
stands somewhere in the same sentence. Japanese is read on the same
subject constraint, head-final: topic, then a run word, then a making.

That closes the measured false negatives (`本ファイル`, `試行`, `That
copy was produced by an experiment`) and keeps the measured false
positives passing, `This text is quoted from the probe specification`
included - the case that fixes the complement slot at two words.

実測文言は引用であって要約ではない。受入条件 0 のテストは SKILL.md の
綴りをそのまま持ち、言い換えを挟まない。掃引は rules/ skills/ adapter/
docs/ の md 90 本を由来免除なしで通し 0 件、これもテストに固定した。
判定が一覧への当てはめでないことを見るため、一覧に無い形の文 21 本を
新たに書き起こして両方向から確認している。

Refs #1938

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@smileygames

Copy link
Copy Markdown
Member Author

Adjudicate each finding below by checking its literal against the source at the revision its path:line is given at, and adopt or drop it on that. No count enters that judgment, and no axis is exempt from it: the fixed impression-literal axis is adjudicated the same way, on the flagged phrase against the removal test its own spec fixes (skills/evolution-impression-literal-detection/SKILL.md), and it fixes no threshold.

Axis A — issue requirement

所見なし。issue #1938 本文(観測 + 修正の軸)と受入条件コメント(gh issue view 1938 --comments、受入条件0-3・target files)を、コミット 8074f656bd55c82a8d4c1ed7ddeabd0271ed1461 の diff(scripts/measure_rule_effect.py / tests/test_measure_rule_effect.py の2ファイルのみ、target files 列挙と一致)と突き合わせた。自クローン(同 SHA)で python -m pytest tests/test_measure_rule_effect.py -q を実行し 60 passed, 140 subtests passed を確認済み。受入条件0(書き下ろし arm B 相当・実在しない本文が通る)は test_run_vocabulary_without_the_claim_passes が固定し、受入条件1(根拠実測例 This file is a copy made for a trial; its verdict is not for production use. が弾かれる)は test_the_grounding_measurement_is_refused_verbatim、受入条件2(skills/evolution-rule-effect-measurement/SKILL.md 全文が由来免除なしでも通る)は test_the_guards_own_skill_passes_without_the_exemption、受入条件3(実在ファイル本文+自己申告1行の部分捏造が弾かれる)は test_a_partial_match_is_not_exempted がそれぞれ固定しており、いずれも自クローンの実行で green。issue の「修正の軸」節が挙げる (a) / (a') / (d 減算側) は「実装は未定」と明記された検討案であり、受入条件はいずれも振る舞い基準(0-3)のみを拘束するため、diff が (a') の単純な co-occurrence より踏み込んだ主語・述語構造(SELF_DECLARING_CLAIM)を採用している点は issue 本文との不一致ではない。

Axis B — rule violation

所見なし。diff が変更・追加した全ハンク(scripts/measure_rule_effect.pytests/test_measure_rule_effect.py)を rules/** / skills/**(同 SHA)に対して独立に再実施したスイープで確認。

  • 英語パターン: grep -rniE "self.declar|provenance exempt|sentence boundary|run vocabulary|complement slot|subject position|artifact noun" rules/ skills/ → 1件ヒット(rules/model/trigger-check-gate.md:38、"Do not re-add a self-declaration trigger" という無関係な既存文への言及、本 diff の識別子とは別概念)。
  • 日本語パターン: python3[぀-ヿ一-鿿]rules/**/*.md skills/**/*.md に走らせ、ヒットした4ファイル(rules/operations/execution-mode.md / rules/operations/main-agent-procedures.md / skills/evolution-rule-effect-measurement/SKILL.md / skills/evolution-self-eval/SKILL.md)の該当行を目視確認。いずれも既存の日本語引用例("黙って" 等)で、本 diff のガード対象語彙・変数名とは無関係。
  • rules/evolution/initiator-autonomy.md:36-40 の governed surface 分類により scripts/** は「checkが背後に立つ実行コード」として brake 1 の対象外、tests/** はバックストップとして対象内。そのバックストップ(pytest)は上記の通り green。

Fixed axis — impression-literal detection

所見なし。本 axis のスコープ(rules/**/*.md, skills/**/SKILL.md, adapter/**/*, Li+update.md)に該当する追加・変更行は本 diff に 0 行。diff の全ハンクは scripts/measure_rule_effect.py(コメントを含む)と tests/test_measure_rule_effect.py のみで、いずれもスコープ外。

@smileygames smileygames left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

親セルフレビュー(brake 1 exit 後、2 回目) — pass、マージする

前回のセルフレビューは fail だった。指摘した欠陥——根拠の実測文言 The file was a copy made for a trial. が通り抜ける——は 8074f65 で修正されている。

受入基準の照合

受入条件 0-6 すべて成立。親が 8074f65 に対して独自に確認した中核はこの対である。

REJECT | The file was a copy made for a trial.
PASS   | Measured: an arm read a note inside its own source saying the file was a copy
         made for a trial, and added that its verdict was therefore not for production use.

同じ単語列を含む二文のうち、片方だけを弾いている。 後者は skills/evolution-rule-effect-measurement/SKILL.md:187 そのもの、つまりこの計器が測るべき自分自身の仕様である。主語位置を制約に採ったことでこの二つが両立した——実装者の報告どおり、この制約が無ければ受入条件 0 と 2 は同時に満たせない。設計判断として正しい。

無改変の arm A 本文(38,596 B)が免除オフでも通ることも確認した。「自分と全文一致だから通る」で済ませていない。

逸脱

なし。scope 逸脱なし(変更は target files 列挙どおりの 2 ファイル)、手続き逸脱なし。

この PR が行っている取引

親が独自に構成した文集合(実装者の申告列とは別)を、現行 main の語単独判定と本 PR の主張判定の両方に当てた実測:

main(語単独) 本 PR(主張判定)
ふつうの Li+ 散文 7 文(通すべき) 7 件棄却 2 件棄却
現実的な事故形 5 件(弾くべき) 5 件棄却 3 件棄却

偽陽性 7→2 と引き換えに、偽陰性 0→2 を入れている。 この取引を承知の上でマージする。根拠:

  1. #1938 が報告した実害は偽陽性の側であり、そちらが実測で大きく縮んでいる。
  2. 抜けた 2 件は親が形を意図的にずらして構成したものであり、根拠の実測文言とその近傍は捕まえている。前回 fail の理由——根拠そのものが抜ける——とは水準が違う。
  3. rules/ skills/ adapter/ docs/ の 90 ファイル掃引が免除オフで 0 hit。
  4. scripts/** の内部ハーネスであり revert 範囲内、リリースは人間ゲートのまま。

残余は握り潰さず #1940 に測定込みで起票済み(マージ前に起票、main-agent-procedures.md PR review の Follow-through 準拠)。偽陽性と偽陰性のどちらのコストが大きいかはまだ測っていない——その未測定自体を issue 本文に書いた。

評価するもの

実装者は uncertainty を 5 件、聞かれる前に申告した。親が独自に測った偽陽性 2 件のうち 1 件は、その uncertainty 1(written)が名指ししていた場所そのものだった。申告した場所が実際に当たっていた。 加えて、自分で構成した新規文 9 件のうち 1 件が初回設計を通ってしまったことを報告し、それが関係節の例外を足す根拠になったと書いている——列挙に当てはめるのではなく、自分の設計を自分で攻撃している。

brake 1 の記録

  • round 1(SHA 9b6c74f): N=1、三軸とも所見なし、step 4 clean 分岐で exit。その後親が step 9 で欠陥を発見しセルフレビュー fail、修正を委譲。
  • round 2(SHA 8074f65): N=1、三軸とも所見なし、step 4 clean 分岐で exit。
  • 採用 0 件 / 却下 0 件。却下されたまま残った所見は無い。
  • 運用コピーは両ラウンドとも適用なし。対象が scripts/** + tests/** で subagent の常時ロード面に注入されないため。step 5 の復元も従って skip。
  • 固定軸は両ラウンドとも構造的に空振り(対象 0 行)。#1823 が名前を与えている形であり、本 PR の欠陥ではない。

brake 1 が clean を返した SHA に欠陥があり、親の step 9 が捕まえた。 これは #1856(N=1 floor)の PRIMARY observable に当たるが、floor の証拠にはならないと判定した——軸 A は diff を issue 本文と突き合わせるもので、その issue 本文に親自身の言い換えが入っていた。評価者が三人いても同じ言い換えを三回読む。欠陥は全軸より上流にあり、複数性が働く場所ではない。memory/self-evolution-observation.md に記録済み。

rule effect measurement

unmeasured。理由 = 発火条件の外。 統治面(rules/** / skills/** / adapter/**)への変更は 0 追加 / 0 削除。変更は scripts/**tests/** のみ。CI green の直後、評価者 spawn の前という本来の位置で判断した。

リリース種別

patch。 scripts/** の内部ハーネスとそのテストのみ。統治面を一行も変えず、アダプタが読む runtime 面の内容も変わらないため、user/system observable な挙動変化を持たない。semi_auto の patch は人間ゲート無しで AI 直接マージ。

🤖 Generated with Claude Code

@smileygames
smileygames merged commit 620de93 into main Sep 10, 2026
2 checks passed
@smileygames
smileygames deleted the 1938-self-declaration-sentence-scope branch September 10, 2026 18:57
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.

bug(measurement): provenance exemption misses a from-scratch arm that does not self-declare

2 participants