Skip to content

fix(ci): join resource sampler before run returns (#3929) - #3930

Merged
zackees merged 2 commits into
masterfrom
fix/3929-resource-sampler
Nov 7, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/3929-resource-sampler

Conversation

@zackees

@zackees zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member

Fixes #3929.

The local gate stopped its sampler by setting an event, but an in-progress resource_sample could still emit after run returned. That output could land in the next test's redirected stdout even though that next run disabled sampling. The environment flag is read synchronously when starting the sampler; the existing disabled-sampling assertion is correct.

The sampler now returns its thread together with the stop event, and run signals and joins it in finally. Disabled sampling and buffered commands still start no thread.

RED commit c17e0ad adds an event-controlled regression with a blocked sample and a completed mocked child. The test invocation through uv run exited 1 with “run returned while a sample was still in progress.” It observes either cleanup joining or the premature return, rather than relying on a scheduling delay. GREEN commit 4947ee8 fixes the lifetime. The resource-sample test file passed 100 consecutive executions, each exit code checked, for 500 passing test cases.

Only CI Python code and its self-test changed. Rust unit, unchanged C, differential, and protocol tiers do not apply. No workflow, plugin, C test, public header, or features ledger changes. The original reported run was still in progress when its failed logs were requested, so that hosted failure was not independently retrieved.

Serial repository lint with SOLDR_PORCELAIN disabled exited 0 and ended with “lane lint: ok (269.0s)”. The bounded report classified diagnostics as unknown, but retained the successful command exit and the full artifact log. No Dylint refusal occurred.

🤖 Generated with Claude Code

@zackees
zackees enabled auto-merge November 7, 2026 19:35
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit 024d3e4 Nov 7, 2026
39 checks passed
@zackees
zackees deleted the fix/3929-resource-sampler branch November 7, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: local gate: resource sampler outlives run and contaminates later output

1 participant