feat(diagnostics): add bounded runtime capture CLI - #800
Open
beruro wants to merge 2 commits into
Open
Conversation
Pre-commit hook ran. Total eslint: 0, total circular: 0
beruro
marked this pull request as ready for review
August 14, 2026 15:54
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.
Problem
Runtime investigations relied on ad-hoc shell commands and screenshots. There was no repository-owned way to discover the ORGII process tree, record a bounded memory session, attach phase markers, stop safely, or turn samples into reviewable artifacts.
Solution
Add a standalone developer CLI under
tools/orgii-diagnostics:pnpm diag:processdiscovers the ORGII root and related processes without mutating them.pnpm diag:memoryrecords bounded NDJSON samples, supports markers/status/stop/report, and emits JSON, CSV, and Markdown summaries.The recorder has an explicit lifecycle, a single active-session owner, PID-start-token validation, default 15-second sampling, default 720-sample limit, per-sample process caps, three-error termination, and symmetric timer/watcher cleanup. It is inert until explicitly invoked and adds no App import, Tauri command, frontend subscription, background task, or wire change.
Potential risks
Performance guard
Verdict: pass. The tool is opt-in, has one recorder owner, bounded default samples/process details/output, incremental persistence, and symmetric timer/stop-watcher cleanup.
Verification
Validated after merging current
develop(017fb9afa) into head5ee1ad30cwithout conflicts:pnpm diag:test— PASS, 13/13 tests covering parsing, lifecycle/cleanup, process snapshots, redaction, and report generation.pnpm typecheck— PASS.git diff --cached --checkbefore the merge commit — PASS./Applications/ORG2.appprocess discovery — PASS against a live installed app root.sample_limit_reached, complete attribution on every sample, no skipped PID, and JSON/CSV/Markdown artifacts generated.Published GitHub CI on head
5ee1ad30cis fully green: Frontend typecheck/lint/test, Rust clippy, and AI attribution all passed.