feat(framework): persistent background dashboard daemon (#302)#306
Merged
Conversation
Bare `framework` ensures a long-lived dashboard for the workspace and prints its URL and commands; `framework stop` shuts it down. The daemon is detached and tails .framework/events.jsonl, pushing each event to browsers so it outlives a single run. Hardening: EventTailer detects an in-place same-length truncation via mtime, and ensureDaemon refuses to re-exec a test entry so a node --test run can't fork-bomb itself.
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.
Closes #302.
Bare
frameworknow ensures a long-lived dashboard for the workspace and prints its URL plus commands;framework stopshuts it down. The daemon is detached and tails.framework/events.jsonl, pushing each event to connected browsers, so it outlives any single run.Two bits of hardening found while building it:
EventTailerdetects an in-place truncation where a fresh run rewrites the log to the same byte length (size unchanged, mtime advanced) and re-reads from the top.ensureDaemonrefuses to re-exec a test file as the daemon. Undernode --test, argv[1] is the test file, which re-runs the whole suite and calls back in, so each spawn spawned another: a fork bomb. It now throws instead.Tests: 41 pass across the cli + daemon suites, zero leaked processes.