Repository navigation
feat(objects): decode TABLESTYLE on R14 to R2007 from §20.4.101.1 (#151) - #303
Merged
Merged
Conversation
§20.4.101 prints TABLESTYLE; the notes that declined it said §20.4 had no entry. Its until-R21 layout closes on its data-stream boundary on all 32 records of R14 to R2007 in the public corpus, and against AutoCAD's DXF export all 1896 values of the 24 R2000 to R2007 records equal it. Two readings come from the bits, not the spec's table: the data type, unit type and format string are R2007+ together, and every colour is the 44-bit TC on R2000 and R14 too. R2010 and later use §20.4.101.2's layout and stay Unhandled.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Oct 26, 2026
Merged
…ares, so the copies merge in any order
This was referenced Oct 26, 2026
# Conflicts: # ARCHITECTURE.md # tools/corpus/baseline.tsv
DrunkOnJava
enabled auto-merge (squash)
October 26, 2026 20:15
3 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
The TABLESTYLE decoder (#303) reads §20.4.101.1's layout on R2000 to R2007; the oracle now compares each field with the group the section's DXF column gives it: 3, 70, 71, 40, 41, 280 and 281, then per row style (data, title, header) 140, 170, 62, 63, 283, on R2007 also 90, 91 and 1, and per border 274-279, 284-289 and 64-69. The text style (7) is a handle the decoder does not read and stays not-decoded; the colours are TC and export as their index. Where an export writes two 280s before the first row style (the R2010+ ones), the suppress-title flag is the second, as the decoder's probe reads it. On the 49 drawing pairs: 24 records, R2000 to R2007, all 1896 decoded values equal AutoCAD's export, the count the decoder's own probe reports. The 18 paired R2010+ records (§20.4.101.2) remain undecoded. tools/oracle/baseline.tsv gains the 237 new rows, and the §20.4.101 row of docs/spec-coverage.md says what the oracle measured. Refs #99, #102, #151
DrunkOnJava
added a commit
that referenced
this pull request
Oct 26, 2026
The TABLESTYLE decoder (#303) reads §20.4.101.1's layout on R2000 to R2007; the oracle now compares each field with the group the section's DXF column gives it: 3, 70, 71, 40, 41, 280 and 281, then per row style (data, title, header) 140, 170, 62, 63, 283, on R2007 also 90, 91 and 1, and per border 274-279, 284-289 and 64-69. The text style (7) is a handle the decoder does not read and stays not-decoded; the colours are TC and export as their index. Where an export writes two 280s before the first row style (the R2010+ ones), the suppress-title flag is the second, as the decoder's probe reads it. On the 49 drawing pairs: 24 records, R2000 to R2007, all 1896 decoded values equal AutoCAD's export, the count the decoder's own probe reports. The 18 paired R2010+ records (§20.4.101.2) remain undecoded. tools/oracle/baseline.tsv gains the 237 new rows, and the §20.4.101 row of docs/spec-coverage.md says what the oracle measured. Refs #99, #102, #151
This was referenced Oct 27, 2026
Open
DrunkOnJava
added a commit
that referenced
this pull request
Oct 27, 2026
Resolved against main's squash of #303 (the TABLESTYLE R14 to R2007 commit this stack carried): its decoder, probe and section stay main's, and this branch's R2010 TABLESTYLE, CELLSTYLEMAP and cell-style reader sit beside them. - src and examples: both sides kept; dispatch and the objects table list the modern TABLESTYLE and CELLSTYLEMAP arms next to main's. - ARCHITECTURE.md: main's sections plus this branch's R2010 section as 7au; the duplicate until-R2007 section is main's 7ad. - README.md: main's. spec-coverage: this branch's newer TABLESTYLE and CELLSTYLEMAP rows, regenerated. - tools/corpus/baseline.tsv: regenerated by measurement; against main's it is decoded +52, skipped -52 and nothing else.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Decode TABLESTYLE on R14 to R2007 from §20.4.101.1. The notes that declined it said §20.4 has no entry for it; §20.4.101 prints it, in two layouts, and this is the "until R21" one. R2010 and later (§20.4.101.2) stay
Unhandledhere and are the next PR, stacked on this one.Spec reference
§20.4.101.1 TABLESTYLE (tracking #151). Two readings come from the bits, not the spec's table (ARCHITECTURE.md §7x, with the budgets):
Data type,Data unit typeandFormat stringare R2007+ together: R2004's record is 220 bits of header and 3 x 543 of rows, R2007's 138 and 3 x 579 (BL 512,BL 0, and aTVthat costs no data-stream bits).TC(BS,BL,RC) on R2000 and R14 too, which is the only reading that fills R2000's 1849-bit budget (the same as R2004's).Test plan
cargo fmt --all -- --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --release --all-features,RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features,cargo +1.85 check --all-features,cargo run --release --example spec_examples: all pass locally.Shown on real files, no new unit tests:
cargo run --release --example probe_tablestyle -- <corpus>over the 52 pinned drawings. It closes on its boundary and compares every decoded value with AutoCAD's DXF export by handle.Corpus baseline regenerated (
tools/corpus/baseline.tsv): decoded 14947 to 14979, skipped 831 to 799, errored unchanged at 296; the 32 rows that move are one record each.Tests touched: none.
examples/probe_tablestyle.rsand its shared harnessexamples/support/twin.rsare new probes, not tests.The DXF oracle does not score TABLESTYLE yet (the oracle lane's
scorers.rsis untouched).Source-provenance declaration
By submitting this PR I certify that my contribution does not incorporate executable code from any source whose license is incompatible with Apache-2.0. Specifically:
973628f3…f504b) is explicitly allowed (seeCLEANROOM.md).My contribution is based on:
Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.