Skip to content

fix: avoid repeated GitHub requests when discovering fork PRs - #190003

Merged
steipete merged 1 commit into
mainfrom
steipete/perf-micro-github-api-response-volume-20260919
Nov 1, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/perf-micro-github-api-response-volume-20260919

Conversation

@steipete

@steipete steipete commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes repeated GitHub requests while discovering a session's pull request when multiple candidate fork repositories belong to the same owner.

User Impact

Session PR discovery avoids an unnecessary network round trip while preserving which fork repository is accepted. With normal GitHub ETags, the eliminated request is usually a bodyless 304; without validators, it also avoids transferring and parsing the duplicate list. No configuration or data migration is needed.

Why This Change Was Made

Fork candidates are distinct by owner/repository, but the list query selects owner:branch against the same base repository. Reuse each parsed list within that one discovery, then apply the existing repository-specific filter to every candidate. Subsequent discoveries still revalidate remotely. The candidate list is already bounded to three; production code grows by two net lines, without a persistent cache or a new TTL.

The accompanying scripts make the request-volume investigation reproducible through the real owner and a local Gateway, a recording loopback GitHub server, and the actual Control UI PR subscription store. Fixture responses and credentials are synthetic; external fetches are blocked. The fixture generator now includes the explicit agent ownership required for multi-agent startup.

Evidence

The strengthened renamed-fork regression fails on the parent with two list requests where one is expected, and passes with the fix. The owner, publication, and staleness suites passed 39 tests; the final owner suite passed all 26 tests after simplification. All six fixture-generator tests passed. pnpm check:changed --staged and the production/full-tree unused-file scans passed. Independent Codex review found no actionable P0–P2 findings.

A final-source local Gateway qualification delivered PR 17 to all four UI viewers: four successful subscription calls and four nonempty ready snapshots. The recording server saw 11 requests (seven 200s and four 304s), 75,428 response bytes, and no unmodeled routes. This short run qualifies the harness; its timings are excluded from performance claims.

Owner measurements: five A/B pairs, A/A controls, separate allocation passes

The committed scripts/perf/github-fork-discovery-measure.ts runs the real owner with prepared repository contexts and a recording loopback server. Each arm performs 1,000 discoveries; all 48,000 measured assertions across four campaigns passed. The mock and client share a process, so these CPU/allocation figures include both. These are per-discovery measurements, not Gateway rates. full means responses without validators; etag means warm conditional responses. Allocation uses 32 KiB V8 sampling with collected objects included and sums tree selfSize.

Mode Metric per discovery Baseline Candidate Change
full HTTP requests 2.000 1.000 -50.0%
full Response bytes 46,842.000 23,421.000 -50.0%
full CPU µs 652.664 390.526 -40.2%
full Mean arm p50 ms 0.408 0.226 -44.6%
full Mean arm p95 ms 0.970 0.600 -38.1%
full All sampled allocation B 295,765.646 164,467.034 -44.4%
full Named-reader allocation B 112,558.291 56,417.088 -49.9%
etag HTTP requests 2.000 1.000 -50.0%
etag Response bytes 0.000 0.000 both zero
etag CPU µs 391.551 246.982 -36.9%
etag Mean arm p50 ms 0.294 0.175 -40.7%
etag Mean arm p95 ms 0.732 0.331 -54.8%
etag All sampled allocation B 171,045.062 100,100.339 -41.5%
etag Named-reader allocation B 0.000 0.000 both zero
Mode Pair CPU µs base→candidate p50 ms base→candidate p95 ms base→candidate
full 1 701.408 → 339.031 (-51.7%) 0.390 → 0.272 (-30.0%) 1.025 → 0.688 (-32.9%)
full 2 725.483 → 307.324 (-57.6%) 0.452 → 0.227 (-49.8%) 1.158 → 0.555 (-52.0%)
full 3 648.926 → 284.332 (-56.2%) 0.371 → 0.195 (-47.4%) 0.817 → 0.619 (-24.2%)
full 4 657.455 → 581.183 (-11.6%) 0.427 → 0.225 (-47.4%) 0.928 → 0.451 (-51.4%)
full 5 530.050 → 440.758 (-16.8%) 0.399 → 0.210 (-47.3%) 0.923 → 0.689 (-25.4%)
etag 1 376.927 → 189.994 (-49.6%) 0.252 → 0.127 (-49.5%) 0.566 → 0.278 (-50.9%)
etag 2 306.183 → 172.399 (-43.7%) 0.205 → 0.117 (-43.2%) 0.460 → 0.249 (-45.8%)
etag 3 352.268 → 269.364 (-23.5%) 0.219 → 0.234 (+6.9%) 0.721 → 0.415 (-42.4%)
etag 4 465.940 → 388.800 (-16.6%) 0.388 → 0.210 (-46.0%) 1.287 → 0.398 (-69.1%)
etag 5 456.439 → 214.351 (-53.0%) 0.407 → 0.185 (-54.5%) 0.628 → 0.317 (-49.6%)

No unprofiled candidate metric regressed by 20% or more. ETag pair 3 p50 increased 6.9%; every other unprofiled CPU/p50/p95 cell improved.

Campaign CPU µs A1→A2 p50 ms A1→A2 p95 ms A1→A2 Total B A1→A2 Reader B A1→A2
timing-full 753.811 → 761.302 (+1.0%) 0.438 → 0.438 (-0.0%) 0.989 → 1.423 (+43.9%) not sampled not sampled
timing-etag 635.955 → 780.093 (+22.7%) 0.411 → 0.406 (-1.2%) 4.519 → 4.144 (-8.3%) not sampled not sampled
alloc-full 1,019.919 → 1,038.221 (+1.8%) 0.719 → 0.714 (-0.7%) 7.255 → 1.676 (-76.9%) 304,310.488 → 300,435.960 (-1.3%) 115,977.880 → 111,737.032 (-3.7%)
alloc-etag 564.692 → 901.903 (+59.7%) 0.502 → 0.719 (+43.4%) 0.761 → 1.965 (+158.3%) 172,828.544 → 173,760.336 (+0.5%) 0.000 → 0.000 (both zero)

The one >=20% adverse candidate cell across all captured metrics is allocation-pass full pair 3 p95: 2.390 → 3.735 (+56.3%). Its total/named-reader allocations improved; its profiler-distorted latency is not used for timing acceptance. A/A adverse cells >=20%: unprofiled full p95 +43.9%, unprofiled ETag CPU +22.7%, profiled ETag CPU +59.7% / p50 +43.4% / p95 +158.3%. Controls and concurrent load preclude a precise latency magnitude claim. No allocation cell regressed.

Reproduce against the parent:

git show 079889d5a09102246b34b363ff340591729d5a80:src/gateway/control-ui-session-prs.ts > src/gateway/control-ui-session-prs.lane2080-base.ts
node --import ./scripts/tsx.mjs scripts/perf/github-fork-discovery-measure.ts src/gateway/control-ui-session-prs.lane2080-base.ts 1000 --compare=src/gateway/control-ui-session-prs.ts
# Separate passes: --etag, --allocations, and --etag --allocations.

The shared host was busy and synthetic fixture generation ran concurrently. Counts and allocation reductions were consistent; timing magnitudes are not production forecasts. No production allocator attribution is claimed.

Completed Gateway campaign

The real source Gateway, separate recording HTTP server, and actual Control UI PR subscription store completed two A/A controls and five interleaved A/B pairs. Each warm window ran nine turns over approximately three minutes with four viewers, 13 mixed RPC methods, and a 385 ms method tick (observed session-list spacing 5.009–5.013 seconds). All arms performed 36 inference streams, nine tool calls/results, 219 source session events and 876 delivered session events, with four ready PR 17 UI snapshots. Network rates use each actual window, not nominal duration.

Warm caller, median arm rate Before requests/min After requests/min Before body B/min After body B/min
PR discovery/display 1.667 1.333 0 0
Preview 3.000 3.000 0 0
Options account verification 1.000 1.000 64 64
Total 5.666 5.333 64 64

