Repository navigation
perf(catalog): cadence-proof provider caches and parallelize the Claude scan - #115259
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 28, 2026 15:16
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 29, 2026
This was referenced Oct 11, 2026
steipete
added a commit
that referenced
this pull request
Oct 14, 2026
…le B) (#171920) * fix(google): report the operation that supplied fallback video An empty SDK video result can fall back to a distinct REST operation. Capture its name after that fallback so returned metadata identifies the delivered video. Keep the SDK error check before fallback and preserve requests and media limits. Parameterize the existing fallback regression for SDK 404 and SDK empty results. The real provider entry probe fails on the original empty-result metadata and passes both scenarios with this fix, using synthetic SDK and HTTP responses. * refactor(providers): consolidate old provider and protocol helpers Share exact Gateway schema fields without changing public shapes. Consolidate tool-payload classification, catalog responses, device polling, media formatting, and speech format selection. Remove the Mantle factory's test-only injection seam. Best-effort tradeoffs accepted: - OpenRouter equivalent nested request policies reordered during configuration edits may cause another bounded catalog GET. #102062 supplies synthetic key equivalence, not a human incident; full auth/network policy stays in the key. - Warm Anthropic scans may discover more history than cold scans. #109309/#115259 establish synthetic frontier equality, not a human pagination incident. Charge actual I/O only, retaining the 64MiB read and bounded file/cache limits. - A complete Anthropic read exactly at the I/O cap can now be cached. The former fence supported synthetic cold/warm cost equality; incomplete reads stay out. - Deleted transcript metadata can remain in the bounded cache until eviction. #109309's eager sweeps duplicate current-candidate visibility and bounded retention; no current file means no visible cached row. - A manually sparse single-audio-item array yields empty text rather than an invariant error. #104577/#104558 introduced the throw for a compiler ratchet; the real caller supplies a dense filter result, not a reported runtime failure. Standalone session-memory backend and its registry/factory/tests are untouched. * refactor(qa-lab): consolidate older harness paths Share manifest discovery/linking, bus parser construction, Matrix device verification, registration-local fault history, FIFO starts and mock answers. Remove type-laundering and duplicate work on trusted internal facts. Best-effort tradeoffs accepted - Heap-capture PID fences came from synthetic replacement tests in #137860, not a human actual-use report. A coincident restart may fail or omit this optional diagnostic; the snapshot-writer health barrier remains. - Failed-realpath lexical guessing came from synthetic execution validation in #116912. A disappearing/inaccessible test now fails existing evidence verification instead of guessing its identity; real symlink paths still work. - #143976 introduced duplicate taxonomy parsing alongside both production callers' canonical identity guarantees. Untyped invalid internal build calls omitting required identity are unsupported; external artifact validation stays. - Manifest discovery is invocation-local. A source catalog changed during staging is best-effort and is rescanned on the next invocation, rather than repeatedly scanning the same catalog for each selected plugin. - The search fixture's fixed hostname (8288b4d) needs no URL-parser fallback. No runtime hostname input exists; a future fixture URL rewrite must update its hostname field too. Current output is unchanged. - db4ad84 projected hit objects to hide registration IDs. Those IDs are now gone, and all private callers only read hit facts. Unexpected future internal object mutation may alter QA diagnostics; stable array snapshots remain. Focused owner tests, canonical QA production/test typechecks, syntax lint, formatting, suppression tests, zero runtime/madge cycles and independent P0-P2 review cover the retained cut. No SDK/config/protocol/schema changes. Local broad-proof gaps are recorded in .local/q04-ledger.md: SDK boundary declaration preparation exceeded its existing 300000ms deadline before typed lint ran; the repo-wide SQLite worker scanner was interrupted after more than 25 minutes on an overloaded host. Neither is attributed as inherited CI red. The production, full-tree and script Knip scans also exceeded their existing 600-605s deadlines without a code verdict. Bundled exact-head CI must provide the missing broad proof; no timeout/skip/retry policy was changed. * refactor(android): simplify legacy native owners Use platform accessibility nodes and canonical coroutine cancellation. Remove duplicate sheet validation and unreachable mascot clamps while retaining security, resource bounds and normal lifecycle behavior. Fix DNS-SD display names by preserving advertised UTF-8 text and decoding instance names once. Both Android APK variants, 260 focused native test cases, lint, cycle checks and independent review validate the candidate. * refactor: keep round-3 bundle within old-code scope Drop all hunks in files touched on main within seven days, plus dependent Mantle, Anthropic cache, and QA assertion cuts. Preserve current main tests and baseline without allowances or shims. Keep Google SDK errors in the typed SDK owner and REST errors in its existing helper, without adding assertions. Retain one full mock ask-user roundtrip contract and the two distinct precedence cases. * refactor(anthropic): preserve fresh hosts without map spread * refactor(qa-lab): drop Gateway startup cleanup from bundle Restore the q04 startup import closure and direct tests to main for Telegram menu E2E attribution. Keep Matrix/profile-evidence, provider, and Android changes unchanged.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 15, 2026
…le B) (openclaw#171920) * fix(google): report the operation that supplied fallback video An empty SDK video result can fall back to a distinct REST operation. Capture its name after that fallback so returned metadata identifies the delivered video. Keep the SDK error check before fallback and preserve requests and media limits. Parameterize the existing fallback regression for SDK 404 and SDK empty results. The real provider entry probe fails on the original empty-result metadata and passes both scenarios with this fix, using synthetic SDK and HTTP responses. * refactor(providers): consolidate old provider and protocol helpers Share exact Gateway schema fields without changing public shapes. Consolidate tool-payload classification, catalog responses, device polling, media formatting, and speech format selection. Remove the Mantle factory's test-only injection seam. Best-effort tradeoffs accepted: - OpenRouter equivalent nested request policies reordered during configuration edits may cause another bounded catalog GET. openclaw#102062 supplies synthetic key equivalence, not a human incident; full auth/network policy stays in the key. - Warm Anthropic scans may discover more history than cold scans. openclaw#109309/openclaw#115259 establish synthetic frontier equality, not a human pagination incident. Charge actual I/O only, retaining the 64MiB read and bounded file/cache limits. - A complete Anthropic read exactly at the I/O cap can now be cached. The former fence supported synthetic cold/warm cost equality; incomplete reads stay out. - Deleted transcript metadata can remain in the bounded cache until eviction. openclaw#109309's eager sweeps duplicate current-candidate visibility and bounded retention; no current file means no visible cached row. - A manually sparse single-audio-item array yields empty text rather than an invariant error. openclaw#104577/openclaw#104558 introduced the throw for a compiler ratchet; the real caller supplies a dense filter result, not a reported runtime failure. Standalone session-memory backend and its registry/factory/tests are untouched. * refactor(qa-lab): consolidate older harness paths Share manifest discovery/linking, bus parser construction, Matrix device verification, registration-local fault history, FIFO starts and mock answers. Remove type-laundering and duplicate work on trusted internal facts. Best-effort tradeoffs accepted - Heap-capture PID fences came from synthetic replacement tests in openclaw#137860, not a human actual-use report. A coincident restart may fail or omit this optional diagnostic; the snapshot-writer health barrier remains. - Failed-realpath lexical guessing came from synthetic execution validation in openclaw#116912. A disappearing/inaccessible test now fails existing evidence verification instead of guessing its identity; real symlink paths still work. - openclaw#143976 introduced duplicate taxonomy parsing alongside both production callers' canonical identity guarantees. Untyped invalid internal build calls omitting required identity are unsupported; external artifact validation stays. - Manifest discovery is invocation-local. A source catalog changed during staging is best-effort and is rescanned on the next invocation, rather than repeatedly scanning the same catalog for each selected plugin. - The search fixture's fixed hostname (34f2850) needs no URL-parser fallback. No runtime hostname input exists; a future fixture URL rewrite must update its hostname field too. Current output is unchanged. - 2f4f28f projected hit objects to hide registration IDs. Those IDs are now gone, and all private callers only read hit facts. Unexpected future internal object mutation may alter QA diagnostics; stable array snapshots remain. Focused owner tests, canonical QA production/test typechecks, syntax lint, formatting, suppression tests, zero runtime/madge cycles and independent P0-P2 review cover the retained cut. No SDK/config/protocol/schema changes. Local broad-proof gaps are recorded in .local/q04-ledger.md: SDK boundary declaration preparation exceeded its existing 300000ms deadline before typed lint ran; the repo-wide SQLite worker scanner was interrupted after more than 25 minutes on an overloaded host. Neither is attributed as inherited CI red. The production, full-tree and script Knip scans also exceeded their existing 600-605s deadlines without a code verdict. Bundled exact-head CI must provide the missing broad proof; no timeout/skip/retry policy was changed. * refactor(android): simplify legacy native owners Use platform accessibility nodes and canonical coroutine cancellation. Remove duplicate sheet validation and unreachable mascot clamps while retaining security, resource bounds and normal lifecycle behavior. Fix DNS-SD display names by preserving advertised UTF-8 text and decoding instance names once. Both Android APK variants, 260 focused native test cases, lint, cycle checks and independent review validate the candidate. * refactor: keep round-3 bundle within old-code scope Drop all hunks in files touched on main within seven days, plus dependent Mantle, Anthropic cache, and QA assertion cuts. Preserve current main tests and baseline without allowances or shims. Keep Google SDK errors in the typed SDK owner and REST errors in its existing helper, without adding assertions. Retain one full mock ask-user roundtrip contract and the two distinct precedence cases. * refactor(anthropic): preserve fresh hosts without map spread * refactor(qa-lab): drop Gateway startup cleanup from bundle Restore the q04 startup import closure and direct tests to main for Telegram menu E2E attribution. Keep Matrix/profile-evidence, provider, and Android changes unchanged.
This was referenced Oct 16, 2026
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
After #114961,
sessions.catalog.liststill averaged 418ms × 60/100min on team.openclaw.ai. A deep audit found the systemic cause: every catalog cache TTL sits BELOW the actual poll cadence — which is 5s under activity (sawChangefast-follow), not 30s — so steady-state polls are always cold. The Claude memo's tree stamp was only an AND-condition with its 15s TTL (never used to revalidate an expired entry), and the scan serialized ~800realpath+statcalls (measured 17× faster parallel). Codex's 3s page memo repaid a 256ms app-server roundtrip every poll; OpenCode spawned its CLI subprocess per poll with no cache; Pi re-walked and stat'ed its whole store per poll; the PATH-probe memo's hits didn't slide its expiry; and the gateway single-flight dropped settled results immediately, so out-of-phase clients shared nothing.Why This Change Was Made
Caches that expire faster than their callers poll are pure overhead. The fix aligns every layer with the real cadence and replaces time-based expiry with change detection where a cheap change signal exists.
User Impact
Sidebar catalog polls drop from ~418ms to near-noise in steady state; freshness contracts are explicit and bounded (changes visible by the next 5s fast-follow tick).
Evidence
forceRefreshbypasses everything.codex-rs/app-server/src/request_processors/thread_processor.rs:1981,:4167,thread-store/src/local/list_threads.rs:22,:151(thread/list walks the store/state DB before status projection — the roundtrip is real work worth caching).