Repository navigation
worker: add diagnostic channel 'worker_threads.main.registry' - #67311
Conversation
Signed-off-by: Paolo Insogna <paolo@cowtech.it> Assisted-By: OpenAI:GPT-6.1 Sol <openai/gpt-6.1-sol>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67311 +/- ##
==========================================
- Coverage 93.00% 90.67% -2.33%
==========================================
Files 428 800 +372
Lines 195818 281098 +85280
Branches 30283 54317 +24034
==========================================
+ Hits 182117 254881 +72764
- Misses 13375 16303 +2928
- Partials 326 9914 +9588
🚀 New features to boost your workflow:
|
| port.unref(); | ||
|
|
||
| if (registryChannel.hasSubscribers) { | ||
| registryChannel.publish({ threadIds: ArrayFrom(threadsPorts.keys()) }); |
There was a problem hiding this comment.
Nit: I haven't checked the convention for other things, but I suspect we should be using null proto objects for these. (not blocking)
Signed-off-by: Paolo Insogna <paolo@cowtech.it> Assisted-by: GPT-6.1 Sol
|
Thanks for the review, @jasnell! Both registry event payloads now use null-prototype objects, and the test checks this explicitly. I also updated the documentation to describe the worker thread registry first, then explain how internal messaging ports track its entries and why snapshots do not guarantee that workers are ready or still running. I kept the channel name unchanged. Could you take another look? |
|
CI is red |
Identify workers created by the test explicitly and skip execution when started inside the CI worker wrapper. Assisted-by: GPT-6.1 Sol Signed-off-by: Paolo Insogna <paolo@cowtech.it>
Failed to start CIFull Auto Start CI output |
Failed to start CIFull Auto Start CI output |
|
Landed in 50ba1ec |
Signed-off-by: Paolo Insogna <paolo@cowtech.it> Assisted-By: OpenAI:GPT-6.1 Sol <openai/gpt-6.1-sol> PR-URL: #67311 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Summary
Add
worker_threads.main.registryto expose changes to the worker messaging registry through diagnostics_channel.Changes
{ threadIds }snapshots on registration and removal, including nested workers.Notes
Registration does not guarantee readiness. Removal depends on the parent processing the worker's exit and can be delayed if the parent is blocked.
Additional Informations
AI-assisted work. All changes reviewed by a human.