Repository navigation
feat(code_page): name the header shorts 28 to 41 that real drawings prove, and pin three public sources (§3.2.5, #375) - #384
Merged
Merged
Conversation
…s (§3.2.5, #375) CodePage::encode is decode's inverse (a character the page holds is its byte, any other the \U+XXXX escape AutoCAD's own R2000 and R2004 saves hold). convert_dwg_to_dxf_bytes and dwg-to-dxf write R12 to R2004 in the drawing's page, the class table writer encodes through the page in force, and the R2004-family header carries the page again, so DwgFile::to_bytes keeps the text readable.
… it (#375) The WHATWG encoders map a few extra code points onto bytes the decoder reads as another character (U+00A5 to 0x5C and U+203E to 0x7E on Shift_JIS, U+0080 on Shift_JIS, U+20AC on GBK). encode_char now returns the bytes only when decode gives the character back, so those characters take the escape and a written string reads as the text it was. The 128 of 128 round trip of each named page in probe_code_page is the same check over the whole page.
…rove, and pin three public sources (§3.2.5, #375) The short at 0x13 is AutoCAD's own enumeration, not a Windows code page number. Eight rows are added, each backed by a drawing: 38 and 39 by the localized layout name decoding in the nine newly pinned drawings (kurema/BookViewerApp3 MIT, Seeed-Studio/OSHW-Jetson-Series and huifer/planar_algorithm Apache-2.0), and 28, 32, 33, 36, 40 and 41 by local-only evidence recorded by sha256 in ARCHITECTURE.md (DXF twins that name the page, Greek and Korean text). fetch.py percent-encodes the path of a file. The probe pairs the header short of every release with its export, checks the known texts, counts the strings that occur in the export, and lists the drawings whose strings hold a \U+ or \M+ escape.
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. |
… errors included (#375) Regenerated from the corpus-measurement artifact of the Corpus job: the 52 existing rows are unchanged, the nine new rows decode 106,189 records, skip 90 and error on 9 BLOCK_HEADER records of the four AutoCAD I.18.0.0 drawings, which ARCHITECTURE.md now says.
…section (#375) The two references said 7aq, which on main is the PERSSUBENTMANAGER section; the rows section is 7ar.
This was referenced Oct 27, 2026
# Conflicts: # ARCHITECTURE.md # examples/probe_code_page.rs
# Conflicts: # ARCHITECTURE.md # examples/probe_code_page.rs
…and extended data strings included (#375) With #380 on main the probe also patches XRECORD and extended data strings, and the R2004 drawings through the DWG writer: 266 strings in 27 kinds, 1,064 of 1,064 reads, 348 of 348 DXF name checks; XRECORD values 24 strings 96 of 96, extended data 3 strings 12 of 12.
…t/code-page-rows # Conflicts: # ARCHITECTURE.md # CLEANROOM.md # examples/probe_code_page.rs
# Conflicts: # ARCHITECTURE.md # CLEANROOM.md # examples/probe_code_page.rs
5 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 27, 2026
…an drawing (#404) The record-weighted aggregate moves when a source of large drawings is pinned: #384's nine drawings hold 106,189 records, seven times the 52 on main, and would lift the headline from 96.7 % to 99.5 % with no decoder changing. readme_status.py now renders a per-source table and a median drawing column, and stops rounding a rate with records left undecoded to 100.0 %.
Merged
3 of 4 tasks
DrunkOnJava
enabled auto-merge (squash)
October 27, 2026 19:34
2 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Oct 27, 2026
… PRs until retargeted (#408) * fix(ci): keep the merge train's order when a build gets no lease, and hold stacked PRs A lease the governor refuses is refused to every build on the machine, so sending the PR to the end of the queue only reordered it: #384 lost the head of the queue twice on 2026-10-27 and a PR stacked on it (#388) came up first. A deferred PR now stays at the front and is retried after TRAIN_LEASE_WAIT seconds, and a PR whose base is not main waits at the end of the queue until GitHub retargets it. * fix(ci): run the merge train on GitHub Actions only, building and testing nothing locally Griffin, 2026-10-27: "tests and builds should ONLY be running on a github runner and NEVER on this mac". refresh.sh now only merges main, resolves the generated files to main's and pushes. land.sh waits for the PR's own CI run; when the Corpus job fails because the merge decodes other counts than the committed baseline, ci_baseline.sh downloads that run's corpus-measurement artifact, refuses any count worse than main's baseline, commits the measured baseline and waits again. The DRY refresh, which rebuilt locally to decide whether a PR survived main moving, is gone: main moving refreshes the PR, and the lease retry is gone with the local build. * fix(ci): check every CI measurement against main, commit the oracle baseline it measured, re-run cancelled runs Codex on #408: a Corpus job that passes compares the merge only with the PR's own baseline, so a PR committing worse counts would land; and a refresh that took main's oracle TSV on a conflict silently dropped the PR's new rows, or failed for good on a retired field. ci_baseline.sh now runs on every finished Corpus job: it refuses any corpus count below main's baseline and any oracle agreement below main's less the rows the PR retired (oracle_base.py, with the PR head and merge base refresh.sh records), then commits the corpus baseline, oracle.tsv and the oracle's coverage notes when they differ. land.sh re-runs a run that was cancelled to free the runners. * chore(corpus): commit the baselines CI run 40572161277 measured * fix(ci): keep README coverage current through the train, and judge a measurement against the main it was refreshed onto Codex on #408: when main lands an improvement while a PR's CI runs, the older measurement compared with the newer baseline is refused as a regression and the PR is dropped. ci_baseline.sh now compares with the main recorded at the refresh (oracle_base.py takes it too); land.sh's moved-main check refreshes the PR when main has moved. With some 25 decoder PRs to land, README.md and STATUS.md would go stale on every landing: ci_baseline.sh renders their coverage again (readme_status.py, citing the PR's own CI run) whenever it disagrees with the baselines, and refresh.sh resolves a README or STATUS conflict to main's when every conflicting line is rendered coverage text (readme3.py), refusing any other.
This was referenced Oct 27, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Oct 27, 2026
….52, #386) (#388) * feat(writer): write the drawing's code page, not UTF-8 or bare escapes (§3.2.5, #375) CodePage::encode is decode's inverse (a character the page holds is its byte, any other the \U+XXXX escape AutoCAD's own R2000 and R2004 saves hold). convert_dwg_to_dxf_bytes and dwg-to-dxf write R12 to R2004 in the drawing's page, the class table writer encodes through the page in force, and the R2004-family header carries the page again, so DwgFile::to_bytes keeps the text readable. * fix(code_page): encode a character only when its bytes decode back to it (#375) The WHATWG encoders map a few extra code points onto bytes the decoder reads as another character (U+00A5 to 0x5C and U+203E to 0x7E on Shift_JIS, U+0080 on Shift_JIS, U+20AC on GBK). encode_char now returns the bytes only when decode gives the character back, so those characters take the escape and a written string reads as the text it was. The 128 of 128 round trip of each named page in probe_code_page is the same check over the whole page. * feat(code_page): name the header shorts 28 to 41 that real drawings prove, and pin three public sources (§3.2.5, #375) The short at 0x13 is AutoCAD's own enumeration, not a Windows code page number. Eight rows are added, each backed by a drawing: 38 and 39 by the localized layout name decoding in the nine newly pinned drawings (kurema/BookViewerApp3 MIT, Seeed-Studio/OSHW-Jetson-Series and huifer/planar_algorithm Apache-2.0), and 28, 32, 33, 36, 40 and 41 by local-only evidence recorded by sha256 in ARCHITECTURE.md (DXF twins that name the page, Greek and Korean text). fetch.py percent-encodes the path of a file. The probe pairs the header short of every release with its export, checks the known texts, counts the strings that occur in the export, and lists the drawings whose strings hold a \U+ or \M+ escape. * test(corpus): ratchet the nine new pinned drawings, nine BLOCK_HEADER errors included (#375) Regenerated from the corpus-measurement artifact of the Corpus job: the 52 existing rows are unchanged, the nine new rows decode 106,189 records, skip 90 and error on 9 BLOCK_HEADER records of the four AutoCAD I.18.0.0 drawings, which ARCHITECTURE.md now says. * docs(code_page): point the module docs at this change's ARCHITECTURE section (#375) The two references said 7aq, which on main is the PERSSUBENTMANAGER section; the rows section is 7ar. * fix(tables): read the whole insert-count run of a BLOCK_HEADER (§20.4.52, #386) * docs(architecture): the merged probe's patched-copy numbers, XRECORD and extended data strings included (#375) With #380 on main the probe also patches XRECORD and extended data strings, and the R2004 drawings through the DWG writer: 266 strings in 27 kinds, 1,064 of 1,064 reads, 348 of 348 DXF name checks; XRECORD values 24 strings 96 of 96, extended data 3 strings 12 of 12. * docs(arch): number the BLOCK_HEADER section after the code page sections (#386) * chore(corpus): commit the baselines CI run 40573732934 measured * docs(architecture): drop the second copy of section 7au the merge with #384's squash appended * chore(corpus): commit the baselines CI run 40576136864 measured
DrunkOnJava
added a commit
that referenced
this pull request
Oct 28, 2026
…10-27 (#416) * docs: bring README, ROADMAP and CHANGELOG up to the landings of 2026-10-27 README's code-page and DXF writer text named work in review that has landed (#371, #380, #382, #384); jev_review.py prose ranked those sentences 0.72 to 0.96. ROADMAP's "where it stands" table was a 2026-10-21 snapshot whose numbers, CI row and release row were all out of date; it now points to the rendered numbers instead of repeating them. CHANGELOG gains #371, #380, #382, #384, #385 and #404. * docs(changelog): record the CI-only merge train (#408) * docs: OBJECTS landed (#372): README, ROADMAP and CHANGELOG * docs: LAYOUT, GROUP and MLINESTYLE (#373), the class map writer (#405) and the double-byte round trip (#414) landed * docs: VISUALSTYLE landed (#413) * docs(readme): name the skipped types still in review without per-type counts; MATERIAL landed (#325) * docs(readme): point to the open decoder PRs instead of a list that each landing makes stale
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
Names eight more pre-R2007 code pages (#375, "table rows backed by real drawings" and "the new pins"): header shorts 28 (
ANSI_1250), 32 (1253), 33 (1254), 36 (1257), 38 (Shift_JIS, 932), 39 (GBK, 936), 40 (EUC-KR, 949) and 41 (Big5, 950). The short is AutoCAD's own enumeration, not a Windows code page number (38 is 932, 39 is 936), so each row is backed by a drawing, not by a number from anywhere. Nine public drawings are pinned (three MIT and Apache-2.0 repositories),tools/corpus/fetch.pypercent-encodes the path of a file (spaces and Chinese in the new ones), andexamples/probe_code_page.rsgains the checks that prove the rows.Spec reference
ODA spec v5.4.1 §3.2.5 (the short at 0x13; the spec prints no table of its values). ARCHITECTURE.md §7ar (provisional letter; the integrator renumbers when #382 lands first). CLEANROOM.md 2026-10-27 entry for the new pins and the local evidence.
Corpus measurement:
tools/corpus/measure.pyover the 61 pinned drawings (52 + 9). The 52 existing rows are unchanged; the nine new rows (tools/corpus/baseline.tsv, regenerated from thecorpus-measurementartifact of this PR's first Corpus run, which was red by design) decode 106,189 records, skip 90 and error on 9: all BLOCK_HEADER records of the four Seeed AC1018 drawings (5 inA205_TOP, 1 inA206_BOTTOM, 3 inA206_TOP; buildI.18.0.0). The baseline pins them; the cause is outside this PR (below).Evidence (
probe_code_page, 2026-10-27):レイアウト1decodes in the pinned AC1014 drawings (kurema/BookViewerApp3, MIT)布局1decodes in the pinned AC1018 (Seeed-Studio/OSHW-Jetson-Series, Apache-2.0) and AC1015 (huifer/planar_algorithm, Apache-2.0) drawings배치1decodes (local)Caveats, said in ARCHITECTURE.md: rows 28 and 33 rest on the twin alone (no byte above 0x7F in either export); row 36 is the weakest (the DXFs are another save of each drawing, and the only non-ASCII text is a degree sign, equal in 1252 and 1257); the
\U+XXXXescape is how an application writes a character outside the page, on R14 as on R2004 (Greek and Chinese drawings), and\M+appears in none of the strings of the 61 pinned or the local drawings. Left out:Xinyuan-LilyGO/T-Dongle-S3(itsAcDb:AppInfonames Teigha 19.7 as the writer, not AutoCAD), the threeicon.dwgof BookViewerApp3 (the corpus keys files by name), and rows 34, 35 and 37 (no pre-R2007 drawing). No file of a GPL-licensed repository is evidence for any row.Owed: the double-byte round trip over real strings needs
CodePage::encodefrom #382. The nine BLOCK_HEADER errors are a decoder defect the new pins expose, not a code page one: the probe lists their 1,028-byte non-text "descriptions" among the non-ASCII strings, so the R2004 BLOCK_HEADER tail after the insert-count run reads from the wrong place for these blocks (ARCHITECTURE.md, Counts and Owed).README.md and STATUS.md are not refreshed here:
tools/maintainer/readme_status.pyis not onmainyet (#376 adds it), so the integrator regenerates them after this lands.Test plan
cargo fmt --all -- --check,python3 tools/ci/spec_coverage.py --check,python3 tools/maintainer/train/arch.py checkpass locally on this head; clippy, tests, MSRV, wasm, deny and doc run in CI on this head (the local lease queue is long)probe_code_pageover the pinned corpus (exit 0) and over a directory of the local-evidence drawings (numbers above);tools/corpus/fetch.py --dest ../dwg-corpusdownloads and verifies all 111 pinned files (9 new, sha256 checked)tools/corpus/baseline.tsvregenerated (second commit)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:
CLEANROOM.md).dwg-rsis Apache-2.0 and must remain compatible.My contribution is based on:
CLEANROOM.md.See
CLEANROOM.mdfor the full allowed/forbidden source list and the honest scope of what "clean-room" means for this project.For this PR specifically: the rows come from the header shorts of public drawings against the
$DWGCODEPAGEof their DXF twins, or against known texts (a localized layout name, Greek words); the pins are data files, no source code of the three repositories was read (CLEANROOM.md, 2026-10-27). The bytes of a string are decoded with theencoding_rscrate's WHATWG tables (already a dependency since #374). Local-only drawings are not pinned, vendored or committed; their sha256 and the probe's result are recorded.Developer Certificate of Origin
By submitting this PR, I certify that the contribution complies with the
Developer Certificate of Origin 1.1.
Specifically, I affirm that the contribution is my own work (or rightfully
licensed to me) and that it can be distributed under the project's Apache-2.0
license.
I will sign off commits with
git commit -swhen asked, which adds aSigned-off-bytrailer to the commit message asserting the DCO.