Add debug logging to rake-ui#54
Open
nicholaspufal wants to merge 2 commits into
Open
Conversation
Austio
approved these changes
May 11, 2026
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.
JIRA link: https://doximity.atlassian.net/browse/CSVUEAN-2825
What is this?
rake-ui runs rake tasks asynchronously, but today there is very little structured host-app logging around that lifecycle. When a task appears to hang, exits before producing useful output, or never reaches the local task log, maintainers have to infer where execution stopped: request handling, log creation, process handoff, or completion marker writing. That makes failures harder to diagnose than they need to be.
This adds debug-level lifecycle breadcrumbs with a small, stable, public-safe shape. Each event identifies the
rake-uicomponent, the lifecycle event, the host Rails app name, the rake task name, and the task log id when one exists. It intentionally does not log command strings, argument values, environment values, authentication data, or application-specific metadata.I also documented the events and fields in the README so host applications can enable Rails debug logging and know what each breadcrumb means.
Diagram
The lifecycle has a few handoff points, so this is useful context for what the breadcrumbs cover:
sequenceDiagram participant Host as Host Rails app participant RakeUi as rake-ui participant Log as Local task log participant Child as Forked task process Host->>RakeUi: Execute rake task RakeUi-->>RakeUi: debug: task_execution.requested RakeUi->>Log: Create task log file RakeUi-->>RakeUi: debug: task_log.created RakeUi->>Child: Fork execution RakeUi-->>RakeUi: debug: task_execution.forked Child->>Log: Write command output Child->>Log: Write finished marker Child-->>RakeUi: debug: task_execution.finished_marker_written