test(b-gate): the pin moves 8 -> 15, and names the two steps that still share a door
`_EXTERNAL_TODAY` and `_WITH_A_DOOR_TODAY` are the arm's own count, not the gate's, so the seven new doors have to be written down here before the suite agrees they exist. The two assertions that pinned `kjørekonfig`/`utboks`/`prepass-artefakt`/`parse-feil` as door-LESS are inverted rather than deleted: they were the arm's discriminator, and a door that silently went away must still turn this red. The manifest count moves 514 -> 515 for the one new probe file. Also a probe for the shape guard: the writers take `Mapping`/`Sequence` and would serialize whatever they were handed, so a list where an object belongs would become a valid file with the wrong shape and the run that reads it later would be the one to fail. The door refuses it as a 3 (the call parsed, so 2 is the wrong code) and leaves no directory behind. Carries its rc-0 control. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
6375ce5af3
commit
c5aa5fcfde
2 changed files with 48 additions and 5 deletions
|
|
@ -391,3 +391,34 @@ def test_write_debate_tools_from_outside_writes_an_empty_trace_as_a_statement(
|
|||
assert len(paa_disk["tool_calls"]) == len(kall)
|
||||
assert len(paa_disk["requirements"]) == len(krav)
|
||||
assert paa_disk["tool_calls"][1]["arguments"]["query"] == "varme"
|
||||
|
||||
|
||||
# --- formvakten -------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_a_payload_of_the_wrong_shape_is_refused_rather_than_written(tmp_path: Path) -> None:
|
||||
"""Skriverne tar `Mapping`/`Sequence` og ville serialisert hva som helst de fikk: en liste der
|
||||
et objekt hører hjemme blir en gyldig fil med feil form, og kjøringen som leser den SENERE er
|
||||
den som feiler. Døren feller formen med en gang, og gjør det som en avvisning (3) — kallet
|
||||
parset, så 2 ville vært feil kode."""
|
||||
ut = tmp_path / "ut"
|
||||
feil = _json_arg(tmp_path / "feil.json", ["ikke", "et", "objekt"])
|
||||
proc = _toolbox(
|
||||
"write-proposal-reviews", "--outbox-dir", str(ut), "--run-id", _RUN, "--payload", feil
|
||||
)
|
||||
assert proc.returncode == 3, proc.stdout
|
||||
assert json.loads(proc.stdout)["error"]["kind"] == "ValueError"
|
||||
assert not ut.exists(), "en avvist form skal ikke ha lagt igjen en katalog eller en fil"
|
||||
# rc-0-kontroll: SAMME dør, samme sti, riktig form. Uten den ville armen vært grønn mot en
|
||||
# dør som avviste alt.
|
||||
ok = _toolbox(
|
||||
"write-proposal-reviews",
|
||||
"--outbox-dir",
|
||||
str(ut),
|
||||
"--run-id",
|
||||
_RUN,
|
||||
"--payload",
|
||||
_json_arg(tmp_path / "rett.json", {"reviews": []}),
|
||||
)
|
||||
assert ok.returncode == 0, ok.stderr
|
||||
assert Path(json.loads(ok.stdout)["path"]).is_file()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue