Skip to content

Profile benchmark children under the native BDN parent - #610

Merged
thomhurst merged 1 commit into
mainfrom
issue-537-native-parent-analysis
Nov 13, 2026
Merged

thomhurst merged 1 commit into
mainfrom
issue-537-native-parent-analysis

Conversation

@thomhurst

@thomhurst thomhurst commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

The original concurrent runner can now use its native BenchmarkDotNet parent, but the launcher rejected exact allocation callbacks with that route. Enable child-only profiling with a separate retained CLI wrapper per launch; the managed parent stays unprofiled, preventing shared-report truncation and parent allocation contamination. The exact-adaptive workflow exposes parent=native and exercises it on PRs.

Closes #609

Advances #537; does not close it. Completed uninstrumented native-parent run 43405582202 has valid ABBA GC totals 739.367676 / 741.859863 / 738.631348 / 735.565674 B/message. One candidate exceeds its bracket and one lies within it. Attribution still requires inspecting owner types from a separate instrumented native-parent run. No historical allocation stream, production defect, causal pipe effect, threshold relaxation or accepted trade-off is claimed.

Builds on BenchmarkDotNet 0.15.8 DotNetCliExecutor (checked tagged source), the existing exact ObjectAllocated/MeasureWithGc profiler, existing native receipt/GC parsers and inventoried frozen images. Reuses the established exact-runtime wrapper; no duplicate pipe protocol, engine or profiler. The earlier guard was an unsupported combination, with no design decision forbidding it; this change adds isolated child environment propagation and focused coverage before permitting it.

Validation: 20 focused launcher tests pass, including real shell execution with apostrophes/spaces, exact-runtime and pipe arguments, per-launch report paths, and missing callback report failure while preserving all launches. actionlint and git diff checks pass. Local ARM64 macOS cannot execute the retained Linux x64 image/profiler; the existing unprivileged hosted workflow validates that combination. No production source changed.

After review/merge, run exactly one trusted-main frozen-exact-adaptive-control.yml dispatch with performance_run=43124385683, runtime_version=10.0.15, same_image=comparison, parent=native. Retain/hash every file, verify original inventories, native receipts/denominators and method coverage, inspect every type family and failure, and compare within its own ABBA only. Callback/JIT/locking, adaptive counts, process order and host drift remain limits. Do not subtract independent controls or infer historical ownership from workflow success.

No docs impact: internal investigation tooling only; tool README updated. Production per-message cost unchanged, 0 B added. No benchmark required.

Validation sources and logs independently retained/read-back SHA-256 verified: /Users/tom/git/Relayer-evidence/pr-610/196acd8553565c0d95e82ed3f4cc41ba08b9c57a/inventory.json (13 files). Original run evidence stays under the open parent issue; this PR does not claim historical ownership.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 99469d99-38bc-4435-b46d-512f2e442ab5
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@thomhurst

Copy link
Copy Markdown
Owner Author

@codex review

@github-actions

Copy link
Copy Markdown

Review of #610: no actionable findings.

  • The per-launch wrapper puts the profiler variables on the child only (exec env K=V dotnet ...) and removes them, along with every RELAYER_ALLOCATION_* key, from the parent's environment. That does what the PR says: the parent stays unprofiled, so there is no shared-report truncation. The shell quoting goes through shlex.join.
  • protocol.json is rewritten with the per-launch wrapper path, so the recorded commands match what ran. The added limits sentence states that the managed parent is unprofiled and that this is not an isolated pipe effect or historical attribution.
  • The new test runs the real wrapper under a shell. It uses a path with spaces and apostrophes, checks the child's environment and arguments, and checks that the parent environment carries no profiler keys. It also covers the missing-report case and still runs all four launches. The unsupported-combination test is updated to match.
  • The workflow input defaults to console. The native option runs on pull requests, and the README is updated.
  • This changes tooling only, with no production per-message cost. No benchmark and no site docs are needed, and the PR description says so. It builds on the existing native executor and profiler rather than duplicating them.

One small thing, not blocking: the child wrapper is made by replacing the literal exec dotnet in the base wrapper's text. If the base wrapper's format changes, the replace silently does nothing, and the child would run unprofiled. The test would catch that today. If you want it more robust, build both wrappers from one helper.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T10:12:31.511782Z 196acd8 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 196acd8553

ℹ️ 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".

@thomhurst

Copy link
Copy Markdown
Owner Author

Disposition of Claude review #610 (comment): the shared-wrapper helper suggestion is non-blocking optional refactoring. Keeping this head unchanged because the real-shell test covers wrapper construction and the launcher fails on a missing callback report; no blocking fix requires another push.

Both required reviewers approve head 196acd8. All review surfaces were checked; no threads or outstanding blocking findings. Re-read all 13 retained evidence files and verified their lengths and SHA-256 hashes against inventory.json at the PR-body location; retained source files also match the committed Git blobs. Separate pre-archive copies of the two logs and external client source are no longer present, so no new comparison against those copies is claimed; their retained bytes match the recorded inventory. No tests were rerun for this disposition-only cycle.

@thomhurst
thomhurst marked this pull request as ready for review November 13, 2026 10:11
@thomhurst
thomhurst enabled auto-merge (squash) November 13, 2026 10:11
@thomhurst
thomhurst merged commit 02fe06f into main Nov 13, 2026
24 checks passed
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.

Measure allocation types in native-parent BenchmarkDotNet replays

1 participant