Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .trinity/seals/claw_ClawCheckLatest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"closure": [
{
"spec": "specs/claw/check_state.t27",
"spec_hash": "sha256:f5f05cce0d40d19693618461a81702761d27917cc6d1a3dfb53d8c06ba8b4ab4"
"spec_hash": "sha256:0a036f9c3e48e9c91b1cdadc806d63db91d5f7638157d26b355bd4db42014d83"
},
{
"spec": "specs/claw/queue_cost.t27",
Expand All @@ -15,23 +15,23 @@
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:28730ddb411cdbd8dab71a359b3198c5d9a604f801292681d99923aa29d83472",
"gen_hash_rust": "sha256:4859d66eed907385076ba205174f57e990c975f8cc5806db5b7ad4abfed807e0",
"gen_hash_verilog": "sha256:f9f5fd676b30d5ae414b77ed7139622591110b63f8bd819dc7381b6cd449ce8e",
"gen_hash_zig": "sha256:449674e0eaa92835b542ae7fe033667a048de932b3f260948fa9b52c93cd6679",
"gen_hash_c": "sha256:c0d1d710a7c1a9acdb6a5abb3ce953cdd6bcf61f76bea744de5d7afa76724327",
"gen_hash_rust": "sha256:7703ef78ced73ae5248a3e376e05f1c4caeaa7061cc4f53a47fd9e9ae8f9f547",
"gen_hash_verilog": "sha256:2b9974288e94433fe04a162f2bb606a627c4dd943c781aab973b96b747bd1f41",
"gen_hash_zig": "sha256:30ff2f1d40d12413152d4e233885bc59f0145102aa4e0ef95fba4909b4296f69",
"module": "ClawCheckLatest",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T00:13:49Z",
"sealed_at": "2026-10-19T00:46:35Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:3195aefb8a0d3dc6cc0f2ba9e1ae064b5678446611cccf1bb80a8d8066c668b4",
"spec_hash": "sha256:2de14a373379d1a5acc19fffeb4123c951dc6f36caffb883fb5a8a406be65d58",
"spec_path": "specs/claw/check_latest.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 11,
"total": 11,
"passed": 14,
"total": 14,
"vacuous": 0
},
"toolchain": {
Expand Down
6 changes: 3 additions & 3 deletions .trinity/seals/claw_ClawRequiredRed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"closure": [
{
"spec": "specs/claw/check_latest.t27",
"spec_hash": "sha256:3195aefb8a0d3dc6cc0f2ba9e1ae064b5678446611cccf1bb80a8d8066c668b4"
"spec_hash": "sha256:2de14a373379d1a5acc19fffeb4123c951dc6f36caffb883fb5a8a406be65d58"
},
{
"spec": "specs/claw/check_state.t27",
"spec_hash": "sha256:f5f05cce0d40d19693618461a81702761d27917cc6d1a3dfb53d8c06ba8b4ab4"
"spec_hash": "sha256:0a036f9c3e48e9c91b1cdadc806d63db91d5f7638157d26b355bd4db42014d83"
},
{
"spec": "specs/claw/queue_cost.t27",
Expand All @@ -26,7 +26,7 @@
"module": "ClawRequiredRed",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T00:13:57Z",
"sealed_at": "2026-10-19T00:47:30Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:ad8660400d420444a1a3c8858866b4cf7447f60027e27e1bb333a9463e1decea",
"spec_path": "specs/claw/required_red.t27",
Expand Down
55 changes: 55 additions & 0 deletions specs/claw/check_latest.t27
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,22 @@ fn t_bad(row : str, row_len : usize) -> bool {
return rows == 1 and st[K_BAD] == 1 and st[K_PASS] == 0;
}

/// CHECK_MAX_ROWS rows: an old failure, a blank line when asked, 1022 passing commit statuses
/// (never superseded, so cheap to scan), the re-run that supersedes the failure, and one more
/// re-run past the cap when asked.
fn t_cap(dst : []u8, cap : usize, blank : bool, extra : bool) -> usize {
var x : usize = put_str(dst, cap, 0, "g\t8\tCOMPLETED\tFAILURE\n", 22);
if (blank) { x = put_str(dst, cap, x, "\n", 1); }
var i : u32 = 0;
while (i < 1022) {
x = put_str(dst, cap, x, "p\t-\tCONTEXT\tSUCCESS\n", 20);
i += 1;
}
x = put_str(dst, cap, x, "g\t9\tCOMPLETED\tSUCCESS\n", 22);
if (extra) { x = put_str(dst, cap, x, "g\t10\tCOMPLETED\tSUCCESS\n", 23); }
return x;
}

// ---- tests ----

test the_10563_rollup_is_pending_here_and_red_to_check_state {
Expand Down Expand Up @@ -276,3 +292,42 @@ test a_clipped_plan_still_advances_the_cursor {
var out : [160]u8 = undefined;
assert latest_plan(&raw, n, &out, 50) == 104;
}

// ---- mutation sweep of this file (#10739): each test below kills a survivor ----

test a_run_id_is_one_to_twenty_digits {
assert t_bad("x\t\tCOMPLETED\tSUCCESS\n", 21) == true;
assert t_bad("x\t12345678901234567890\tCOMPLETED\tSUCCESS\n", 41) == false;
assert t_bad("x\t1\tCOMPLETED\tSUCCESS\n", 22) == false;
}

test the_row_cap_reads_1024_rows_and_refuses_the_next {
var raw : [20608]u8 = undefined;
var st : [5]u32 = undefined;
var n : usize = t_cap(&raw, 20608, false, false);
assert n == 20484;
assert latest_counts(&raw, n, &st) == 1024;
assert st[K_SUPERSEDED] == 1;
assert st[K_PASS] == 1023;
assert st[K_FAIL] == 0;
assert st[K_BAD] == 0;
assert latest_verdict(&raw, n) == V_GREEN;
n = t_cap(&raw, 20608, false, true);
assert n == 20507;
assert latest_counts(&raw, n, &st) == 1025;
assert st[K_SUPERSEDED] == 1;
assert st[K_PASS] == 1023;
assert st[K_BAD] == 1;
}

test a_blank_line_does_not_push_a_rerun_past_the_cap {
var raw : [20608]u8 = undefined;
var st : [5]u32 = undefined;
const n : usize = t_cap(&raw, 20608, true, false);
assert n == 20485;
assert raw[22] == 10;
assert latest_counts(&raw, n, &st) == 1024;
assert st[K_SUPERSEDED] == 1;
assert st[K_FAIL] == 0;
assert latest_verdict(&raw, n) == V_GREEN;
}
Loading