docs: decide the parity seam and the two tiers under emf/ - #126
Merged
Merged
Conversation
Record two decisions for the model-driven implementation. 0120 puts the parity suite on the pipeline's file interface. The suite imports Pipeline, Parsed, Diagnostic and Descriptor today, which is why parity/ is an eclipse-plugin bundle while the architecture says a module needing no p2 bundle stays a plain jar. Moving the suite onto the files the pipeline writes closes that drift and narrows the test surface to the one an examiner exercises from a launch configuration. 0121 splits the tree into bundles/ for what Tycho builds and Eclipse imports and tests/ for what only Maven runs, and makes the second tier Kotlin. Ecore generates Java and a bundle compiles through JDT against a target platform with no Kotlin unit, so the bundle tier stays Java. Both are proposed, and the tree is unchanged: emf/docs/architecture.md describes the flat modules it still has and carries each decision as a "proposed, not landed" note beside the section it will rewrite.
This was referenced Sep 16, 2026
Contributor
Author
|
Implementation is tracked in #127, a sub-issue of #78: #128 (emit the files), #129 (move the suite onto them, de-bundle the module), #130 (split the tiers), #131 (port the tier to Kotlin). #132 proves the examiner's Eclipse import before the Task 1 deadline, independently of all four. #78 is amended for both decisions, and #105 is rewritten to the one rule #122 left it. |
test/emdash.test.ts refuses an em-dash in tracked text, and 0120 carries one, so the Tests job is red on that alone.
test/emdash.test.ts refuses an em-dash in tracked text, and the note for 0120 carries two, so the Tests job is red on them alone.
Root ADR 0120 landed on main in #123 while this branch took 0120 for the parity seam, and test/adr-contract.test.ts refuses a number used in both registers. The branch alone is green, so the collision only appears against merged main. The parity seam becomes 0121 and the two tiers 0122, the next two numbers free in either register, with every citation moved with them.
Shape
CoverageBaseline:
This pull request changed no covered line. |
ExtraToast
added a commit
that referenced
this pull request
Sep 16, 2026
* feat: write the parsed intent, the diagnostics and the descriptor as files the build leaves behind A run of the pipeline now leaves behind everything the parity contract compares, as files, in the canonical JSON the oracles are committed in. For every case under spec/v1/examples/, Outputs writes the parsed intent or the diagnostics that refused it, beside the exit code the run ended on, under cli/target/parity in a tree that mirrors the example tree, so a written file and its oracle are obviously a pair. DescriptorFile writes the source metamodel's descriptor from the same reflective walk Descriptor already performs, under metamodel/target/parity. Neither file is committed. The canonical JSON writer moves down to metamodel/, the lowest module that writes a canonical file, because the pipeline now writes what the parity suite used to serialise. The parity suites are otherwise untouched: this is the expand half of the move recorded in 0120, so a wrong output shape is caught here rather than after the suites depend on it. Closes #128. * refactor: move the parity suite onto the pipeline's file interface The suite decides every case from the files a run leaves behind and the exit code beside them, so it holds no EMF type, calls nothing, and needs nothing from the target platform. The module becomes a plain jar: its META-INF/MANIFEST.MF and build.properties are gone, and it declares the test libraries the parent's bundle profile used to give it. Each case asserts its file exists before comparing it, so a file the run owes and did not write fails as a missing file rather than as a skipped case (0120). Two gates had to survive that change rather than quietly stop enforcing. ArchitectureTest saw the other modules only because the manifest required them; with no dependency left it reads their class directories by path instead. Because withOptionalLayers excuses an empty layer, EMF-010 and EMF-011 would then pass on an empty import while proving nothing, so EMF-017 fails when a module whose classes the build wrote is missing from the import. All three now fail on a fixture that breaks them, as 0104 requires, and the layered rule no longer names the parity layer as a permitted accessor. Also removes an em-dash the decision record carried, which test/emdash.test.ts refuses. Closes #129. * refactor: split emf/ into a bundle tier and a test tier The listing now says which modules a course examiner opens. `bundles/` holds the five Tycho builds Eclipse imports; `tests/` holds the parity tier Maven alone runs, which by 0120 holds no EMF type and needs nothing from the target platform. The directory names stay short, since Eclipse names an imported project from its `artifactId` regardless (0121). Every document that names a module by its old path moves with it: the rule ledger, whose EMF-014 check fails the build the moment a row's named file is not where the row says, the witness list, this tree's architecture, two decision records, the refusal examples' README, the root architecture, and the two root tests that name a parity path in a comment and in a fixture string. `emf/README.md` gains the table that says which artefact lives where and which task grades it. Two things the move would have broken quietly. The module POMs now sit two directories below the parent, so each declares its `relativePath`, and `scripts/lint-codes.ts` matched `emf/<module>/src/test/` one segment deep, which would have stopped counting a Java test as exercising a code for the whole tree rather than only for the tier that moved. Closes #130. * refactor: port the test tier to Kotlin, with the gates the estate runs on it `tests/parity` is written in the estate's JVM language, with the idiom its other repositories already use: JUnit 5, AssertJ, ArchUnit, and a test function named as a sentence in backticks. The bundle tier stays Java, because Ecore generates Java, Xtext's runtime hooks are Java, and a bundle compiles through JDT against a target platform holding no Kotlin unit (0121). The gates move with it. Spotless gains a ktlint step over `src/*/kotlin`, and EMF-018 is its ledger row. The Kotlin compiler runs with `-Werror`, which is EMF-006's rule in the compiler this tier uses. The coverage floor holds unchanged. The mutation threshold also stands at 100, which needed one thing rather than a decision to lower it: `kotlinc` emits a null check for every platform type crossing into Kotlin and a `closeFinally` for every `use`, and removing either call is an equivalent mutation, not an uncovered one, so pitest is told not to mutate calls to them. That is the same treatment `bundles/cli` already gives the one-off OCL language registration. The word that changes in 0114 is "Java", not the rule: a witness is a JUnit test in whichever language its module is written, so `Ledgers.checkWitnesses` now reads a `.kt` function and a `.java` method alike, three of the six witnesses name Kotlin functions and three name Java methods, and a new fixture proves a Java witness in a bundle is still found. The decision record, the witness list, EMF-013's row and the gates sentence say so. Closes #131. * docs: follow the two records to the numbers they landed on Root ADR 0120 landed on main in #123 while #126 was open, so the parity seam became 0121 and the two tiers 0122 in that pull request. This moves the citations that live here: the slugged links, the `docs/adr/emf/NNNN` form a pom comment and a javadoc line use, and the number in a link's own text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #78.
The two records take 0121 and 0122, not 0120 and 0121: root ADR 0120 landed on main in #123 while this branch was open, and test/adr-contract.test.ts refuses a number used in both registers.
What this branch does
Records two decisions for the model-driven implementation. No module moves, no packaging changes, no Kotlin enters the build; both ADRs are
status: proposed.0121: the parity suite reaches the pipeline through its file interface.
ParityTestimportsPipeline,ParsedandDiagnosticfromcli/andDescriptorandProjectIntentPackagefrommetamodel/. Those resolve from p2, soparity/pom.xmliseclipse-pluginpackaging whileemf/docs/architecture.mdsays a module needing no p2 bundle stays a plain jar. That drift is live onmain: one suite reaching past the pipeline's interface pulled the Eclipse toolchain into the module whose job is to be free of it. The decision narrows the test surface to what the parity contract already compares — files.0122:
bundles/andtests/are separate tiers. Five modules are graded artefacts an examiner opens in Eclipse; one is this repository's own evidence, run only by Maven. The flat listing says which is which nowhere. The split is also a language boundary: Ecore generates Java, Xtext's runtime hooks are Java, and a bundle compiles through JDT against a target platform holding no Kotlin unit, sobundles/stays Java.tests/has none of those constraints, and every other JVM repository in the estate is Kotlin.Decisions worth naming
cliis tried by name, not by category. It is the module that looks like the Kotlin candidate, since no teacher runs it as an Eclipse project. It stays Java: it calls the EMF, OCL, QVTo and Acceleo standalone APIs, all resolved from p2, so it is a bundle by its dependencies whatever language it is written in. Kotlin would reach it only as a launcher around the Java pipeline.ArchitectureTestis@AnalyzeClasses(packages = "dev.jorisjonkers.deploykit.emf")with.withOptionalLayers(true), and sees the other modules only throughparity/META-INF/MANIFEST.MF'sRequire-Bundle. Dropping that leaves every other layer empty-and-optional, andEMF-010andEMF-011green while proving nothing. So: a non-empty-import assertion, a per-case output-file assertion, and the fixture ADR 0104 requires.ParityTestmethods; the other three sit in bundles and stay Java. The word that changes is "Java", not the rule.emf/docs/architecture.mdstill prints the six flat modules andparity/as a bundle, with each decision beside it as a> **Proposed, not landed:**note. Writing the future tree there in the present tense is the drift 0121 exists to close.What this does not do yet
The move, the packaging change and the Kotlin port. Both ADRs carry that cost in Consequences, the rule ledger first:
Ledgers.checkRulesfails the build the moment a row's named file is not where the row says.emf/docs/is untouched otherwise, so a reader who finds the documents spread out is finding a different problem.Verification
node scripts/lint-adrs.ts emf: 12 files clean.npm run lint:links: 188 files clean, both new ADRs tracked — it enumerates throughgit ls-files, so untracked files are invisible to it.npm run lint:meaning: 167 files clean.npm run lint:secrets: no leaks.