Skip to content

test(scripts): add 31 tests for sudoku/core/graph.py + dataset.py (cycle 81)#1907

Merged
jsboige merged 1 commit into
mainfrom
test/sudoku-core-graph
May 30, 2026
Merged

test(scripts): add 31 tests for sudoku/core/graph.py + dataset.py (cycle 81)#1907
jsboige merged 1 commit into
mainfrom
test/sudoku-core-graph

Conversation

@jsboige
Copy link
Copy Markdown
Owner

@jsboige jsboige commented May 30, 2026

Summary

Adds 31 tests for 2 Sudoku core modules:

**** (16 tests):

  • (9): shape [2,1620], dtype long, no self-loops, 20 incoming edges per node, row/col/box neighbor verification, deterministic output
  • (7): batch_size=1 matches base, correct offset for batch>1, shape scales, valid index ranges

**** (15 tests):

  • (8): string-to-numpy conversion, zeros handling, dtype, edge cases
  • (3): length, getitem, int8 casting
  • Cross-invariants (4): edge count matches peer count, batch structure preserved, parse_81 output compatible with solver

LIVE verification

13+ callers across training/eval/diagnostic scripts (grep build_sudoku_edge_index / make_batch_edge_index).

Test results

31 passed in 2.26s
Full suite: 1429 passed, 0 failed, 0 regression

po-2024 test-coverage cumulative (cycles 69-81)

Cycle Script Tests PR
69 validate_pr_notebooks 34 #1878
70 weekly_digest 19 #1880
71 validate_sc_notebooks 56 #1882
72 update_sc_navigation 42 #1885 (CLOSED dead-code)
73-78 genai-stack (7 modules) 341 #1886/#1892/#1894/#1897/#1898/#1903/#1905
80 sudoku/core/solvers.py 24 #1906
81 sudoku/core/graph.py + dataset.py 31 this PR
Total 579

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

…cle 81)

Covers build_sudoku_edge_index (9 tests), make_batch_edge_index (7 tests),

parse_81 (8 tests), SudokuGraphDataset (3 tests), cross-invariants (4 tests).

LIVE: 13+ callers across training/eval/diagnostic scripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@clusterManager-Myia clusterManager-Myia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Hermes] — APPROVED

Pure test file (251 LOC, single file). Tests for deterministic graph construction functions — no business logic changes, no I/O, no secrets. CI passes, security scan clean. Tests are well-structured with meaningful edge cases (self-loops, batch offsets, determinism). LGTM.

@jsboige jsboige merged commit 9858a35 into main May 30, 2026
2 checks passed
@jsboige jsboige deleted the test/sudoku-core-graph branch May 30, 2026 22:37
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.

2 participants