Skip to content

perf(gateway): skip provider catalog rewarm on rate limits - #125906

Merged
steipete merged 8 commits into
openclaw:mainfrom
Grynn:perf/runtime-init-reuse
Sep 5, 2026
Merged

steipete merged 8 commits into
openclaw:mainfrom
Grynn:perf/runtime-init-reuse

Conversation

@Grynn

@Grynn Grynn commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Refs #125315.

What Problem This Solves

Ordinary rate-limit cooldowns invalidated the Gateway's prepared provider-auth snapshot and scheduled another full catalog rebuild. A previous real-Gateway reproduction on this PR measured an 11.3-second rebuild even though a rate limit does not change whether credentials exist.

Why This Change Was Made

Carry the existing failure reason through the internal notification hook and let the Gateway skip rate-limit invalidation at the owner of the prepared snapshot. Both profile and inline-key failure producers retain their persistence and error handling. Authentication and billing failures still trigger recovery; a rate limit cannot cancel a repair already queued or running.

This integrates current main without replacing the contributor's ancestry. The original optional event object and unused source field are removed. Current session projection is retained, while the separate CLI import and device-identity proposals remain follow-ups under #125315.

User Impact

Rate-limited agents avoid redundant provider-catalog work. Cooldown recording, profile selection, credential validation, configuration, plugin SDK contracts, and storage schemas remain unchanged.

Original diagnosis and implementation: @Grynn (Vishal Doshi).

Evidence

  • Before reason propagation: CI 33979786806, head 0d7d56024f83fd710b9f30a6e888345950f7bcd9, recorded four expected failures because the callback received no reason; 14 existing producer tests passed.
  • Before the Gateway filter: CI 33980563586, head bc559c3ba51dbdab85924cf0487f79cb08eb8fe1, reached the Gateway regression and showed two unwanted invalidations after two rate-limit events. The other 198 startup-core tests passed.
  • The second run also reproduced the unrelated sibling-drain timing failure repaired canonically by test(agents): give the sibling-drain completion wait a tolerance on slow runners #139176. This branch includes that main commit (886aaa689076b7b7c2f7a4d8d0048e89f5855698) through an ancestry-preserving merge.
  • Production remains +13/-9 (net +4); growth consists of a type-only import and the invariant comment. The follow-up adds a built-Gateway runtime smoke and registers it with the existing build prerequisite owner, without changing workflows or runner caps.
  • Final independent source challenge and fresh structured integration autoreview found no actionable P0–P2 findings. The integration preserved the repaired auth-hook behavior while retaining current-main startup and session behavior.
  • Production repair head fe6ddac991f4faedfa23836b5b05485be8f61a05 passed CI 33985236614.
  • The first runtime-smoke attempt, CI 33987122604, exposed fixture issues before Gateway readiness: the multi-agent ownership marker, the planner ownership assertion, and a lint-only cleanup expression. Those are corrected; no successful runtime proof is claimed from that attempt.
  • The built-Gateway smoke passed in secretless CI in 17.819 seconds. The actual built merge SHA was 72c8c4f08b38bb9006643acae976ba21f4fa9d29, with PR head f7efc490960002ba1b7da86fd2d65cb166970d72 as its second parent. The three repaired production modules and the runtime smoke match that PR head byte-for-byte. Four HTTP rate-limit requests recorded cooldown state and produced zero rewarms during the five-second observation; the subsequent HTTP authentication failure recorded failure state and produced one rewarm.
  • That run exposed a remaining planner-test formatting mismatch: the local formatter was 0.60, while the branch pins 0.65. Current head 54c9fd565523b7fca8cfd451ba563d5d2428eade restores the pinned formatter output (+8/-9 whitespace-only), with all non-whitespace bytes identical and the targeted 0.65 format check passing. Production and runtime-smoke source remain byte-identical to the observed run. Exact-head CI 33989197791 passed, including the pinned formatter and Gateway runtime smoke.

The new runtime smoke pins the compiled checkout, stages distinct synthetic per-agent profiles, verifies the credential actually used over HTTP, waits for explicit terminal outcomes, reads real SQLite failure state, and records bounded rewarm counters. It complements the unit tests that enforce immediate no-invalidation behavior; its negative log observation is limited to five seconds. The observed run exercises the real built Gateway and SQLite persistence against a local mock HTTP provider; it is not authenticated-provider proof or a performance benchmark.

