Skip to content

t27o: direct tests for every function of rust_convert.t27 -- coverage 9 % to 100 % (Closes #10825) - #10883

Merged
gHashTag merged 8 commits into
masterfrom
t27o/convert-coverage-10825
Oct 19, 2026
Merged

gHashTag merged 8 commits into
masterfrom
t27o/convert-coverage-10825

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Closes #10825. Lane C1 of the coverage epic #10522 (option A, coverage to 100 %).

Stacked on #10817 (branch t27o/std-methods-dedup-10764, which also edits rust_convert.t27): this branch is based on it, so the diff against master shows #10817's changes too until that lands. The new commits are the eight after it.

Coverage

t27c coverage specs/tools/t27o/rust_convert.t27: 32 of 360 functions (9 %) before, 360 of 360 (100 %) after. Nothing is left untested.

What changed

Tests only, appended after the existing ones in specs/tools/t27o/rust_convert.t27: 161 new test blocks (129 before, 290 after), 7044 lines added, 0 lines removed or changed. No existing test was touched; no non-test line was touched. Each test names its functions by direct call, asserts values derived by reading the function (not the output of a run), checks both sides of every predicate and the edges (empty text, a token at the last byte, the end of the buffer, a full or tiny buffer); a function that only writes into the state or the output has its observable effect asserted (the bytes through out_is, or a state slot).

commit area new tests
1 lexing and the reader (byte classes, quoted_end / raw_end / num_end, op2 / op3, item_end, is_tail, skip_arm, refuse / want) 15
2 the name table, the declaration index, deps, use_names, method / impl lookups 25
3 the output writers and the type reader (put_*, insert / wrap, reserved, angles, result_ty, ty) 18
4 types and classes (literal / type / name / receiver / expression classes, std table find, struct lookups) 19
5 expressions (operators, calls, std methods through method / expand, paths, literals, cfg_eval, primary) 33
6 statements (blocks, let, ?, vec! locals, if / if let / while let, for, match, asserts, result asserts) 19
7 items and refusals, the oracle writer (put_reason, put_refusal, derives, params, fn_head, stub, vkind, put_value, put_call, put_print, vectors) 17
8 the out-buffer form, the item writers, the passes, the report 15

Gates

  • t27b test: 290 passed, 0 failed (was 129).
  • t27c test-report: 290 / 290, vacuous passes 0 of 290.
  • gen/rust/tools/t27o/rust_convert.rs regenerated with t27c gen-rust: it differs by one comment line only (// NOT LOWERED BY THIS BACKEND: 290 test(s), was 129), as tests are not lowered. Staged.
  • Seal .trinity/seals/t27o_T27oRust.json re-saved and verified. The seals of rust_std, spice_convert, golden, ledger, service and install still verify (spice_convert uses rust_convert; its closure hash did not move).
  • python3 -I tools/dupe_scan.py: no new duplicate body, no known group grew. python3 -I tools/check_devhome_paths.py: OK. ASCII only.
  • No output of tri t27o changes: only a comment of the generated Rust (above) and the tests differ.

What the tests found wrong (non-test lines left alone, one issue each)

Observed and not filed (harmless on valid Rust, no test pins them as right): mentions with a hi past the source length never ends (found by a hang in a test; the callers keep hi <= src.len, and other while (q < hi) loops have the same shape); chars_iter with no { in the buffer answers as if the end of the buffer were the brace; ret_has_str says an Option<String> / Result<String, E> result is a text in its comment, but only a bare String and str are (those results are refused before this matters).

Traps for the next person

  • clear(st) zeroes the STATE slots only: the declaration index (IXON, IXHIT, IXB, IXBN, IXTOP, slots 53..57) survives it. A test that calls prescan / index_decls and then reuses the same st for another source reads a stale index and misses declarations; set st[IXON] = 0 (or use a fresh vector) after clear.
  • The name table stores positions, not text: an entry added with one src matches whatever text sits at those positions in a different src passed later.
  • A name table of fewer than ~70 slots silently drops names (add_name returns without a sign), so tests that add several names use 128+.

🤖 Generated with Claude Code

@gHashTag
gHashTag marked this pull request as ready for review October 19, 2026 05:36
@gHashTag
gHashTag enabled auto-merge (squash) October 19, 2026 05:36
@gHashTag

Copy link
Copy Markdown
Owner Author

Review (orchestrator, Opus): re-ran on the PR head -- the spec diff against #10817 is additions only (7,044 test lines, 0 removed); t27b test specs/tools/t27o/rust_convert.t27 290/290; t27c coverage 360 of 360 (100 %, was 32 of 360); tools/dupe_scan.py ok; seal --verify MATCH; t27c gen-rust byte-identical to the committed gen file (only the count of unlowered tests changed). The three known_defect_* tests pin #10829, #10834 and #10843 as they behave today, named so the fix of each updates its test; #10864 cannot be pinned (the call traps under both runners). Marked ready; auto-merge on. Merge order: #10817 first (this is stacked on it); afterwards #10819 (Zig, a draft) is rebased and its seal re-saved, since zig_convert.t27 uses rust_convert.t27.

claude and others added 8 commits October 19, 2026 12:37
…t27 -- byte classes, quoted/raw/num ends, op2/op3, item_end, is_tail, skip_arm, the reader predicates and refusals (Closes #10825)

Tests only; no non-test line changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… of rust_convert.t27, and a known-defect test for the static mut name (Closes #10825)

Tests only; no non-test line changes. The static mut naming defect is #10829.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…_convert.t27 -- put_*, insert/wrap, reserved, prim/heap, angles, result_ty, param_slice, nested_elem, ty (Closes #10825)

Tests only; no non-test line changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…al/type/name/receiver/expression classes, struct lookups, std table find, and a known-defect test for str_chain (Closes #10825)

Tests only; no non-test line changes. The str_chain field-open defect is #10834.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…of rust_convert.t27 -- operators, calls, std methods, paths, literals, cfg, plus known-defect tests for the int_type_names splice alias (Closes #10825)

Tests only; no non-test line changes. The splice alias defect is #10843.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lets, ?, vec! locals, if / if let / while let, for forms, match, asserts and result asserts (Closes #10825)

Tests only; no non-test line changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…_convert.t27 -- docs, reasons, refusals, derives, params, fn heads, stubs, sample values, calls and recorded fields (Closes #10825)

Tests only; no non-test line changes. The 64-bit unsigned sampling defect is #10864.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…passes of rust_convert.t27 -- coverage 100 %; gen-rust test count and seal re-saved (Closes #10825)

Tests only; no non-test line changes. t27c coverage: 360 of 360 functions
named by a test (was 32). t27b 290 / 290, test-report vacuous 0 of 290,
the seal of rust_convert.t27 re-saved and verified; the seals of rust_std,
spice_convert, golden, ledger, service and install still verify. The
regenerated gen/rust/tools/t27o/rust_convert.rs differs by one comment line
(the count of tests it does not lower).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 05:57:35 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 35
PRs with All Checks Green 15
READY 2
FAILING 35
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 35 + 0 + 0 = 37, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=88b8cb73ceda != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t27o: rust_convert.t27 function test coverage 9 % -> 100 % (32 of 360 functions named by a test)

2 participants