Every baseline arm made 17 requests; every candidate made 16. The removed request was a 304. Cold setup had median 12→10 requests (baseline range 12–15), with 75,428 body bytes in both. Initial PR discovery alone went 5→4 requests with identical 74,998 body bytes. Reset-triggered conditionals explain the extra cold-count variation. Raw async ancestry may retain the initiating subscription/reset method; endpoint grouping identifies the PR owner.

All Gateway RPC timing medians and spread

Cells below are median arm p50/p95/p99 in milliseconds, five arms per variant. These are descriptive mixed-workload observations, not a claim that the request fix caused every change.

RPC Before p50 / p95 / p99 After p50 / p95 / p99
connect 9.407 / 20.350 / 95.040 9.279 / 20.220 / 29.400
sessions.list 5.488 / 14.380 / 29.989 5.282 / 8.217 / 15.074
chat.history 11.168 / 23.504 / 113.939 10.737 / 20.311 / 36.474
board.get 4.267 / 10.783 / 25.620 3.969 / 8.882 / 17.148
workboard.boards.list 1.676 / 7.277 / 9.390 1.692 / 4.606 / 8.388
sessions.diff 7.012 / 777.879 / 1086.160 6.322 / 291.555 / 923.179
workboard.cards.list 1.647 / 8.175 / 11.850 1.716 / 5.143 / 15.946
sessions.github.options 6.176 / 55.194 / 89.844 5.884 / 54.265 / 61.693
github.preview 3.453 / 11.141 / 18.335 3.562 / 6.020 / 9.412
models.list 3.294 / 10.108 / 20.146 3.382 / 6.068 / 9.136
models.authStatus 2.664 / 13.837 / 22.125 2.655 / 7.248 / 11.533
sessions.describe 2.253 / 9.986 / 19.024 2.045 / 6.417 / 7.830
controlUi.sessionPullRequests.subscribe 1.645 / 7.429 / 11.369 1.694 / 5.852 / 9.361

Selected whole-workload and adverse metrics: each cell is median [minimum–maximum] across arms. CPU is ms/min, memory is decimal MB; other timings are ms. A/A lists the two control values as a range.

Metric A/A range Before median [range] After median [range] Change
gatewayReadyMs 56276.063–78451.454 62123.163 [58029.359–73155.935] 62824.892 [58251.712–113933.117] +1.1%
processCpuMsPerMin 11741.146–13037.703 12288.943 [12168.927–16709.140] 12278.110 [12033.308–14029.370] -0.1%
mainCpuMsPerMin 3992.564–4068.092 4111.232 [3995.608–5094.012] 4055.456 [3887.080–4318.866] -1.4%
max.heapUsed 727.020–730.295 726.060 [720.918–733.395] 731.906 [729.509–739.921] +0.8%
lastCollected.heapUsed 659.592–659.774 659.965 [659.733–661.194] 660.114 [659.770–661.330] +0.0%
max.rss 4910.487–5012.486 4911.895 [4690.860–4979.067] 4845.027 [4510.595–4983.017] -1.4%
workboard.cards.list.p99Ms 7.467–11.505 11.850 [9.194–82.703] 15.946 [7.306–29.963] +34.6%
chatDeltaDeliveryMs.median 0.911–1.057 0.874 [0.698–1.090] 0.959 [0.574–1.097] +9.8%
chatDeltaDeliveryMs.p95 1.605–1.937 1.751 [1.482–34.692] 3.041 [1.724–3.518] +73.7%
chatDeltaDeliveryMs.p99 1.739–2.146 1.855 [1.590–35.294] 3.678 [1.842–3.774] +98.3%
streamStart.turnLatencyMs.p95 16869.178–16917.438 17085.198 [16487.685–19201.848] 16881.734 [16355.179–16973.415] -1.2%
streamStart.providerRequestMs.p95 1087.991–1153.880 1284.028 [641.845–1306.146] 1172.587 [583.857–1201.585] -8.7%

Frame-count medians were 9,204→9,236 and frame bytes 37,944,753→39,963,996; semantic session/stream/tool work stayed equal. Presence cadence accounts for most frame variation. First-text latency has no samples and is not claimed.

