Skip to content

Add worker diagnostic Bake tasks - #9

Merged
samuel-williams-shopify merged 9 commits into
mainfrom
add-worker-diagnostic-bake-tasks
Jul 29, 2026
Merged

Add worker diagnostic Bake tasks#9
samuel-williams-shopify merged 9 commits into
mainfrom
add-worker-diagnostic-bake-tasks

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a workers Bake task for listing registered connection IDs
  • expose memory_dump, scheduler_dump, thread_dump, garbage_profile_start, and garbage_profile_stop as worker Bake tasks
  • add bounded allocation_trace_start and allocation_trace_stop tasks that capture a traced heap and clear allocation metadata
  • guard allocation tracing ownership so the tasks do not interfere with an already-active external profiler
  • support omitting Ruby SHAPE records from memory dumps with shapes=false for Reap compatibility
  • compose the simple example with Managed::Environment so Supervised#prepare! has its expected lifecycle parent
  • exercise the Bake tasks end-to-end with a Sus fixture containing a real supervisor, worker, bus proxy, and worker controller
  • add a Memory Diagnostics guide covering safe heap capture and dedicated workflows for heap-profiler, sheap, and Reap
  • document bounded allocation tracing, GC profiling, scheduler/thread dumps, and a practical leak-investigation workflow
  • remove stale memory_sample instructions and regenerate the README guide list and agent documentation context

Validation

  • full Sus suite: 68 tests, 199 assertions passing
  • focused Bake suite: 7 tests, 19 assertions passing
  • RuboCop: 61 files inspected, no offenses
  • generated documentation context successfully
  • exercised heap-profiler and sheap against real Ruby 4 ObjectSpace.dump_all files
  • end-to-end tests verify shapes=false omits SHAPE records and bounded allocation tracing adds source locations then clears metadata
  • git diff --check

Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
Assisted-By: devx/d15f74b3-893f-4846-bbae-4dcdd10e8b8a
@samuel-williams-shopify
samuel-williams-shopify merged commit f21405c into main Jul 29, 2026
34 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the add-worker-diagnostic-bake-tasks branch July 29, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant