Skip to content

Commit bbaa0f1

Browse files
committed
fix(ci): seal 14th fix-forward — revert cmd_over_fetch partial_success flip
CI on 83b4b68 failed: test_w809_over_fetch_empty_corpus_partial_success_bool_present asserts `partial_success is False` on empty corpus — the wave-1 A W805 Pattern-2 sweep over-applied the "disclose empty state" rule to cmd_over_fetch by flipping partial_success=True on empty_corpus / no_php_models branches. W809's contract (sealed by task #907 finding "no Pattern 2 gap") is: empty corpus → 0 real leaks → partial_success MUST be False. Over-fetch is legitimately a "0 leaks = healthy" check, not a missing-data Pattern-2 case. The new `detector_state` field on the envelope ("empty_corpus" / "no_php_models" / "scanned") provides the right disclosure mechanism — flipping partial_success was redundant AND contract-violating. Reverted the `if w805_empty_state is not None: partial_success = True` flip. Kept the detector_state field + verdict text changes (those still add real signal). Tests/test_w809_over_fetch_empty_corpus.py: 5/5 pass.
1 parent 83b4b68 commit bbaa0f1

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/roam/commands/cmd_over_fetch.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,15 +1434,14 @@ def over_fetch_cmd(ctx, threshold, limit, leaks_only, persist):
14341434
# don't break. The summary carries the headline counts so agents
14351435
# can read the verdict line and skip the full envelope.
14361436
# Pre-existing partial_success semantic (leaks present) is
1437-
# preserved for back-compat. W805 layers an additional
1438-
# detector-input-state field (`detector_state`) for the
1439-
# empty-input case + flips partial_success on empty-input
1440-
# branches per the canonical Pattern-2 convention. The legacy
1441-
# `state` ("ok"/"leak") is preserved unchanged so existing
1442-
# consumers don't break.
1437+
# preserved for back-compat. W805 added detector-input-state
1438+
# disclosure via the `detector_state` field for the
1439+
# empty-corpus / no-PHP-models cases — partial_success stays
1440+
# False on those branches because 0 real leaks is genuinely
1441+
# healthy (W809 pins this contract: empty corpus → 0 real
1442+
# leaks → partial_success MUST be False). The legacy `state`
1443+
# ("ok"/"leak") is preserved unchanged.
14431444
partial_success = bare_count > 0 or unguarded_relation_count > 0
1444-
if w805_empty_state is not None:
1445-
partial_success = True
14461445
click.echo(
14471446
to_json(
14481447
json_envelope(

0 commit comments

Comments
 (0)