Wave-35 C05: soft HTTP continuous profiling push (L45) - #289
Conversation
Add http_soft push_backend with optional SL_PROFILE_PUSH_URL, hermetic SelfCheck, and DryRun/continue-on-error semantics while retaining local samples by default. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a soft continuous-profiling HTTP push mechanism (push_backend: http_soft and SL_PROFILE_PUSH_URL) to the continuous profiling agent stub, updating the agent script, documentation, and adding a hermetic integration test. Feedback focuses on improving robustness: first, by gracefully skipping the integration test if pwsh is not installed on the host system, and second, by referencing $_ directly in the PowerShell catch block to prevent potential null-reference exceptions when accessing $_.Exception.Message.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| let output = Command::new("pwsh") | ||
| .args([ | ||
| "-NoProfile", | ||
| "-File", | ||
| script.to_str().expect("utf-8 script path"), | ||
| "-SelfCheck", | ||
| ]) | ||
| .output() | ||
| .unwrap_or_else(|error| panic!("failed to spawn pwsh for SelfCheck: {error}")); |
There was a problem hiding this comment.
The test currently spawns pwsh directly and panics if it fails to start. Since PowerShell Core (pwsh) is not guaranteed to be installed on all developer or CI environments running cargo test, this will cause the test suite to fail. It is highly recommended to gracefully handle the case where pwsh is missing by checking for std::io::ErrorKind::NotFound and skipping the test (returning early) instead of panicking.
| let output = Command::new("pwsh") | |
| .args([ | |
| "-NoProfile", | |
| "-File", | |
| script.to_str().expect("utf-8 script path"), | |
| "-SelfCheck", | |
| ]) | |
| .output() | |
| .unwrap_or_else(|error| panic!("failed to spawn pwsh for SelfCheck: {error}")); | |
| let output = match Command::new("pwsh") | |
| .args([ | |
| "-NoProfile", | |
| "-File", | |
| script.to_str().expect("utf-8 script path"), | |
| "-SelfCheck", | |
| ]) | |
| .output() | |
| { | |
| Ok(out) => out, | |
| Err(ref e) if e.kind() == std::io::ErrorKind::NotFound => { | |
| eprintln!("skipping test: 'pwsh' executable not found in PATH"); | |
| return; | |
| } | |
| Err(error) => panic!("failed to spawn pwsh for SelfCheck: {error}"), | |
| }; |
| catch { | ||
| Write-Host "warn: soft HTTP profile push failed: $($_.Exception.Message) (continue-on-error; local sample retained)." | ||
| } |
There was a problem hiding this comment.
Inside the catch block, accessing $_.Exception.Message can throw a null-reference exception if $_.Exception is null. Since $ErrorActionPreference = "Stop" is set, any exception thrown inside this catch block will crash the script, violating the "continue-on-error" design. In PowerShell, the ErrorRecord object ($_) itself stringifies to the error message safely. It is safer and more idiomatic to reference $_ directly.
catch {
Write-Host "warn: soft HTTP profile push failed: $_ (continue-on-error; local sample retained)."
}
| } | ||
|
|
||
| if ($DryRunMode) { | ||
| Write-Host "dry-run: would soft-POST $($Bytes.Length) bytes from '$SamplePath' to $Url (no network)." |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: MEDIUM
The new http_soft flow logs the full destination URL ($Url) in dry-run and live modes, and the catch path may also echo request URI details via exception text. If SL_PROFILE_PUSH_URL contains credentials or signed query tokens, those secrets can leak into CI/operator logs.
Impact: exposed ingest credentials or tokens can be replayed by anyone with log access.
Reviewed by Cursor Security Reviewer for commit 3e2002f. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Risk: medium. Not approving: an unresolved MEDIUM security finding flags potential credential/token leakage when logging SL_PROFILE_PUSH_URL in the http_soft push path. Cursor Bugbot check was not present on this PR; human review is needed and no reviewers were assigned (sole repo collaborator is the PR author).
Sent by Cursor Approval Agent: Pull Request Approver




Summary
http_softpush_backendwith optionalSL_PROFILE_PUSH_URLsoft HTTP sample POST.-DryRun/ continue-on-error semantics; add focusedcontinuous_profilingSelfCheck test + CHANGELOG Unreleased bullet.Test plan
pwsh ./scripts/continuous-profiling-agent.ps1 -SelfCheckcargo test --test continuous_profiling --lockedcontinuous-profiling-agentjob onops-load.yml(noSL_PROFILE_PUSH_URLrequired)Made with Cursor