Commit 18e9d2b
committed
fix(java): green the 5 pre-existing ConformanceTest failures
Closes the four provider-extension-* fixtures plus docs-file-basic
that have been failing on main since the 7.0.0 release tree was
cut. Two distinct fixes:
PROVIDER-EXTENSION fixtures (4 of 5)
====================================
The cross-port conformance corpus declares test-only providers
(cycle-a, cycle-b, duplicate-x, duplicate-x-clone,
depends-on-missing, example-template-briefing) via providers.json
to drive the four provider-extension scenarios. The TS and Python
ports load these via composeRegistry / compose_registry; the Java
runner had no equivalent path and honest-failed every fixture as
"providers.json requires unavailable providers".
With MetaDataRegistry.compose(...) now available (b78e201), the
Java conformance runner can mirror the cross-port pattern:
- Adds a sibling helper class ConformanceTestProviders that
declares the test-only providers (matching the shape of the
TS adapter at server/typescript/.../conformance/adapter.ts and
the Python adapter at server/python/.../conformance_adapter.py).
- Test providers join AVAILABLE_PROVIDERS so the honest-gap
check passes.
- For fixtures whose providers.json names only test-only error
providers (cycle-a, cycle-b, duplicate-x, duplicate-x-clone,
depends-on-missing), the runner invokes compose() on the
resolved provider objects and captures the resulting
MetaDataException as the fixture's "thrown" error. The
existing expected-errors comparison pipeline picks it up
unchanged. The empty meta.empty.json stub is skipped — the
test result is fully determined by the compose-time error.
- For the success fixture (new-subtype-success), the
BriefingTemplate's template.briefing subtype is lazily
registered into the singleton just before the loader runs.
This works because fixtures sort alphabetically and
missing-provider-fails (which requires briefing absent) runs
before new-subtype-success (which requires briefing present).
The alphabetical-ordering rationale is documented in
ensureBriefingRegistered's javadoc.
Compose errors now carry CodeSource.DEFAULT as their ErrorSource
envelope so the conformance runner's buildEnvelope produces
format=code (matching expected-errors.json), not format=json. The
three MetaDataRegistry throw sites in resolveDependenciesStrict /
topologicalSortStrict were updated to use the 3-arg
MetaDataException constructor.
DOCS-FILE-BASIC (1 of 5)
========================
The Author entity in fixtures/conformance/docs-file-basic/input
explicitly re-declares "package": "acme::blog" on the object.entity
even though it equals the root's package. The TS / Python oracles
emit this redundant re-declaration on round-trip; the Java
canonical serializer was suppressing it (the "differs from parent"
heuristic in serializeBody) because Java's effective-package model
couldn't distinguish "author wrote it" from "node inherited it".
Adds a packageAuthored boolean on MetaData that the
CanonicalJsonParser sets when it reads a "package" key from a
node's body. CanonicalJsonSerializer then emits the package key
when packageAuthored is true, even if the value equals the
parent's package. This is the "Task 2 follow-up" that the
existing serializeBody comment called out explicitly. Other tests
(195 in metadata) continue to pass — the new flag is opt-in:
nodes whose package was inferred (not authored) still get the
suppression behavior they had before.
Verification:
- ConformanceTest: 196/196 green (previously 191/196).
- metadata module overall: 724 tests / 0 failures / 0 errors
(previously 724/5/0; my new ComposeRegistryTest 6 tests still
green; same overall test count).
- Full reactor builds clean across all 13 modules.
The remaining 1 failure in the render module (RenderSnapshotTest
[template-generator]) is from the parallel TS workstream's
in-flight template-generator render-conformance fixtures and is
not introduced or exposed by this change.1 parent 03ded6f commit 18e9d2b
6 files changed
Lines changed: 242 additions & 20 deletions
File tree
- server/java/metadata/src
- main/java/com/metaobjects
- io/json
- loader/parser/json
- registry
- test/java/com/metaobjects/conformance
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
294 | 304 | | |
295 | 305 | | |
296 | 306 | | |
| |||
844 | 854 | | |
845 | 855 | | |
846 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
847 | 873 | | |
848 | 874 | | |
849 | 875 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
650 | 659 | | |
651 | 660 | | |
652 | 661 | | |
| |||
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | | - | |
| 1069 | + | |
| 1070 | + | |
1070 | 1071 | | |
1071 | 1072 | | |
1072 | 1073 | | |
| |||
1082 | 1083 | | |
1083 | 1084 | | |
1084 | 1085 | | |
1085 | | - | |
| 1086 | + | |
| 1087 | + | |
1086 | 1088 | | |
1087 | 1089 | | |
1088 | 1090 | | |
| |||
1105 | 1107 | | |
1106 | 1108 | | |
1107 | 1109 | | |
1108 | | - | |
| 1110 | + | |
| 1111 | + | |
1109 | 1112 | | |
1110 | 1113 | | |
1111 | 1114 | | |
| |||
Lines changed: 95 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
219 | 235 | | |
220 | 236 | | |
221 | 237 | | |
| |||
225 | 241 | | |
226 | 242 | | |
227 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
228 | 260 | | |
229 | 261 | | |
230 | 262 | | |
| |||
249 | 281 | | |
250 | 282 | | |
251 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
252 | 291 | | |
253 | 292 | | |
254 | 293 | | |
| |||
268 | 307 | | |
269 | 308 | | |
270 | 309 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
276 | 333 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | 334 | | |
289 | 335 | | |
290 | 336 | | |
| |||
613 | 659 | | |
614 | 660 | | |
615 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
616 | 667 | | |
617 | 668 | | |
618 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
619 | 698 | | |
620 | 699 | | |
621 | 700 | | |
| |||
Lines changed: 100 additions & 0 deletions
| 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 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments