Skip to content

docs(quest): plan CI benchmark regressions and new benches - #4149

Merged
kixelated merged 4 commits into
mainfrom
claude/plan-quests-benchmark-suite-47839d
Sep 25, 2026
Merged

kixelated merged 4 commits into
mainfrom
claude/plan-quests-benchmark-suite-47839d

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

None of the 21 Criterion benches run in CI, so performance regressions surface only when someone runs just bench BASE by hand.

Approach

Four m1 quests:

  • Benchmark regressions in CI [M]: PRs get a sticky, non-blocking comment comparing the benches they affect (changed crates plus dependents), with base and head built on the same runner. Nightly keeps a trend with github-action-benchmark and fails past a loose threshold, which routes to Discord through alert.yml. The moq-uring socket benches run nightly only. Requires Thin justfiles for the impact map.
  • Sans-IO session bench [M]: publisher to relay to N subscribers in moq-net over the in-memory mock transport, swept over subscribers and frame size, lite and IETF.
  • Relay session bench [L]: the same scenario through moq-relay's connection handler.
  • Bench coverage [M]: targets for moq-mux containers, the hang catalog, moq-auth verification, and moq-pattern matching.

Also:

  • The root CLAUDE.md benchmark guideline now asks for a benchmark on any performance-sensitive change.
  • Three existing bench quests pointed at rs/scripts/bench.sh; they now point at bench/run.sh and bench/relay.sh.

Impact

  • None (planning only).

Alternatives

  • CodSpeed: its instruction counting skips every iter_custom bench (6 of 22 files) and can't see syscalls.
  • Bencher: compares a PR against history recorded on other VMs, so runner noise triggers its thresholds.
  • Headless JS benches (mitata/tinybench for @moq/net): deferred; they stay with Browser benchmarks.

Follow-ups

  • Quests above.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review September 25, 2026 14:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T15:51:33.803552Z 862b8c3 New commits
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 16 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 569a0174-9a8a-4413-a760-e2b0171fee2a

📥 Commits

Reviewing files that changed from the base of the PR and between cb52c75 and 862b8c3.

📒 Files selected for processing (5)
  • quest/m1/README.md
  • quest/m1/bench-ci.md
  • quest/m1/bench-coverage.md
  • quest/m1/bench-relay.md
  • quest/m1/bench-session.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 2181dd60-f763-4287-b517-d22f70f7406d

📥 Commits

Reviewing files that changed from the base of the PR and between fc46699 and cb52c75.

📒 Files selected for processing (9)
  • CLAUDE.md
  • quest/m1/README.md
  • quest/m1/bench-ci.md
  • quest/m1/bench-coverage.md
  • quest/m1/bench-relay.md
  • quest/m1/bench-session.md
  • quest/m1/browser-benchmarks.md
  • quest/m1/performance-comparisons.md
  • quest/m1/performance-profiles.md

Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review.


Walkthrough

The changes update benchmark guidance and add plans for benchmark CI, Criterion coverage, and in-memory session and relay benchmarks. They also update references to benchmark scripts in existing discovery, comparison, and profiling plans. The changes document proposed work; they do not add benchmark implementations.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to cb52c

This PR documents proposed benchmark work and updates references; it does not change benchmark execution. No actionable merge-blocking risk is identified, so it is ready for normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to cb52c

The change affects 2 systems.

Changed systems: quest, CLAUDE.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — quest (service) was modified; 8 changed files map to changed impact.
  • observed — CLAUDE.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CLAUDE.md: The guideline now requires adding or extending a benchmark for performance-sensitive changes and measuring optimizations; the previous wording only required benchmarking optimizations.
  • observed — Modified behavior in quest/m1/README.md: Adds a quest for non-blocking PR benchmark comparisons and nightly performance-regression alerts.
  • observed — Modified behavior in quest/m1/README.md: Adds quests for a moq-net in-memory publisher/relay/subscriber benchmark, a corresponding moq-relay connection-handling benchmark, and Criterion coverage of four additional areas.
  • observed — Modified behavior in quest/m1/bench-ci.md: Adds the benchmark CI plan, including PR and nightly workflows, target selection, comparison and regression reporting, runner constraints, validation steps, required impact-map dependency, and related benchmark documents.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: planning CI benchmark regressions and new benchmarks.
Description check ✅ Passed The description is directly related to the changeset and explains the benchmark planning, CI strategy, new benchmark quests, and documentation updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb52c7593e

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

Comment thread quest/m1/bench-coverage.md
Comment thread quest/m1/bench-ci.md Outdated
kixelated and others added 2 commits September 25, 2026 07:11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56b6f29935

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

Comment thread quest/m1/bench-session.md Outdated
@kixelated

Copy link
Copy Markdown
Collaborator Author

Verdict: MERGE

Solid planning-only PR. The four m1 quests (CI regressions, sans-IO session bench, relay session bench, coverage gaps) fill a real hole: none of the Criterion benches run in CI today. Same-runner base/head PR comments (non-blocking) plus a nightly paired comparison with github-action-benchmark is a better fit than CodSpeed (iter_custom blind spot) or Bencher (cross-VM noise).

Quests are sized and ordered sensibly: Thin justfiles as a required dependency for the impact map, session bench feeding the relay bench, coverage named so CI comments stay readable. Path fixes for existing quests (bench/run.sh / bench/relay.sh) and the CLAUDE.md guideline tweak are small and consistent.

No code impact, no complexity debt. Merge and execute the quests in the stated order.

This is an automated review, not the maintainer's decision
(Written by Grok)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated enabled auto-merge (squash) September 25, 2026 15:47
@kixelated

Copy link
Copy Markdown
Collaborator Author

Auto-merge enabled. Adds four m1 quests (CI benchmark regressions, sans-IO session bench, relay session bench, bench coverage), widens the CLAUDE.md benchmark guideline, and fixes stale bench script paths in three quests. Review rounds addressed: the auth bench is scoped to today's JWT verification, the nightly check is a same-runner paired comparison, and the session benches sweep publishers too.

(Written by Claude Opus 5.5)

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 862b8c3fc2

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

Comment thread quest/m1/bench-ci.md
stays informational: record it with
[github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark)
on a data branch, with its own alert disabled. The `moq-uring` socket
benches run only here, and skip loudly when the runner's kernel is too old. Add the workflow's name to

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Refuse kernels that cannot run socket benchmarks

When the nightly runner's kernel is below the moq-uring floor, “skip loudly” leaves the workflow green with no socket measurements, so regressions in those targets are neither recorded nor gated despite the goal promising history for every benchmark. The existing session_lite benchmark implements this condition by printing and returning successfully; select a compatible runner or fail the nightly job when the required benchmark cannot run.

AGENTS.md reference: AGENTS.md:L16-L17

Useful? React with 👍 / 👎.

Comment thread quest/m1/bench-ci.md

## Related

- [Benchmark comparisons](/quest/m1/performance-comparisons.md) - extends the same `bench/run.sh` with repeated paired rounds

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require robust pairing before failing nightly

When host performance drifts during a run, the current bench/run.sh::compare_criterion always measures each base case before its head case, so a single fixed-order pair can turn thermal or frequency drift into a threshold crossing. performance-comparisons.md:10-20 already identifies the missing repeated, alternating rounds and dispersion estimate, but leaving that quest merely Related allows this quest to make the noisy result fatal first; require that work or incorporate equivalent pairing before failing Nightly.

Useful? React with 👍 / 👎.


## Related

- [Benchmark regressions in CI](/quest/m1/bench-ci.md) - tracks these targets on PRs and nightly

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make benchmark CI a prerequisite

If this ready quest lands before bench-ci.md, its stated outcome that CI tracks the new targets is false because no existing workflow runs the Rust Criterion suite. A Related entry does not block execution, so move this dependency to Required; bench-session.md has the same ordering problem.

AGENTS.md reference: AGENTS.md:L51-L51

Useful? React with 👍 / 👎.

@kixelated
kixelated merged commit 94df86c into main Sep 25, 2026
3 checks passed
@kixelated
kixelated deleted the claude/plan-quests-benchmark-suite-47839d branch September 25, 2026 15:54
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