Skip to content

Parity runner: support fixture appliesTo and an edition key - #75

Merged
MaxDac merged 2 commits into
mainfrom
feat/parity-applies-to
Nov 5, 2026
Merged

MaxDac merged 2 commits into
mainfrom
feat/parity-applies-to

Conversation

@MaxDac

@MaxDac MaxDac commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Part of the GitHub Issues integration. Closes #73.

What

The Kotlin parity runner (core/src/testFixtures/.../parity/SpecFixtures.kt) now supports the spec's fixture-file appliesTo and takes the runner's edition key.

Runner API (for the Pro session)

  • class FixtureSet(dir: File, edition: String = SpecFixtures.APP_KEY): the files of one fixtures/ folder as seen by one edition. allIds(), ids() (applicable files), skippedIds() (recognised but excluded by appliesTo), appliesTo(id), isApplicable(id), load(id) (empty when not applicable).
  • SpecFixtures keeps its API and gains an optional edition parameter, default "android": ids(edition), load(id, edition), skippedIds(edition), requireSet(edition). New constants SpecFixtures.APP_KEY = "android" and SpecFixtures.PRO_KEY = "android-pro".
  • Pro passes the edition at the call sites, e.g. SpecFixtures.ids(SpecFixtures.PRO_KEY) / SpecFixtures.load("issues/pull", SpecFixtures.PRO_KEY), in its own coverage test. A file with no appliesTo applies to every edition; a file listing android also applies to android-pro (the spec README: android is Libre and Pro), while a file listing only android-pro is skipped in Libre.
  • knownDivergence is still read under the key android for both editions (the schema has no android-pro divergence key).
  • Libre: SpecCoverageTest.everyFixtureIsMapped compares only the applicable ids with the mappings; new filesExcludedByAppliesToAreSkipped reports the excluded files as skipped (JUnit assumption) and asserts none is mapped.

Differences from the issue

  • Libre has no spec/ submodule (the spec is private and Libre is public; Libre CI has no Parity job, and the fixtures run only when -Pmarknotes.specDir points at a checkout, in Pro). So there is no pin to bump here; Pro adopts the spec pin. Verified locally against the spec main checkout at ea4a41f instead.

Verified

  • ./gradlew :core:test --tests '*parity*' -Pmarknotes.specDir=~/Projects/marknotes-spec (spec at ea4a41f): green; the six issues/* files are reported as skipped for android.
  • New FixtureSetTest (synthetic files): Libre skips issues files, android-pro selects them, files without appliesTo apply everywhere, an unmapped applicable file is still detected.
  • ./gradlew ktlintCheck detekt: green.

Public API of :core testFixtures changes additively; Pro needs no change until it adopts the issues fixtures.

🤖 Generated with Claude Code

MaxDac and others added 2 commits November 5, 2026 19:14
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MaxDac
MaxDac merged commit b3be414 into main Nov 5, 2026
13 checks passed
@MaxDac
MaxDac deleted the feat/parity-applies-to branch November 5, 2026 19:27
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.

Parity runner: support fixture appliesTo and an edition key

1 participant