Commit c0fc474
test(metadata): Java conformance harness over shared fixtures/conformance/ corpus
Parametric JUnit 4 runner that auto-discovers fixtures under
fixtures/conformance/, lints each expected-errors.json against the
canonical ERROR-CODES.json registry, and asserts canonical round-trip
(happy path) or error-code-set match (error path). Per-fixture
classification against conformance-expected-failures.json: pass /
known-gap / fixed-but-listed / fail.
Five new files mirroring the C# shape oracle:
- CorpusRoot.java — repo-root walker (extracted from CanonicalJsonParserTest)
- FixtureDiscovery.java — fixture enumeration + expectation flags
- FixtureLint.java — corpus-integrity lint (registered-codes check
+ script.json shape + ERROR-CODES.json loader)
- ExpectedFailures.java — ledger load + classify
- ConformanceTest.java — @RunWith(Parameterized) runner with lint+conformance methods
Java-specific divergences from the C# oracle (each honestly captured in the
ledger when it affects a fixture):
- Provider set: Java uses ServiceLoader auto-registration; providers.json
is not yet composable in the Java loader. Fixtures requiring an alternate
provider set are ledgered.
- Loader-root-name leak: the Java loader's MetaRoot name is the loader name.
The runner pre-scans the first input file's metadata.root.package and
passes it as the loader name so canonical round-trips produce the right
top-level "package" key.
- Effective serialization / warnings / scripts: not implemented in the Java
harness yet — fixtures using expected-effective.json, expected-warnings.json,
or script.json are ledgered.
Ledger lists the honest current Java gap (72 of 80 fixtures). Stage-1
source-v2 fixtures Unit 1 enabled are passing for Java natively (e.g.
error-reserved-word-as-attr, error-source-no-primary) and are NOT in
the ledger.
Conformance runner: 160 parametric tests (80 lint + 80 conformance),
all green with the populated ledger.
Metadata module: 566/566 tests pass (up from 406, +160 from this harness).
Full reactor: BUILD SUCCESS.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7c367c5 commit c0fc474
6 files changed
Lines changed: 943 additions & 0 deletions
File tree
- server/java/metadata
- src/test/java/com/metaobjects/conformance
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
0 commit comments