Skip to content

Fix audit repository proxy loading in packaged applications - #55

Merged
ancongui merged 1 commit into
mainfrom
codex/audit-repository-loader-20261102
Nov 3, 2026
Merged

ancongui merged 1 commit into
mainfrom
codex/audit-repository-loader-20261102

Conversation

@ancongui

@ancongui ancongui commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Audit repository proxies could fail with ProxyBuilder.ensureVisible when created on a request thread whose context class loader cannot see interfaces inside a Spring Boot nested JAR. This prevented real audited Accounts reservation operations from completing.

Set the bean class loader on each of the two internal R2dbcRepositoryFactory instances to the loader of its declared repository interface. This preserves Spring Data repositories, transaction ownership and audit checks, and does not mutate the caller thread context or open a connection during construction.

Validation on current main 48d27323e3862202950f5fcf5a13872664ff528c: both new regressions fail before the correction; all 172 current r2dbc module cases pass after it. A separate test-only nested-executable composition loads both actual candidate audit proxies with the system context loader and succeeds without changing it. Root independently checked the exact three-path candidate tree and all 20 retained JUnit reports.

The equivalent fix on the released-source baseline was separately exercised by real Accounts packaged HTTP and PostgreSQL persistence tests. That evidence does not establish current-main consumer adoption or a published release. No version bump, artifact installation or replacement of an existing release is included.

@ancongui
ancongui enabled auto-merge November 3, 2026 01:01
@ancongui
ancongui merged commit 45a5c4e into main Nov 3, 2026
12 checks passed
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