fix(learn): v1 also withholds function length (a leak by construction)

The leak audit found facts.function_lines separating fixed from vulnerable pair
sides (a fix guard lengthens the function: 0.80 untrusted_destination, 0.75
config_secrets). Input profiles may now name single features; v1 withholds the
engine and the function length from prompts, retrieval and the proposer summary.
A withheld feature keeps its instrument block in the distance (state still counts).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
This commit is contained in:
Marius Ciepluch
2026-10-01 19:51:49 +02:00
co-authored by Claude Opus 5.5
parent 9e3c83cfdc
commit 68294e9db3
5 changed files with 32 additions and 5 deletions
+2 -1
View File
@@ -157,7 +157,8 @@ def _signal_summary(example: Example, inputs: str = DEFAULT_INPUTS) -> dict[str,
hidden = withheld(inputs)
ran = {
k: v for k, v in example.x.items()
if v not in (None, 0, False) and not k.startswith("lang.") and not (k in BY_NAME and BY_NAME[k].instrument in hidden)
if v not in (None, 0, False) and not k.startswith("lang.") and k not in hidden
and not (k in BY_NAME and BY_NAME[k].instrument in hidden)
} # fmt: skip
return dict(sorted(ran.items())[:12])