Skip to content

docs(export): correct the GenModelUtilX context Javadoc and test its restore - #1555

Merged
joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:fix/export-genmodel-context-followup
Sep 28, 2026
Merged

joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:fix/export-genmodel-context-followup

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

Follow-up to #1546, from a review after it was merged:

  • The Javadoc of withModelContext and renderBody called GenModelUtilX shared and said the leak lasts until the thread infers another export model. Neither holds. The utility isn't a singleton, so each inferrer has its own thread-local, and the leaked entry's value keeps its own key reachable, so the entry was never cleared.
  • Adds a regression test: inference and the type initializers must leave the GenModelUtilX context as they found them.

No functional change.

🤖 Generated with Claude Code

…restore

Follow-up to dsldevkit#1546. The Javadoc of withModelContext and renderBody called
GenModelUtilX shared and said the leak lasted until the thread inferred another
export model. The utility is not a singleton, so each inferrer has its own
thread-local, and the leaked entry's value kept its own key reachable, so it was
never cleared. Add a regression test: inference and the type initializers must
leave the GenModelUtilX context as they found it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LgVRfQCTxSDwGrN8J5s6fd
@joaodinissf
joaodinissf merged commit 5f83a65 into dsldevkit:master Sep 28, 2026
4 checks passed
@joaodinissf
joaodinissf deleted the fix/export-genmodel-context-followup branch September 28, 2026 22:20
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.

2 participants