Repository navigation
[hotfix][api][java] Move ResourceContext lookup factory to test utilities - #1349
Merged
wenjin272 merged 1 commit intoNov 2, 2026
Merged
Conversation
…ties Move ResourceContext.fromGetResource() to TestResourceContexts in the API test-jar and migrate Java test callers. Add test-scoped API test-jar dependencies for integrations and integration E2E tests. Include the OpenAI Responses and pgvector test callers added on main so removing the production helper does not break test compilation. Generated-by: Codex CLI 0.153.4 (GPT-6; exact model version unavailable) Co-authored-by: Codex <codex@openai.com>
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of change
Move the resource-lookup-only test factory out of the production
ResourceContextAPI. Java tests now callTestResourceContexts.fromGetResource()from the API test-jar.Runtime flow and key decisions
Production resource lookup is unchanged. The test factory returns a
ResourceContextthat delegatesgetResourceto the supplied function and supplies empty skill defaults. Integration modules and integration E2E tests depend on the API test-jar with test scope, keeping the fixture out of production artifacts.Behavioral Semantics
Tests
JDK 21:
SKIP_SPOTLESS_CHECK=true bash tools/build.sh -jpassed (full clean install, with tests compiled). The 46 migrated test classes completed with 696 passed, 42 skipped, no failures/errors. JDK 11 full-reactor Spotless check andgit diff --checkpassed.Not verified: live model/vector-store services, E2E execution, or Python tests. No Python code changes.
API
Removes the public static Java method
ResourceContext.fromGetResource. In-repository callers are tests and move toTestResourceContexts; external callers of the removed convenience method must implementResourceContextthemselves (or use the test fixture in their tests). The remainingResourceContextmethods and production lookup behavior are unchanged.Documentation
doc-neededdoc-not-neededdoc-includedWas this patch authored or co-authored using generative AI tooling?
Generated-by: Codex CLI 0.153.4 (GPT-6; exact model version unavailable)