fix(docs): two comments cited the wrong snippet for the duplication (#4102)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 10s
CI & Build / integration (push) Successful in 47s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / Python tests (push) Successful in 1m32s
CI & Build / Build & push image (push) Successful in 23s

Both said the repeated read-and-clamp was "canon #2860 across 295 of 372
siblings". Wrong on both halves, and checked rather than assumed:
#2860 is "Scribe service function — the async_session unit", the
service-layer canon, and its instance count is that canon's dominance in
src/scribe/services — nothing to do with a threshold helper. The
divergence hook flagged the new module against it because the new module
is a service, which is the hook working correctly and me misreading it.

The duplication itself was real and is what the registry consolidated:
`plugin_context` read and clamped the pair twice over, three rule arms
did it again, and `reply_preferences._threshold` once more. The comments
now say that, and claim nothing about a ledger count.

`rule_usage.py:122` cites #2860 correctly as the service canon and is
untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01821k5B3Ysecp9fNYs92Kuy
This commit is contained in:
2026-09-17 11:41:30 -04:00
co-authored by Claude Opus 5
parent c8bfa6947c
commit ea108acac5
2 changed files with 5 additions and 5 deletions
+1 -2
View File
@@ -618,8 +618,7 @@ async def get_autoinject_config(user_id: int) -> dict:
THE TWO NUMBERS COME FROM THE REGISTRY NOW (#4102). They used to be read and THE TWO NUMBERS COME FROM THE REGISTRY NOW (#4102). They used to be read and
clamped here, and identically again in `get_writepath_config`, and again in clamped here, and identically again in `get_writepath_config`, and again in
three rule arms, and once more in `reply_preferences` — the duplication the three rule arms, and once more in `reply_preferences`. That was
shape ledger counts as canon #2860 across 295 of 372 siblings. That was
tolerable while the values were shipped constants. It stops being tolerable tolerable while the values were shipped constants. It stops being tolerable
once a tool is expected to MOVE them, because a tuning surface cannot be once a tool is expected to MOVE them, because a tuning surface cannot be
consistent across arms that each spell their configuration differently. consistent across arms that each spell their configuration differently.
+4 -3
View File
@@ -4,9 +4,10 @@ WHY THIS EXISTS
Six push arms each carried their own loose copy of the same shape: a settings Six push arms each carried their own loose copy of the same shape: a settings
key, a default, and a limit that was usually a module constant nobody could key, a default, and a limit that was usually a module constant nobody could
change. `_threshold()` was duplicated so widely that the shape ledger counts it change. The read-and-clamp was written out separately in `plugin_context` (twice
as canon across 295 of 372 judged siblings (snippet #2860). That was survivable over, for auto-inject and the write path), in three rule arms, and again as
while the numbers were shipped constants an operator occasionally edited. `reply_preferences._threshold`. That was survivable while the numbers were
shipped constants an operator occasionally edited.
It stops being survivable once the numbers are meant to MOVE. The operator's It stops being survivable once the numbers are meant to MOVE. The operator's
decision for this step: decision for this step: