Skip to content

Commit a64661d

Browse files
authored
[GenAI] Improve coverage for org.apache.avro:avro:1.12.1 using gpt-5.5 (#8590)
* Checkpoint for coverage improvement of org.apache.avro:avro:1.12.1 * Dynamic-access coverage for org.apache.avro.reflect.ReflectionUtil (40/41) * Dynamic-access coverage for org.apache.avro.io.FastReaderBuilder (41/41) * Native metadata for org.apache.avro.io.FastReaderBuilder__native_batch_2 * Update generated library support for org.apache.avro:avro:1.12.1 * Improve coverage for org.apache.avro:avro:1.12.1
1 parent a27feae commit a64661d

5 files changed

Lines changed: 506 additions & 77 deletions

File tree

metadata/org.apache.avro/avro/1.12.1/reachability-metadata.json

Lines changed: 129 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,63 @@
22
"reflection" : [
33
{
44
"condition" : {
5-
"typeReached" : "org.apache.avro.Schema"
5+
"typeReached" : "org.apache.avro.Schema$Parser"
66
},
7-
"type" : "java.lang.StackTraceElement[]"
7+
"type" : "com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer$Bucket[]"
8+
},
9+
{
10+
"condition" : {
11+
"typeReached" : "org.apache.avro.util.internal.JacksonUtils"
12+
},
13+
"type" : "com.fasterxml.jackson.databind.cfg.CoercionAction[]"
814
},
915
{
1016
"condition" : {
1117
"typeReached" : "org.apache.avro.Schema"
1218
},
13-
"type" : "com.fasterxml.jackson.databind.ext.Java7SupportImpl"
19+
"type" : "com.fasterxml.jackson.databind.ext.Java7SupportImpl",
20+
"methods" : [
21+
{
22+
"name" : "<init>",
23+
"parameterTypes" : [ ]
24+
}
25+
]
1426
},
1527
{
1628
"condition" : {
17-
"typeReached" : "org.apache.avro.util.internal.Accessor"
29+
"typeReached" : "org.apache.avro.Schema"
1830
},
19-
"type" : "org.apache.avro.Schema$Field"
31+
"type" : "java.lang.Class"
2032
},
2133
{
2234
"condition" : {
23-
"typeReached" : "org.apache.avro.util.internal.Accessor"
35+
"typeReached" : "org.apache.avro.reflect.ReflectData$ClassAccessorData"
2436
},
25-
"type" : "org.apache.avro.io.parsing.ResolvingGrammarGenerator"
37+
"type" : "java.lang.Object"
2638
},
2739
{
2840
"condition" : {
2941
"typeReached" : "org.apache.avro.Schema"
3042
},
31-
"type" : "java.lang.String[]"
43+
"type" : "java.lang.StackTraceElement[]"
3244
},
3345
{
3446
"condition" : {
35-
"typeReached" : "org.apache.avro.util.springframework.ConcurrentReferenceHashMap"
47+
"typeReached" : "org.apache.avro.reflect.ReflectDatumReader"
3648
},
37-
"type" : "org.apache.avro.util.springframework.ConcurrentReferenceHashMap$Segment[]"
49+
"type" : "java.lang.String"
3850
},
3951
{
4052
"condition" : {
41-
"typeReached" : "org.apache.avro.Schema$Parser"
53+
"typeReached" : "org.apache.avro.Schema"
4254
},
43-
"type" : "com.fasterxml.jackson.core.sym.CharsToNameCanonicalizer$Bucket[]"
55+
"type" : "java.lang.String[]"
4456
},
4557
{
4658
"condition" : {
47-
"typeReached" : "org.apache.avro.util.internal.JacksonUtils"
59+
"typeReached" : "org.apache.avro.reflect.ReflectDatumReader"
4860
},
49-
"type" : "com.fasterxml.jackson.databind.cfg.CoercionAction[]"
61+
"type" : "java.lang.String[]"
5062
},
5163
{
5264
"condition" : {
@@ -96,6 +108,18 @@
96108
},
97109
"type" : "jdk.internal.classfile.impl.Util$Writable[]"
98110
},
111+
{
112+
"condition" : {
113+
"typeReached" : "org.apache.avro.util.internal.Accessor"
114+
},
115+
"type" : "org.apache.avro.Schema$Field"
116+
},
117+
{
118+
"condition" : {
119+
"typeReached" : "org.apache.avro.util.internal.Accessor"
120+
},
121+
"type" : "org.apache.avro.io.parsing.ResolvingGrammarGenerator"
122+
},
99123
{
100124
"condition" : {
101125
"typeReached" : "org.apache.avro.reflect.ReflectData"
@@ -124,78 +148,77 @@
124148
"name" : "c"
125149
},
126150
{
127-
"name" : "s"
151+
"name" : "d"
128152
},
129153
{
130-
"name" : "i"
154+
"name" : "f"
131155
},
132156
{
133-
"name" : "l"
157+
"name" : "i"
134158
},
135159
{
136-
"name" : "f"
160+
"name" : "i2"
137161
},
138162
{
139-
"name" : "d"
163+
"name" : "l"
140164
},
141165
{
142166
"name" : "o"
143167
},
144168
{
145-
"name" : "i2"
169+
"name" : "s"
146170
}
147171
]
148172
},
149173
{
150174
"condition" : {
151175
"typeReached" : "org.apache.avro.reflect.ReflectionUtil$AccessorTestClass"
152176
},
153-
"type" : "org.apache.avro.reflect.ReflectionUtil$AccessorTestClass"
154-
},
155-
{
156-
"condition" : {
157-
"typeReached" : "org.apache.avro.Schema"
158-
},
159-
"type" : "sun.util.resources.cldr.CalendarData"
177+
"type" : "org.apache.avro.reflect.ReflectionUtil$AccessorTestClass",
178+
"fields" : [
179+
{
180+
"name" : "b"
181+
},
182+
{
183+
"name" : "by"
184+
},
185+
{
186+
"name" : "c"
187+
},
188+
{
189+
"name" : "d"
190+
},
191+
{
192+
"name" : "f"
193+
},
194+
{
195+
"name" : "i"
196+
},
197+
{
198+
"name" : "i2"
199+
},
200+
{
201+
"name" : "l"
202+
},
203+
{
204+
"name" : "o"
205+
},
206+
{
207+
"name" : "s"
208+
}
209+
]
160210
},
161211
{
162212
"condition" : {
163-
"typeReached" : "org.apache.avro.reflect.ReflectionUtil"
213+
"typeReached" : "org.apache.avro.util.springframework.ConcurrentReferenceHashMap"
164214
},
165-
"type" : {
166-
"lambda" : {
167-
"declaringClass" : "org.apache.avro.reflect.ReflectionUtil",
168-
"declaringMethod" : {
169-
"name" : "getConstructorAsFunction",
170-
"parameterTypes" : [
171-
"java.lang.Class",
172-
"java.lang.Class"
173-
]
174-
},
175-
"interfaces" : [
176-
"java.util.function.Function"
177-
]
178-
}
179-
}
215+
"type" : "org.apache.avro.util.springframework.ConcurrentReferenceHashMap$Segment[]"
180216
},
181217
{
182218
"condition" : {
183-
"typeReached" : "org.apache.avro.reflect.ReflectionUtil"
219+
"typeReached" : "org.apache.avro.Schema"
184220
},
185-
"type" : {
186-
"lambda" : {
187-
"declaringClass" : "org.apache.avro.reflect.ReflectionUtil",
188-
"declaringMethod" : {
189-
"name" : "getConstructorAsSupplier",
190-
"parameterTypes" : [
191-
"java.lang.Class"
192-
]
193-
},
194-
"interfaces" : [
195-
"java.util.function.Supplier"
196-
]
197-
}
198-
}
221+
"type" : "sun.util.resources.cldr.CalendarData"
199222
},
200223
{
201224
"condition" : {
@@ -276,26 +299,68 @@
276299
"org.apache.avro.reflect.AvroEncode"
277300
]
278301
}
302+
},
303+
{
304+
"type" : {
305+
"lambda" : {
306+
"declaringClass" : "org.apache.avro.reflect.ReflectionUtil",
307+
"declaringMethod" : {
308+
"name" : "getConstructorAsFunction",
309+
"parameterTypes" : [
310+
"java.lang.Class",
311+
"java.lang.Class"
312+
]
313+
},
314+
"interfaces" : [
315+
"java.util.function.Function"
316+
]
317+
}
318+
}
319+
},
320+
{
321+
"type" : {
322+
"lambda" : {
323+
"declaringClass" : "org.apache.avro.reflect.ReflectionUtil",
324+
"declaringMethod" : {
325+
"name" : "getConstructorAsSupplier",
326+
"parameterTypes" : [
327+
"java.lang.Class"
328+
]
329+
},
330+
"interfaces" : [
331+
"java.util.function.Supplier"
332+
]
333+
}
334+
}
279335
}
280336
],
281337
"resources" : [
338+
{
339+
"glob" : "DUMP_LAMBDA_PROXY_CLASS_FILES/org/apache/avro/reflect/ReflectionUtil$$Lambda.*.class"
340+
},
282341
{
283342
"condition" : {
284-
"typeReached" : "org.apache.avro.reflect.ReflectionUtil"
343+
"typeReached" : "org.apache.avro.generic.GenericData"
285344
},
286-
"glob" : "DUMP_LAMBDA_PROXY_CLASS_FILES/org/apache/avro/reflect/ReflectionUtil$$Lambda.0x000000009822cd08.class"
345+
"glob" : "META-INF/services/org.apache.avro.Conversion"
287346
},
288347
{
289348
"condition" : {
290-
"typeReached" : "org.apache.avro.reflect.ReflectionUtil"
349+
"typeReached" : "org.apache.avro.LogicalTypes"
291350
},
292-
"glob" : "DUMP_LAMBDA_PROXY_CLASS_FILES/org/apache/avro/reflect/ReflectionUtil$$Lambda.0x0000000098252e28.class"
351+
"glob" : "META-INF/services/org.apache.avro.LogicalTypes$LogicalTypeFactory"
293352
},
294353
{
295354
"condition" : {
296-
"typeReached" : "org.apache.avro.reflect.ReflectionUtil"
355+
"typeReached" : "org.apache.avro.Schema"
356+
},
357+
"glob" : "META-INF/services/org.slf4j.spi.SLF4JServiceProvider"
358+
},
359+
{
360+
"condition" : {
361+
"typeReached" : "org.apache.avro.Schema"
297362
},
298-
"glob" : "DUMP_LAMBDA_PROXY_CLASS_FILES/org/apache/avro/reflect/ReflectionUtil$$Lambda.0x0000000098253050.class"
363+
"glob" : "org/slf4j/impl/StaticLoggerBinder.class"
299364
}
300365
]
301366
}

