Skip to content

Preserve original BDN wait boundary in frozen allocation control - #416

Merged
thomhurst merged 1 commit into
mainfrom
issue-349-bdn-await
Nov 10, 2026
Merged

thomhurst merged 1 commit into
mainfrom
issue-349-bdn-await

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

The existing fixed-count full-delivery probe awaits ConcurrentRoundTrip, whereas the retained generated BenchmarkDotNet driver synchronously calls AwaitHelper.GetResult. This difference changes the completion boundary and can change continuation scheduling. Add a separate --bdn-await ABBA that binds the original retained BDN helper once, without rebuilding or changing historical workload images. Native Ubuntu runs retain separate untraced outcomes and measured-region profiles for all three historical input sets.

Refs #349

This narrows a concrete measurement mismatch; it does not attribute the historical excess or close the investigation. Fixed counts still differ from the original adaptive BDN driver. No threshold, input classification or production behavior changes.

Native/existing reuse: inspected BenchmarkDotNet v0.15.8 Helpers/AwaitHelper.cs and each original generated driver. Reuses its cached thread-local waiter and callback rather than implementing synchronous ValueTask waiting. Reuses existing image inventory verification, measured-region reader and ABBA orchestration. Reflection occurs once in this diagnostic tool, outside measurements; no broker capability is duplicated. Reviewed full diff for reuse, measurement boundaries, original binary preservation and separate protocols.

Validation: zero-warning Release probe build, Python 12/12, actionlint, npm ci, docs production build and diff check pass. Real retained-image ARM64/.NET 10.0.14 ABBAs, 4096 warmup and 32768 measured eight-message batches per launch, all verified sums:

Inputs A1 B1 B2 A2
42306276036 690.815491 692.283020 691.458435 691.113098
42312305889 716.557434 713.905457 716.493774 715.326996

Inclusive B/message. Both original-input candidates exceed the baseline bracket, but only B1 exceeds the upper baseline by more than 0.5 B/message. Newer B1 is below its bracket and B2 inside it. These unfavorable outcomes are retained; local ARM64 results do not attribute the historical x64 signal. Full broker/library suites were not run for diagnostic-only tool changes. Native measurements and reviews are asynchronous.

Sources, loaded probe binaries, protocols, all eight outcomes and validation logs retained independently at /Users/tom/git/Relayer-evidence/issue-349/bdn-wait-control/32b8b93f71fa9f19a0cb099af4441c2489fda4d6/: 48 payloads copied and SHA-256 verified against originals; inventory SHA-256 ac638ded4edbad3be674c441c3cac5b2ccecb4829ae496e836edb878521f6a1c. Original image/dependency archives remain independently retained under issue-349 and verified before launches. Local evidence follows open-issue retention; hosted results retain 90 days.

Production per-message cost: unchanged, zero added work and 0 B. Performance documentation describes the completion boundary and accounting limits.

@coderabbitai

coderabbitai Bot commented Nov 10, 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: f72d005a-0a99-4a9d-a654-fc66cbb883bc
  • 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 #416: no actionable findings.

  • Scope: diagnostic-only tooling (probe, orchestration script, workflow, docs). Production per-message cost is unchanged.
  • Native reuse: it binds BenchmarkDotNet's own AwaitHelper.GetResult<int>(ValueTask<int>) once, by reflection and outside the measured region. It does not reimplement synchronous ValueTask waiting, so this follows the reuse rule. The per-iteration call goes through a cached Func delegate, which should add no allocations.
  • Correctness: the single-argument check is replaced by --bdn-await parsing. bdnAwait selects the same warmup and measured loops with the same sum validation. The Single(...) selector on the GetResult overload fails loudly if BenchmarkDotNet's shape changes. The script rejects combining --bdn-await with the exact-counter flags, and the tests cover both that rejection and that no collect is passed in the non-profiled mode. The protocol and launch output record the completion boundary, so the two modes cannot be confused.
  • Workflow and docs: the separate ABBA and profiled steps use distinct output directories. The performance page states that the results are separate experiments and must not be subtracted from each other.
  • Not checked: I did not run the build, the tests or the workflow.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 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-10T04:58:43.362714Z 9477e72 Manual request
