Skip to content

Commit c0fc474

Browse files
dmealingclaude
andcommitted
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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"language": "java",
3+
"fixtures": [
4+
"attr-default-polymorphic",
5+
"attr-filter-explicit-ops",
6+
"attr-filter-shorthand",
7+
"attr-properties-basic",
8+
"auto-set-on-create",
9+
"auto-set-on-create-and-update",
10+
"auto-set-on-update",
11+
"currency-default-usd",
12+
"currency-explicit-jpy",
13+
"currency-precedence-field-vs-view",
14+
"enum-abstract-extends",
15+
"enum-array",
16+
"enum-inline",
17+
"error-attr-bad-allowed-value",
18+
"error-attr-filter-bad-field",
19+
"error-attr-filter-bad-op",
20+
"error-attr-filter-legacy-string",
21+
"error-attr-missing-required",
22+
"error-attr-wrong-type",
23+
"error-data-grid-bad-sort-field",
24+
"error-extends-nonexistent",
25+
"error-field-object-storage-flattened-array",
26+
"error-field-object-storage-no-object-ref",
27+
"error-origin-bad-aggregate-fn",
28+
"error-origin-bad-via-path",
29+
"error-parse-malformed-json",
30+
"error-source-multiple-primary",
31+
"error-template-payload-ref-unresolved",
32+
"error-template-prompt-missing-payload-ref",
33+
"error-template-required-slot-missing",
34+
"error-unknown-relationship-subtype",
35+
"extends-abstract-base",
36+
"extends-cross-file",
37+
"extends-multi-level",
38+
"extends-single-level",
39+
"field-decimal-precision-scale",
40+
"field-object-storage-flattened",
41+
"field-object-storage-flattened-nullable",
42+
"field-object-storage-jsonb-array",
43+
"field-object-storage-jsonb-single",
44+
"field-string-maxlength",
45+
"identity-primary-and-secondary",
46+
"identity-reference-simple",
47+
"layout-data-grid-basic",
48+
"layout-data-grid-multiple-named",
49+
"loader-basic-explicit-subtype",
50+
"loader-basic-multi-file-same-package",
51+
"loader-basic-single-entity",
52+
"loader-filterable-on-indexed-no-warning",
53+
"origin-aggregate-count",
54+
"origin-aggregate-sum",
55+
"origin-collection-simple",
56+
"origin-multi-level-via",
57+
"origin-passthrough-simple",
58+
"overlay-attr-last-writer-wins",
59+
"overlay-merge-flag-explicit",
60+
"overlay-same-object-different-files",
61+
"relationship-one-to-many",
62+
"smoke-empty-metadata",
63+
"source-db-table-default-schema-omitted",
64+
"source-db-table-explicit",
65+
"source-db-table-with-schema",
66+
"source-db-view-projection",
67+
"source-db-view-with-schema",
68+
"source-multi-source-roles",
69+
"source-rdb-column",
70+
"source-rdb-referential-actions",
71+
"subtype-entity-missing-primary-warning",
72+
"subtype-entity-with-identity",
73+
"template-output-and-prompt",
74+
"template-prompt-simple",
75+
"warning-filterable-no-index"
76+
]
77+
}

0 commit comments

Comments
 (0)