Skip to content

Wave-35 C05: soft HTTP continuous profiling push (L45) - #289

Merged
KooshaPari merged 2 commits into
mainfrom
feat/sl-w35-profile-push
Jul 17, 2026
Merged

Wave-35 C05: soft HTTP continuous profiling push (L45)#289
KooshaPari merged 2 commits into
mainfrom
feat/sl-w35-profile-push

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Summary

  • Add http_soft push_backend with optional SL_PROFILE_PUSH_URL soft HTTP sample POST.
  • Keep hermetic SelfCheck (doc/config anchors only); RunOnce always retains local samples and only attempts soft push when explicitly configured.
  • Document -DryRun / continue-on-error semantics; add focused continuous_profiling SelfCheck test + CHANGELOG Unreleased bullet.

Test plan

  • pwsh ./scripts/continuous-profiling-agent.ps1 -SelfCheck
  • cargo test --test continuous_profiling --locked
  • Soft continuous-profiling-agent job on ops-load.yml (no SL_PROFILE_PUSH_URL required)

Made with Cursor

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>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@KooshaPari, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5c47baf5-2415-4fee-9f3d-168bc241f027

📥 Commits

Reviewing files that changed from the base of the PR and between 9be58d3 and c0db457.

📒 Files selected for processing (8)
  • .env.example
  • .github/workflows/ops-load.yml
  • CHANGELOG.md
  • docs/ops/continuous-profiling.json
  • docs/ops/continuous-profiling.md
  • docs/ops/observability.md
  • scripts/continuous-profiling-agent.ps1
  • tests/continuous_profiling.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sl-w35-profile-push
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/sl-w35-profile-push

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +23 to +31
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}"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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}"),
};

Comment on lines +165 to +167
catch {
Write-Host "warn: soft HTTP profile push failed: $($_.Exception.Message) (continue-on-error; local sample retained)."
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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)."
    }

cursor[bot]
cursor Bot approved these changes Jul 17, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identified 1 net-new security finding after module triage/deduplication.

Open in Web View Automation 

Sent by Cursor Security Agent: Security Reviewer

}

if ($DryRunMode) {
Write-Host "dry-run: would soft-POST $($Bytes.Length) bytes from '$SamplePath' to $Url (no network)."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 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.

Fix in Cursor Fix in Web

Reviewed by Cursor Security Reviewer for commit 3e2002f. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver

@KooshaPari
KooshaPari merged commit f1355a3 into main Jul 17, 2026
56 of 57 checks passed
KooshaPari added a commit that referenced this pull request Jul 17, 2026
Conservative +4 from soft http_soft profile push (C05 L45), MCP host N/A
ADR + SelfCheck (C06 L57). Held soft shuttle, Alertmanager packaging, and
Go OKF adapter stubs at prior pillar scores.

Co-authored-by: Cursor <cursoragent@cursor.com>
KooshaPari added a commit that referenced this pull request Jul 17, 2026
Conservative +4 from soft http_soft profile push (C05 L45), MCP host N/A
ADR + SelfCheck (C06 L57). Held soft shuttle, Alertmanager packaging, and
Go OKF adapter stubs at prior pillar scores.

Co-authored-by: Cursor <cursoragent@cursor.com>
KooshaPari added a commit that referenced this pull request Jul 17, 2026
Conservative +4 from soft http_soft profile push (C05 L45), MCP host N/A
ADR + SelfCheck (C06 L57). Held soft shuttle, Alertmanager packaging, and
Go OKF adapter stubs at prior pillar scores.

Co-authored-by: Cursor <cursoragent@cursor.com>
KooshaPari added a commit that referenced this pull request Jul 17, 2026
Conservative +4 from soft http_soft profile push (C05 L45), MCP host N/A
ADR + SelfCheck (C06 L57). Held soft shuttle, Alertmanager packaging, and
Go OKF adapter stubs at prior pillar scores.

Co-authored-by: Cursor <cursoragent@cursor.com>
@KooshaPari
KooshaPari deleted the feat/sl-w35-profile-push branch August 12, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant