Track org 9.8 in the Emacs oracle !11

merged merged by cmc on 2026-10-18 20:22 UTC · krz/orgo:oracle-org-9.8-drift into main

Discussion

cmc

cargo test --locked --test oracle failed four snapshots on Emacs 31.1 / org 9.8.7, identically on main. Neither cause is in orgo.

org 9.8 converged on <pre><code>. ox-html.el now wraps source blocks the way orgo already did, so the pre-code divergence stopped firing: core 87.9% → 91.4%, blocks 87.0% → 93.6%, elements 78.0% → 80.5%. The rule stays, because org 9.7 and earlier write a bare <pre>.

ox-html 9.8.7 emits a malformed entity. The heading tag prefix is written &nbsp;&nbsp;&nbsp — the last reference unterminated (ox-html.el:2915). decode_entities required the semicolon and left it literal, so a heading with tags reduced to A Subheading &nbsptag1 tag2 against orgo's A Subheading tag1 tag2. HTML5 decodes the legacy named set without the semicolon and a browser renders three non-breaking spaces; the skeleton now does the same. minimal is back to its committed 38/42 (90.5%).

The semantic-time rule was hiding both. It accepted any hunk where ours was tags-or-text and theirs was timestamp-or-text — and any text line satisfies both, so every prose difference matched. The &nbsp mismatch therefore arrived labelled as a deliberate rendering choice and every_divergence_from_emacs_is_deliberate kept passing. Guarded with any on both sides.

That guard exposed a second divergence the rule had also been absorbing: orgo keeps heading priority cookies, org drops them (org-export-with-priority defaults to nil). It is the policy the module docs already claim — "heading decoration is a policy difference" — but no rule recorded it. Added as heading-priority-cookie.

Reports now name the Emacs and org version they ran against. The oracle is whatever Emacs is on the machine, so a snapshot without that is not interpretable, and a version bump silently rewrites the agreement percentage — which is how this sat on main. The cost is that the snapshots churn on an Emacs upgrade; the diff then says oracle: emacs 31.1, org 9.8.7 changed, which is the thing you need to know. Pinning Emacs instead would make it a build dependency, which the suite deliberately avoids (it skips when Emacs is absent, as CI does).

cargo test --locked green, 15/15 oracle tests, unexplained: 0 on all twelve fixtures. cargo clippy --all-targets --locked -- -D warnings clean. New unit test unterminated_named_references_decode_like_a_browser pins the entity behaviour without needing any particular Emacs.