Commit 0443e2a
test(resolver): aggressive-testing layers 1, 4, 5, 7, 8 + Layer 9 PIT profile
Phase 7 of the sub-project 1 plan. Spec §12's testing matrix lands as
five new test classes (26 tests) plus a non-default Maven profile.
Layers 3 + 6 were already shipped in the prior commit on this branch.
Layer 1 — JavaSymbolResolverLayer1ExtendedTest (16):
Spec §12 Layer 1 cases not exercised by the existing
JavaSymbolResolverTest — deep generics (Map<String, List<Set<UUID>>>),
inner classes (static + non-static), records, sealed hierarchies,
enums with abstract methods, default-method interfaces, abstract
classes, annotation types, same simple name in different packages
pinned by import direction, JDK Optional/Stream/List via
ReflectionTypeSolver, multi-source-root cross-reference
(src/main ↔ src/test), wildcard imports, cyclic imports both
directions.
Layer 4 — JavaSymbolResolverPathologicalTest (3):
10K-line class, 1000 imports (most unresolvable), 10-deep generic
nesting (programmatically built so brackets are provably balanced).
@timeout per-test is the regression sentinel against quadratic
memoization; Surefire's default heap covers the spec's -Xmx512m
target many times over so we don't pin it explicitly.
Layer 5 — JavaSymbolResolverAdversarialTest (5):
Unbalanced braces (strict-success → EmptyResolved, strong assertion),
mis-tagged Kotlin (no exception/null, branch-agnostic — JavaParser's
permissiveness for "fun ... { }" is implementation-specific),
mis-tagged random bytes, mixed source root with .java + .txt siblings
(only .java enters the solver), empty source root (no Java files
anywhere) bootstraps via ReflectionTypeSolver alone.
Layer 7 — E2EResolverPetclinicTest (1, env-gated):
Runs JavaSymbolResolver against every .java under $E2E_PETCLINIC_DIR
and asserts bootstrap < 10 s (spec §9 budget), no exception, > 50%
files produce JavaResolved (i.e. strict-success isn't false-rejecting
valid Java). Lighter than spec §12 Layer 7's full precision/recall
comparison — that needs a pre-resolver baseline JSON checked into
test resources, captured at implementation time. This stand-in is the
strongest signal we have until that baseline lands.
Layer 8 — JavaSymbolResolverRandomizedTest (1, 100 samples):
Hand-rolled randomized generator with fixed seed (0xC0DE197042L). Per
the plan's license guidance, jqwik (EPL-2.0) isn't on the project's
preferred-license list (~/.claude/rules/dependencies.md prefers
MIT/Apache/BSD); this is the documented JUnit + java.util.Random
fallback. Properties: never throws unchecked, never returns null,
completes per-file in < 1 s budget.
Layer 9 — mutation Maven profile (non-default):
Adds pitest-maven 1.18.0 (Apache-2.0) targeting
intelligence.resolver.* and model.Confidence. Run with
mvn -P mutation org.pitest:pitest-maven:mutationCoverage \
-Dfrontend.skip=true -Ddependency-check.skip=true
Reports under target/pit-reports/. Non-gating per the plan; the
≥ 80% target is a follow-up signal once a first run lands.
Full suite: mvn test → 3618 / 0 failures / 32 skipped (1 new skip is
the env-gated E2EResolverPetclinicTest).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c12c847 commit 0443e2a
7 files changed
Lines changed: 696 additions & 0 deletions
File tree
- src/test/java/io/github/randomcodespace/iq/intelligence/resolver/java
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 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 | + | |
131 | 187 | | |
132 | 188 | | |
133 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
492 | 528 | | |
493 | 529 | | |
494 | 530 | | |
| |||
Lines changed: 96 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 | + | |
Binary file not shown.
0 commit comments