From efa131aaace8c9e963cb9c46e9becc5b11c6b1cb Mon Sep 17 00:00:00 2001 From: suleman-uzair Date: Fri, 27 Nov 2026 14:19:33 +0500 Subject: [PATCH] Move the testsuite pin to latex generation 4 --- .github/workflows/corpus.yml | 2 +- .github/workflows/replay.yml | 2 +- .github/workflows/stage-cases.yml | 2 +- CHANGELOG.md | 3 +++ docs/testsuite-pin.adoc | 17 +++++++++++++---- spec/corpus/replay_corpus_spec.rb | 4 ++-- spec/fixtures/testsuite-pin.yml | 6 +++--- 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/corpus.yml b/.github/workflows/corpus.yml index 6a1a736..8269214 100644 --- a/.github/workflows/corpus.yml +++ b/.github/workflows/corpus.yml @@ -24,7 +24,7 @@ defaults: # The testsuite commit is a literal here (not read from a step output) so the # checkout ref is fixed by this file; a step checks it against the pin. env: - TESTSUITE_COMMIT: 337262eda0483ceaa43a02cc52362c5b721e5eb3 + TESTSUITE_COMMIT: bcd1a578adcb7230639f6c366d034d85f933c7b2 PIN: spec/fixtures/testsuite-pin.yml jobs: diff --git a/.github/workflows/replay.yml b/.github/workflows/replay.yml index c040e06..64c9f30 100644 --- a/.github/workflows/replay.yml +++ b/.github/workflows/replay.yml @@ -56,7 +56,7 @@ jobs: env: # The commit pinned in spec/fixtures/testsuite-pin.yml (a step checks # it); fixtures/ is unchanged there since 281059b. - TESTSUITE_COMMIT: 337262eda0483ceaa43a02cc52362c5b721e5eb3 + TESTSUITE_COMMIT: bcd1a578adcb7230639f6c366d034d85f933c7b2 FIXTURES_SHA256: 22ef60184fc547150c4f525f627b2bec22d9a3c4bb52794f772cf2a2dde78b59 # Parsanol ships a precompiled native extension for x86_64 Linux; # fail instead of skipping the native-engine examples if it is missing. diff --git a/.github/workflows/stage-cases.yml b/.github/workflows/stage-cases.yml index ba044a8..bcf28b9 100644 --- a/.github/workflows/stage-cases.yml +++ b/.github/workflows/stage-cases.yml @@ -36,7 +36,7 @@ env: # spec/fixtures/testsuite-pin.yml (a step checks it). The payloads are # generated from its generation 1, which every later generation keeps # byte for byte. - TESTSUITE_COMMIT: 337262eda0483ceaa43a02cc52362c5b721e5eb3 + TESTSUITE_COMMIT: bcd1a578adcb7230639f6c366d034d85f933c7b2 SOURCE_GENERATION: "1" SOURCE_DIGEST: sha256:9b362ce57706c5ca154bfc295b2037b9e626775d8a82a4557f3702c9ad2c74ba # Parsanol ships a precompiled native extension for x86_64 Linux; fail diff --git a/CHANGELOG.md b/CHANGELOG.md index 10980b9..0b1257c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,9 @@ derived attribute that a row does not record, such as `MathSymbol#value` and `#kind` in the generation 3 rows, is left out of the comparison and listed in the report. +- The testsuite pin moves to latex generation 4, which adds revision-2 + typed-model rows that record `MathSymbol#value` and `#kind`. All raw-tree + and typed-model rows match on both engines. ### Fixed diff --git a/docs/testsuite-pin.adoc b/docs/testsuite-pin.adoc index b63df24..f4d7f4f 100644 --- a/docs/testsuite-pin.adoc +++ b/docs/testsuite-pin.adoc @@ -11,10 +11,10 @@ named in `spec/fixtures/testsuite-pin.yml`: ---- schema: plurimath-stage/pin/1 repository: https://github.com/plurimath/plurimath-testsuite -commit: 337262eda0483ceaa43a02cc52362c5b721e5eb3 +commit: bcd1a578adcb7230639f6c366d034d85f933c7b2 language: latex -generation: 3 -snapshot_digest: sha256:782cb6ee7c75ec1e38ed343301c2220ad14c283b96e5cf9eac2a4ff39b1aeceb +generation: 4 +snapshot_digest: sha256:a657a0c61602ffdc9c02f3533f8671f92e38c42ee679d50ded38efd0e69ae0ce ---- Generation 2 keeps every case of generation 1 (the legacy corpus, produced by @@ -33,6 +33,15 @@ not record it, and lists those rows in its report (`unrecorded_derived_rows`). A derived attribute that a row does record must match, like every other field. +Generation 4 keeps every payload of generation 3 byte for byte and adds 108 +revision-2 typed-model rows (`-r2`) written by `scripts/stage_cases.rb` +at the merged head of this gem's PR 68. Each supersedes the typed-model row of +the same id: `Latexmath::Model::MathSymbol` now records its derived `value` +and `kind` beside `spelling`. The replay compares the revision-2 rows in full +and still compares the 108 superseded rows without the unrecorded derived +attributes. All 139 raw-tree rows and all 247 typed-model rows match on the +Ruby and the native engine. + == What CI checks The `corpus` workflow checks out the testsuite at the pinned commit and then: @@ -61,7 +70,7 @@ To run the replay locally: [source,sh] ---- git clone https://github.com/plurimath/plurimath-testsuite tmp/testsuite -git -C tmp/testsuite checkout 337262eda0483ceaa43a02cc52362c5b721e5eb3 +git -C tmp/testsuite checkout bcd1a578adcb7230639f6c366d034d85f933c7b2 bundle exec ruby scripts/replay_corpus.rb --testsuite tmp/testsuite --report tmp/replay.json ---- diff --git a/spec/corpus/replay_corpus_spec.rb b/spec/corpus/replay_corpus_spec.rb index 7a8d10a..3c51c28 100644 --- a/spec/corpus/replay_corpus_spec.rb +++ b/spec/corpus/replay_corpus_spec.rb @@ -102,10 +102,10 @@ def run_replay(testsuite, pin, **options) end describe "the committed pin" do - it "names latex generation 3 at an exact testsuite commit" do + it "names latex generation 4 at an exact testsuite commit" do pin = described_class.load_pin(PIN_FILE) expect(pin.language).to eq("latex") - expect(pin.generation).to eq(3) + expect(pin.generation).to eq(4) expect(pin.commit).to match(/\A\h{40}\z/) expect(pin.digest).to match(/\Asha256:\h{64}\z/) end diff --git a/spec/fixtures/testsuite-pin.yml b/spec/fixtures/testsuite-pin.yml index 61c39cd..ed8edf8 100644 --- a/spec/fixtures/testsuite-pin.yml +++ b/spec/fixtures/testsuite-pin.yml @@ -6,7 +6,7 @@ --- schema: plurimath-stage/pin/1 repository: https://github.com/plurimath/plurimath-testsuite -commit: 337262eda0483ceaa43a02cc52362c5b721e5eb3 +commit: bcd1a578adcb7230639f6c366d034d85f933c7b2 language: latex -generation: 3 -snapshot_digest: sha256:782cb6ee7c75ec1e38ed343301c2220ad14c283b96e5cf9eac2a4ff39b1aeceb +generation: 4 +snapshot_digest: sha256:a657a0c61602ffdc9c02f3533f8671f92e38c42ee679d50ded38efd0e69ae0ce