Historical real-flow proof on original contributor head 8637dad9e5282b188f6cfd666ae696431d73ee5c used the same isolated Gateway process against a local HTTP provider: a 429 recorded its cooldown with zero catalog rewarms, then a 401 caused one rewarm. This is real Gateway/mock-provider evidence, not authenticated-provider proof or a fresh timing measurement of the rewritten head.

Final-head runtime proof: job 101368367710 passed in 19.025 seconds. The actual built merge e4fe993a35e91eb4bee1dcc602f9f49fec3c977b has parents e8fbf33b32bea82769237675b99e03355ba3a50e and exact PR head 54c9fd565523b7fca8cfd451ba563d5d2428eade.

{
  "head": "e4fe993a35e91eb4bee1dcc602f9f49fec3c977b",
  "requests": {
    "rate": 4,
    "auth": 1
  },
  "rateCooldownRecorded": true,
  "authFailureRecorded": true,
  "rateObservationMs": 5000,
  "afterRateRewarms": 0,
  "afterAuthRewarms": 1,
  "prHead": "54c9fd565523b7fca8cfd451ba563d5d2428eade",
  "mergeParents": [
    "e8fbf33b32bea82769237675b99e03355ba3a50e",
    "54c9fd565523b7fca8cfd451ba563d5d2428eade"
  ],
  "ciRun": 33989197791,
  "ciJob": 101368367710,
  "durationMs": 19025
}

Latest ClawSweeper disposition: the 19:51 UTC review found no blocking correctness defect and requested successful rewritten-head Gateway output. The linked passing run fulfills that proof and rank-up request. Its five-second negative observation remains explicitly bounded; the complementary focused regression enforces immediate no-invalidation behavior. No rank-up move is silently skipped. The broader CLI and device-identity slices of #125315 remain follow-ups.

Rate-limit auth-profile failures no longer clear the provider auth cache or
trigger a full catalog rewarm: the failure hook now carries {reason, source}
and the gateway prewarm skips rewarm for rate_limit cooldowns. Session
listing moves to a narrow read-only facade (clone:false, list projection)
so `openclaw sessions` stops importing the full mutation/lifecycle accessor
graph. Device identity loads read-only on CLI start instead of opening the
state DB through the writer/repair lifecycle. CLI backend resolution uses
the lightweight runtime-state registry instead of the loader facade.