ℹ️ 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. Hooray!

Reviewed commit: 32b8b93f71

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

Rechecked the assigned #349 follow-up under pr-416 after releasing issue-349. The earlier #409 lock is no longer a blocker: #409 merged as f498a71 and run 42751735792 succeeded. Current published work is this PR, not a stranded local implementation.

All paginated REST reviews, inline comments, conversation comments and GraphQL review threads checked: Claude CLEAR and Codex completed with no findings both name current head 32b8b93. No outstanding findings or threads, conflict, superseding PR, missing review or failed check needs a fix or recovery. Independently verified all 48 retained payloads and inventory hash ac638ded4edbad3be674c441c3cac5b2ccecb4829ae496e836edb878521f6a1c at the issue-349 evidence location in the PR body. The original removable worktree is absent: this checks retained copies against their recorded inventory rather than re-comparing removed originals.

Native concurrent allocation investigation run 42754366882 is still running. It is a non-CI check, so promotion/arming must wait for its outcome; no competing launch or rerun is appropriate. Native fixture control passed. This unit leaves the reviewed draft unchanged and releases every lock without waiting. Historical attribution remains open; no production fix or threshold change is justified by pending evidence.

@thomhurst
thomhurst marked this pull request as ready for review November 10, 2026 04:19
@thomhurst
thomhurst enabled auto-merge (squash) November 10, 2026 04:19
@thomhurst

Copy link
Copy Markdown
Owner Author

The previous native investigation wait is complete: run 42754366882 passed, and the native fixture control also passed. Rechecked all paginated review and conversation surfaces plus GraphQL threads: Claude CLEAR and Codex completed with no findings both cover unchanged head 32b8b93; no review threads or outstanding findings exist.

Reverified all 48 retained payload lengths and SHA-256 hashes at the independent issue-349 evidence location already listed in this PR body; inventory hash remains ac638ded4edbad3be674c441c3cac5b2ccecb4829ae496e836edb878521f6a1c. As previously documented, original removable checkout is absent; this verifies retained copies against the inventory, not against deleted originals.

Ran scripts/Enable-AutoMerge.ps1 -Pr 416 -MarkReady from the shared checkout; it selected current origin/main gate scripts, verified protection, promoted the reviewed head and successfully armed squash auto-merge pinned to that head. Ready CI run 42755111100 is now in progress. No new code or competing workflow launch was needed. Releasing pr-416 without waiting for CI.

@thomhurst
thomhurst disabled auto-merge November 10, 2026 04:37
@thomhurst
thomhurst marked this pull request as draft November 10, 2026 04:37
@thomhurst

Copy link
Copy Markdown
Owner Author

The earlier blocker is gone: CI run 42755111100 succeeded on the previous head. The PR subsequently conflicted with #418, now on main. Rebased onto current main and resolved the four shared insertion sites, retaining both independent controls, exact-roundtrip reporting, separate workflow launches and protocol fields. Added rejection coverage for combining --bdn-await with --exact-roundtrips and clarified the documentation. No superseding PR, unfinished parent or agent-workable linked prerequisite requires a separate unit; #349 remains the broader historical investigation.

Pushed 69c425f. Disabled auto-merge and restored draft before the push; old approvals do not approve this rebased head. Fresh reviews are required. Production per-message cost remains unchanged, 0 B. Validation: zero-warning Release probe build, all 14 Python tests, actionlint, npm ci and documentation production build passed; full broker suites and fresh retained-image measurements were not run for this conflict resolution. Existing measurements in the body remain explicitly evidence from original head 32b8b93, not new measurements of this head.

Final sources and loaded probe build payloads copied and SHA-256 compared to originals under /Users/tom/git/Relayer-evidence/pr-416/69c425fe4248698836797cbc84c06e2b76bb313e (inventory.json); validation logs retained independently at /Users/tom/git/Relayer-evidence/pr-416/rebase-validation/. Reviewed the final diff for preservation of both experiments and reuse of original BDN helper. The default async/exact control path retains its original loop; no production pipeline changed.

@codex review

@github-actions

Copy link
Copy Markdown

Review of #416: no blocking issues.

  • Probe (Program.cs): AwaitHelper.GetResult<int> is bound once through reflection, outside the measured region, and called via a cached delegate. That reuses BenchmarkDotNet's own synchronous waiter instead of re-implementing one, as AGENTS.md asks. The fixed-count loops and the awaited path are left unchanged, so the two completion boundaries stay separate experiments.
  • Python driver: --bdn-await is rejected together with the exact-counter flags, and the protocol records completion_boundary. The new tests cover the separate-process ABBA and that rejection.
  • Workflow: the plain and profiled ABBAs write to distinct result directories, and the failure aggregation matches the existing steps.
  • Production impact: none. This is diagnostic tooling and docs only.
  • Docs: performance.md is updated. One sentence in the new paragraph ("The protocol and each launch record...") runs on one line, which is a cosmetic wrap nit only.

I did not build or run the probe or the tests; this review is from reading the diff.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 69c425fe42

ℹ️ 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
thomhurst marked this pull request as ready for review November 10, 2026 04:45
@thomhurst
thomhurst enabled auto-merge (squash) November 10, 2026 04:45
@thomhurst

Copy link
Copy Markdown
Owner Author

Run 42755111100 passed; its earlier wait no longer blocks this PR. Current rebased head 69c425f has Claude CLEAR and Codex completed with no findings. Checked paginated reviews, inline comments, conversation comments and GraphQL threads: no outstanding blocking findings or threads. Claude’s cosmetic line-wrap nit is non-blocking; declining an extra push for formatting alone. Both native control runs passed. No superseding PR, already-delivered issue, finished parent or linked agent-workable prerequisite needs action; #349 remains the broader investigation.

Reverified 48 historical payloads and their inventory hash ac638ded4edbad3be674c441c3cac5b2ccecb4829ae496e836edb878521f6a1c at the issue-349 location in the body. Reverified all 10 current-head payloads at /Users/tom/git/Relayer-evidence/pr-416/69c425fe4248698836797cbc84c06e2b76bb313e; inventory SHA-256 dabc6d3cad110bd09063d26395d0935d7d2e9b3ace6fab6f588713196d0383d1. Archived current sources also match the Git commit. Original removable checkouts are absent; binaries and historical evidence were checked against retained inventories, not deleted originals.

Enable-AutoMerge.ps1 -Pr 416 -MarkReady selected fresh origin/main gate scripts, passed protection and review gates, promoted the reviewed head and armed auto-merge pinned to it. Ready CI run 42757823265 is now running. No competing launch or rerun is needed. Releasing pr-416 without waiting; GitHub will merge when required CI passes.

@thomhurst
thomhurst disabled auto-merge November 10, 2026 04:55
@thomhurst
thomhurst marked this pull request as draft November 10, 2026 04:55
@thomhurst

Copy link
Copy Markdown
Owner Author

The assigned wait on run 42757823265 was still active, but a fresh mergeability check found a removable blocker: main now includes #420 and conflicts with this PR. Disabled auto-merge and restored draft before rebasing. Resolved the Python shared insertion points while preserving both separate controls, all workflow launches and the original probe loops. The BDN waiter rejects combination with exact-driver counters, with regression coverage; protocol completion boundaries now correctly identify the exact-driver's original BDN waiter too. Documentation covers that separation.

Pushed 9477e72. Release probe build passed with zero warnings/errors, all 16 Python tests passed, actionlint passed, npm ci and the documentation production build passed, and diff whitespace checks passed. Full broker suites and fresh retained-image measurements were not run for this conflict resolution; earlier measurements remain evidence for their named historical heads. Production per-message cost is unchanged, 0 B. Reviewed the complete diff for reuse and preservation of both experiments.

