High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
test(pin-367): pin the body replay at its httpx owner and assert a repeat unroute is idempotent
Luigi Agosti7b363c7c9753
diff --git a/internal/mcp/short_read_census_test.go b/internal/mcp/short_read_census_test.goindex 9fd0b030..82d83ace 100644--- a/internal/mcp/short_read_census_test.go+++ b/internal/mcp/short_read_census_test.go@@ -82,8 +82,10 @@ func TestEveryCappedReadIsClassified(t *testing.T) {// The two sites this rule fixed carry its own idiom, so a revert is visible here// as well as in the behaviour tests.for name, want := range map[string]string{- "internal/mcp/client.go": "MaxResponseBytes+1",- "internal/activity/context.go": "io.MultiReader",+ "internal/mcp/client.go": "MaxResponseBytes+1",+ "internal/httpx/body.go": "io.MultiReader",+ "internal/activity/context.go": "httpx.ReplayBody(peeked, original)",+ "internal/orchestrator/tab_extract.go": "httpx.ReplayBody(buf, original)",} {if !fileText(t, name).Contains(want) {t.Errorf("%s no longer carries %q; the classification above says it refuses or replays, and it does neither", name, want)diff --git a/tests/e2e/scenarios/api/network-route-extended.sh b/tests/e2e/scenarios/api/network-route-extended.shindex 14d549a5..57798194 100755--- a/tests/e2e/scenarios/api/network-route-extended.sh+++ b/tests/e2e/scenarios/api/network-route-extended.sh@@ -189,12 +189,12 @@ netroute_full_server_tests() {end_test# ─────────────────────────────────────────────────────────────────- start_test "DELETE /tabs/{id}/network/route again returns 404 (tab not routed)"+ start_test "DELETE /tabs/{id}/network/route again is idempotent on a cleared tab"- # After clearing, the route manager forgets the tab. A second unroute should- # distinguish that from "rule matched nothing" by 404'ing.pt_delete "/tabs/${TAB_ID}/network/route"- assert_not_ok "second unroute on cleared tab returns error"+ assert_ok "second unroute on cleared tab"+ assert_json_eq "$RESULT" '.removed' '0' "nothing left to remove"+ assert_json_eq "$RESULT" '.rules | tojson' '[]' "the rule list is an empty array"end_test