docs(source-facts): pin the two scanners' divergences instead of unifying them (closes #83) - #89
Merged
CarlLee1983 merged 1 commit intoAug 16, 2026
Conversation
… of unifying them #83 假設分歧大致是「drafts 比較寬鬆」,量測之後不成立:兩邊的寬鬆處是交錯的。 閘門讀得到裸行/反引號/清單/粗體形式的宣告、無標籤的參數表、任何語言的圍籬範例; 草稿讀得到帶前綴的標題、小寫 method、GitBook 的兩段反引號寫法。各自朝自己的用途 放寬——閘門要的是「事實在哪裡就讀哪裡」,草稿要的是能貼進小節的結構。 三個候選收斂點(帶前綴的標題、小寫 method、GitBook 兩段反引號)在十三個 benchmark case 的語料裡都是**零次**出現,所以收斂沒有可得的涵蓋,只有把 fail-closed 閘門的 散文誤判面放大的風險。因此這張票的正確結局是釘住而非收斂。 新增 ADR 0009 記錄「兩套掃描器分開治理」與逐條分歧表,並說明為什麼不共用 regex: 為了草稿輸出而做的改動會安靜地移動閘門,而症狀是一次沒人編輯過卻失敗的 run。 GitBook 那一列標記為 gap 而非 decision——它是字面宣告、認它不會削弱嚴格度, 只是目前沒有來源用它,而在那之前這種來源會以 SOURCE_FACTS_UNSCANNED 浮現而非沉默, 這正是等待安全的原因。 tests/source_facts/test_scanner_divergence.py 把每一格釘成可執行的紀錄:任何一格變了, 要嘛是有意的決策(連同 ADR 一起改),要嘛是一次沒被發現的漂移。
This was referenced Aug 16, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #83。堆在 #88 之上(base 是
agent/issue-82-unclosed-fence),因為兩者都動source_facts/markdown.py的 docstring;#88 併入 main 之後這張的 base 會自動回到 main。量測推翻了票面上的假設
#83 的表格假設分歧大致是「drafts 比較寬鬆」(
searchvs^錨定、IGNORECASE)。實測之後不成立:兩邊的寬鬆處是交錯的。source_factsmarkdown_drafts## 支付 GET /a)`GET`+`/a`各自朝自己的用途放寬:閘門要的是「事實在哪裡就讀哪裡」,草稿要的是能貼進小節的結構。
因此收斂什麼都沒做,而那是刻意的
三個候選收斂點——帶前綴的標題、小寫 method、GitBook 兩段反引號——在十三個 benchmark case 的語料裡各出現 0 次。收斂沒有可得的涵蓋,只有把 fail-closed 閘門的散文誤判面放大的風險,而 #83 自己的 AC 就寫著「不因收斂而放寬
source_facts的嚴格度」。GitBook 那一列在 ADR 裡標記為 gap 而非 decision:它是字面宣告、認它不會削弱嚴格度,只是目前沒有來源用它;而在那之前,這種來源會以
SOURCE_FACTS_UNSCANNED浮現而不是沉默(ADR 0007)——那正是等待安全的原因。交付物
tests/source_facts/test_scanner_divergence.py:16 個案例把每一格釘成可執行的紀錄。任何一格變了,要嘛是有意的決策(連同 ADR 一起改),要嘛是一次沒被發現的漂移。AGENTS.md兩列指向 ADR,不重述表格。Test plan
uv run pytest2202 passeduv run ruff check ./npm run docs:checkPASS