Skip to content

ci: check that docs/spec-coverage.md has a row for every ODA spec section and matches its data (#105) - #219

Merged
DrunkOnJava merged 2 commits into
mainfrom
ci/spec-coverage
Oct 26, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
ci/spec-coverage

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Adds tools/ci/spec_coverage.py and a Spec coverage CI job so docs/spec-coverage.md keeps one row for every section of ODA spec v5.4.1 and never drifts from docs/data/spec-coverage.tsv. Closes #105.

Spec reference

The required sections are the v5.4.1 table of contents: chapters 1 to 29, chapter 20 through §20.1 to §20.3 and the 104 object prescriptions §20.4.1 to §20.4.104 (135 sections). The check fails when any of them has no row or more than one, when a row's state is not one of complete, closes, decoder, partial, missing, n/a, when its tracking cell is not an issue reference, when an open state has no tracking issue, and when the summary and the section table between the spec-coverage markers differ from the data. --write regenerates that part of the page.

This is the commit from the stranded local branch ci/spec-coverage-check (bbd50d7, written on 2026-10-21 against 97d0e61), rebased onto current main. The only change from the original is the new job's actions/checkout pin, moved to the SHA every other job in ci.yml uses.

Test plan

  • Untouched files pass on current main data:
$ python3 tools/ci/spec_coverage.py --check
spec-coverage: 139 rows, 135 required sections, 0 problems      (exit 0)
  • Three mutations, each on a copy of the tree, each fail:
== delete the §20.4.76 row
spec-coverage: §20.4.76 has no row
spec-coverage: spec-coverage.md differs from spec-coverage.tsv: run tools/ci/spec_coverage.py --write
spec-coverage: 138 rows, 135 required sections, 2 problems      (exit 1)
== write state 'done' on §20.4.76
spec-coverage: §20.4.76: state 'done' is not one of complete, closes, decoder, partial, missing, n/a
spec-coverage: spec-coverage.md differs from spec-coverage.tsv: run tools/ci/spec_coverage.py --write
spec-coverage: 139 rows, 135 required sections, 2 problems      (exit 1)
== hand-edit the §29 row of the page
spec-coverage: spec-coverage.md differs from spec-coverage.tsv: run tools/ci/spec_coverage.py --write
spec-coverage: 139 rows, 135 required sections, 1 problems      (exit 1)
  • No Rust code changes; no unit tests added.

The job is not added to the main-protection required checks here; the ruleset is changed through its own file and the API.

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.

My contribution is based on the section list of the ODA's freely-redistributable Open Design Specification for .dwg files (v5.4.1) table of contents. No third-party code or comments were read.

Developer Certificate of Origin

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

…tion and matches its data (#105)

tools/ci/spec_coverage.py reads docs/data/spec-coverage.tsv. It fails when any of the 135 sections the v5.4.1 table of contents requires (chapters 1 to 29, chapter 20 through §20.1 to §20.3 and §20.4.1 to §20.4.104) has no row, when a row has an unknown state, a malformed tracking cell or an open state with no tracking issue, and when the generated summary and table of docs/spec-coverage.md differ from the data. --write regenerates them. A new CI job, Spec coverage, runs --check. Checked by hand three ways: deleting the §20.4.76 row, writing state 'done', and editing the page each fail it; the untouched files pass.
@DrunkOnJava DrunkOnJava added type:ci Workflows and automation area:docs Documentation labels Oct 26, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 26, 2026 08:46
@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-26T09:16:20.869851Z b5a025e 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 merged commit 91eeae8 into main Oct 26, 2026
24 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/spec-coverage branch October 26, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentation type:ci Workflows and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep docs/spec-coverage.md complete: a CI check against the spec's table of contents

1 participant