test: pin task custom env query forwarding through let_value (#2239) - #2254
Merged
ericniebler merged 1 commit intoSep 13, 2026
Merged
Conversation
…A#2239) Issue NVIDIA#2239 reported that a task whose env_type is constructed from the enclosing environment failed to compile under starts_on + let_value when the consumer provides the queried value. The bug was incidentally fixed by the task reorganization in e88b131, but without a regression test. Add two regression tests pinning the fixed behavior: the task's custom env must observe queries written by write_env, both when a let_value sits between starts_on and the task (the reported failing arrangement) and when the task is a direct child of starts_on. On pre-fix code the reported arrangement fails to compile, so these tests guard against regressions at compile time. Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Contributor
Author
|
Hi @ericniebler — could you run /ok to test 5ffbf41 when you get a chance? It's a test-only PR adding regression coverage for #2239 (details in the description). Thanks! |
ericniebler
approved these changes
Sep 13, 2026
Collaborator
|
/ok to test 5ffbf41 |
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.
Adds regression tests for #2239.
What happened
Issue #2239 reported that a
stdexec::taskwhoseenv_typeis constructed from the enclosing environment failed to compile understarts_on+let_value, even when the consumer provides the queried value:The issue is already fixed on current
mainby thetaskreorganization in e88b131 (landed via #2252). I verified:main(ae89633): the reproducer compiles.7) — not the-1default — in every arrangement from the issue, including both previously failing ones.This PR
The fix landed without a regression test for this arrangement, so this adds two test-only regression tests to
test/stdexec/types/test_task.cpp:starts_on(sched, just() | let_value(task)) | write_env(prop{q, 7})— the task's env must observeq == 7.starts_on(sched, task) | write_env(...).On pre-fix code the first test fails to compile, so CI guards this behavior at compile time. The tests use
exec::single_thread_context(the existing pattern in this file) and are modules-safe (noon()).No library changes are needed.
Fixes #2239