Skip to content

Honor declared classpath order in static inputs - #10

Merged
johnsonlee merged 2 commits into
mainfrom
fix/static-classpath-order
Nov 15, 2026
Merged

johnsonlee merged 2 commits into
mainfrom
fix/static-classpath-order

Conversation

@johnsonlee

@johnsonlee johnsonlee commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

The Boot decoder sorted nested library names and archive normalization moved application-owned entries ahead of dependencies. This discarded declared classpath order and rejected valid packaged inputs containing different definitions of the same class.

Honor the integration’s ordered classpath and complete packaged BOOT-INF/classpath.idx when selecting the first definition for the graph. Application ownership follows the selected bytes; an identical later application copy retains its ownership without changing precedence. Inputs without order evidence still require unambiguous definitions. There is no new startup, index, entrypoint or container requirement.

Maven inputs preserve the model order within compile/runtime dependencies and place provided/system dependencies afterward as supplemental static type evidence. Both graph dependencies and source mappings honor Maven’s native artifactHandler.isAddedToClasspath flag as well as scope. Non-classpath artifacts such as native tarballs are excluded according to Maven’s model; custom classpath artifact types remain supported. Source mappings retain the original compiler classpath order.

Keep all original class bytes, annotations, resources and order in the production inventory. Changes to shadowed production definitions remain proof obligations: paired engine goldens accept an unchanged shadowed input with a controlled application change, and reject added shadowed body, annotation or resource changes. Cache keys distinguish the selection policy.

Depends on #9. This PR is stacked on fix/signed-mr-projection.

Validation:

  • 320 engine input/golden cases, the affected native Gradle integration test and all 36 Maven module tests passed; engine, Gradle and Maven lint passed. The Maven module coverage gate also passed.
  • Both real Spring Boot Gradle goldens passed with a fresh TestKit cache, and Gradle test lint passed. Their plugin-resolution repositories now use Maven Central directly before the Plugin Portal, avoiding reliance on the portal proxy for published Boot dependencies.
  • All seven affected engine input-preparation files and MavenProjectInput.kt have 100% line and branch coverage against their current compiled class identities.
  • Actual Petclinic customers and visits archives prepared successfully as two preserved scopes for each BASE/HEAD revision. All 718 original manifest/archive/dependency files retained their hashes; all four scopes selected the Spring AOP definition declared first in the packaged index.
  • Real Netty BASE and HEAD revisions both completed native Maven packaging and GraphFold snapshot export for common and buffer. Tracked source/POM hashes remained unchanged. These exports validate input preparation, not full graph analysis or performance.

All 13 checks in the full Build workflow pass on this commit. Both platforms pass all test shards, exact 100% line and branch coverage gates for every module, publication checks, and native Maven library, Boot JAR and WAR lifecycle verification. Petclinic input preparation passed, but its full analysis encountered a separate SootUp bytecode-conversion limitation. The separate Issue #5 performance evaluation was completed using real Netty multi-graph inputs; it did not establish sufficient benefit to adopt the proposed cache.

@johnsonlee johnsonlee left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue in the ordering source for Maven flat scopes (inline).

The rest checks out:

  • Boot uses BOOT-INF/classes followed by a complete classpath.idx, and an incomplete index falls back to unambiguous selection.
  • WAR stays unambiguous.
  • Shadowed definitions stay in the inventory, and the paired goldens make their changes obligations.
  • The cache key includes the selection policy.

Generated by Claude Code

@johnsonlee
johnsonlee force-pushed the fix/signed-mr-projection branch from b42c5f9 to 36dc6e7 Compare November 14, 2026 13:18
@johnsonlee
johnsonlee force-pushed the fix/static-classpath-order branch 3 times, most recently from c8456ab to 2d842be Compare November 14, 2026 13:47
@github-actions

Copy link
Copy Markdown

Unit test coverage: Passed

Commit 8f8fa602425ae25db3612a9dfabcb6cd5b788ba8 · Build run 43606201401, attempt 1

Required for every module on both platforms: 100% line and 100% branch coverage. A pass requires zero missed lines/branches and nonzero measured totals.

Platform Verification
ubuntu-latest Passed
macos-latest Passed
Module Platform Line Branch
engine ubuntu-latest 100% (6019/6019) 100% (5999/5999)
engine macos-latest 100% (6019/6019) 100% (5999/5999)
gfc ubuntu-latest 100% (479/479) 100% (368/368)
gfc macos-latest 100% (479/479) 100% (368/368)
plugin/gradle ubuntu-latest 100% (172/172) 100% (76/76)
plugin/gradle macos-latest 100% (172/172) 100% (76/76)
plugin/maven ubuntu-latest 100% (110/110) 100% (94/94)
plugin/maven macos-latest 100% (110/110) 100% (94/94)

Coverage reports describe this run; missing or invalid reports never count as 100%. The required run-unit-test check also requires all tests and verification steps to succeed.

@johnsonlee
johnsonlee marked this pull request as ready for review November 14, 2026 15:40
Base automatically changed from fix/signed-mr-projection to main November 15, 2026 06:01
@johnsonlee
johnsonlee merged commit 5fdc7a0 into main Nov 15, 2026
13 checks passed
@johnsonlee
johnsonlee deleted the fix/static-classpath-order branch November 15, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant