Commit 7ce0552
refactor(ai,java): author voRequest/voResponse columns; remove deriveTraceFields + preFreeze hook
The AI-trace design changed: trace entities now AUTHOR their typed
voRequest/voResponse jsonb columns explicitly instead of deriving them by
injecting synthetic field.object nodes into the loaded metadata tree at load
time. This mirrors the TypeScript reference revert and removes the load-time
metadata mutation entirely.
Removed (the derivation + its generic load-time mutation hook):
- LlmTraceFieldDeriver + its test + trace-derive.yaml fixture (metadata).
- The generic preFreeze loader option on MetaDataLoader (field, setPreFreeze,
the 4-arg fromUris overload, and the in-load invocation after
resolvePendingExtends) — MetaDataLoader.java is byte-restored to its
pre-hook state.
- The deriveTraceFields pre-pass call in AbstractMetaDataMojo (meta:gen).
- The redundant PromptTemplate.getPayloadRef() override added for the deriver
(the base MetaTemplate.getPayloadRef() is identical and is what every
generator already calls).
Kept (these never mutate metadata):
- The OMDB recorder (omdb .../manager/db/ai/).
- LlmTraceHelperGenerator (codegen-spring record<Entity> generator) — it
already carries its own local LLM_CALL_BASE constant, no deriver dependency.
- @responseRef stays first-class cross-port vocabulary (registry manifest
untouched).
Tests now author the columns instead of relying on derivation:
- integration meta.ai-trace.yaml restored to the Slice-1 authored shape
(hand-declared voResponse field.object; no template.prompt, no GreetingRequest).
- LlmCallTraceRoundTripTest uses the plain fromUris (no deriver hook); DDL
restored to voResponse-only.
- The codegen-spring compile-run fixture already authored voResponse/voRequest,
so it needed no change.
Verified: metadata 983/0/0; codegen-spring 144/0/0 (incl. GeneratedTraceHelper
compile-run); RegistryManifestConformanceTest 3/0/0; integration
LlmCallTraceRoundTripTest 2/2 against real Postgres (authored voResponse jsonb
persisted end-to-end, no derivation).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 378db17 commit 7ce0552
8 files changed
Lines changed: 10 additions & 383 deletions
File tree
- server/java
- integration-tests/src/test
- java/com/metaobjects/integration
- resources
- maven-plugin/src/main/java/com/metaobjects/mojo
- metadata/src
- main/java/com/metaobjects
- loader
- ai
- template
- test
- java/com/metaobjects/loader/ai
- resources/com/metaobjects/loader/ai
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 211 | + | |
218 | 212 | | |
219 | 213 | | |
220 | 214 | | |
| |||
251 | 245 | | |
252 | 246 | | |
253 | 247 | | |
254 | | - | |
255 | 248 | | |
256 | 249 | | |
257 | 250 | | |
| |||
Lines changed: 9 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 3 | + | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 7 | + | |
20 | 8 | | |
21 | 9 | | |
22 | 10 | | |
| |||
25 | 13 | | |
26 | 14 | | |
27 | 15 | | |
28 | | - | |
29 | | - | |
| 16 | + | |
| 17 | + | |
30 | 18 | | |
31 | 19 | | |
32 | 20 | | |
33 | 21 | | |
34 | 22 | | |
35 | 23 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 89 | | |
98 | 90 | | |
99 | 91 | | |
| |||
Lines changed: 0 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 113 | | |
123 | 114 | | |
124 | 115 | | |
| |||
400 | 391 | | |
401 | 392 | | |
402 | 393 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | 394 | | |
420 | 395 | | |
421 | 396 | | |
422 | | - | |
423 | 397 | | |
424 | 398 | | |
425 | 399 | | |
| |||
698 | 672 | | |
699 | 673 | | |
700 | 674 | | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | 675 | | |
715 | 676 | | |
716 | 677 | | |
| |||
1289 | 1250 | | |
1290 | 1251 | | |
1291 | 1252 | | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | 1253 | | |
1301 | 1254 | | |
1302 | 1255 | | |
| |||
Lines changed: 0 additions & 121 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 80 | | |
0 commit comments