docs(6209): wide net, startup, stamps, slippage, miss route and parity tests
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m10s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 1m23s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m10s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 1m23s
Eight more test files state the property they pin as a present-tense fact. Incident narratives (a dated storage stall, a week of zero tuning events, a two-project poisoned ledger, a twenty-site owner audit) become the failure shape each test defends; one-install figures that name a rule become a general worked example with the calibration numbers kept. The family-grouping regression guard is renamed for what it checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
"""A semantic MISS is not evidence, and the divergence check never reads one (#4208).
|
||||
"""A semantic MISS is not evidence, and the divergence check never reads one.
|
||||
|
||||
WHAT THIS IS ABOUT. #4204 gave the divergence check a structural gate, which
|
||||
silenced one of the five false prompts it was filed for. The other four are
|
||||
`def` helpers beside an `async def` service canon — callables beside a
|
||||
callable — and differ from #2793's acceptance case (a hand-rolled sync
|
||||
`confirmDanger` where an async confirm helper is canon) only by the JOB they
|
||||
do. A signature does not carry a job.
|
||||
WHAT THIS IS ABOUT. The divergence check's structural gate separates a type
|
||||
from a callable canon. `def` helpers beside an `async def` service canon —
|
||||
callables beside a callable — differ from the readout's acceptance case (a
|
||||
hand-rolled sync `confirmDanger` where an async confirm helper is canon) only
|
||||
by the JOB they do. A signature does not carry a job.
|
||||
|
||||
#4208 tried meaning: store the proposer's semantic "compared, nothing cleared
|
||||
the floor" and let it withdraw the prompt. Measured live on 2026-09-22 it
|
||||
cannot discriminate. Judged instances of the service-unit canon score 0.68–
|
||||
0.71 against it at best, most below 0.66; helpers score 0.66–0.75 against
|
||||
snippets unrelated to them. The then-floor of 0.8 was reached by nothing, so
|
||||
the "miss" fired for nearly every body — the real divergence silenced exactly
|
||||
as the helper was. The gate was removed; the prompt asks and the judge
|
||||
answers. The same measurement moved the arm's floor down to the write-path
|
||||
hint's: 0.8 was sized for proposals nobody reads, and it proposed 0 of 150.
|
||||
Meaning cannot withdraw the prompt either. Judged instances of a service-unit
|
||||
canon score 0.68–0.71 against it at best, most below 0.66; helpers score
|
||||
0.66–0.75 against snippets unrelated to them. No floor separates the two, so a
|
||||
"compared, nothing cleared the floor" miss fires for nearly every body,
|
||||
silencing the real divergence exactly as it silences the helper. So the prompt
|
||||
asks and the judge answers, and the arm proposes at the write-path hint's
|
||||
floor: one sized for proposals nobody reads proposes almost nothing.
|
||||
|
||||
These tests pin what stayed: the arm proposes on a hit and says nothing on a
|
||||
miss, the divergence check does not consult it, and the capped pass reads new
|
||||
@@ -32,8 +29,8 @@ from scribe.services import shape_ledger
|
||||
from scribe.services.shape_ledger import _semantic_canon
|
||||
|
||||
# Comfortably over WRITEPATH_MIN_CODE_CHARS (48 non-whitespace characters), so
|
||||
# these tests exercise the comparison rather than the substance guard. One of
|
||||
# #4204's four survivors, quoted rather than invented.
|
||||
# these tests exercise the comparison rather than the substance guard. A real
|
||||
# helper body, quoted rather than invented.
|
||||
BODY = (
|
||||
"def is_registered(source: str) -> bool:\n"
|
||||
" return source in _REGISTRY and _REGISTRY[source].enabled\n"
|
||||
@@ -87,7 +84,7 @@ async def test_a_body_too_thin_to_embed_spends_no_embedding() -> None:
|
||||
|
||||
|
||||
async def test_no_allowed_canon_spends_no_search() -> None:
|
||||
"""The language-family gate (#2871) empties the allowed set routinely."""
|
||||
"""The language-family gate empties the allowed set routinely."""
|
||||
mock = _hits()
|
||||
with _patch(mock):
|
||||
assert await _semantic_canon(1, BODY, set()) is None
|
||||
@@ -97,7 +94,7 @@ async def test_no_allowed_canon_spends_no_search() -> None:
|
||||
async def test_the_arm_proposes_at_the_write_path_floor() -> None:
|
||||
"""It asks the write-path hint's question of the same documents, so it
|
||||
uses that surface's floor — not a stricter private one that yields no
|
||||
proposals for the judge to weigh (#4208)."""
|
||||
proposals for the judge to weigh."""
|
||||
from scribe.services.plugin_context import WRITEPATH_DEFAULT_THRESHOLD
|
||||
|
||||
mock = _hits()
|
||||
@@ -111,14 +108,14 @@ async def test_the_arm_proposes_at_the_write_path_floor() -> None:
|
||||
|
||||
def test_the_divergence_check_does_not_read_the_proposal_basis() -> None:
|
||||
"""The retired gate keyed on `proposal_basis`. Asserted on the function's
|
||||
structure (rule 167): any attribute read of it inside `flag_divergence` is
|
||||
structure: any attribute read of it inside `flag_divergence` is
|
||||
the miss being consulted again, whatever the constant is called."""
|
||||
tree = ast.parse(textwrap.dedent(inspect.getsource(shape_ledger.flag_divergence)))
|
||||
reads = [n for n in ast.walk(tree)
|
||||
if isinstance(n, ast.Attribute) and n.attr == "proposal_basis"]
|
||||
assert not reads, (
|
||||
"flag_divergence reads proposal_basis — a semantic miss is 'cannot "
|
||||
"tell' at the arm's floor (#4208), never 'not the canon'"
|
||||
"tell' at the arm's floor, never 'not the canon'"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user