Profile short Dart file runs - #4
Conversation
📝 WalkthroughWalkthroughCLI and core profiler accept bare Dart file targets (auto-expanded to Changes
Sequence DiagramsequenceDiagram
participant CLI as CLI User
participant PR as ProfileRunner
participant PL as ProcessLaunch
participant PP as ProfiledProcess
participant VSC as ProfileSessionController
participant VMH as VMServiceHookup
CLI->>PR: run(request with bare.dart)
PR->>PL: normalize command (bare.dart → dart run bare.dart)
PL->>PP: launch normalized command
PR->>VSC: attachToVmService(monitorExitPause=true)
VSC->>VMH: attachToVmService(monitorExitPause=true)
VMH->>VMH: subscribe to debug stream (watch for EventKind.kPauseExit)
par Profiling activity
PP->>VMH: emit pause-exit events
VMH->>VMH: record paused isolates & reconcile with VM
and Waiting for completion
PR->>VSC: await exitPauseSignal or process.exitCode
VSC->>VMH: confirm all app isolates paused
end
VMH-->>VSC: all isolates paused ✓
PR->>VSC: capture final CPU/memory snapshots
PR->>VSC: resumePausedExitIsolates()
VSC->>VMH: resumePausedExitIsolates()
VMH->>PP: resume isolates
PP->>PR: process exits
PR-->>CLI: return profile artifact
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e02b33a36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| final kind = completion.kind; | ||
| if (kind != null) { | ||
| return (kind: kind, exitCode: completion.exitCode); |
There was a problem hiding this comment.
Wait for root isolate exit before ending Dart profile run
With --pause-isolates-on-exit enabled, a pause-at-exit can happen when any non-system isolate finishes, not just when the whole process is done. This branch returns as soon as the first pause is observed, so runs that spawn short-lived worker isolates can be finalized early (handleProcessExit runs while the app is still active) and then force-killed about 10 seconds later in _resumeExitPausedProcess if the main isolate is still running. That can corrupt whole-session results and terminate valid long-running workloads that use background isolates.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/devtools_profiler_core/lib/src/capture/profile_runner.dart`:
- Around line 346-351: The fallback path in run() currently calls process.kill()
and returns the raw exitCodeFuture which can hang if the kill fails; modify the
recovery to attempt killing the process then await the process exit with a
bounded timeout (e.g., await the exitCodeFuture with Future.timeout), and if the
timeout elapses log a clear warning via sessionController.addWarning and return
a forced non-zero exit (or throw) instead of the unbounded exitCodeFuture.
Target the block that calls sessionController.addWarning(...), process.kill(),
and returns exitCodeFuture so you add the timed wait and fallback return there.
- Around line 290-352: Add concise doc comments for the new exit-pause helpers
to document the shutdown contract, retry semantics, and VM-service/protocol
assumptions encoded by the code. Specifically, add /// comments above
_waitForDartProcessCompletion describing that it waits for either process exit
or all app isolates reaching an exit pause, explains the polling loop with
Future.any and why recordCurrentlyPausedExitIsolates and
haveAllAppIsolatesPausedAtExit are used, and notes the semantic meaning of the
returned _ProfiledProcessCompletionKind. Also add /// comments above
_resumeExitPausedProcess describing the retry loop (up to 5 attempts), the 2s
timeout on exitCodeFuture, the reason for repeated resume calls via
sessionController.resumePausedExitIsolates, and the final fallback behavior
(warning, kill, and returning exitCodeFuture). Reference the sessionController
methods (allAppIsolatesPausedAtExit, recordCurrentlyPausedExitIsolates,
haveAllAppIsolatesPausedAtExit, resumePausedExitIsolates, addWarning) in the
comments so future maintainers understand the contract.
In
`@packages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dart`:
- Around line 67-73: The catch blocks that cancel the debug stream
(_debugSubscription) currently only log a warning via context.warnings and can
leave callers of allAppIsolatesPausedAtExit blocked; update those catch handlers
to also resolve/terminate the exit-pause coordination so waiters are not left
hanging (e.g., complete the completer or emit a terminal event used by
allAppIsolatesPausedAtExit), and likewise update the reconciliation path around
the code that expects at least one live app isolate (the reconciliation logic
that checks for live app isolates) to treat an empty/no-visible-isolates case as
a finished/no-op so it doesn't wait indefinitely. Apply the same change to the
other similar catch sites (the ones around lines 76-78 and the reconciliation at
127-130) so every monitor startup failure both logs the error and explicitly
completes/fails the coordination primitive used by allAppIsolatesPausedAtExit.
In
`@packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dart`:
- Around line 5-6: Replace the large numeric literals in the hot loop that
updates `state` with digit-separated forms to improve readability: change the
loop limit `10000` to `10_000`, the multiplier `1664525` to `1_664_525`, and the
mask `0x7fffffff` to `0x7fff_ffff` in the assignment expression inside the for
loop that uses `i` and `state`.
In
`@packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dart`:
- Around line 13-14: The numeric literals in the PRNG loop (the for-loop using
variable i and the state update in quick_worker_isolate.dart) are hard to read;
replace 10000 with 10_000, 1664525 with 1_664_525, and format the hex mask
0x7fffffff as 0x7fff_ffff to use digit separators and improve readability in the
expression "state = ((state * 1664525) + i) & 0x7fffffff;" inside that loop.
In `@packages/devtools_profiler_core/test/profile_runner_test.dart`:
- Line 234: Replace the numeric literal used as the threshold in the assertion
so it's easier to read: update the call to greaterThan(...) that checks
result.overallProfile!.durationMicros to use a digit-separated literal (300_000)
instead of 300000 so the test reads and follows the project's numeric formatting
guidelines.
In `@README.md`:
- Around line 66-70: The README currently says bare .dart files are supported
earlier but the "Current Limits" section still requires launched commands to
start with `dart` or `flutter`; update the "Current Limits" section text to
reflect that bare `.dart` files are allowed (i.e., launched commands may be
either `dart <file>`, `flutter <command>`, or simply `<file>.dart`), removing or
rewording the line that enforces commands must start with `dart` or `flutter` so
the two sections are consistent. Make sure any examples or bullet points in the
"Current Limits" block mention using profiler options before the target command
and using `--` when the target has its own options, matching the earlier
paragraph.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 90b17dbc-1e68-4348-8577-5f6989f0575a
📒 Files selected for processing (17)
README.mdpackages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dart
📜 Review details
🧰 Additional context used
📓 Path-based instructions (7)
packages/devtools_profiler_**/pubspec.yaml
📄 CodeRabbit inference engine (AGENTS.md)
packages/devtools_profiler_**/pubspec.yaml: Do not add Flutter UI, web UI, or browser-only runtime dependencies to the profiler packages
Use hosteddevtools_sharedfor shared VM and memory models; do not vendor package trees into this workspace
Files:
packages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_cli/pubspec.yaml
packages/devtools_profiler_core/pubspec.yaml
📄 CodeRabbit inference engine (AGENTS.md)
devtools_profiler_coremay depend onvm_service,dtd, anddevtools_shared
Files:
packages/devtools_profiler_core/pubspec.yaml
**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
**/*.dart: Follow idiomatic Dart and keep code easy to scan in split-screen views
Prefer multi-line strings over string concatenation for large text blocks, command output fixtures, JSON examples, and terminal snapshots
Keep lines near 80 characters where practical. Long identifiers and URLs may exceed that when wrapping would make the code harder to read
Use records for short-lived grouped return values instead of introducing one-off classes
Use patterns,if-case, and switch expressions when they make parsing or dispatch logic clearer
Use class modifiers such assealed,final,base, andinterfacewhen they describe the intended inheritance boundary
Use digit separators for large numeric literals, for example timeouts, sample counts, and byte sizes
Use wildcard variables for intentionally unused callback parameters
Use null-aware collection elements when conditionally including nullable values in list or map literals
Use dot shorthands only when the inferred type is obvious from context
Use///documentation comments for public APIs
Start doc comments with a short, single-sentence summary
Put a blank line after the first sentence when adding more detail in doc comments
Avoid repeating information that is already obvious from the declaration in documentation comments
Start method comments with third-person verbs, such as 'Returns', 'Starts', or 'Captures'
Start non-boolean property comments with a noun phrase
Start boolean property comments with 'Whether'
Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Prefer fenced Markdown code blocks for examples in documentation comments
Keep Markdown simple; avoid HTML in documentation comments
Files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
packages/devtools_profiler_*/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
packages/devtools_profiler_cli/pubspec.yaml
📄 CodeRabbit inference engine (AGENTS.md)
packages/devtools_profiler_cli/pubspec.yaml: Keepdart_mcpon the supported^0.5.0line unless the user asks for an upgrade
devtools_profiler_climay depend on terminal/MCP/presentation packages such asartisanalanddart_mcp
Files:
packages/devtools_profiler_cli/pubspec.yaml
packages/*/README.md
📄 CodeRabbit inference engine (AGENTS.md)
Package READMEs should explain how that package is used and how it fits into the profiler system. Prefer examples that agents can execute directly from the CLI
Files:
packages/devtools_profiler_core/README.mdpackages/devtools_profiler_cli/README.md
README.md
📄 CodeRabbit inference engine (AGENTS.md)
Keep the root
README.mdend-user focused
Files:
README.md
🧠 Learnings (19)
📓 Common learnings
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: `devtools_region_profiler` should stay small and safe to add to Dart or Flutter applications being profiled
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: For Flutter targets, remember that release mode, AOT builds, and browser/web targets do not expose the Dart VM service needed by this profiler
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : `devtools_profiler_cli` may depend on terminal/MCP/presentation packages such as `artisanal` and `dart_mcp`
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : Keep `dart_mcp` on the supported `^0.5.0` line unless the user asks for an upgrade
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Do not add Flutter UI, web UI, or browser-only runtime dependencies to the profiler packages
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_core/pubspec.yaml : `devtools_profiler_core` may depend on `vm_service`, `dtd`, and `devtools_shared`
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Use hosted `devtools_shared` for shared VM and memory models; do not vendor package trees into this workspace
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : `devtools_profiler_cli` may depend on terminal/MCP/presentation packages such as `artisanal` and `dart_mcp`
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : Keep `dart_mcp` on the supported `^0.5.0` line unless the user asks for an upgrade
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: `devtools_region_profiler` should stay small and safe to add to Dart or Flutter applications being profiled
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Do not add Flutter UI, web UI, or browser-only runtime dependencies to the profiler packages
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_core/pubspec.yaml : `devtools_profiler_core` may depend on `vm_service`, `dtd`, and `devtools_shared`
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Use hosted `devtools_shared` for shared VM and memory models; do not vendor package trees into this workspace
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/CHANGELOG.mdpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: For Flutter targets, remember that release mode, AOT builds, and browser/web targets do not expose the Dart VM service needed by this profiler
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Applied to files:
packages/devtools_profiler_cli/CHANGELOG.mdpackages/devtools_profiler_core/pubspec.yamlpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_cli/pubspec.yamlpackages/devtools_profiler_core/README.mdpackages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/README.mdpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Start doc comments with a short, single-sentence summary
Applied to files:
packages/devtools_profiler_core/README.mdpackages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/README.mdREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_core/lib/src/capture/runner/process_launch.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_run_request.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/README.mdREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Avoid repeating information that is already obvious from the declaration in documentation comments
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_run_request.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use `///` documentation comments for public APIs
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_run_request.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Prefer multi-line strings over string concatenation for large text blocks, command output fixtures, JSON examples, and terminal snapshots
Applied to files:
packages/devtools_profiler_cli/test/cli_test.dartpackages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dartpackages/devtools_profiler_cli/README.mdREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Start method comments with third-person verbs, such as 'Returns', 'Starts', or 'Captures'
Applied to files:
packages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/*/README.md : Package READMEs should explain how that package is used and how it fits into the profiler system. Prefer examples that agents can execute directly from the CLI
Applied to files:
packages/devtools_profiler_cli/README.mdREADME.md
🔇 Additional comments (12)
packages/devtools_profiler_core/pubspec.yaml (1)
5-5: Version bump looks consistent.
0.2.1-wipaligns with the rest of this PR’s unreleased package updates.packages/devtools_profiler_cli/CHANGELOG.md (1)
3-9: Changelog entry is clear and aligned with behavior changes.The new
0.2.1-wipbullets accurately describe both the Dart file shorthand and exit-pause capture improvement.packages/devtools_profiler_core/CHANGELOG.md (1)
3-9: Core changelog update looks good.The release note succinctly captures both command normalization and short-lived isolate finalization behavior.
packages/devtools_profiler_cli/test/cli_test.dart (1)
31-33: Help-output expectations were updated correctly.These assertions now validate both the
[--]separator form and the newrun <file>.dartshorthand example.Also applies to: 36-36
packages/devtools_profiler_cli/pubspec.yaml (1)
5-5: Package version and core dependency bump are consistent.This keeps CLI and core on the same
0.2.1-wiptrack without violating the supported dependency constraints.Also applies to: 20-20
packages/devtools_profiler_core/lib/src/capture/profile_run_request.dart (1)
4-5: Documentation update is accurate and helpful.The new wording for
commandnow reflects the supported bare Dart file input and its expansion behavior.Also applies to: 23-23
packages/devtools_profiler_core/test/profile_runner_test.dart (1)
187-214: Strong regression coverage for quick-exit bare Dart runs.This test validates both command normalization and the absence of the previous disposed-service warning path.
packages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dart (1)
53-75: Help text now matches the new shorthand cleanly.The updated invocation, examples, and missing-target error all line up with bare-file expansion and the
--disambiguation rules.packages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dart (1)
86-102: Nice controller-level façade for exit-pause handling.Keeping
ProfileRunneron controller APIs instead of reaching intoProfileSessionVmHookupdirectly preserves the session boundary and makes the shutdown flow easier to test.packages/devtools_profiler_core/lib/src/capture/runner/process_launch.dart (1)
107-128: Centralizing bare-file normalization here is a good move.Rewriting the shorthand once and then reusing the normalized command for validation and launch keeps the CLI and core behavior aligned.
packages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dart (2)
145-158: Resuming paused isolates is fault-tolerantSnapshotting IDs before iteration and handling per-isolate resume failures avoids partial-progress loss when isolates disappear during shutdown.
186-186: Good lifecycle cleanup for debug monitoringCanceling
_debugSubscriptionindispose()prevents dangling debug-stream listeners.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/devtools_profiler_core/lib/src/capture/profile_runner.dart`:
- Around line 129-142: The code incorrectly sets processExited = true even when
_resumeExitPausedProcess() may return a synthetic exit (e.g., timeout fallback),
which prevents cleanup; update _resumeExitPausedProcess (or its call contract)
to return a sentinel or boolean indicating whether the real process exit was
observed (for example return null or a tuple/flag when fallback used), then in
the paused-at-exit branch use that returned signal to set processExited only
when the real exit was observed; keep processExited false when the fallback path
produced the synthetic exitCode so the finally block will perform cleanup and
not leave the child running; ensure callers still capture exitCode via
exitCodeFuture and that sessionController.handleProcessExit() is still awaited
as before.
In
`@packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dart`:
- Around line 5-8: The worker isolate currently sends one message and exits
immediately (ReceivePort workerDone / Isolate.spawn(_worker,
workerDone.sendPort)), so the test doesn't exercise the "wait for all isolates
paused at exit" path; modify the worker/_worker logic to hold the spawned
isolate open by keeping a dedicated control ReceivePort/SendPort (e.g.,
workerControlPort) that the main isolate closes/signals only when main is
finishing, and change the main test to spawn the isolate, wait for the initial
ready message as now, but do not close workerControlPort or send the shutdown
signal until after main signals completion (apply the same change to the other
occurrence on lines 23-24) so the worker stays alive until process shutdown.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ef917738-17d5-4b76-b84f-96c5ca26b505
📒 Files selected for processing (7)
README.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dart
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
**/*.dart: Follow idiomatic Dart and keep code easy to scan in split-screen views
Prefer multi-line strings over string concatenation for large text blocks, command output fixtures, JSON examples, and terminal snapshots
Keep lines near 80 characters where practical. Long identifiers and URLs may exceed that when wrapping would make the code harder to read
Use records for short-lived grouped return values instead of introducing one-off classes
Use patterns,if-case, and switch expressions when they make parsing or dispatch logic clearer
Use class modifiers such assealed,final,base, andinterfacewhen they describe the intended inheritance boundary
Use digit separators for large numeric literals, for example timeouts, sample counts, and byte sizes
Use wildcard variables for intentionally unused callback parameters
Use null-aware collection elements when conditionally including nullable values in list or map literals
Use dot shorthands only when the inferred type is obvious from context
Use///documentation comments for public APIs
Start doc comments with a short, single-sentence summary
Put a blank line after the first sentence when adding more detail in doc comments
Avoid repeating information that is already obvious from the declaration in documentation comments
Start method comments with third-person verbs, such as 'Returns', 'Starts', or 'Captures'
Start non-boolean property comments with a noun phrase
Start boolean property comments with 'Whether'
Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Prefer fenced Markdown code blocks for examples in documentation comments
Keep Markdown simple; avoid HTML in documentation comments
Files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dart
packages/devtools_profiler_*/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dart
README.md
📄 CodeRabbit inference engine (AGENTS.md)
Keep the root
README.mdend-user focused
Files:
README.md
🧠 Learnings (22)
📓 Common learnings
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: `devtools_region_profiler` should stay small and safe to add to Dart or Flutter applications being profiled
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: For Flutter targets, remember that release mode, AOT builds, and browser/web targets do not expose the Dart VM service needed by this profiler
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : `devtools_profiler_cli` may depend on terminal/MCP/presentation packages such as `artisanal` and `dart_mcp`
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Do not add Flutter UI, web UI, or browser-only runtime dependencies to the profiler packages
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_core/pubspec.yaml : `devtools_profiler_core` may depend on `vm_service`, `dtd`, and `devtools_shared`
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : Keep `dart_mcp` on the supported `^0.5.0` line unless the user asks for an upgrade
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Use hosted `devtools_shared` for shared VM and memory models; do not vendor package trees into this workspace
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: `devtools_region_profiler` should stay small and safe to add to Dart or Flutter applications being profiled
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/profile_runner_test.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use digit separators for large numeric literals, for example timeouts, sample counts, and byte sizes
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Prefer multi-line strings over string concatenation for large text blocks, command output fixtures, JSON examples, and terminal snapshots
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_exit.dartpackages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/test/profile_runner_test.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Do not add Flutter UI, web UI, or browser-only runtime dependencies to the profiler packages
Applied to files:
packages/devtools_profiler_core/test/profile_runner_test.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Applied to files:
packages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Keep lines near 80 characters where practical. Long identifiers and URLs may exceed that when wrapping would make the code harder to read
Applied to files:
packages/devtools_profiler_core/test/profile_runner_test.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: For Flutter targets, remember that release mode, AOT builds, and browser/web targets do not expose the Dart VM service needed by this profiler
Applied to files:
packages/devtools_profiler_core/test/profile_runner_test.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_core/pubspec.yaml : `devtools_profiler_core` may depend on `vm_service`, `dtd`, and `devtools_shared`
Applied to files:
packages/devtools_profiler_core/lib/src/capture/runner/profile_session_controller.dartpackages/devtools_profiler_core/lib/src/capture/runner/profile_session_vm_hookup.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use `///` documentation comments for public APIs
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Start doc comments with a short, single-sentence summary
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Put a blank line after the first sentence when adding more detail in doc comments
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Avoid repeating information that is already obvious from the declaration in documentation comments
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Start method comments with third-person verbs, such as 'Returns', 'Starts', or 'Captures'
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dartREADME.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : Keep `dart_mcp` on the supported `^0.5.0` line unless the user asks for an upgrade
Applied to files:
README.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Follow idiomatic Dart and keep code easy to scan in split-screen views
Applied to files:
README.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Keep Markdown simple; avoid HTML in documentation comments
Applied to files:
README.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : `devtools_profiler_cli` may depend on terminal/MCP/presentation packages such as `artisanal` and `dart_mcp`
Applied to files:
README.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/devtools_profiler_core/lib/src/capture/profile_runner.dart`:
- Around line 331-359: The loop currently polls every 50ms and calls
sessionController.recordCurrentlyPausedExitIsolates() on every tick, causing
profiler-side work for the entire run; change the loop so the tight 50ms poll is
not always active: only enable frequent polling when listenForExitPauseSignal is
true or when the runner is in the shutdown path (e.g., after exitCompletion
completes), otherwise either remove the small fixed delay from the Future.any
set or replace it with an exponential/backoff timer (starting at 50ms and
growing to a few seconds) before calling
sessionController.recordCurrentlyPausedExitIsolates(); adjust the logic around
exitPause, exitCompletion and _ProfiledProcessCompletionKind so that
pausedAtExit is still detected but the frequent
sessionController.recordCurrentlyPausedExitIsolates() calls are gated/backed
off.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 01861799-091c-41e2-811a-382c8f206995
📒 Files selected for processing (3)
packages/devtools_profiler_core/lib/src/capture/profile_runner.dartpackages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartskills/devtools-profiler-local/SKILL.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test packages/devtools_profiler_core
🧰 Additional context used
📓 Path-based instructions (2)
**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
**/*.dart: Follow idiomatic Dart and keep code easy to scan in split-screen views
Prefer multi-line strings over string concatenation for large text blocks, command output fixtures, JSON examples, and terminal snapshots
Keep lines near 80 characters where practical. Long identifiers and URLs may exceed that when wrapping would make the code harder to read
Use records for short-lived grouped return values instead of introducing one-off classes
Use patterns,if-case, and switch expressions when they make parsing or dispatch logic clearer
Use class modifiers such assealed,final,base, andinterfacewhen they describe the intended inheritance boundary
Use digit separators for large numeric literals, for example timeouts, sample counts, and byte sizes
Use wildcard variables for intentionally unused callback parameters
Use null-aware collection elements when conditionally including nullable values in list or map literals
Use dot shorthands only when the inferred type is obvious from context
Use///documentation comments for public APIs
Start doc comments with a short, single-sentence summary
Put a blank line after the first sentence when adding more detail in doc comments
Avoid repeating information that is already obvious from the declaration in documentation comments
Start method comments with third-person verbs, such as 'Returns', 'Starts', or 'Captures'
Start non-boolean property comments with a noun phrase
Start boolean property comments with 'Whether'
Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Prefer fenced Markdown code blocks for examples in documentation comments
Keep Markdown simple; avoid HTML in documentation comments
Files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
packages/devtools_profiler_*/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
🧠 Learnings (21)
📓 Common learnings
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: `devtools_region_profiler` should stay small and safe to add to Dart or Flutter applications being profiled
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: For Flutter targets, remember that release mode, AOT builds, and browser/web targets do not expose the Dart VM service needed by this profiler
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_core/pubspec.yaml : `devtools_profiler_core` may depend on `vm_service`, `dtd`, and `devtools_shared`
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartskills/devtools-profiler-local/SKILL.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dartskills/devtools-profiler-local/SKILL.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use digit separators for large numeric literals, for example timeouts, sample counts, and byte sizes
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Prefer multi-line strings over string concatenation for large text blocks, command output fixtures, JSON examples, and terminal snapshots
Applied to files:
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Applied to files:
skills/devtools-profiler-local/SKILL.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Start doc comments with a short, single-sentence summary
Applied to files:
skills/devtools-profiler-local/SKILL.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Applied to files:
skills/devtools-profiler-local/SKILL.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Do not add Flutter UI, web UI, or browser-only runtime dependencies to the profiler packages
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: `devtools_region_profiler` should stay small and safe to add to Dart or Flutter applications being profiled
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Applied to files:
skills/devtools-profiler-local/SKILL.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Avoid repeating information that is already obvious from the declaration in documentation comments
Applied to files:
skills/devtools-profiler-local/SKILL.mdpackages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: For Flutter targets, remember that release mode, AOT builds, and browser/web targets do not expose the Dart VM service needed by this profiler
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Start method comments with third-person verbs, such as 'Returns', 'Starts', or 'Captures'
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Follow idiomatic Dart and keep code easy to scan in split-screen views
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Use hosted `devtools_shared` for shared VM and memory models; do not vendor package trees into this workspace
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : `devtools_profiler_cli` may depend on terminal/MCP/presentation packages such as `artisanal` and `dart_mcp`
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use dot shorthands only when the inferred type is obvious from context
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/pubspec.yaml : Keep `dart_mcp` on the supported `^0.5.0` line unless the user asks for an upgrade
Applied to files:
skills/devtools-profiler-local/SKILL.md
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use `///` documentation comments for public APIs
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Put a blank line after the first sentence when adding more detail in doc comments
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
🔇 Additional comments (2)
packages/devtools_profiler_core/test/fixtures/profiled_app/bin/quick_worker_isolate.dart (1)
4-44: This fixture now exercises the multi-isolate exit path.The control-port handshake keeps the worker alive until
main()is ready to stop it, so this regression meaningfully covers the "all isolates paused at exit" flow.skills/devtools-profiler-local/SKILL.md (1)
59-93: Nice clarification of bare-file vs explicitdart runusage.This matches the CLI contract in
packages/devtools_profiler_cli/lib/src/cli/commands/capture_commands.dart:52-76and should make--usage much easier for users to get right.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart (1)
160-166:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftDon't let the final cleanup timeout degrade to a warning.
If the target ignores
process.kill()or exits after the 2-second wait, this branch still disposes the session and returns control while the child may keep running. That can leave an orphaned profiled process behind.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6aa52065-15b0-442e-bb8a-76c7f6cfd9ac
📒 Files selected for processing (1)
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
**/*.dart: Follow idiomatic Dart and keep code easy to scan in split-screen views
Prefer multi-line strings over string concatenation for large text blocks, command output fixtures, JSON examples, and terminal snapshots
Keep lines near 80 characters where practical. Long identifiers and URLs may exceed that when wrapping would make the code harder to read
Use records for short-lived grouped return values instead of introducing one-off classes
Use patterns,if-case, and switch expressions when they make parsing or dispatch logic clearer
Use class modifiers such assealed,final,base, andinterfacewhen they describe the intended inheritance boundary
Use digit separators for large numeric literals, for example timeouts, sample counts, and byte sizes
Use wildcard variables for intentionally unused callback parameters
Use null-aware collection elements when conditionally including nullable values in list or map literals
Use dot shorthands only when the inferred type is obvious from context
Use///documentation comments for public APIs
Start doc comments with a short, single-sentence summary
Put a blank line after the first sentence when adding more detail in doc comments
Avoid repeating information that is already obvious from the declaration in documentation comments
Start method comments with third-person verbs, such as 'Returns', 'Starts', or 'Captures'
Start non-boolean property comments with a noun phrase
Start boolean property comments with 'Whether'
Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Prefer fenced Markdown code blocks for examples in documentation comments
Keep Markdown simple; avoid HTML in documentation comments
Files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
packages/devtools_profiler_*/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: `devtools_region_profiler` should stay small and safe to add to Dart or Flutter applications being profiled
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: For Flutter targets, remember that release mode, AOT builds, and browser/web targets do not expose the Dart VM service needed by this profiler
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_**/pubspec.yaml : Do not add Flutter UI, web UI, or browser-only runtime dependencies to the profiler packages
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_cli/lib/**/command*.dart : Split large CLI commands into focused files instead of growing a monolithic command file
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to packages/devtools_profiler_*/**/*.dart : Consider documenting private helpers when they encode profiler behavior, artifact contracts, protocol semantics, or VM-service assumptions
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use square brackets for in-scope identifiers, such as [ProfileRunRequest], [Duration], and [StateError]
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Run formatting, analysis, and tests before handing work back using: dart format ., dart analyze ., and dart test on all profiler packages
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Use `///` documentation comments for public APIs
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Start doc comments with a short, single-sentence summary
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Explain parameters, return values, and exceptions in prose rather than using tag-style documentation
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Put a blank line after the first sentence when adding more detail in doc comments
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
📚 Learning: 2026-04-26T17:03:32.425Z
Learnt from: CR
Repo: kingwill101/devtools-profiler PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-26T17:03:32.425Z
Learning: Applies to **/*.dart : Avoid repeating information that is already obvious from the declaration in documentation comments
Applied to files:
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart
🔇 Additional comments (4)
packages/devtools_profiler_core/lib/src/capture/profile_runner.dart (4)
36-42: Normalization is wired through the launch path correctly.Expanding bare Dart files before validation and threading the normalized [command] into launch + VM-service setup keeps the new
dart run <file>behavior consistent end-to-end.Also applies to: 74-101
304-364: The exit-pause poller is much more bounded now.Using
recordCurrentlyPausedExitIsolates()on the timer tick and backing off to 3 seconds afterexitPauseUnavailableavoids the previous hot loop while still detecting late-pausing isolates.
373-418: The resume fallback is now well-bounded.Five resume attempts, a 2-second wait per attempt, and a synthetic non-zero exit after termination keep the shutdown path from hanging forever.
130-142: No action needed. The original concern is unfounded.handleProcessExit()only finalizes active profiling regions and does not dispose the VM service connection. The connection remains available for_resumeExitPausedProcess()to callresumePausedExitIsolates(), and is only disposed in the finally block after resume completes.> Likely an incorrect or invalid review comment.
Summary
devtools-profiler run <file>.dartby expanding bare Dart files todart run <file>.0.2.1-wipafter the0.2.0publish.Validation
dart pub getdart analyze .dart test packages/devtools_profiler_protocoldart test packages/devtools_region_profilerdart test packages/devtools_profiler_coredart test packages/devtools_profiler_clidart run devtools_profiler_cli:devtools_profiler run --hide-sdk --hide-runtime-helpers --method-table t.dartgit diff --staged --checkSummary by CodeRabbit
New Features
devtools-profiler run <file.dart>) for profiling.Improvements
Documentation
--is only needed when the target has its own args; updated examples and help text.Tests / Changelog