stats/org.apache.avro/avro/1.12.1/execution-metrics.json

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,97 @@
5959
"test_file": "tests/src/org.apache.avro/avro/1.12.1/src/test/java/org_apache_avro/avro/SpecificDataTest.java",
6060
"metadata_file": "metadata/org.apache.avro/avro/1.12.1/reachability-metadata.json"
6161
}
62+
},
63+
"improve_library_coverage:2026-06-24": {
64+
"timestamp": "2026-06-24T11:28:55.524210Z",
65+
"library": "org.apache.avro:avro:1.12.1",
66+
"starting_commit": "2db46a4efaa98005e6586e8df2f937d1a4e8d4f6",
67+
"ending_commit": "070cc4f73e94fff4435625fee62c490a1dc5227f",
68+
"strategy_name": "dynamic_access_main_sources_pi_gpt-5.5",
69+
"agent": "pi",
70+
"model": "oca/gpt-5.5",
71+
"status": "success_with_intervention",
72+
"stats": {
73+
"version": "1.12.1",
74+
"dynamicAccess": {
75+
"breakdown": {
76+
"reflection": {
77+
"coverageRatio": 0.926829,
78+
"coveredCalls": 38,
79+
"totalCalls": 41
80+
}
81+
},
82+
"coverageRatio": 0.926829,
83+
"coveredCalls": 38,
84+
"totalCalls": 41
85+
},
86+
"libraryCoverage": {
87+
"instruction": {
88+
"covered": 9184,
89+
"missed": 43877,
90+
"ratio": 0.173084,
91+
"total": 53061
92+
},
93+
"line": {
94+
"covered": 2127,
95+
"missed": 9527,
96+
"ratio": 0.182512,
97+
"total": 11654
98+
},
99+
"method": {
100+
"covered": 578,
101+
"missed": 2213,
102+
"ratio": 0.207094,
103+
"total": 2791
104+
}
105+
}
106+
},
107+
"library_preparation_preflight": {
108+
"status": "completed",
109+
"action": "advisory_preparation",
110+
"issue_number": 8565,
111+
"issue_label": "library-update-request",
112+
"library": "org.apache.avro:avro:1.12.1",
113+
"summary": "No extra dependency or Docker service is required for normal Avro schema, generic, specific, and reflect usage, but meaningful native coverage of Avro reflection constructor paths needs a JDK LambdaMetafactory dump property.",
114+
"deterministic_setup": [],
115+
"agent_guidance": "If generated tests exercise org.apache.avro.reflect.ReflectionUtil, ReflectData, or constructor-backed specific/reflect records, configure the test JVM with -Djdk.invoke.LambdaMetafactory.dumpProxyClassFiles=true and use a stable writable working directory so the native-image agent can observe the dumped lambda proxy class resources.",
116+
"risks": [
117+
"Avro's snappy, xz, and zstandard codecs depend on optional artifacts; avoid tests for those codecs unless explicit optional dependencies are later added.",
118+
"Dumped lambda proxy class resource names can vary by JDK/GraalVM version, so Gradle and Native Image verification remain authoritative."
119+
],
120+
"applied_setup": [],
121+
"input_evidence": [
122+
{
123+
"name": "issue",
124+
"summary": "#8565 Update existing library: org.apache.avro:avro:1.12.1; label=library-update-request; body_chars=150"
125+
},
126+
{
127+
"name": "existing_tests",
128+
"summary": "14 existing test file path(s) included"
129+
}
130+
],
131+
"model": "oca/gpt-5.5",
132+
"input_tokens_used": 60020,
133+
"output_tokens_used": 3971,
134+
"prompt_path": "library-preflight-prompt.txt",
135+
"raw_response_path": "library-preflight-response.txt",
136+
"session_log_path": "/home/mihailo/git/graalvm-reachability-metadata/forge/logs/org.apache.avro:avro:1.12.1/library-preparation-preflight/pi-generation-2026-06-24T10-13-01-561756Z.log"
137+
},
138+
"metrics": {
139+
"input_tokens_used": 84402,
140+
"cached_input_tokens_used": 496640,
141+
"output_tokens_used": 6662,
142+
"iterations": 2,
143+
"cost_usd": 0.4482,
144+
"generated_loc": 565,
145+
"tested_library_loc": 2127,
146+
"metadata_entries": 61,
147+
"test_only_metadata_entries": 53,
148+
"code_coverage_percent": 18.25
149+
},
150+
"artifacts": {
151+
"test_file": "tests/src/org.apache.avro/avro/1.12.1/src/test/java/org_apache_avro/avro/ReflectDatumReaderTest.java",
152+
"metadata_file": "metadata/org.apache.avro/avro/1.12.1/reachability-metadata.json"
153+
}
62154
}
63155
}

0 commit comments

Comments
 (0)