Skip to content

feat(dxf): score SORTENTSTABLE in the value oracle (§20.4.93) - #351

Merged
DrunkOnJava merged 2 commits into
mainfrom
feat/dxf-oracle-sortentstable
Oct 27, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
feat/dxf-oracle-sortentstable

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

The value oracle scores SORTENTSTABLE (§20.4.93, decoded by #307) against AutoCAD's DXF export. The decoder reads the BL entry count and that many sort handles (handle code 0, in the data stream). The DXF writes each entry as 331 (the entity, a handle of the handle stream the decoder does not read) then 5 (the sort handle), after the record's own 5. The entry count is compared with the number of those 5 groups, and each sort handle with the next 5, all entries under one field. The section map files the class under §20.4.93.

Measured (49 drawing pairs)

Section Records Equal Different Not decoded
§20.4.93 SORTENTSTABLE 18 (R2000-R2018, three per release) 66 0 102 (the 331 entity handles, owners, reactors)

These are the same 66 values examples/probe_sortentstable compares: 18 entry counts and 48 sort handles. tools/oracle/baseline.tsv gains the 12 new rows (ratchet against main's: no count fell). The §20.4.93 row's probe sentence is corrected: it said the export equals "the 24 R2000 to R2018 records", but the probe compares 18; the other 6 R2018 records are export_sample.dwg's, which has no DXF twin.

Test plan

  • cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, python3 tools/ci/spec_coverage.py --check
  • Oracle over the 102 pinned files with --baseline tools/oracle/baseline.tsv (main's): exit 0; the regenerated TSV is committed
  • cargo run --release --example spec_examples: OK: 425 checks

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:

  • No Autodesk DWG SDK source (RealDWG, ObjectARX, ObjectDBX) or NDA-protected Autodesk documentation was consulted or imported.
  • No Open Design Alliance Teigha / Drawings SDK source was consulted or imported. The ODA's public Open Design Specification for .dwg files PDF is explicitly allowed (see CLEANROOM.md).
  • No GPL-licensed DWG implementation source (LibreDWG, etc.) was consulted or imported.

Based on ODA spec v5.4.1 §20.4.93 and AutoCAD's DXF exports read as data.

Developer Certificate of Origin

By submitting this PR, I certify that the contribution complies with the Developer Certificate of Origin 1.1.

Refs #99, #102, #149.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T10:29:12.509516Z 7b51592 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DrunkOnJava
DrunkOnJava force-pushed the feat/dxf-oracle-sortentstable branch from ea50918 to be89ec5 Compare October 26, 2026 21:57
The SORTENTSTABLE decoder (#307) reads §20.4.93's BL entry count and
that many sort handles, handle code 0 in the data stream. The DXF writes
each entry as 331 (the entity, a handle of the handle stream the decoder
does not read) then 5 (the sort handle), after the record's own 5. The
oracle compares the entry count with the number of those 5 groups and
each sort handle with the next one, all entries under one field, and
files the class under §20.4.93.

On the 49 drawing pairs: 18 records, R2000 to R2018 (three per
release), all 66 values equal the export, the 66 the decoder's probe
reports. tools/oracle/baseline.tsv gains the 12 new rows, and the
§20.4.93 row of docs/spec-coverage.md says what the oracle measured. That
row's probe sentence said the export equals "the 24 R2000 to R2018
records"; the probe compares 18, and the other 6 R2018 records are
export_sample.dwg's, which has no DXF twin.

Refs #99, #102, #149
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 27, 2026 10:31
@DrunkOnJava
DrunkOnJava merged commit ff5bc4e into main Oct 27, 2026
26 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/dxf-oracle-sortentstable branch October 27, 2026 10:38
DrunkOnJava added a commit that referenced this pull request Oct 27, 2026
….tsv too

The README's oracle line was typed by hand and went stale when #351 landed:
105,690 equal fields became 105,756. readme_status.py now renders it from
the oracle baseline that CI pins, and --check covers it.
DrunkOnJava added a commit that referenced this pull request Oct 27, 2026
#379 decoded the last two skipped types that had no decoder in progress,
so every skipped type now has one in review, and #351 changed the
oracle's totals. readme_status.py re-renders both, and the CHANGELOG gets
the three 2026-10-27 entries the catch-up (#378) predates.
DrunkOnJava added a commit that referenced this pull request Oct 27, 2026
…red table from the baseline (#376)

* docs: bring README.md and RELEASE.md up to main, and render the measured table from the baseline

README.md still showed the 2026-10-26 measurement: 13,781 decoded, 308
errored, 85.7 %, with the errors tracked in four issues that are now
closed. main measures 15,527 decoded, 547 skipped and 0 errored on the
52 pinned drawings (96.6 %). The README now says that, lists the 30
skipped types with the open PR for each, gives the DXF value oracle's
totals, and brings the capability matrix, the streaming section, the
CLI list and the "does not do" list up to what has landed.

The table and the totals are rendered from tools/corpus/baseline.tsv by
tools/maintainer/readme_status.py (--write, --check). audit.py runs
the check, and docs/maintaining.md adds housekeeping item 10: refresh
the README after any landing that moves the baseline or ships a
capability. STATUS.md's coverage line uses the same blocks.

RELEASE.md cited a "#418" and "Q-07" that do not exist, listed five CLI
tools where release.yml builds seven, and promised "4 binaries on 3
platforms" where it ships seven on five targets. It now names the
twelve required checks and the README refresh as release steps.

* docs: the README names #374 as landed and #375 as what remains of code pages

* docs: render the DXF value oracle's totals from tools/oracle/baseline.tsv too

The README's oracle line was typed by hand and went stale when #351 landed:
105,690 equal fields became 105,756. readme_status.py now renders it from
the oracle baseline that CI pins, and --check covers it.

* fix(tools): readme_status requires every marker block in both documents

A STATUS.md edit that dropped or damaged its corpus-summary markers made
--check pass with stale numbers, and --write left them untouched. Each
document now lists the blocks it must carry. --check reports a block that
is missing or doubled, and --write refuses to run until it is fixed.

* docs: record #379 and #351, and re-render the numbers they moved

#379 decoded the last two skipped types that had no decoder in progress,
so every skipped type now has one in review, and #351 changed the
oracle's totals. readme_status.py re-renders both, and the CHANGELOG gets
the three 2026-10-27 entries the catch-up (#378) predates.
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.

1 participant