feat(model): shipped joins the evidence vector as a within-tier weight; v5 baseline

v5 (parameter-fed carried confirmed by the exact flow): pmpro 69, wpstatistics 172, mwwpform 68,
vampi 16. Reading the recorded head of each order: every region ahead of a CVE is in its tier on a tied
or higher score, and 10 of the 67 ahead of MW WP Form's are test-mail.php. The build's own word on what
is product was on the region and not in the vector; it is now, at -2.0 for an unshipped file. Orders
only, never promotes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
This commit is contained in:
Marius Ciepluch
2026-09-11 13:45:00 +02:00
co-authored by Claude Fable 5.1
parent 983eda5886
commit 2de873274f
4 changed files with 3493 additions and 0 deletions
+7
View File
@@ -32,6 +32,9 @@ WEIGHTS: dict[str, float] = {
"source_near": 1.0, # a modelled source within the arbiter's callDepth
"entry": 0.5, # parameters untrusted by contract
"access_declared_public": 1.0,
# A file the build does not ship: tests, fixtures, examples. Measured: 10 of the 67 regions ahead of
# MW WP Form's CVE were test-mail.php.
"unshipped": -2.0,
}
OPEN_SINK_CAP = 5
CLEANSED_SINK_CAP = 3
@@ -66,6 +69,7 @@ class Evidence:
access_declared_public: bool = False # declared, not inferred -- "no decorator found" is not "public"
carried: bool | None = None # stage one of the two-stage join, the STRONG form; None where it was not computed
carried_weak: bool = False # the weak form: a field assigned from a parameter of its method. Orders, never promotes.
shipped: bool = True # the project's own build declaration names this file (regions.shipped); tests and fixtures are not
bound_names: tuple[str, ...] = field(default=()) # sink names the shape test treats as bound at arity >= 2
@property
@@ -114,6 +118,7 @@ class Evidence:
+ (w["source_near"] if self.source_near else 0.0)
+ (w["entry"] if self.entry else 0.0)
+ (w["access_declared_public"] if self.access_declared_public else 0.0)
+ (w["unshipped"] if not self.shipped else 0.0)
)
@property
@@ -129,6 +134,7 @@ def evidence_from_rows(
access_declared_public: bool = False,
carried: bool | None = None,
bound_names: Sequence[str] = (),
shipped: bool = True,
) -> Evidence | None:
"""Read the query's evidence rows for one request. ``None`` when the query did not answer.
@@ -165,6 +171,7 @@ def evidence_from_rows(
if "carried" in summary
else carried,
carried_weak=str(summary.get("carriedKind", "")) == "parameter",
shipped=shipped,
bound_names=tuple(bound_names),
)
+1
View File
@@ -397,6 +397,7 @@ def _evidence_pass(
# the brief names it as the field to thread through next.
access_declared_public=region.rank >= 1.0,
bound_names=getattr(spec, "safe_shape_sinks", ()),
shipped=bool(getattr(region, "shipped", True)),
)
if evidence is not None:
out[_pair_key(region, spec)] = evidence