Explicit acceptance decision

Accept this bounded owner fix despite the recorded adverse whole-workload observations: cards-list p99 11.850→15.946 ms (+34.6%), chat-delta p95 1.751→3.041 ms (+73.7%), and p99 1.855→3.678 ms (+98.3%). These cells are retained as adverse; the campaign is not labeled uniformly green. The request reduction is deterministic, the repeated isolated owner proof shows reduced allocation/CPU, whole-Gateway CPU is essentially flat, and the production change adds only two lines without retaining state beyond one invocation.

The 20% stop rule triggered investigation rather than dismissal as spread. Initial startup +55.7% and cards-median +24.6% effects did not persist under reversed order and five-arm replication. Startup delay was already present in CLI/config initialization before any GitHub call. The chat maxima setting the candidate aggregate occurred in rounds 0/1/2 before the sole warm discovery at 83–86 seconds. Cold discovery precedes explicit forced GC, so its invocation-local map is gone before measurement. Cards tail requests did not overlap discovery; the median-setting candidate p99 sample occurred 53.761 seconds afterward. This separates the observed spikes from execution of the changed operation, but does not prove every indirect effect impossible. This acceptance is limited to the small request-elimination fix; it does not assert a broad Gateway latency improvement.

Separate profiles and scope limits

A descriptive main-isolate allocation pair used 4 KiB sampling including collected objects. Baseline: 3,206,636,448 sampled bytes / 182.453 seconds = 1,054,506,628 B/min. Candidate: 3,183,774,776 / 180.012 seconds = 1,061,190,428 B/min (+0.63%). The denominator is the recorded profile diagnostics window, with a brief control-edge mismatch relative to V8 sampling. This single pair cannot resolve a tiny request-level saving amid gigabytes of other allocations. Both full profile trees had zero observed readGitHubJsonBody self/subtree bytes. GitHub API subtree totals were 1,061,760→1,005,400 sampled bytes. Both full-profile counters recorded 876 deliveries; the baseline's narrower cohort samples contain 836, with 40 in control/cohort gaps. Neither a production named-allocator reduction nor a whole-Gateway allocation win is claimed.

An ordinary no-fork control produced 15 warm requests/192 B (three PR, nine preview, three account). Nine CPU traces covered 179.553 seconds at 1 ms sampling: 158.116 s idle, 5.976 s dispatch, 2.677 s program, 0.946 s GC; GitHub API subtree 8.593 ms, PR owner 2.542 ms, zero observed reader samples. This control is excluded from timing comparisons.

The fixture has 10,800 original sessions across four agents; all survive the final canonical roster check. Its agent DB is 51.88 GiB, larger than the approximately 35 GiB target, and the active managed workspace has 62,001 tracked files / 1,116,000,022 B. An initial 48 GiB logical-history generation request was interrupted after storage expanded beyond the estimate; canonical recovery and existing fixture owners completed the remaining setup. Actual histories are 3,634 populated / 7,166 empty, with 19,078,809,866 JSONL bytes. The original history target is not claimed complete. This runs on APFS, not btrfs, with four viewers of one active PR; it does not exercise 100 distinct Activity PR rows or ETag working-set churn. Synthetic repository metadata is deliberately minimal (122 B), so absolute body rates are not typical production estimates. No production data or credentials were used.

Gateway reproduction

Use the committed synthetic fixture generator and a suitably sized isolated fixture. The original fixture-generation command requested --sessions 10800 --agents 4 --runs 0 --approvals 0 --cron 0 --projects 1 --transcript-mib 49152 --worktree-files 62000 --worktree-file-bytes 18000 --github-options-connected; it was interrupted as disclosed above, so that command is not represented as a completed exact fixture recipe.

node --import ./scripts/tsx.mjs scripts/perf/transcript-broadcast-measure.ts \
  --state-dir .local/lane2080/fixture-large --entry src/entry.ts \
  --port 42880 --mock-port 42882 --scenario memory-soak --clients 4 --runs 1 --plugins 0 \
  --duration-ms 180000 --soak-rounds 9 --warmup-ms 1000 --round-interval-ms 20000 \
  --list-interval-ms 385 --chunks 300 --chunk-interval-ms 50 --retained-profile-ms 0 \
  --mixed-rpc --dashboard-rpc --github-options-connected --github-volume-observe \
  --github-volume-forks --diagnostics

