From edaf6bbd345f5f6bc1261ce9ab2d3d63564f6107 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Mon, 19 Oct 2026 08:10:49 +0700 Subject: [PATCH] test(claw): pin push_gate's reason-7 clamp boundary (#10746) The mutation sweep of push_gate.t27 caught 5 of 6 mutants. The survivor, k >= R_COUNT changed to k > R_COUNT, let reason 7 index the 7-entry tables out of range. One test now writes reason 7 and expects the hold line. Co-Authored-By: Claude Opus 5.5 --- .trinity/seals/claw_ClawPushGate.json | 16 ++++++++-------- specs/claw/push_gate.t27 | 9 +++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.trinity/seals/claw_ClawPushGate.json b/.trinity/seals/claw_ClawPushGate.json index 2eb7627f9b..5bab3fba41 100644 --- a/.trinity/seals/claw_ClawPushGate.json +++ b/.trinity/seals/claw_ClawPushGate.json @@ -11,23 +11,23 @@ } ], "config": "gen=c,rust,verilog,zig;tests=zig", - "gen_hash_c": "sha256:0e36ad6408ba73e3b2db496f6cc417b0c1236e82ae40add734cf51612263ebf3", - "gen_hash_rust": "sha256:1eb6f86199f548d3b36099f89b6f91c4b6bccef17ce8a8f2b631462dc15c497c", - "gen_hash_verilog": "sha256:0ec11c9d0223665c89b150a8147411831d0c46e9baf251076370de4a7c6c22d1", - "gen_hash_zig": "sha256:3c10671b2b202f661735d742eb2f3e6ff2d695afd42c48f5ed543a8e7846d157", + "gen_hash_c": "sha256:0a28ea7fe0713d4f99ee2ae477a11bb9545e3c4ff9d3d7075b736efceeb870ef", + "gen_hash_rust": "sha256:9958493c1404819ac26c3ee651bcd74f90684ca623d35170d98172cc82ff13da", + "gen_hash_verilog": "sha256:46834dd24028602e8567087d1474dcfe18f075132f8a72ecd8d029682b69ec5e", + "gen_hash_zig": "sha256:d67ce061e1e8221b6e9843f1b339ca3b70476f46a0a52e07b09cc0dfa682e0f3", "module": "ClawPushGate", "ring": 12, "seal_schema": 2, - "sealed_at": "2026-10-19T00:13:55Z", + "sealed_at": "2026-10-19T01:09:10Z", "sealed_by": "t27c-bootstrap@0.5.2", - "spec_hash": "sha256:0395e6a85e44f9dbe8d26766fa23693967135ea13946423bd514d82fa37240a6", + "spec_hash": "sha256:72d262c8a628578c614043bca5231e48e373c26ba35ed41e659716bff6f73959", "spec_path": "specs/claw/push_gate.t27", "tests": { "failed": 0, "failing": [], "forced": false, - "passed": 14, - "total": 14, + "passed": 15, + "total": 15, "vacuous": 0 }, "toolchain": { diff --git a/specs/claw/push_gate.t27 b/specs/claw/push_gate.t27 index 627e2bc19c..8697932e83 100644 --- a/specs/claw/push_gate.t27 +++ b/specs/claw/push_gate.t27 @@ -194,3 +194,12 @@ test an_out_of_range_reason_writes_the_hold_line { assert n == 31; assert buf_has(&out, n, "V\thold\tunknown push kind; hold\n", 31) == true; } + +// Written against the mutation sweep of this file: `k >= R_COUNT` to `k > R_COUNT` +// let reason 7, the first one past the tables, index them out of range. +test the_first_reason_past_the_tables_writes_the_hold_line { + var out : [64]u8 = undefined; + const n : usize = push_line(7, &out, 64, 0); + assert n == 31; + assert buf_has(&out, n, "V\thold\tunknown push kind; hold\n", 31) == true; +}