Skip to content

fix: silence false-positive context warning in react framework#1009

Open
ajbozarth wants to merge 1 commit intogenerative-computing:mainfrom
ajbozarth:fix/react-context-warning
Open

fix: silence false-positive context warning in react framework#1009
ajbozarth wants to merge 1 commit intogenerative-computing:mainfrom
ajbozarth:fix/react-context-warning

Conversation

@ajbozarth
Copy link
Copy Markdown
Contributor

@ajbozarth ajbozarth commented May 4, 2026

Misc PR

Type of PR

  • Bug Fix

Description

  • Link to Issue: Fixes

react() uses ChatContext for multi-turn history, which triggers the "not using SimpleContext with async requests" warning on every turn. The warning is a false positive here — react() serializes all aact() calls with sequential awaits, so there is no risk of stale context from concurrent access.

The silence_context_type_warning parameter exists precisely for this case; the sync act() wrapper already uses it for the same reason.

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code was added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

Attribution

  • AI coding assistants used

react() serializes all aact() calls with sequential awaits, so the
SimpleContext warning does not apply.

Assisted-by: Claude Code
Signed-off-by: Alex Bozarth <ajbozart@us.ibm.com>
@ajbozarth ajbozarth requested a review from a team as a code owner May 4, 2026 22:48
@github-actions github-actions Bot added the bug Something isn't working label May 4, 2026
@ajbozarth ajbozarth requested review from jakelorocco and nrfulton May 4, 2026 22:49
@ajbozarth ajbozarth self-assigned this May 4, 2026
Copy link
Copy Markdown
Member

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

seems ok to me (holding off on approval due to code freeze)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants