v154: FOUR of six predicates are vacuous (150/150) - my prediction was wrong on pathprefix, whose prefix belongs to the SCAFFOLD not the content. Content gating is available almost exclusively where it does not matter: the vacuous gain transforms hold 96.58% of stack value. Caught two instrument defects - a default-OFF flag my probe never set, and a space-only predicate blind to 59 tabs. 1223 tests, 26/26 mutations fire (part 3)
Browse files- test_compressors.py +242 -0
- variance_analysis.json +163 -0
test_compressors.py
CHANGED
|
@@ -19246,5 +19246,247 @@ class TestPerRepairPredicatesAndMarkerPricing(unittest.TestCase):
|
|
| 19246 |
tok, src,
|
| 19247 |
tok + " reached the shipped compressor while unpromoted")
|
| 19248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19249 |
if __name__ == "__main__":
|
| 19250 |
unittest.main(verbosity=2)
|
|
|
|
| 19246 |
tok, src,
|
| 19247 |
tok + " reached the shipped compressor while unpromoted")
|
| 19248 |
|
| 19249 |
+
|
| 19250 |
+
class TestPredicateSelectivityAcrossTheStack(unittest.TestCase):
|
| 19251 |
+
"""Last turn the truncation marker's predicate turned out vacuous (at-cap bodies in 150/150 challenges). The
|
| 19252 |
+
open question was whether any OTHER transform I hold has a genuinely selective predicate. I measured all six.
|
| 19253 |
+
|
| 19254 |
+
MY PREDICTION WAS WRONG ON PATHPREFIX. I expected it to be selective - "not every challenge mentions the
|
| 19255 |
+
workspace path" - and it fires on 150/150. In hindsight the reason is structural: the harness constructs every
|
| 19256 |
+
challenge inside that workspace, so the prefix is a property of the SCAFFOLD, not of task content. I was
|
| 19257 |
+
reasoning about content when the predicate was about the container.
|
| 19258 |
+
|
| 19259 |
+
FOUR OF SIX PREDICATES ARE VACUOUS (marker, pathprefix, relabel, rolemark at 100% of challenges each); only
|
| 19260 |
+
tilde (31.3%) and wscollapse (81.3%) are selective.
|
| 19261 |
+
|
| 19262 |
+
TRAP 1 IS THE FINDING, and it is not a happy one. Pairing each predicate with its MEASURED gain: the three
|
| 19263 |
+
vacuous gain transforms carry +0.0243866763 = 96.58% of the stack's value, while the one selective gain
|
| 19264 |
+
transform carries +0.0008634527 = 3.42%. CONTENT GATING IS AVAILABLE ALMOST EXCLUSIVELY WHERE IT DOES NOT
|
| 19265 |
+
MATTER. The transforms worth money fire everywhere; the transform with a real predicate is the weakest member.
|
| 19266 |
+
|
| 19267 |
+
TRAP 3 gives a third kind of answer, neither "gate it" nor "the transform is bad": a real gate exists for
|
| 19268 |
+
wscollapse, it is free, and it protects the smallest gain in the stack. AVAILABLE AND NEARLY POINTLESS IS NOT
|
| 19269 |
+
THE SAME AS UNAVAILABLE.
|
| 19270 |
+
|
| 19271 |
+
TWO INSTRUMENT DEFECTS, BOTH CAUGHT BY VALIDATING AGAINST THE LIVE VARIANT. First, wscollapse produced output
|
| 19272 |
+
byte-identical to shipped on all 150 challenges while I have a gain booked for it - because WS_COLLAPSE is
|
| 19273 |
+
default OFF and my probe never set SOMA_WS_COLLAPSE. The zero was my harness, not the transform. Second, with
|
| 19274 |
+
the flag on, the variant changed output on 2 challenges my predicate called empty, so my "forfeits exactly 0
|
| 19275 |
+
occurrences" claim was WRONG: I searched only for interior SPACE runs, and the variant also collapses TAB runs.
|
| 19276 |
+
Challenges 1649 and 1661 hold 59 tabs with no multi-space run. The corrected predicate is EXACT on all 150 -
|
| 19277 |
+
0 too strict, 0 too loose - and moves occurrences 589 -> 623, skipped challenges 30 -> 28, surface reduction
|
| 19278 |
+
10.0% -> 9.53%.
|
| 19279 |
+
"""
|
| 19280 |
+
|
| 19281 |
+
RP = Path("/var/lib/octave/sn114/repo/sel_report.json")
|
| 19282 |
+
PR = Path("/var/lib/octave/sn114/repo/sel_predicates.json")
|
| 19283 |
+
CO = Path("/var/lib/octave/sn114/repo/sel_concentration.json")
|
| 19284 |
+
FX = Path("/var/lib/octave/sn114/repo/sel_fixed.json")
|
| 19285 |
+
MS = Path("/var/lib/octave/sn114/repo/sel_missed.json")
|
| 19286 |
+
|
| 19287 |
+
@classmethod
|
| 19288 |
+
def setUpClass(cls):
|
| 19289 |
+
for name, path in (("rp", cls.RP), ("pr", cls.PR), ("co", cls.CO),
|
| 19290 |
+
("fx", cls.FX), ("ms", cls.MS)):
|
| 19291 |
+
if not path.exists():
|
| 19292 |
+
raise unittest.SkipTest("selectivity result missing: " + path.name)
|
| 19293 |
+
setattr(cls, name, json.loads(path.read_text()))
|
| 19294 |
+
|
| 19295 |
+
def test_population_is_non_vacuous(self):
|
| 19296 |
+
self.assertEqual(self.pr["n"], 150)
|
| 19297 |
+
self.assertEqual(
|
| 19298 |
+
len(self.pr["predicates"]), 6,
|
| 19299 |
+
msg="the predicate census no longer covers all six transforms")
|
| 19300 |
+
|
| 19301 |
+
def test_four_predicates_are_vacuous(self):
|
| 19302 |
+
v = set(self.pr["vacuous"])
|
| 19303 |
+
self.assertEqual(
|
| 19304 |
+
v, {"marker", "pathprefix", "relabel", "rolemark"},
|
| 19305 |
+
msg="the set of vacuous predicates changed, so the central census result "
|
| 19306 |
+
"moved")
|
| 19307 |
+
for k in v:
|
| 19308 |
+
self.assertGreaterEqual(
|
| 19309 |
+
self.pr["predicates"][k]["pct"], 95.0,
|
| 19310 |
+
msg=k + " is recorded as vacuous but no longer fires on >=95% of "
|
| 19311 |
+
"challenges")
|
| 19312 |
+
|
| 19313 |
+
def test_two_predicates_are_selective(self):
|
| 19314 |
+
s = set(self.pr["selective"])
|
| 19315 |
+
self.assertEqual(
|
| 19316 |
+
s, {"tilde", "wscollapse"},
|
| 19317 |
+
msg="the set of selective predicates changed")
|
| 19318 |
+
for k in s:
|
| 19319 |
+
self.assertLess(
|
| 19320 |
+
self.pr["predicates"][k]["pct"], 95.0,
|
| 19321 |
+
msg=k + " is recorded as selective but now fires nearly everywhere")
|
| 19322 |
+
self.assertGreater(
|
| 19323 |
+
self.pr["predicates"][k]["occurrences"], 0,
|
| 19324 |
+
msg=k + " has no occurrences at all, so the predicate is empty rather "
|
| 19325 |
+
"than selective")
|
| 19326 |
+
|
| 19327 |
+
def test_pathprefix_prediction_failure_recorded(self):
|
| 19328 |
+
self.assertIn(
|
| 19329 |
+
"WRONG ON PATHPREFIX", self.rp["prediction_outcome"],
|
| 19330 |
+
msg="the record that my selectivity prediction failed was removed")
|
| 19331 |
+
self.assertIn(
|
| 19332 |
+
"SCAFFOLD", self.rp["prediction_outcome"],
|
| 19333 |
+
msg="the explanation - the path belongs to the container, not the content - "
|
| 19334 |
+
"was removed")
|
| 19335 |
+
self.assertEqual(
|
| 19336 |
+
self.pr["predicates"]["pathprefix"]["challenges"], self.pr["n"],
|
| 19337 |
+
msg="pathprefix no longer fires on every challenge, which was the surprise")
|
| 19338 |
+
|
| 19339 |
+
def test_gating_is_available_where_it_does_not_matter(self):
|
| 19340 |
+
"""TRAP 1: selectivity is not value."""
|
| 19341 |
+
t = self.rp["trap1_selectivity_is_not_value"]
|
| 19342 |
+
g = t["measured_gains"]
|
| 19343 |
+
vac = g["pathprefix"] + g["relabel"] + g["rolemark"]
|
| 19344 |
+
sel = g["wscollapse"]
|
| 19345 |
+
self.assertGreater(
|
| 19346 |
+
vac, 0.0, "the vacuous gain transforms no longer carry positive value")
|
| 19347 |
+
self.assertGreater(
|
| 19348 |
+
sel, 0.0, "the selective gain transform no longer carries positive value")
|
| 19349 |
+
self.assertGreater(
|
| 19350 |
+
vac, sel * 10,
|
| 19351 |
+
msg="the vacuous transforms no longer dominate the selective one by 10x, so "
|
| 19352 |
+
"the 'gating where it does not matter' conclusion is gone")
|
| 19353 |
+
self.assertGreater(
|
| 19354 |
+
t["vacuous_share_pct"], 90.0,
|
| 19355 |
+
msg="the vacuous share of stack value fell below 90%")
|
| 19356 |
+
# anchor the derived share to the raw gains
|
| 19357 |
+
self.assertAlmostEqual(
|
| 19358 |
+
100.0 * vac / (vac + sel), t["vacuous_share_pct"], places=1,
|
| 19359 |
+
msg="the recorded vacuous share no longer matches the measured gains")
|
| 19360 |
+
|
| 19361 |
+
def test_wscollapse_is_the_weakest_member(self):
|
| 19362 |
+
g = self.rp["trap1_selectivity_is_not_value"]["measured_gains"]
|
| 19363 |
+
for k in ("pathprefix", "relabel", "rolemark"):
|
| 19364 |
+
self.assertGreater(
|
| 19365 |
+
g[k], g["wscollapse"],
|
| 19366 |
+
msg=k + " no longer exceeds wscollapse, so the selective transform is "
|
| 19367 |
+
"not the weakest member")
|
| 19368 |
+
|
| 19369 |
+
def test_default_off_harness_defect_recorded(self):
|
| 19370 |
+
d = self.rp["harness_defect_caught_by_validation"]
|
| 19371 |
+
self.assertIn(
|
| 19372 |
+
"MY HARNESS, NOT THE TRANSFORM", d["diagnosis"],
|
| 19373 |
+
msg="the record that the zero-change result was a harness defect was removed")
|
| 19374 |
+
self.assertIn("SOMA_WS_COLLAPSE", d["diagnosis"])
|
| 19375 |
+
|
| 19376 |
+
def test_predicate_defect_recorded_and_fixed(self):
|
| 19377 |
+
d = self.rp["predicate_defect_caught_and_fixed"]
|
| 19378 |
+
self.assertIn(
|
| 19379 |
+
"TAB runs", d["cause"],
|
| 19380 |
+
msg="the cause of the incomplete predicate - unhandled tab runs - was "
|
| 19381 |
+
"removed")
|
| 19382 |
+
self.assertGreater(
|
| 19383 |
+
len(d["missed"]), 0,
|
| 19384 |
+
msg="the record of the challenges my predicate missed is empty, so this "
|
| 19385 |
+
"test would pass without evidence")
|
| 19386 |
+
self.assertEqual(
|
| 19387 |
+
len(d["missed"]), len(self.ms),
|
| 19388 |
+
msg="the recorded miss list no longer matches the measurement file")
|
| 19389 |
+
for m in self.ms:
|
| 19390 |
+
self.assertGreater(
|
| 19391 |
+
m["tabs_in_output"], 0,
|
| 19392 |
+
msg="a missed challenge has no tabs, contradicting the diagnosis")
|
| 19393 |
+
|
| 19394 |
+
def test_corrected_predicate_is_exact(self):
|
| 19395 |
+
f = self.fx
|
| 19396 |
+
self.assertEqual(
|
| 19397 |
+
f["too_strict"], 0,
|
| 19398 |
+
msg="the corrected predicate is too strict again, so the gate would forfeit "
|
| 19399 |
+
"real occurrences")
|
| 19400 |
+
self.assertEqual(
|
| 19401 |
+
f["too_loose"], 0,
|
| 19402 |
+
msg="the corrected predicate became loose, overstating the gate surface")
|
| 19403 |
+
self.assertTrue(f["exact"])
|
| 19404 |
+
self.assertGreater(
|
| 19405 |
+
f["agree"], 100,
|
| 19406 |
+
msg="the corrected predicate now agrees with the variant on fewer than 100 "
|
| 19407 |
+
"challenges")
|
| 19408 |
+
self.assertGreater(
|
| 19409 |
+
f["occurrences"], self.co["occurrences"],
|
| 19410 |
+
msg="the corrected predicate no longer finds MORE occurrences than the "
|
| 19411 |
+
"space-only probe, which was the whole correction")
|
| 19412 |
+
self.assertLess(
|
| 19413 |
+
f["skipped_challenges"], self.co["zero_challenges"],
|
| 19414 |
+
msg="the corrected predicate no longer skips fewer challenges")
|
| 19415 |
+
|
| 19416 |
+
def test_wscollapse_default_off_LIVE(self):
|
| 19417 |
+
"""Drive the live variant: it must be inert without the env flag and active with
|
| 19418 |
+
it. This is the defect that fooled my own probe."""
|
| 19419 |
+
import importlib.util as _iu
|
| 19420 |
+
import os as _os
|
| 19421 |
+
pl = "/var/lib/octave/sn114/external/SOMA-plugin/"
|
| 19422 |
+
|
| 19423 |
+
def _load(nm, fn):
|
| 19424 |
+
spec = _iu.spec_from_file_location(nm, pl + fn)
|
| 19425 |
+
m = _iu.module_from_spec(spec)
|
| 19426 |
+
spec.loader.exec_module(m)
|
| 19427 |
+
return m
|
| 19428 |
+
|
| 19429 |
+
nl = chr(10)
|
| 19430 |
+
tab = chr(9)
|
| 19431 |
+
probe = nl.join(['<message role="user">', "<text>",
|
| 19432 |
+
"def f():", tab + tab + "return 1",
|
| 19433 |
+
"a" + (" " * 6) + "b",
|
| 19434 |
+
"</text>", "</message>"])
|
| 19435 |
+
prev = _os.environ.get("SOMA_WS_COLLAPSE")
|
| 19436 |
+
try:
|
| 19437 |
+
_os.environ.pop("SOMA_WS_COLLAPSE", None)
|
| 19438 |
+
sh = _load("sel_sh_live", "structural_cot_compressor.py")
|
| 19439 |
+
off = _load("sel_ws_off", "structural_wscollapse_compressor.py")
|
| 19440 |
+
self.assertFalse(
|
| 19441 |
+
off.WS_COLLAPSE,
|
| 19442 |
+
msg="the wscollapse variant is no longer default OFF, which would mean "
|
| 19443 |
+
"an unpromoted transform is live")
|
| 19444 |
+
base = sh.compress_content(probe)
|
| 19445 |
+
self.assertEqual(
|
| 19446 |
+
off.compress_content(probe), base,
|
| 19447 |
+
msg="the disabled variant no longer matches shipped byte for byte")
|
| 19448 |
+
_os.environ["SOMA_WS_COLLAPSE"] = "1"
|
| 19449 |
+
on = _load("sel_ws_on", "structural_wscollapse_compressor.py")
|
| 19450 |
+
self.assertTrue(
|
| 19451 |
+
on.WS_COLLAPSE,
|
| 19452 |
+
msg="setting SOMA_WS_COLLAPSE=1 no longer enables the variant")
|
| 19453 |
+
got = on.compress_content(probe)
|
| 19454 |
+
self.assertNotEqual(
|
| 19455 |
+
got, base,
|
| 19456 |
+
msg="the enabled variant no longer changes output on a probe holding "
|
| 19457 |
+
"both a tab run and a 6-space run")
|
| 19458 |
+
# assert on values COPIED from the printed output: the 6-space INTERIOR run
|
| 19459 |
+
# collapses, while the leading tab indentation is preserved by design (v140)
|
| 19460 |
+
self.assertIn(
|
| 19461 |
+
"a b", got,
|
| 19462 |
+
msg="the enabled variant no longer collapses an interior 6-space run")
|
| 19463 |
+
self.assertNotIn(
|
| 19464 |
+
"a" + (" " * 6) + "b", got,
|
| 19465 |
+
msg="the interior space run survived, so the variant did nothing")
|
| 19466 |
+
self.assertIn(
|
| 19467 |
+
tab + tab + "return 1", got,
|
| 19468 |
+
msg="leading tab indentation was destroyed, which is the v140 defect")
|
| 19469 |
+
# and a tab in INTERIOR position must collapse
|
| 19470 |
+
probe2 = nl.join(['<message role="user">', "<text>",
|
| 19471 |
+
"x = 1" + tab + tab + "# note", "</text>", "</message>"])
|
| 19472 |
+
got2 = on.compress_content(probe2)
|
| 19473 |
+
self.assertNotIn(
|
| 19474 |
+
tab + tab, got2,
|
| 19475 |
+
msg="an interior tab run survived, which was the behaviour my predicate "
|
| 19476 |
+
"had missed on challenges 1649 and 1661")
|
| 19477 |
+
finally:
|
| 19478 |
+
if prev is None:
|
| 19479 |
+
_os.environ.pop("SOMA_WS_COLLAPSE", None)
|
| 19480 |
+
else:
|
| 19481 |
+
_os.environ["SOMA_WS_COLLAPSE"] = prev
|
| 19482 |
+
|
| 19483 |
+
def test_shipped_has_no_ws_collapse(self):
|
| 19484 |
+
src = Path("/var/lib/octave/sn114/external/SOMA-plugin/"
|
| 19485 |
+
"structural_cot_compressor.py").read_text()
|
| 19486 |
+
for tok in ("WS_COLLAPSE", "WS_TAB_RUN", "collapse_whitespace"):
|
| 19487 |
+
self.assertNotIn(
|
| 19488 |
+
tok, src,
|
| 19489 |
+
tok + " reached the shipped compressor while unpromoted")
|
| 19490 |
+
|
| 19491 |
if __name__ == "__main__":
|
| 19492 |
unittest.main(verbosity=2)
|
variance_analysis.json
CHANGED
|
@@ -153,6 +153,14 @@
|
|
| 153 |
]
|
| 154 |
},
|
| 155 |
"findings": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
"THE MARKER PREDICATE IS VACUOUS: an at-cap span body is present in 150 of 150 challenges (100.0%) and in all 76 unclamped ones. There is NO content gate for the truncation marker - truncated bodies are what the compressor produces. Trap 2 caught this before I could claim a gate helped",
|
| 157 |
"SO LAST TURN'S FRAMING WAS WRONG. I called needfix 'content-triggered repair'; it was the marker RIDING on the tilde's unrelated predicate - 'markers wherever tildes happen to be'. A GATE THAT SAVES MONEY IS NOT THEREBY A PRINCIPLED GATE: check that the predicate belongs to the thing it gates",
|
| 158 |
"AND THE COINCIDENTAL GATE WAS ADVERSE, NOT MERELY ARBITRARY: the 47 tilde-bearing challenges average 23.596 at-cap bodies against 11.65 for the other 103 (2.025x) and hold 48.03% of all 2309 at-cap bodies while being 31.3% of challenges. Marking them cost 22.9 tokens/challenge against 15.1 on average - the gate selected exactly the MOST expensive challenges to mark",
|
|
@@ -25909,5 +25917,160 @@
|
|
| 25909 |
"policy_now_supported": "tilde repair on the 47 challenges that contain a tilde, compression where unclamped, and NO truncation marker - because the marker cannot be gated and its benefit cannot be priced with the instruments available",
|
| 25910 |
"still_not_promoted": "shipped remains byte-identical to pristine; the flip-probability asymmetry is still unmeasured",
|
| 25911 |
"mutation_note": "a third live mutation (renaming a _truncate helper) was DISCARDED because its anchor count was 0 - the symbol does not exist in shipped. v151's lesson: a mutation that changes nothing produces a meaningless result either way"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25912 |
}
|
| 25913 |
}
|
|
|
|
| 153 |
]
|
| 154 |
},
|
| 155 |
"findings": [
|
| 156 |
+
"FOUR OF SIX PREDICATES ARE VACUOUS: marker, pathprefix, relabel and rolemark each fire on 150/150 challenges; only tilde (31.33%) and wscollapse (80.0%) are selective",
|
| 157 |
+
"MY PREDICTION WAS WRONG ON PATHPREFIX. I expected it selective - 'not every challenge mentions the workspace path' - and it fires everywhere. The reason is structural: the harness builds every challenge inside that workspace, so the prefix is a property of the SCAFFOLD, not of task content. I was reasoning about content when the predicate was about the container",
|
| 158 |
+
"TRAP 1 IS THE FINDING: the three vacuous GAIN transforms carry +0.0243866763 = 96.58% of the stack's value while the one selective gain transform carries +0.0008634527 = 3.42%. CONTENT GATING IS AVAILABLE ALMOST EXCLUSIVELY WHERE IT DOES NOT MATTER - the transforms worth money fire everywhere, and the transform with a real predicate is the weakest stack member",
|
| 159 |
+
"TRAP 3 gives a third kind of answer, neither 'gate it' nor 'the transform is bad': a real free gate exists for wscollapse and it protects the smallest gain in the stack. AVAILABLE AND NEARLY POINTLESS IS NOT THE SAME AS UNAVAILABLE",
|
| 160 |
+
"A HARNESS DEFECT CAUGHT BY VALIDATION: wscollapse produced output byte-identical to shipped on all 150 challenges while I have a gain booked for it - because WS_COLLAPSE is default OFF and my probe never set SOMA_WS_COLLAPSE. The zero was my harness, not the transform",
|
| 161 |
+
"A PREDICATE DEFECT CAUGHT THE SAME WAY: with the flag on, the variant changed output on 2 challenges my predicate called empty, so my 'forfeits exactly 0 occurrences' claim was WRONG. I searched only for interior SPACE runs; the variant also collapses TAB runs, and challenges 1649/1661 hold 59 tabs with no multi-space run. The corrected predicate is EXACT on all 150 (0 too strict, 0 too loose), moving occurrences 589->623, skipped challenges 30->28, surface reduction 10.0%->9.53%. A PREDICATE MUST BE VALIDATED AGAINST THE TRANSFORM IT GATES, BY DRIVING IT",
|
| 162 |
+
"AND MY FIRST TEST ASSERTION WAS RECALLED RATHER THAN COPIED FROM THE VALUE, again: I asserted the variant collapses a tab run, but my probe put the tabs in LEADING INDENTATION, which wscollapse preserves by design (v140). Fixed by asserting on the printed interior collapse and adding an interior-tab probe",
|
| 163 |
+
"1223 tests pass; 26 mutations attempted and all 26 fire (22 stored-measurement, 4 live source including two behavioural regex neuterings). All five sources byte-identical to pristine",
|
| 164 |
"THE MARKER PREDICATE IS VACUOUS: an at-cap span body is present in 150 of 150 challenges (100.0%) and in all 76 unclamped ones. There is NO content gate for the truncation marker - truncated bodies are what the compressor produces. Trap 2 caught this before I could claim a gate helped",
|
| 165 |
"SO LAST TURN'S FRAMING WAS WRONG. I called needfix 'content-triggered repair'; it was the marker RIDING on the tilde's unrelated predicate - 'markers wherever tildes happen to be'. A GATE THAT SAVES MONEY IS NOT THEREBY A PRINCIPLED GATE: check that the predicate belongs to the thing it gates",
|
| 166 |
"AND THE COINCIDENTAL GATE WAS ADVERSE, NOT MERELY ARBITRARY: the 47 tilde-bearing challenges average 23.596 at-cap bodies against 11.65 for the other 103 (2.025x) and hold 48.03% of all 2309 at-cap bodies while being 31.3% of challenges. Marking them cost 22.9 tokens/challenge against 15.1 on average - the gate selected exactly the MOST expensive challenges to mark",
|
|
|
|
| 25917 |
"policy_now_supported": "tilde repair on the 47 challenges that contain a tilde, compression where unclamped, and NO truncation marker - because the marker cannot be gated and its benefit cannot be priced with the instruments available",
|
| 25918 |
"still_not_promoted": "shipped remains byte-identical to pristine; the flip-probability asymmetry is still unmeasured",
|
| 25919 |
"mutation_note": "a third live mutation (renaming a _truncate helper) was DISCARDED because its anchor count was 0 - the symbol does not exist in shipped. v151's lesson: a mutation that changes nothing produces a meaningless result either way"
|
| 25920 |
+
},
|
| 25921 |
+
"predicate_selectivity_across_the_stack": {
|
| 25922 |
+
"question": "last turn's marker predicate was vacuous. Does any OTHER transform I hold have a genuinely selective predicate?",
|
| 25923 |
+
"prediction": "pathprefix selective; relabel and rolemark vacuous like the marker",
|
| 25924 |
+
"prediction_outcome": "WRONG ON PATHPREFIX - it fires on 150/150. I was reasoning about task content when the workspace path is a property of the SCAFFOLD: the harness builds every challenge inside it",
|
| 25925 |
+
"selectivity": {
|
| 25926 |
+
"n": 150,
|
| 25927 |
+
"predicates": {
|
| 25928 |
+
"pathprefix": {
|
| 25929 |
+
"challenges": 150,
|
| 25930 |
+
"pct": 100.0,
|
| 25931 |
+
"occurrences": 1991,
|
| 25932 |
+
"mean_per_challenge": 13.273,
|
| 25933 |
+
"max_per_challenge": 71,
|
| 25934 |
+
"vacuous_at_challenge_level": true
|
| 25935 |
+
},
|
| 25936 |
+
"relabel": {
|
| 25937 |
+
"challenges": 150,
|
| 25938 |
+
"pct": 100.0,
|
| 25939 |
+
"occurrences": 3381,
|
| 25940 |
+
"mean_per_challenge": 22.54,
|
| 25941 |
+
"max_per_challenge": 166,
|
| 25942 |
+
"vacuous_at_challenge_level": true
|
| 25943 |
+
},
|
| 25944 |
+
"rolemark": {
|
| 25945 |
+
"challenges": 150,
|
| 25946 |
+
"pct": 100.0,
|
| 25947 |
+
"occurrences": 3639,
|
| 25948 |
+
"mean_per_challenge": 24.26,
|
| 25949 |
+
"max_per_challenge": 168,
|
| 25950 |
+
"vacuous_at_challenge_level": true
|
| 25951 |
+
},
|
| 25952 |
+
"wscollapse": {
|
| 25953 |
+
"challenges": 120,
|
| 25954 |
+
"pct": 80.0,
|
| 25955 |
+
"occurrences": 589,
|
| 25956 |
+
"mean_per_challenge": 3.927,
|
| 25957 |
+
"max_per_challenge": 75,
|
| 25958 |
+
"vacuous_at_challenge_level": false
|
| 25959 |
+
},
|
| 25960 |
+
"marker": {
|
| 25961 |
+
"challenges": 150,
|
| 25962 |
+
"pct": 100.0,
|
| 25963 |
+
"occurrences": 2309,
|
| 25964 |
+
"mean_per_challenge": 15.393,
|
| 25965 |
+
"max_per_challenge": 104,
|
| 25966 |
+
"vacuous_at_challenge_level": true
|
| 25967 |
+
},
|
| 25968 |
+
"tilde": {
|
| 25969 |
+
"challenges": 47,
|
| 25970 |
+
"pct": 31.33,
|
| 25971 |
+
"occurrences": 269,
|
| 25972 |
+
"mean_per_challenge": 1.793,
|
| 25973 |
+
"max_per_challenge": 38,
|
| 25974 |
+
"vacuous_at_challenge_level": false
|
| 25975 |
+
}
|
| 25976 |
+
},
|
| 25977 |
+
"vacuous": [
|
| 25978 |
+
"marker",
|
| 25979 |
+
"pathprefix",
|
| 25980 |
+
"relabel",
|
| 25981 |
+
"rolemark"
|
| 25982 |
+
],
|
| 25983 |
+
"selective": [
|
| 25984 |
+
"tilde",
|
| 25985 |
+
"wscollapse"
|
| 25986 |
+
]
|
| 25987 |
+
},
|
| 25988 |
+
"four_of_six_vacuous": {
|
| 25989 |
+
"vacuous": [
|
| 25990 |
+
"marker",
|
| 25991 |
+
"pathprefix",
|
| 25992 |
+
"relabel",
|
| 25993 |
+
"rolemark"
|
| 25994 |
+
],
|
| 25995 |
+
"selective": [
|
| 25996 |
+
"tilde",
|
| 25997 |
+
"wscollapse"
|
| 25998 |
+
],
|
| 25999 |
+
"note": "threshold 95% of challenges"
|
| 26000 |
+
},
|
| 26001 |
+
"trap1_selectivity_is_not_value": {
|
| 26002 |
+
"measured_gains": {
|
| 26003 |
+
"pathprefix": 0.0137724979,
|
| 26004 |
+
"relabel": 0.0066846686,
|
| 26005 |
+
"rolemark": 0.0039295098,
|
| 26006 |
+
"wscollapse": 0.0008634527,
|
| 26007 |
+
"marker": -0.0028215624,
|
| 26008 |
+
"tilde": -2.10764e-05
|
| 26009 |
+
},
|
| 26010 |
+
"vacuous_gain_transforms_component": 0.0243866763,
|
| 26011 |
+
"selective_gain_transform_component": 0.0008634527,
|
| 26012 |
+
"vacuous_share_pct": 96.58,
|
| 26013 |
+
"finding": "the three vacuous GAIN transforms carry +0.0243866763 = 96.6% of the stack value; the one selective gain transform carries +0.0008634527 = 3.4%. CONTENT GATING IS AVAILABLE ALMOST EXCLUSIVELY WHERE IT DOES NOT MATTER - the transforms worth money fire everywhere, and the transform with a real predicate is the weakest stack member"
|
| 26014 |
+
},
|
| 26015 |
+
"trap2_both_granularities": {
|
| 26016 |
+
"concentration": {
|
| 26017 |
+
"occurrences": 589,
|
| 26018 |
+
"zero_challenges": 30,
|
| 26019 |
+
"median": 2.0,
|
| 26020 |
+
"top1_pct": 12.73,
|
| 26021 |
+
"top5_pct": 31.75,
|
| 26022 |
+
"top10_pct": 43.8,
|
| 26023 |
+
"top30_pct": 69.44,
|
| 26024 |
+
"chars_skipped": 98780,
|
| 26025 |
+
"chars_total": 987484,
|
| 26026 |
+
"surface_reduction_pct": 10.0
|
| 26027 |
+
},
|
| 26028 |
+
"finding": "wscollapse occurrences are concentrated - top 10 challenges hold 43.8% of them, one alone 12.73% - but the gate is at challenge level and skips only zero-occurrence challenges, so concentration does not threaten it"
|
| 26029 |
+
},
|
| 26030 |
+
"trap3_third_kind_of_answer": "neither \"gate it\" nor \"the transform is bad\": a real gate exists, it is free, and it protects the smallest gain in the stack. AVAILABLE AND NEARLY POINTLESS IS NOT THE SAME AS UNAVAILABLE",
|
| 26031 |
+
"harness_defect_caught_by_validation": {
|
| 26032 |
+
"symptom": "the wscollapse variant produced output IDENTICAL to shipped on all 150 challenges while I have +0.0008634527 booked for it",
|
| 26033 |
+
"diagnosis": "WS_COLLAPSE = os.environ.get(\"SOMA_WS_COLLAPSE\",\"0\")==\"1\" is default OFF by design, and my validation probe never set the env var. THE 0-CHANGES RESULT WAS MY HARNESS, NOT THE TRANSFORM",
|
| 26034 |
+
"lesson": "a default-OFF variant is inert unless the probe enables it - diagnose a zero result before interpreting it (v149)"
|
| 26035 |
+
},
|
| 26036 |
+
"predicate_defect_caught_and_fixed": {
|
| 26037 |
+
"symptom": "with the flag on, the variant changed output on 2 challenges my predicate called empty, so the 0-forfeit claim was WRONG",
|
| 26038 |
+
"cause": "my probe only looked for interior SPACE runs; the variant also collapses TAB runs via WS_TAB_RUN. Challenges 1649 and 1661 hold 59 tabs with no multi-space run",
|
| 26039 |
+
"missed": [
|
| 26040 |
+
{
|
| 26041 |
+
"cid": "1649",
|
| 26042 |
+
"n_diff": 14,
|
| 26043 |
+
"tabs_in_output": 56,
|
| 26044 |
+
"sample": [
|
| 26045 |
+
"'-\\t\\t\\tret = fcntl.flock(_fd(f), flags)'",
|
| 26046 |
+
"'-\\t\\t\\treturn ret == 0'",
|
| 26047 |
+
"'+\\t\\t\\ttry:'"
|
| 26048 |
+
]
|
| 26049 |
+
},
|
| 26050 |
+
{
|
| 26051 |
+
"cid": "1661",
|
| 26052 |
+
"n_diff": 1,
|
| 26053 |
+
"tabs_in_output": 3,
|
| 26054 |
+
"sample": [
|
| 26055 |
+
"\">>> o.c8 = F('name')\\t# model has char fields 'c8' and 'name'\""
|
| 26056 |
+
]
|
| 26057 |
+
}
|
| 26058 |
+
],
|
| 26059 |
+
"corrected": {
|
| 26060 |
+
"agree": 122,
|
| 26061 |
+
"too_loose": 0,
|
| 26062 |
+
"too_strict": 0,
|
| 26063 |
+
"neither": 28,
|
| 26064 |
+
"occurrences": 623,
|
| 26065 |
+
"skipped_challenges": 28,
|
| 26066 |
+
"chars_skipped": 94137,
|
| 26067 |
+
"chars_total": 987484,
|
| 26068 |
+
"surface_reduction_pct": 9.53,
|
| 26069 |
+
"exact": true
|
| 26070 |
+
},
|
| 26071 |
+
"result": "the corrected predicate (space runs OR tabs) is EXACT on all 150: 0 too strict, 0 too loose. Occurrences 589 -> 623, skipped challenges 30 -> 28, surface reduction 10.0% -> 9.53%",
|
| 26072 |
+
"lesson": "A PREDICATE MUST BE VALIDATED AGAINST THE TRANSFORM IT GATES, by driving it - my probe was the incomplete artefact, as it has been ~66 times now"
|
| 26073 |
+
},
|
| 26074 |
+
"still_not_promoted": "shipped remains byte-identical to pristine; the flip-probability asymmetry is still unmeasured"
|
| 26075 |
}
|
| 26076 |
}
|