Commit c5905b8
Adds the shared api-contract-conformance gate that verifies the deployed API
surface honors field.timestamp @autoset across all five ports — the "additional
assurance" gate #229 asked for, now achievable because the Kotlin controller
(46d8e54) and Python router (abf48d2) were fixed to stamp above the seam.
Corpus (fixtures/api-contract-conformance/):
- Author gains isolated autoCreatedAt (@autoset:onCreate) + autoUpdatedAt
(@autoset:onUpdate) fields — existing scenarios untouched (they use subset
matchers; the only equals is list-empty's []).
- seed.json seeds both to an OLD "2000-01-01" sentinel (equal).
- scenarios/autoset-patch.yaml: PATCH /api/authors/1 → assert
fieldsNotEqual:[autoCreatedAt, autoUpdatedAt]. A field-vs-field inequality
(old sentinel vs a 2026 now()) is format- AND timing-agnostic and catches BOTH
the no-bump and the lost-update (rewrite-created) failure modes — no capture-once
or literal timestamp matching needed.
Per-port runners (test-only; no generator/product code touched):
- New fieldsEqual/fieldsNotEqual matchers (raw response field-vs-field) in all five
assertion vocabularies (TS/Python/Kotlin/Java/C#).
- Each hand-rolled reference server stamps @autoset (insert stamps onCreate+onUpdate
from one now(); update/patch bumps onUpdate, never rewrites onCreate) + serves the
two new columns; seeds the OLD sentinel via DIRECT insert (not the stamping path).
- Generated-lane harnesses that POST-seed (Kotlin/Java/C#) switched to a direct
insert of the sentinel, so the generated controller's PATCH-stamp diverges robustly
(Python/TS already seed directly).
Verified: all five ports pass both lanes (reference + generated) — 26 scenarios × 2
each, including autoset-patch, with every prior scenario green. POST onCreate/onUpdate
stamping stays unit-gated per port (KotlinAutoSetStampingTest, test_router_autoset,
Issue203AutoSetStampingTests, etc.); this corpus gates the drift-prone update path
cross-port.
Refs #203, #229.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XeGSV3StPCcJGZNNJ4ZfAb
1 parent abf48d2 commit c5905b8
19 files changed
Lines changed: 546 additions & 88 deletions
File tree
- fixtures/api-contract-conformance
- scenarios
- server
- csharp/MetaObjects.IntegrationTests/Api
- java
- integration-tests-kotlin/src/test/kotlin/com/metaobjects/integration/kotlin/api
- generated
- integration-tests/src/test/java/com/metaobjects/integration/api
- generated
- python/tests/integration
- typescript/packages/integration-tests/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
Lines changed: 21 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
Lines changed: 45 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
147 | 190 | | |
148 | 191 | | |
149 | 192 | | |
| |||
Lines changed: 48 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
94 | 99 | | |
95 | 100 | | |
96 | 101 | | |
| |||
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
138 | | - | |
| 143 | + | |
| 144 | + | |
139 | 145 | | |
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
143 | 156 | | |
144 | 157 | | |
145 | 158 | | |
| |||
261 | 274 | | |
262 | 275 | | |
263 | 276 | | |
264 | | - | |
| 277 | + | |
| 278 | + | |
265 | 279 | | |
266 | 280 | | |
267 | 281 | | |
| |||
473 | 487 | | |
474 | 488 | | |
475 | 489 | | |
476 | | - | |
| 490 | + | |
477 | 491 | | |
478 | 492 | | |
479 | 493 | | |
| |||
508 | 522 | | |
509 | 523 | | |
510 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
511 | 529 | | |
512 | 530 | | |
513 | 531 | | |
514 | 532 | | |
515 | 533 | | |
516 | | - | |
| 534 | + | |
| 535 | + | |
517 | 536 | | |
518 | 537 | | |
519 | 538 | | |
| 539 | + | |
| 540 | + | |
520 | 541 | | |
521 | 542 | | |
522 | 543 | | |
523 | 544 | | |
524 | 545 | | |
525 | | - | |
| 546 | + | |
526 | 547 | | |
527 | 548 | | |
528 | 549 | | |
| |||
572 | 593 | | |
573 | 594 | | |
574 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
575 | 602 | | |
576 | 603 | | |
577 | 604 | | |
| |||
592 | 619 | | |
593 | 620 | | |
594 | 621 | | |
595 | | - | |
| 622 | + | |
596 | 623 | | |
597 | 624 | | |
598 | 625 | | |
| |||
621 | 648 | | |
622 | 649 | | |
623 | 650 | | |
624 | | - | |
| 651 | + | |
625 | 652 | | |
626 | 653 | | |
627 | 654 | | |
628 | 655 | | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
629 | 662 | | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
641 | 670 | | |
642 | 671 | | |
643 | 672 | | |
| |||
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
| |||
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
288 | | - | |
| 293 | + | |
| 294 | + | |
289 | 295 | | |
290 | 296 | | |
291 | 297 | | |
292 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
293 | 306 | | |
294 | 307 | | |
295 | 308 | | |
| |||
0 commit comments