Accept spaced tiling table terminators #2675
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2685"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T06:12:37Z.
gen_tiling.pypreviously required a table's closing};on its own line. The first patch accepted spaces and indentation, but an inline ending could make the scan consume rows from the following mode. C comments containing a closing delimiter could also stop it early. This follow-up bounds each flat-row initializer and ignores comments before matching.The follow-up follows RavenCurseBurg's review and candidate, with their authorship retained in the commit.
What is in it
Tested
3b8f26dd, the synthetic first mode incorrectly emitted three rows instead of one; the all-inline and comment layouts also failed. The updated fixture passes on9915c8b3.python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, 0 skipped on Windows.f8d82935aa137953768a6e058100a78d7dcc51c43fcb0a58534161d329d4dc60, matching the checked-in table.git diff --check HEAD^ HEAD: passed. The repair merges cleanly with current mainc2ee10e4.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-26T09:45:52Z.
On
3b8f26dd4b1c5a64bacd16152687d3dd52b172d7, a mode table ending on the same line as its last row picked up the next mode’s two rows. The generator exited successfully and emitted three rows for the first mode, which had one in the input. A header with every table closed inline was rejected.Candidate 9cb990c05c0d keeps the initializer inside its own braces and ignores delimiters inside C comments. I ran
python -B scripts/gen_tiling.py <synthetic-header>on four nibble tables and twenty mode tables with alternating row counts. All four layouts produced the same complete Rust file. Combining the fix with #2661 atd002e9332545gave identical bytes for decimal8, octal010and hexadecimal0X8.python -B -m unittest discover -s scripts -p "test_*.py"passed all 26 tests on the candidate. Windows build 26100, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) wrote and ran the synthetic tests. I did not regenerate from the vendor header or run GPU workloads.Retest on
9915c8b37119f85c370fc25dd02f331b5a743c09The generator on this head matches the candidate tested above. I reran
python -B scripts/gen_tiling.pyon four synthetic layouts: plain, indented, mixed inline/standalone, and all inline with comment delimiters. All produced byte-identical Rust output and the first mode contained exactly its one input row. Python test discovery passed all 26 tests.OpenAI Codex (GPT-6) ran the synthetic fixtures on Windows 11. No retail title, GPU workload or Rust workspace build was used.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:42:56Z.
Triage (#1607) – head
9915c8bNo open or merged PR makes the same change. #2661 also edits
scripts/gen_tiling.py, but changes how integer literals are parsed, not how tables end; it shares only test boilerplate. #1587 rewrites the CLI handling of the same script and keeps the old\n};terminator, so the two will conflict. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:09:55Z.
merge-check
base:
1c8b551475head:
9915c8b371merge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/gen_tiling.pyandscripts/test_tiling_table_spacing.py, +72/-1)build: not run (Tier 0 Python generator diff; no Rust code changed)
tests:
python -m unittest discover -s scripts -p "test_tiling_table_spacing.py" -v-> 1 passed, 0 failed (5 layout subtests: indented, one inline mode, all inline, block comment, line comment; new test file);python -m unittest discover -s scripts -p "test_*.py"-> 66 passed, 1 error (test_discord_mirror.pyon Windows, same failure on base1c8b5514). Rust workspace tests not run (Tier 0).review: Read the full diff (+72/-1). Strips C line/block comments while preserving quoted literals (
scripts/gen_tiling.py:10-12) and replaces the newline-coupled\n};terminator regex with a balanced one-level outer-initializer pattern (scripts/gen_tiling.py:43-45). Correctly fixes both spaced/indented terminators and inline-closed mode tables without swallowing the following table's rows. All 5 layout subtests produce byte-identical Rust output. No problems found.performance: none (offline table generator in
scripts/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
Imported from ivall/xcl. Originally posted by grathepic on 2026-12-03T02:24:30Z.
merge-check
base:
078358a058head:
9915c8b371merge: clean (
git diff --checkexit 0)build: not needed (Tier 0 offline Python generator and unit test; no Rust or generated table files touched)
tests:
python -m unittest discover -s scripts -p "test_tiling_table_spacing.py" -v-> 1 passed, 0 failed (all 5 layout subtests:indented,one inline mode,all inline,block comment,line comment).python -m unittest discover -s scripts -p "test_*.py"-> 85 passed, 1 error (test_discord_mirror.MirrorTest.test_nothing_is_written_when_the_state_cannot_be_saved, pre-existing Windows failure onorigin/main078358a0, fixed by #3610). Rust workspace suite not run (Tier 0).title run: none (Tier 0 script/test change)
review: Read full diff (
scripts/gen_tiling.py+6/-1,scripts/test_tiling_table_spacing.py+66). No findings. Comment stripping preserves quoted C string/char literals and replaces//and/*...*/comments with a space so adjacent tokens remain separated;table()matches one outer{ ... };containing at most one level of nested{ ... }rows, preventing cross-table spillover on inline closers. All CI checks are green. Not tested: regenerating against upstream Mesagfx10SwizzlePattern.h(verified against synthetic fixture covering all 4 nibble tables and 20 mode tables).performance: none (offline generator script only)
verdict: safe to merge
hardware / tool and model: AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Python 3.12.3 / Antigravity, Gemini 4 Neon