Trimmed against upstream: the ACP session-meta batch reader is superseded
by readAcpSessionMetaBatch (openclaw#114659); model metadataSnapshot pinning is
superseded by openclaw#125569; the startup-migration DB-warm change is owned by
open PR openclaw#122005.

Co-Authored-By: Claude Fable 5 <[email protected]>
@clawsweeper

clawsweeper Bot commented Aug 18, 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.

@Grynn
Grynn marked this pull request as ready for review August 18, 2026 16:43
@Grynn
Grynn requested a review from a team as a code owner August 18, 2026 16:43
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: M labels Aug 18, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 5, 2026, 3:51 PM ET / 19:51 UTC.

ClawSweeper review

What this changes

The PR passes failure reasons through the internal auth notification hook, skips Gateway catalog rebuilding for rate limits, and adds regression coverage plus a built-Gateway smoke test.

Merge readiness

⛔ Blocked before merge - 3 items remain

This remains a useful, focused repair: current main still invalidates the provider catalog on rate-limit failures, and related merged work does not replace it. No blocking correctness finding was identified; successful runtime evidence for the rewritten implementation remains outstanding.

Priority: P2
Reviewed head: f7efc490960002ba1b7da86fd2d65cb166970d72

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The repair is focused and source-supported, with no actionable correctness finding, but final-implementation runtime evidence remains incomplete.
Proof confidence 🦐 gold shrimp (3/6) Needs stronger real behavior proof before merge: Historical evidence exercises real Gateway turns and HTTP failures, showing 429 cooldown recording without rewarm followed by 401 recovery. The rewritten reason-only hook has an appropriately scoped built-Gateway smoke, but the captured body explicitly says its execution is pending; successful after-fix output for that implementation remains unrecorded. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Historical evidence exercises real Gateway turns and HTTP failures, showing 429 cooldown recording without rewarm followed by 401 recovery. The rewritten reason-only hook has an appropriately scoped built-Gateway smoke, but the captured body explicitly says its execution is pending; successful after-fix output for that implementation remains unrecorded. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 9 items Current main still needs the repair: The fetched main revision installs a reasonless callback that clears provider-auth state and schedules recovery for every notification. The supplied related merged PRs concern catalog construction, model listing, or unrelated prerequisites; none establishes a merged replacement for this behavior.
Repair occurs at the catalog lifecycle owner: The reason check precedes both cache invalidation and rewarm scheduling. Rate limits therefore leave queued or running authentication recovery untouched; other failure reasons retain the existing recovery path.
Persistence and sibling producers remain intact: Both profile and inline-key producers notify only after successful persistence and retain exception isolation. Inline-key failures already accept only authentication or billing reasons. Provider-reported blocked-until handling already avoids this notification.
Findings None None.
Security None None.

How this fits together

Agent failures update credential-profile health and notify the Gateway’s prepared provider-auth catalog. That catalog helps model listing determine credential availability, while separate cooldown logic controls profile selection.

flowchart TD
  A[Agent request fails] --> B[Record profile health]
  B --> C[Notify failure reason]
  C --> D{Rate limit?}
  D -->|Yes| E[Preserve prepared catalog]
  D -->|No| F[Invalidate and schedule recovery]
  F --> G[Rebuild provider availability]
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Historical evidence exercises real Gateway turns and HTTP failures, showing 429 cooldown recording without rewarm followed by 401 recovery. The rewritten reason-only hook has an appropriately scoped built-Gateway smoke, but the captured body explicitly says its execution is pending; successful after-fix output for that implementation remains unrecorded. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The new smoke’s five-second absence-of-rewarm observation is bounded; immediate no-invalidation guarantees rely on the complementary focused regression coverage.
  • Complete next step (P2) - Attach successful runtime-smoke logs for the rewritten implementation, redacting private addresses, endpoints, credentials, and identifiers. Terminal output is sufficient; screenshots or video are welcome when they show the result. Update the PR body to trigger review automatically; if it does not, ask a maintainer to comment @clawsweeper re-review.
Agent review details

Security

None.

PR surface

Source +4, Tests +277, Other +1. Total +282 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 3 13 9 +4
Tests 4 317 40 +277
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 8 331 49 +282

Review metrics

Metric Value Why it matters
Production versus validation growth Production net +4; tests net +277; test prerequisite registration +1 Production growth is limited to the typed notification contract and invariant documentation; most growth exercises the existing production boundary.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #125315
Summary: This PR addresses the umbrella issue’s rate-limit catalog-rewarm defect; separate CLI and initialization work remains outside its narrowed scope.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep reason propagation and filtering at the existing catalog owner; the four added production lines supply the type import and invariant comment without adding another recovery path.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep reason propagation and filtering at the existing catalog owner; the four added production lines supply the type import and invariant comment without adding another recovery path.

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

Yes, source establishes that current main sends rate-limit failures through unconditional catalog invalidation; the supplied CI evidence also records the focused pre-fix failures. This review did not execute a reproduction.

Is this the best way to solve the issue?

Yes, the existing notification and catalog owner are the appropriate boundaries: suppressing failure recording would damage cooldown behavior, while another cache or timer would duplicate lifecycle policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This removes redundant catalog work during provider throttling without changing credential selection or adding product surface.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Historical evidence exercises real Gateway turns and HTTP failures, showing 429 cooldown recording without rewarm followed by 401 recovery. The rewritten reason-only hook has an appropriately scoped built-Gateway smoke, but the captured body explicitly says its execution is pending; successful after-fix output for that implementation remains unrecorded. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current main still needs the repair: The fetched main revision installs a reasonless callback that clears provider-auth state and schedules recovery for every notification. The supplied related merged PRs concern catalog construction, model listing, or unrelated prerequisites; none establishes a merged replacement for this behavior. (src/gateway/server-startup-post-attach.ts:201, de2c4b1768d9)
  • Repair occurs at the catalog lifecycle owner: The reason check precedes both cache invalidation and rewarm scheduling. Rate limits therefore leave queued or running authentication recovery untouched; other failure reasons retain the existing recovery path. (src/gateway/server-startup-post-attach.ts:201, f7efc4909600)
  • Persistence and sibling producers remain intact: Both profile and inline-key producers notify only after successful persistence and retain exception isolation. Inline-key failures already accept only authentication or billing reasons. Provider-reported blocked-until handling already avoids this notification. (src/agents/auth-profiles/usage.ts:1131, f7efc4909600)
  • Credential presence is separate from cooldown selection: The catalog owner builds provider-presence snapshots, while embedded failover and CLI settlement record profile failures through the shared usage owner. The changed notification is an OpenClaw-internal contract; neither its implementation nor the smoke’s explicitly selected OpenClaw runtime depends on Codex protocol behavior. (src/agents/model-provider-auth.ts:91, f7efc4909600)
  • Focused regression coverage: Producer coverage checks rate-limit, authentication, and billing reason propagation, including persistence when subscribers throw. Gateway coverage checks repeated rate limits cause no invalidation and cannot cancel recovery queued by an authentication failure. The PR body records separate pre-fix failures and passing production-repair CI; these were not executed during this read-only review. (src/gateway/server-startup-post-attach.test.ts:1832, f7efc4909600)
  • Runtime smoke matches the outstanding proof request: The new smoke pins compiled artifacts to the checkout, sends actual agent RPCs through a subprocess Gateway and HTTP client, verifies synthetic credentials, reads persisted cooldown state, then checks authentication-triggered recovery in the same process. Its rate-limit observation is explicitly bounded to five seconds. The captured body at sourceRevision 1070e40fe70944c4de0474833d8c1b8505811efa4dc01267f435264cde2806d4 explicitly reports execution pending and claims no success from the earlier fixture failure. (src/gateway/gateway-auth-rewarm.test.ts:209, f7efc4909600)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Attach the successful built-Gateway smoke output showing persisted rate-limit cooldown with no rewarm, then authentication-triggered recovery in the same process.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-22T23:53:13.338Z sha 8637dad :: needs maintainer review before merge. :: none
  • reviewed 2026-08-23T00:02:59.848Z sha 8637dad :: needs changes before merge. :: none
  • reviewed 2026-08-24T23:41:03.863Z sha 8637dad :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T16:09:45.012Z sha 8637dad :: needs maintainer review before merge. :: none
  • reviewed 2026-09-03T13:14:40.143Z sha 8637dad :: blocked before merge. :: none
  • reviewed 2026-09-03T13:27:51.804Z sha 8637dad :: blocked before merge. :: none
  • reviewed 2026-09-05T17:43:07.152Z sha bc559c3 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-05T18:55:20.381Z sha fe6ddac :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 18, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. label Sep 1, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 3, 2026
@steipete steipete self-assigned this Sep 5, 2026
Integrate current main without replacing contributor ancestry and narrow
this PR to the rate-limit rewarm defect. Preserve current session projection
and startup lifecycle behavior; defer unrelated CLI and device-store changes.

This regression-first commit intentionally fails until reason propagation
and subscriber filtering are repaired. Secretless fork CI records that proof.

Co-authored-by: Grynn <[email protected]>
@steipete

steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

The final repaired head is fe6ddac991f4faedfa23836b5b05485be8f61a05. The PR is narrowed to the rate-limit catalog-rewarm defect, preserves contributor ancestry, and includes the canonical fork-CI timing fix from #139176. The unrelated CLI import and device-identity proposals remain follow-ups under #125315.

Both before-fix failures were captured in secretless CI: 33979786806 demonstrated lost failure reasons, and 33980563586 demonstrated two unwanted invalidations after two rate limits. The final repair passes the existing reason through the internal hook and filters rate limits before touching the prepared snapshot or queued recovery.

Independent source review and fresh integration autoreview found no actionable P0–P2 findings. Final-head CI 33985236614 is pending; this is not a claim that its tests have passed yet.

@openclaw-barnacle openclaw-barnacle Bot added size: S and removed commands Command implementations size: M labels Sep 5, 2026
Forward the existing failure reason through the internal hook without
changing cooldown persistence or adding an optional event shape. Both
profile and inline-key bookkeeping retain their error handling.

This intermediate checkpoint lets CI reach the still-unfixed Gateway
rate-limit regression after the producer regression passes.

Co-authored-by: Grynn <[email protected]>
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 5, 2026
steipete and others added 2 commits September 5, 2026 11:35
Rate-limit cooldowns change profile selection without changing credential
presence. Skip invalidation before touching the prepared snapshot or queued
repair, while retaining authentication and billing recovery.

Refs openclaw#125315. Producer and Gateway regressions failed independently in
secretless CI before their respective repairs.

Co-authored-by: Grynn <[email protected]>
Merge the main commit containing openclaw#139176 after the fork CI reproduction
hit its known cold-runner timing failure. Preserve contributor ancestry
and the reviewed rate-limit auth-catalog repair unchanged.

Co-authored-by: Grynn <[email protected]>
@steipete steipete changed the title perf(runtime): skip catalog rewarm on rate-limit cooldowns; slim session listing and CLI startup perf(gateway): skip provider catalog rewarm on rate limits Sep 5, 2026
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

The current head narrows this PR to the reason-aware rate-limit rewarm repair, integrates current-main lifecycle behavior and the canonical #139176 CI fix, and records separate before-fix producer and Gateway regression failures. The body now describes the final five-file scope and the precise proof limits. Exact-head CI is pending.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

…ntime

Use isolated synthetic profiles, real agent RPCs and HTTP failures, and
canonical SQLite reads to cover the producer-to-subscriber composition.
Keep the immediate no-invalidation unit regressions and report the runtime
smoke's negative observation window explicitly.

Register the test with the existing built-runtime prerequisite owner.
Refs openclaw#125315.
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M and removed size: S labels Sep 5, 2026
Declare explicit ownership for the two named test agents and retain the
exact runtime-consumer grouping assertion. Use a block-bodied Promise
executor for mock-server cleanup without changing cleanup behavior.

These fix the first secretless runtime-smoke attempt before actual
Gateway failure/recovery proof. Production behavior is unchanged.
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The repaired-head built-Gateway smoke now has execution proof: CI job passed in 17.819 seconds. Actual merge SHA 72c8c4f08b38bb9006643acae976ba21f4fa9d29 contains PR head f7efc490960002ba1b7da86fd2d65cb166970d72; all three repaired production modules and the runtime test match that head byte-for-byte.

Four synthetic HTTP 429 requests recorded cooldowns and produced zero catalog rewarms over the bounded five-second observation. A subsequent HTTP 401 recorded its authentication failure and produced one rewarm. The strict unit regressions separately verify immediate invalidation behavior. This is real built-Gateway/mock-provider proof, not authenticated-provider testing or a timing benchmark.

The run exposed a planner-test formatting mismatch between local 0.60 and pinned 0.65. Head 54c9fd565523b7fca8cfd451ba563d5d2428eade contains only the reviewed callback wrapping/indentation correction (+8/-9, identical non-whitespace bytes), created with the normal hooks and pinned 0.65 format/check. Production and runtime-smoke source are unchanged. Exact-head CI is pending.

@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Final exact head 54c9fd565523b7fca8cfd451ba563d5d2428eade passed CI 33989197791. The built-Gateway smoke passed in 19.025 seconds at merge e4fe993a35e91eb4bee1dcc602f9f49fec3c977b, whose verified second parent is this PR head.

The real Gateway recorded cooldowns after four HTTP429 requests, with zero rewarms over five seconds; the subsequent HTTP401 recorded an authentication failure and triggered one rewarm. Both persistence facts are true. This fulfills the latest ClawSweeper proof/rank-up request. The observation window is bounded and complements the strict immediate-invalidation regression; this is mock-provider execution, not an authenticated-provider or timing benchmark.

The full proof is in the PR body. The broader startup and identity proposals in #125315 remain open follow-ups.

@steipete
steipete merged commit 451ac30 into openclaw:main Sep 5, 2026
213 of 215 checks passed
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
…125906)

Carry profile failure reasons through the internal hook and preserve the prepared provider-auth catalog on rate limits. Authentication and billing failures retain the existing recovery path; cooldown recording and profile selection are unchanged.

Cover reason propagation and queued recovery with regressions, plus built-Gateway HTTP429-to-401 proof using synthetic credentials and real SQLite state. CI 33989197791 passed on source head 54c9fd5.

Refs openclaw#125315. Its separate CLI and device-identity proposals remain follow-ups. Original diagnosis and repair by @Grynn.

Co-authored-by: Grynn <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
@Grynn
Grynn deleted the perf/runtime-init-reuse branch September 17, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants