Skip to content

feat: first pass at carrying contextvars though async flows - #878

Merged
AngeloDanducci merged 4 commits into
generative-computing:mainfrom
AngeloDanducci:ad-459
Apr 17, 2026
Merged

feat: first pass at carrying contextvars though async flows#878
AngeloDanducci merged 4 commits into
generative-computing:mainfrom
AngeloDanducci:ad-459

Conversation

@AngeloDanducci

@AngeloDanducci AngeloDanducci commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as 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

@AngeloDanducci AngeloDanducci added the enhancement New feature or request label Apr 17, 2026
@AngeloDanducci
AngeloDanducci requested review from a team, jakelorocco and nrfulton as code owners April 17, 2026 08:23
@github-actions

Copy link
Copy Markdown
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

@AngeloDanducci

Copy link
Copy Markdown
Contributor Author

Rebased after the other logging merge.

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review from Claude Code (via @ajbozarth). Minor note on the commits — "first pass at carrying contextvars though async flows" has a typo and is missing the feat: prefix. Just an FYI in case someone reads the squash commit message.

Comment thread mellea/stdlib/sampling/base.py Outdated
Comment thread mellea/stdlib/session.py

@ajbozarth ajbozarth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In addition to the Claude review above I also ran the tests locally and looked through the code changes manually and overall it LGTM. The Claude items aren't blockers, in it's own words:

Neither is blocking — they're more "should fix before this pattern spreads" than "this is broken now."

@AngeloDanducci
AngeloDanducci added this pull request to the merge queue Apr 17, 2026
Merged via the queue into generative-computing:main with commit 8501b3d Apr 17, 2026
7 checks passed
@AngeloDanducci
AngeloDanducci deleted the ad-459 branch April 17, 2026 21:06
akihikokuroda pushed a commit to akihikokuroda/mellea that referenced this pull request May 27, 2026
…ve-computing#878)

* first pass at carrying contextvars though async flows

* update docstring

* utilize with context instead of iter token

* add todo regarding log context and contextfilter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a contextvars-based system to carry session_id, request_id, model_id, and sampling_iteration through async flows

3 participants