Repository navigation
refactor: deslop old provider, qa-lab, and Android code (round-3 bundle B) - #171920
Conversation
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.
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.
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.
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.
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d97d07d406
ℹ️ 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".
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.
…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.
What Problem This Solves
Assembles three older-code cleanup lanes into one reviewed bundle, removing duplicate provider, QA harness, and Android implementation paths while retaining current main's recent work.
User Impact
Google video generation now reports the operation that actually supplied the video after an empty SDK response falls back to REST, rather than reporting the abandoned SDK operation. Android gateway discovery preserves advertised UTF-8 TXT display names and decodes DNS instance names only once, including names with literal escape-like text.
There are no configuration, dependency, protocol-shape, schema-version, permission, or intended layout changes. The remaining cleanup preserves normal behavior except for the explicitly accepted best-effort edges below.
Why This Change Was Made
Combined final diff: 273 net production LOC removed (+295/-568); tests add 312 LOC (+388/-76); 39 net LOC added overall (+683/-644), across 28 files. The assembled-bundle floor is explicitly waived.
The seven-day OLD-CODE rule was applied to every changed path, including tests and baselines. Seven recently changed files were excluded. Dependent Mantle factory-seam removal, Anthropic discovery-cache policy changes, and QA assertion removals were also dropped to preserve current main's retained tests and unchanged assertion baseline. The recent Android sheet cleanup is not part of this PR.
Credited source lanes: q11,
deslop/q11-provider-plugins-protocol-20261013at8ba25089d973658986f624ff18360acbb0d560b4(including276627730477a8e862e824f3a52e7bc49a82b0fc); q04,deslop/q04-qa-lab-20261013ataa65df9e4bad8a8337a4ff21b866eabae35764c6; q03,deslop/q03-android-20261013atb48c4ec003d70dc39ec9df526a73bbe06904eae4.Best-effort Tradeoffs Accepted
Evidence
Channel.cancel()invokes the existingonUndeliveredElementcallback that cancels queued clear completions (retained native tests cover both pre-start and post-delivery cancellation); rejected parser candidates have no accepted payload, so their over-cap flags cannot be true (also covered by the 1,688-case comparison). No accepted actionable finding remains.Local proof gap: ordinary type-aware lint stopped before source lint when plugin-SDK boundary declaration emission reached its existing 300000ms deadline, matching the source lanes' unresolved prerequisite. The focused CI-repair lint attempt reached the same prerequisite timeout. No deadline or preparation guard was changed or bypassed. Source-lane broad worker-inventory/dead-export gaps remain assigned to exact-head PR CI. Passing no-emit type graphs are not claimed as successful declaration emission.
CI repair and failure attribution
Initial exact-head run
38529087258ond97d07d40627a439c497de842ea103b31962ee8bcompleted red. The introduced Anthropic object spread insidemapviolatedno-map-spread; it now usesObject.assigninto a fresh object, matching its sibling paths. Formatting passed; fresh Keychain-backed delta review through P2 was scoped-clean.The untouched PTY mock-export diagnostic (
src/process/terminal-pty.test.ts:40) is inherited from main commit97e2332b398and was fixed on main in255c4d47a33(#171916). The QA wire test timed out at 240000ms; its failure diagnostics showphase=fixture cleanup, 57 provider requests, and no pending cleanup owners, at 248883ms. This timing failure is not yet attributed to baseline, and a passing replay alone is not a claimed fix. Only the failed test is being replayed; no timeout, load, retry, skip, or assertion is weakened. PR CI remains the broad proof.Repair head
cd5343ba094d230a3085ce33b777726bc30f1027has fresh run38533993129. It reportschecks-node-changed-16:telegram-command-menu-gateway.e2e.test.ts > registers pressure-prioritized Telegram menus through a real Gatewayexceeded 120000ms (120072ms test time). Classification is unknown, with no matching main job; no inherited exception is claimed. The focused local replay is isolated and waiting for build preparation. The test uses packaged-plugin mode, which bypasses the changed QA staging helper, but that observation alone is not baseline attribution. An exact-main Linux baseline attempt is pinned to CI merge1f61cdfe63e7c6232c303ebc4924da389bc3225d's first parent,fa48c5f72db55f1c0dc127b58e186e31861d4047.That run completed with only the Telegram test job and its aggregate CI gate failed;
security-fastpassed. The corrected Anthropic extension-lint stripe passed. The original wire E2E passed at 121795ms inchecks-node-changed-14; this is current-head success, not a claimed causal repair of the previous timeout. No CI rerun was requested.The two failed-scope local replay attempts were cancelled before Vitest when host load reached 138. The wire attempt completed build invocation 1, then spent 2529.7 seconds in declaration-heavy invocation 2; the Telegram attempt was waiting for the artifact owner. Managed cancellation confirmed the build process group dead and released the lock. Neither attempt is claimed as a local test pass. The first Linux baseline setup stopped before testing because the exact-main Git object was absent; its Testbox was confirmed completed and cleanup reconciled. The corrected attempt explicitly fetches that exact public-repository commit before creating its separate baseline worktree.
Previous-head Attribution (superseded by the coordinator rollback)
Blocked, not merged: coordinator attribution remains inconclusive. The corrected Testbox allocation queued and was cancelled under the no-queue policy before its payload ran. A subsequent local comparison waited for the five-minute load average to fall below 60, polling every 60 seconds. The gate opened at 2026-10-14 09:01:47 UTC with a five-minute average of 58.52; the coordinator's comparison deadline was 09:46:47 UTC.
Only
test/e2e/qa-lab/runtime/telegram-command-menu-gateway.e2e.test.tswas selected, with--maxWorkers=1, at headcd5343ba094d230a3085ce33b777726bc30f1027and the tested main parentfa48c5f72db55f1c0dc127b58e186e31861d4047. Each attempt used a clean environment with fresh, separate HOME/OpenClaw/XDG/temp/module-cache directories; main had its own checkout and copied dependencies with baseline-local workspace links. Neither reached Vitest: head hit its 22-minute preparation cap after declaration-heavy compiler invocation 2 ran 1079.9 seconds; main hit its 27-minute preparation cap after the same invocation ran 1417.6 seconds. The caps overlapped within the overall comparison window. Managed cleanup confirmed both compiler process groups dead; the bundle working tree remains clean.These are preparation timeouts, not Telegram test failures. They do not establish a matching inherited test failure, and they do not implicate a q04 hunk. The requested head/main test comparison could not be completed within the bounded window, so the PR stays open and the inherited-only admin exception is not selected. No speculative fix, push, CI rerun, test-timeout increase, weakened assertion, or build-guard bypass was used.
cd5343ba094,38533993129, attempt 1checks-node-changed-16/ Telegram pressure-prioritized menus / 120000ms timeoutopenclaw/ci-gateThe native merge attempt aborted before dispatch because main advanced during its final stability observation; it confirmed no merge request was sent, no outcome ref existed, and its operation lock was released. Prepared branch, exact-head review evidence, source-lane ledgers, and the clean bundle worktree remain available for continuation.
Coordinator Rollback and Current Landing Status
The coordinator ruled the Telegram menu real-Gateway E2E plausibly PR-caused and directed removal of q04 changes on its Gateway/bus startup import graph. Seven production files and their three directly edited test paths now match fetched
origin/mainat5361ed7e3dfd16a6d0eaa4bae47b8182c47f0329exactly:extensions/qa-lab/src/bus-server.tsandbundled-plugin-staging.ts: restore bus schema construction and staging/discovery behavior.src/providers/mock-openai/mock-openai-assistant-text.tsandsrc/qa-web-search-provider.tsunder that plugin: restore mock-answer dispatch and fixture hostname derivation, reached through the mock-server startup imports.src/suite-planning.ts,src/suite.ts, andsrc/test-file-scenario-vitest-report.ts: restore start gates, heap-snapshot PID checks, and report path handling. The E2E imports the public API barrel, which statically imports these suite helpers too.src/bundled-plugin-staging.test.tsandsrc/suite.test.ts; remove the q04-onlysrc/providers/mock-openai/server.ask-user.test.ts, which is absent on main. Existing main owner tests remain intact.No remaining q04 changed module is in that static startup closure. Matrix E2EE/fault-proxy and profile-evidence changes remain; q11, Android, and both user-impact fixes are unchanged. The dropped hunks are recorded as a separate q04 follow-up in the lane ledger, requiring real-Gateway startup/menu proof before reintroduction. This is scope isolation, not a claim that a particular dropped hunk caused the timeout.
Fresh rollback proof passed: 209 QA cases in nine files plus three lint-suppression cases, ten files total, using the normal wrapper with
--maxWorkers=1and isolated state. Both shards completed successfully in 581.02 seconds. Coverage includes bus validation/shutdown, staging, mock-server behavior, QA search, suite planning/concurrency/heap capture, and native Vitest-report validation. Runtime and Madge checks both report zero cycles; formatting and whitespace checks passed. Fresh Keychain-backed rollback review through P2 is scoped-clean with no actionable finding. Native proof is reused because no Android input changed.Reviewed rollback head:
8a50893dc973ac242435eb8aee45959be42f24ff(signed). The single push attached CI run38592599326, attempt 1. Its planned test, lint, type, native, boundary, and security checks passed; the native exact-head watcher reports GREEN. No CI rerun was requested.Landing held: the required Telegram result is uncovered. The narrowed selection omitted
telegram-command-menu-gateway.e2e.test.ts: completed changed-node and hosted tooling-shard logs contain neither that file nor its case name. This is not claimed as a Telegram pass. A single focused, isolated attempt selected only that file with--maxWorkers=1through the supported wrapper at the reviewed rollback head. Testboxtbx_01m4xnz3kvx2ge6qxgkqg55vr2queued and was stopped immediately under the no-queue policy; native provider status confirmscompleted. The payload never ran, and no Actions run URL was assigned. Provider GitHub settlement remains unresolved, so its local claim/key are retained for recovery. Local five-minute load exceeded 300 during preparation, precluding a heavy local fallback under the coordinator's load limit. No alternate provider, CI rerun, new push, or merge was attempted.Neither coordinator landing condition has yet been observed: an actual new-head Telegram pass, or the same test timeout after rollback. Green selected CI cannot establish either. The PR remains open pending coordinator direction or a safe opportunity for the missing focused proof; the native inherited-failure exception is not selected.