Ten current-head source/build payloads copied and SHA-256 compared against originals at /Users/tom/git/Relayer-evidence/pr-416/9477e72dde953e7454cd36e3efb5911fdd94cf93; inventory SHA-256 b85d8c1b2ad442b96cd5f798ee52151483abb516b26c87b4ce5b8dfdbe97d263. Validation logs are retained at /Users/tom/git/Relayer-evidence/pr-416/rebase-validation-2/. Existing historical evidence retention statements remain unchanged.

Checked all review surfaces before the push: no outstanding findings, and the prior cosmetic nit is now folded into this necessary push. No superseding PR or linked prerequisite removes the need for this control; #349 remains the broader attribution investigation, rather than a blocker to this diagnostic PR. Fresh reviews of this rebased head are required; leaving draft, without waiting for reviews or launching competing runs.

@codex review

@github-actions

Copy link
Copy Markdown

Review

This adds a --bdn-await mode to the diagnostic probe that binds the retained BenchmarkDotNet AwaitHelper.GetResult<int>(ValueTask<int>) once. It also adds the matching script wiring, workflow steps, tests and docs. I checked it against AGENTS.md and found nothing that should block the merge.

  • Production code: none of it changes. All changes are in tools/, .github/ and the docs, so the per-message performance budget is unaffected. The reflection runs once at startup, outside the measured region.
  • Reuse: it reuses BDN's own cached waiter instead of writing a synchronous ValueTask waiter, which is the right call under the 'search before you build' rule. The PR description names what it reuses.
  • Argument handling: the probe accepts --bdn-await as a mutually exclusive option, and the Python script rejects combining it with the exact-* counters. Tests cover both the separate-process launch and the rejection.
  • Docs: performance.md is updated in the same PR and describes the mode as a separate experiment.

Non-blocking nit: protocol["completion_boundary"] is set to asynchronous-await for every mode except --bdn-await and --exact-driver. That includes --exact-invocations and --exact-releases, which use FrozenFixtureProbe and do not run full delivery at all. The label is misleading for those two. Consider only setting it for the full-delivery modes (default, --bdn-await, --exact-roundtrips) so the protocol file does not make claims that don't apply.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 9477e72dde

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

The assigned wait on run 42757823265 no longer applies: that old-head run was cancelled after the rebase. Current head 9477e72 is mergeable, both Claude CLEAR and Codex completed without findings cover it, and all three native control runs succeeded. Checked paginated reviews, inline and conversation comments, and GraphQL review threads: no outstanding blocking findings or threads.

Claude’s protocol-label suggestion is non-blocking diagnostic wording for the existing fixture modes; declining a separate fix push for that nit under the review-cycle policy. It does not change the measured full-delivery experiment or its results. No linked agent-workable prerequisite, superseding PR, already-delivered issue or finished parent removes the need for this independent control; #349 remains the broader attribution investigation.

Reverified all 10 current-head retained payload sizes and SHA-256 hashes under /Users/tom/git/Relayer-evidence/pr-416/9477e72dde953e7454cd36e3efb5911fdd94cf93 (inventory SHA-256 b85d8c1b2ad442b96cd5f798ee52151483abb516b26c87b4ce5b8dfdbe97d263). The five archived sources also match the Git commit. Reverified all 48 historical payloads under the issue-349 evidence location in the body, inventory SHA-256 ac638ded4edbad3be674c441c3cac5b2ccecb4829ae496e836edb878521f6a1c. Original removable checkouts are absent, so binary/historical verification is against retained inventories, not deleted originals. Evidence and validation limitations remain as previously recorded. Proceeding through the protected promotion/auto-merge wrapper, without rerunning completed workflows or waiting for CI.

@thomhurst
thomhurst marked this pull request as ready for review November 10, 2026 05:03
@thomhurst
thomhurst enabled auto-merge (squash) November 10, 2026 05:04
@thomhurst
thomhurst merged commit 7de2b3e into main Nov 10, 2026
21 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.

1 participant