Skip to content

refactor: deslop old provider, qa-lab, and Android code (round-3 bundle B) - #171920

Merged
steipete merged 7 commits into
mainfrom
deslop/bundle-old-r3b-20261013
Oct 14, 2026
Merged

steipete merged 7 commits into
mainfrom
deslop/bundle-old-r3b-20261013

Conversation

@steipete

@steipete steipete commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

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

  • q11 — providers and packages: consolidate catalog response shaping, speech format selection, device polling, media text formatting, tool-payload classification, and protocol schema fields. All 50 exported protocol schema shapes are unchanged after JSON serialization. Includes the Google operation-metadata fix.
  • q04 — QA Lab: retain Matrix verification setup/reporting, registration-local fault histories, and profile-evidence planning. Gateway/bus startup-path cleanup and its direct test edits were dropped under the coordinator ruling below.
  • q03 — Android: use native accessibility nodes and canonical coroutine cancellation, remove unreachable mascot clamps and obsolete DNS decoding/constructor detours, and fix double-decoded discovery names.

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-20261013 at 8ba25089d973658986f624ff18360acbb0d560b4 (including 276627730477a8e862e824f3a52e7bc49a82b0fc); q04, deslop/q04-qa-lab-20261013 at aa65df9e4bad8a8337a4ff21b866eabae35764c6; q03, deslop/q03-android-20261013 at b48c4ec003d70dc39ec9df526a73bbe06904eae4.

Best-effort Tradeoffs Accepted

  • Reordering otherwise equivalent OpenRouter request policies may cause an extra bounded catalog GET. Authentication and network-policy isolation remain in the cache key.
  • Private QA fault-hit objects are treated as immutable facts, with stable array snapshots. An unexpected future internal mutation could alter diagnostics; current consumers only read/project fields.
  • A manually fabricated sparse one-item audio array produces empty text rather than an invariant error.
  • Android's removed mascot clamps cover channels already bounded by their sole producer; real combined-offset clips remain. Unexpected internal DNS resolver construction failure aborts that best-effort refresh and retries on the next normal refresh; actual DNS-query failure fallback remains.
  • Parsed TXT values use the maintained dependency's UTF-8 getter. Impossible internal getter failures are no longer swallowed; malformed DNS wire remains rejected by parsing.

Evidence

  • Original-bundle proof before the coordinator rollback: 214 tests in seven files passed (suppression 3, provider 68, QA 143), followed by Google/QA delta checks covering 216 distinct cases across eight files. This is retained-input proof, not a claim that the dropped QA test file still exists. Fresh restored-owner proof is recorded below.
  • Final direct Google provider-entry replay passes SDK 404 fallback, empty-SDK fallback, and SDK operation-error propagation without REST fallback. Fixtures are synthetic; this is boundary proof, not a live Google API claim. The original empty-SDK metadata defect was reproduced red in q11 before its fix.
  • All 50 exported serialized protocol shapes and 1,688 accepted/rejected XML/JSON parser cases match the pinned original owners.
  • Fresh core and extension production types, extension-test types, package-test types, and the companion declaration-input graph passed. Fresh runtime and Madge cycle checks both report zero cycles. Targeted core lint, formatting, whitespace, and the three suppression tests passed. Google retains its existing 13-assertion count without a baseline change.
  • Native proof reused as explicitly authorized: q03's final Play and third-party APK builds and 260 focused Android cases passed. No cherry-pick conflict touched Android; retained native production files are unchanged from that source lane. No Apple target changed.
  • Fresh Keychain-backed Codex review completed through P2. Two findings were declined after owner/proof verification: Channel.cancel() invokes the existing onUndeliveredElement callback 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 38529087258 on d97d07d40627a439c497de842ea103b31962ee8b completed red. The introduced Anthropic object spread inside map violated no-map-spread; it now uses Object.assign into 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 commit 97e2332b398 and was fixed on main in 255c4d47a33 (#171916). The QA wire test timed out at 240000ms; its failure diagnostics show phase=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 cd5343ba094d230a3085ce33b777726bc30f1027 has fresh run 38533993129. It reports checks-node-changed-16: telegram-command-menu-gateway.e2e.test.ts > registers pressure-prioritized Telegram menus through a real Gateway exceeded 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 merge 1f61cdfe63e7c6232c303ebc4924da389bc3225d's first parent, fa48c5f72db55f1c0dc127b58e186e31861d4047.

That run completed with only the Telegram test job and its aggregate CI gate failed; security-fast passed. The corrected Anthropic extension-lint stripe passed. The original wire E2E passed at 121795ms in checks-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.ts was selected, with --maxWorkers=1, at head cd5343ba094d230a3085ce33b777726bc30f1027 and the tested main parent fa48c5f72db55f1c0dc127b58e186e31861d4047. 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.

Exact head / run Failed job / case Attribution Disposition
cd5343ba094, 38533993129, attempt 1 checks-node-changed-16 / Telegram pressure-prioritized menus / 120000ms timeout Unknown; no matching scheduled-main diagnostic; isolated head/main attempts never reached Vitest Leave open: bounded comparison inconclusive; no inherited exception
Same openclaw/ci-gate Aggregate of the test-job failure Not waived

The 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/main at 5361ed7e3dfd16a6d0eaa4bae47b8182c47f0329 exactly:

  • extensions/qa-lab/src/bus-server.ts and bundled-plugin-staging.ts: restore bus schema construction and staging/discovery behavior.
  • src/providers/mock-openai/mock-openai-assistant-text.ts and src/qa-web-search-provider.ts under that plugin: restore mock-answer dispatch and fixture hostname derivation, reached through the mock-server startup imports.
  • src/suite-planning.ts, src/suite.ts, and src/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.
  • Restore src/bundled-plugin-staging.test.ts and src/suite.test.ts; remove the q04-only src/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=1 and 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 run 38592599326, 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=1 through the supported wrapper at the reviewed rollback head. Testbox tbx_01m4xnz3kvx2ge6qxgkqg55vr2 queued and was stopped immediately under the no-queue policy; native provider status confirms completed. 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.

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.
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review October 14, 2026 07:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-10-14T15:53:09.952218Z 8a50893 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 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.
@steipete
steipete merged commit 6c8d9ac into main Oct 14, 2026
161 of 163 checks passed
@steipete
steipete deleted the deslop/bundle-old-r3b-20261013 branch October 14, 2026 17:07
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant