Repository navigation
Conversation
…169-plugin-log # Conflicts: # packages/cli/README.md # packages/server/src/plugins/loading.rs
JustKira
marked this pull request as draft
November 20, 2026 14:08
JustKira
changed the base branch from
feat/tkm-167-cli
to
feat/tkm-168-plugin-reload
November 20, 2026 15:10
Contributor
Author
|
Closing without merging. The plugin shape, the server engine and sign-in are being decided again (Linear TKM-194 and TKM-195), and this work sits on top of them. Nothing is lost: the head commit is 94fa0f7, and |
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.
Stacked on #255.
Summary
Linear: TKM-169
A broken log sink leaves invocations and workers running and emits one bounded diagnostic per failed writer. A 10 MiB cap or a backed-up queue produces one drop marker. A successful reload publishes the new revision's log, including initializer output; a failed reload leaves the previous log in place. The CLI streams records, counts malformed lines, and recognizes existing logs while the server is offline. Shared CLI changes add a streaming command result with stdout/stderr handling and reuse the plugin index reader; the command registry is unchanged by the review fixes.
Each JSON Lines entry contains
time(Unix epoch milliseconds),source,level,kind, andtext. Function entries distinguish exceptions, validation failures and cancellations; reload cancellations are informational. Worker errors include bounded, mapped stacks. The stopped screen shows the command and a copy button.The host supplies the view owner and revision for render failures and callbacks it invokes (currently shortcuts). Unhandled browser errors and rejections outside those callbacks fall back to known module stack frames or the event filename. Without either, or when only a retired module URL is available, the host cannot attribute the error. The server rejects stale revisions and marks dropped window reports once per rate window (eight reports per plugin per ten seconds; up to 8,192 UTF-8 bytes per report).
Evidence
/usr/bin/time -l proto run bun -- packages/cli/src/main.ts plugin logs memory-fixture --json).proto run bun -- test packages/cli/testscargo test -p server --no-fail-fast -- --test-threads=2cd app && proto run bun -- run test tests/plugins.test.tsxproto run bun -- run e2e:browserproto run bun -- e2e/run.tsbash .ci/check.sh lintbash .ci/check.sh tsbash .ci/check.sh rustMerge Danger
Door: Two-way. Logs are temporary. This changes the default log path, so logs written by a previous build at the old path are not found automatically.
Blast Radius: Plugins.
Any code running in the window can write an entry to any loaded plugin's log. This is accepted until plugin isolation exists.