feat(model): phase 2 measured (weights v1) and carried reported by the evidence branch

budget_at_recall by a real evidence pass over every region: pmpro 391 -> 116, wpstatistics 504 -> 223,
mwwpform 513 -> 292, vampi 16 -> 16. The gate (< 50) is not met. pmpro's CVE is inside its 121 tier-4
regions; WP Statistics's and MW WP Form's are one tier low because `carried` -- stage one of the
two-stage join -- was not reported as evidence. taint.sc now reports it where a sink exists, and the
vector reads the query's answer when given.

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 11:47:06 +02:00
co-authored by Claude Fable 5.1
parent 9f881b433e
commit 1741b6bed6
5 changed files with 192 additions and 1 deletions
+22
View File
@@ -123,3 +123,25 @@ def test_the_score_orders_within_a_tier_and_never_across_one() -> None:
cleansed = Evidence(sinks=(sink(1), sink(2, cleansed=True)), source_near=True)
assert cleansed.score < one.score, "a cleansed sink beside an open one counts against the pair"
assert sorted([many, one, local], key=lambda e: e.order_key, reverse=True) == [local, many, one]
def test_the_query_may_answer_carried_itself() -> None:
"""Stage one of the two-stage join, reported by the query as `carried`. When present it is the answer;
when absent the caller's value stands, and absent-and-unknown stays None rather than becoming False."""
from openultrasast.model.evidence import TIER_OPEN, TIER_OPEN_PUBLIC, evidence_from_rows
sink = {
"kind": "sink",
"sink": "unlink($f)",
"sinkLine": "259",
"sinkMethod": "_delete_files",
"sinkArity": 1,
"sinkArg0Literal": False,
"cleansedOnCall": False,
}
said = evidence_from_rows([{"kind": "summary", "sinks": 1, "sourceNear": True, "carried": True, "familyInRepo": True}, sink])
assert said is not None and said.carried is True and said.tier == TIER_OPEN_PUBLIC
silent = evidence_from_rows([{"kind": "summary", "sinks": 1, "sourceNear": True, "familyInRepo": True}, sink])
assert silent is not None and silent.carried is None and silent.tier == TIER_OPEN
told = evidence_from_rows([{"kind": "summary", "sinks": 1, "sourceNear": True, "familyInRepo": True}, sink], carried=True)
assert told is not None and told.carried is True