feat(row6): a proposal whose approach declared no requirement is unsupported

Stress round 6 validated three falsification arms, and every validated
approach rested only on run-level declarations nobody can attribute to one
approach. declare_requirement now takes a required approach_id (a mandate
id or own-proposal; an unknown id is refused naming the valid ones), and a
ValidatedProposal whose approach has neither a mandate requirement nor a
declaration under its own id becomes validator.Unsupported - a Rejection
subclass carrying the validator's own ruling, reported as `unsupported` in
coverage, the outcome artefact, the settlement and the judge, and never
counted or summed. The rule is active whenever the debate held the
declaration tool, the micro base included; the road and pre-pass paths are
untouched. Declaration quality is not judged, so the rule can be satisfied
by declaring any document the run read.

The v1 gate's row 6 probes pass; its artefact half reads IKKE MÅLT because
stress round 6 predates approach-addressed declarations, and IKKE MÅLT is
never green - it fails the exit code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-17 16:40:54 +02:00
commit 938a1ca30e
23 changed files with 718 additions and 115 deletions

View file

@ -102,7 +102,7 @@ def test_a_requirement_the_run_never_opened_is_refused_and_recorded_nowhere() ->
"""(a) The declaration's one falsifier is the run's own read trace."""
tools, _opened, declared = _wired()
answer = tools["declare_requirement"].func(
bundle_id="tunnel-hauglia", path=_a_concept(), ref="12.1"
approach_id="a1", bundle_id="tunnel-hauglia", path=_a_concept(), ref="12.1"
)
assert answer["refusal"] == "RequirementNotRead"
assert "0 document(s)" in answer["refused"]
@ -130,7 +130,7 @@ def test_the_correction_is_to_read_it_and_then_it_is_accepted() -> None:
opened.append(ToolCall(name="read_file", bundle_id="tunnel-hauglia", path=other))
opened.append(ToolCall(name="read_file", bundle_id="tunnel-hauglia", path=path))
answer = tools["declare_requirement"].func(
bundle_id="tunnel-hauglia", path=path, ref="Krav 12.1"
approach_id="a1", bundle_id="tunnel-hauglia", path=path, ref="Krav 12.1"
)
# P20/A1 widened the reply: the three arguments PLUS the document's own title and number and
# the sentence saying what the declaration binds. Asserted key by key rather than by equality,
@ -142,15 +142,30 @@ def test_the_correction_is_to_read_it_and_then_it_is_accepted() -> None:
path,
"Krav 12.1",
)
assert set(answer) == {"declared", "bundle_id", "path", "ref", "title", "req_number", "binds"}
assert declared == [DeclaredRequirement(bundle_id="tunnel-hauglia", path=path, ref="Krav 12.1")]
assert set(answer) == {
"declared",
"bundle_id",
"path",
"ref",
"approach_id",
"title",
"req_number",
"binds",
}
assert declared == [
DeclaredRequirement(
bundle_id="tunnel-hauglia", path=path, ref="Krav 12.1", approach_id="a1"
)
]
def test_a_declaration_naming_an_unknown_base_is_refused() -> None:
"""(c) The same base index every read rung uses, so no second, laxer resolution exists."""
tools, opened, declared = _wired()
opened.append(ToolCall(name="read_file", bundle_id="nope", path="a.md"))
answer = tools["declare_requirement"].func(bundle_id="nope", path="a.md", ref="1")
answer = tools["declare_requirement"].func(
approach_id="a1", bundle_id="nope", path="a.md", ref="1"
)
assert answer["refusal"] == "ExplorationError"
assert declared == []
@ -252,14 +267,15 @@ def test_a_hit_is_counted_against_this_approachs_fasit_never_the_base() -> None:
label="L",
requirement=BindingRequirement(path="krav/12-1/a.md", ref="12.1"),
)
paths, source = stress._attributable(approach, ["krav/99-9/elsewhere.md"])
paths, source = stress._attributable(approach, [{"path": "krav/99-9/elsewhere.md"}])
assert (paths, source) == (("krav/12-1/a.md",), "approach")
assert set(paths) & wanted
# A run-level declaration that is NOT one of this approach's fasit concepts is reported and is
# not a hit — the base holds it, which is exactly what must not count.
# A run-level declaration (one written before declarations carried an ``approach_id``) that is
# NOT one of this approach's fasit concepts is reported and is not a hit — the base holds it,
# which is exactly what must not count.
bare = Approach(id="a2", label="M")
paths, source = stress._attributable(bare, ["krav/99-9/elsewhere.md"])
paths, source = stress._attributable(bare, [{"path": "krav/99-9/elsewhere.md"}])
assert (paths, source) == (("krav/99-9/elsewhere.md",), "run")
assert not set(paths) & wanted
@ -408,11 +424,13 @@ def test_the_declaration_reaches_the_debate_artefact(tmp_path: Path) -> None:
[ToolCall(name="read_file", bundle_id="b", path="k/a.md")]
),
requirements=explore.requirement_payload(
[DeclaredRequirement(bundle_id="b", path="k/a.md", ref="12.1")]
[DeclaredRequirement(bundle_id="b", path="k/a.md", ref="12.1", approach_id="a1")]
),
)
payload = json.loads((tmp_path / "r1-debate.json").read_text(encoding="utf-8"))
assert payload["requirements"] == [{"bundle_id": "b", "path": "k/a.md", "ref": "12.1"}]
assert payload["requirements"] == [
{"bundle_id": "b", "path": "k/a.md", "ref": "12.1", "approach_id": "a1"}
]
# An empty list is the honest positive statement every pre-P19 run makes.
outbox.write_debate_tools(str(tmp_path), "r2", tool_calls=[])
assert (