Baseline adds --github-volume-owner src/gateway/control-ui-session-prs.lane2080-base.ts after creating the exact parent module using the earlier command. Timing order: AA1, AA2, A1, B1, B2, A2, A3, B3, B4, A4, A5, B5. Allocation passes separately add --allocations --heap-sampling-interval 4096. The ordinary CPU control removes --github-volume-forks and adds --workload-cpu-profile.

Exact-head CI 41267254649 passed at e4df12d75b2cd067a024e22d891126de27ba3477. No inherited-failure exception is used.

Reuse each head query within one discovery while preserving per-repository fork matching. Add a regression and recording owner/Gateway workloads for request volume, conditional response bytes, and sampled allocation.
@clawsweeper

clawsweeper Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts size: L labels Nov 1, 2026
@steipete
steipete marked this pull request as ready for review November 1, 2026 02:57
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T02:59:41.325833Z e4df12d 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR reuses GitHub list results within one fork-PR discovery and adds recording workloads to measure request volume.

Example: Discovery tries lonexreb/another-repository followed by lonexreb/paloa-claw for the same branch.

  • Before: It sends the same owner-and-branch list request twice before finding PR 183571.
  • After: It sends that list request once and still accepts PR 183571 only for the matching repository.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused production fix with useful recording evidence; broader Gateway performance acceptance remains explicitly pending, and noisy timing controls limit magnitude claims.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The supplied final-source local Gateway qualification exercises real WebSocket subscriptions and the Control UI PR store, delivering PR 17 to four viewers through a recording loopback GitHub server; owner comparisons independently show two list requests becoming one with identical PR facts in ETag and full-response modes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Session PR discovery makes unnecessary GitHub round trips when several candidate fork repositories share an owner.
Reason: The maintainer-authored direction removes measured redundant work with a small production change; the accompanying tooling records the real owner and Gateway subscription path.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it removes verified duplicate discovery requests while preserving fork matching, and no actionable introduced defect was found.

Priority: P2
Reviewed head: e4df12d75b2cd067a024e22d891126de27ba3477

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway discovers session PRs from checkout and fork candidates, reads GitHub through the existing credential-bound transport, and supplies PR facts to publication controls and Control UI subscriptions.

flowchart LR
  A[Session checkout] --> B[Bounded fork candidates]
  B --> C[Gateway PR discovery]
  C --> D[Credential bound GitHub transport]
  D --> E[Discovery local list reuse]
  E --> F[Repository specific matching]
  F --> G[Publication and UI subscriptions]
Loading

Technical review

Best possible solution:

Retain discovery-local query reuse and repository-specific admission, then finish the already-declared Gateway campaign before landing.

Do we have a high-confidence way to reproduce the issue?

Current-main source deterministically repeats a list query when successive candidate repositories share an owner; the supplied parent-red regression and recording measurements corroborate that path, without reviewer execution.

Is this the best way to solve the issue?

The fix uses the existing discovery owner, retains repository filters and remote revalidation between discoveries, and adds no persistent cache or competing policy owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 52e113b095d9.

Provenance checked

  • Fork list discovery and repository admission keeps the original intent (b1a512e: Find alternate and renamed fork PRs while rejecting same-owner PRs from unrelated repositories.)
  • Host-bound GitHub reads keeps the original intent (db01f6d: Keep enterprise repository reads bound to the selected host, endpoint, and current authority.)
  • Synthetic fixture agent ownership changes intended behavior with a stated reason (ed32fdc: The stress fixture declared explicit ownership for multiple agents; the PR extends that setup to other generated multi-agent workloads so the recording Gateway can start.)
  • Existing broadcast benchmark and connected GitHub workload keeps the original intent (01dfb1d: Measure connected dashboard publication work through the existing isolated Gateway workload; new recording behavior is opt-in and keeps that owner.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced production change: The pinned introduced diff adds a discovery-local map keyed by the complete head query; base repository, branch, endpoint, host, and read authority remain fixed within that discovery. (src/gateway/control-ui-session-prs.ts:228, e4df12d75b2c)
  • Current main retains redundant requests: Fetched main still requests and parses the same owner-and-branch list separately for each candidate repository. (src/gateway/control-ui-session-prs.ts:242, 52e113b095d9)
  • Fork contract and provenance: fix(gateway): show session PRs from alternate fork remotes #183804 established bounded alternate-fork discovery and repository-specific admission; this PR preserves those contracts. (src/gateway/control-ui-session-prs.ts:235, b1a512e3b459)
  • Supplied behavior evidence and explicit landing hold: The complete public body reports five interleaved owner comparisons with requests reduced from two to one, separate ETag/allocation measurements, and final-source local Gateway delivery of PR 17 to four UI subscription viewers; it explicitly holds landing for the full synthetic Gateway campaign. (e4df12d75b2c)
  • Authority remains owned by the existing transport: The existing request owner checks credential identity before and after network reads, and the branch owner checks current reader authority before returning a snapshot; the new map neither persists nor transfers authority. (src/gateway/control-ui-session-pr-request.ts:83, e4df12d75b2c)
  • Exact-head CI: The exact-head openclaw/ci-gate succeeded; paginated check inspection found only two cancelled auto-response checks outside the successful CI aggregate. (e4df12d75b2c)

Likely related people:

  • Peter Steinberger: Raw commit 2d54be3 adds src/gateway/control-ui-session-prs.ts:348 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2d54be31ba68; files: src/gateway/control-ui-session-prs.ts)
  • Pratik Rai: Raw commit b1a512e adds src/gateway/control-ui-session-prs.ts:238 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b1a512e3b459; files: src/gateway/control-ui-session-prs.ts)

PR surface

Source +2, Tests +4, Docs +25, Other +719. Total +750 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 17 15 +2
Tests 1 7 3 +4
Docs 1 25 0 +25
Config 0 0 0 0
Generated 0 0 0 0
Other 7 729 10 +719
Total 10 778 28 +750

Review metrics

Metric Value Why it matters
Production versus regression growth Production +17/-15; tests +7/-3 Two net production lines remove repeated requests, and four net test lines strengthen the existing renamed-fork regression.
Benchmark options Four new benchmark flags Three boolean switches and one source-owner path select recording, fork candidates, validator behavior, and baseline comparison; no product configuration option is added.

Labels

Label changes:

  • add P2: Duplicate requests waste GitHub quota and discovery work in a bounded alternate-fork case without preventing PR discovery.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Duplicate requests waste GitHub quota and discovery work in a bounded alternate-fork case without preventing PR discovery.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the declared interleaved Gateway campaign and confirm equal PR facts, reduced request counts, and unaffected RPC latency.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 31, 2026, 11:14 PM ET / November 1, 2026, 03:14 UTC.

@steipete
steipete merged commit fbc8084 into main Nov 1, 2026
229 of 231 checks passed
@steipete
steipete deleted the steipete/perf-micro-github-api-response-volume-20260919 branch November 1, 2026 05:22
@steipete

steipete commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
…aw#190003)

Reuse each head query within one discovery while preserving per-repository fork matching. Add a regression and recording owner/Gateway workloads for request volume, conditional response bytes, and sampled allocation.
RomneyDa added a commit that referenced this pull request Nov 17, 2026
Release adaptation: backport only the Socket Mode reconnect waiter owner
and focused regression tests; omit the performance harness and main-only
transport documentation addition. Add listener-count assertions for timer
settlement and disconnect cancellation; adjust the test allocation to 41.

Companion dispositions: #198007 is specific to SDK 3.2 callback/abort
semantics and is not applicable to this line pinned to socket-mode 3.1.0.
#197657 retires main allocations; other audit hits (#200523, #197009,
#194964, #184507, #192197, #192051, #190003, #189850) only overlap the
excluded shared perf README. No later #188745 mention through bd692e9.

(cherry picked from commit a1d1da7)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant