Skip to content

refactor(browser,qa-lab): consolidate trusted internal execution paths - #173065

Merged
steipete merged 4 commits into
mainfrom
deslop/y13-ext-qalab-browser-cleanup-20261015
Oct 15, 2026
Merged

steipete merged 4 commits into
mainfrom
deslop/y13-ext-qalab-browser-cleanup-20261015

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Browser and QA Lab repeat work already owned by their input normalizers, evidence capture, staging pass, and transport factory.

User Impact

No intended user-visible change, new configuration, or migration. External validation, credential/navigation authority, evidence integrity, normal restart durability and process settlement remain. The named standalone session-memory backend is untouched.

Why This Change Was Made

Use canonical normalized actions and captured facts, stage bundled sources and calculate their runtime host floor in one pass, and publish Chrome MCP handles synchronously while waiting only for readiness. Remove private test-factory plumbing, dead projections, mirror types, pass-through adapters and redundant own-write probes.

Wave-5 y13, limited to Browser and QA Lab: 474 net production lines removed (+209/-683) against the branch merge base, with the coordinator's explicit floor waiver after the Telegram split, excluding tests, fixtures, test-support, generated files and declarations. The resumed largest-file pass and provenance decisions are recorded in the requested local lane ledger. Character-eval and CLI snapshot cleanup clusters were dropped after CI; those files and their original tests match the cleanup base exactly.

Evidence

The Telegram credential rewrite, its added tests and receiver-free lint contract are split to deslop/y13-telegram-userbot-credential-20261015 from current main. That branch is pushed without a PR and still requires Telegram Test Server userbot proof with Convex-leased credentials. Both Telegram files on this PR match origin/main exactly; that live proof is not claimed for this PR.

Fresh reduced-candidate independent review: scoped-clean P0–P2, correct 0.90. Focused isolated replay: Browser 10 files / 177 tests pass (245.14s), QA Lab 15 files / 143 tests pass (392.50s). Targeted source-graph types, formatting and focused boundary lint pass. Required suppression replay retains only the unchanged UI inventory mismatch. Type-aware extension lint was attempted; its unchanged plugin-SDK declaration prerequisite timed out at 300000ms before lint. Both extension lint lanes and all type lanes subsequently passed on the exact hosted head. No retry, longer timeout or bypass was added. Prior unchanged-input runtime cycles and Madge checks both report zero; this split only restores main's Telegram implementation and adds no graph edges.

Required Telegram command-menu replay on exact reduced head e6999fc: node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/telegram-command-menu-gateway.e2e.test.ts --maxWorkers=1 passed 1 file / 1 test (case 72680 ms, Vitest 336.32 s, wrapper 350.02 s). Native current-head private-QA JS runtime preparation passed first (6m 4.3s); the test then used the supported prebuilt-runtime contract and task-isolated HOME/OpenClaw/XDG roots. Original assertions and 120000 ms deadline unchanged. This is real-Gateway/mock-transport boundary proof, not live Test Server userbot proof.

Character-eval and CLI snapshot clusters were completely dropped after initial CI exposed test failures; their original tests and production files are retained. No assertions, retries, timeouts, skips or suppression allowances were weakened.

Exact-head CI run 38729417685, head e6999fc: all 145 check runs enumerated, 85 success / 53 skipped / 1 neutral / 4 failure including the downstream gate / 2 superseded non-test cancellations. All four QA smoke profiles and all six Security High boundary suites passed; dependency/security review statuses passed. Landing uses the coordinator-authorized inherited-only admin exception, not a claim of green CI.

Failed job Inherited-failure evidence
check-additional-extension-package-boundary WhatsApp TS4058 / PLUGIN_COMMAND_DISPATCH / inbound-dispatch.ts@18008 is byte-equivalent on scheduled main run 38721065715. No lane file in the failure path.
checks-node-changed-13 memory-dreaming-provenance's restricted-session case rejects cron.add because the unchanged mock-openai configuration has a direct key, not a stored account. Serial same-test replay reproduces the exact rejection on CI-tested merge 22c6557bbf015fc165f4cfafd90decbfc82f1a6f (137404 ms) and its main parent 85c4751 (78484 ms), not timeouts. The deep-consolidation sibling passes on both.
checks-node-changed-17 Telegram message-tool failure settlement reproduces the unchanged 120000 ms timeout on both the same tested merge and main parent (baseline 122356 ms). This test uses packaged plugins and bypasses the modified source-staging path; test, transport and lifecycle owners are unchanged. The root cause remains unresolved; no load-only diagnosis or repair is claimed.
openclaw/ci-gate Downstream aggregate of the three inherited failures above.

The serial replays use native current-head JS runtime preparation plus canonical run-vitest's supported prebuilt-runtime contract, identical unchanged test files / maxWorkers=1, isolated state, and no assertion/deadline changes. Both finish 2 failed / 1 passed. Relevant test/auth/setup/cron owner files also match current main 7816d8b. Context job 116403200286 and dispatch 116403200520 were superseded by successful 116403225229 / 116403226775; neither cancelled job held test-suite proof. The coordinator separately accepts local inherited UI suppression inventory drift (97 actual / 95 expected), previously reproduced on clean main 45b463f; no allowance changed.

Best-effort tradeoffs accepted

Keep external validation, navigation and credential authority, selected evidence
integrity, process settlement and public contracts. Trust canonical normalized
actions and fresh internal evidence instead of repeating their owners' work.
Stage bundled sources and compute their runtime host floor in one pass.

Best-effort tradeoffs accepted

- Internal child evidence changing completed/pending history: #147756/#168841 describe synthetic ownership foundations, not human mutation incidents. Keep the first captured facts; canonical publication still validates the graph.
- Invalid internal evidence selection/combination: duplicate preflights from #147756 are not external boundaries. Invalid snapshots fail at canonical publication instead of every adapter/select step.
- Fresh V3 snapshots or local taxonomy objects mutating between private calls: no external writer holds them. Use owner-held facts; path rebasing still copies because it mutates paths.
- Gallery roots/symlinks changing during one request: private consumers use the canonical ingress root. Actual artifact containment and download authorization remain at their boundaries.
- Gallery model rows not belonging to their own declaration list: impossible because those rows are created from that exact list. Actual arbitrary-path downloads keep the allowlist.
- Configured replacement Telegram skill returning malformed internal results: #133030 introduced a canonical leased-skill producer, not a human malformed-result incident. Canonical credential validation and effect-time lease health remain; malformed replacements fail at use.
- Local filesystem calls hanging during Mantis cleanup: #111051/#158313 provide synthetic timeout qualification, not a human uncancellable-local-FS incident. Await the OS; preserve Git deadlines, exact path/inode authority and process settlement.
- Mantis path replacement between consecutive ownership probes: preserve one precheck plus child-side pinned identity at destructive dispatch; a disappeared/replaced path fails safely.
- Typed log collector returning an impossible bad cursor: #137622 added the retirement mode as a review defense. Trust its paired owner; retain bounded rollover, redaction and legacy fallback.
- Fetch implementation ignoring AbortSignal: Matrix's removed outer timer defended fake-only behavior. Native request deadline/cancellation, parallel healthy-peer probes, response-body and loser cleanup remain.
- Artifact disappearing immediately after its successful own write: #92606/445317a38b1 add the redundant access check, with no human disappearance report. Real write failures propagate; actual readers detect later deletion.
- Private Browser leaves receiving unnormalized values: #63977 owns external /act normalization; extraction #113771 retained mirror checks. Keep external fill repair #131231 and all effect authority. Invalid internal calls may fail at Playwright rather than a second validator.
- Unnormalized oversized/deep batches reaching the private executor: restored executor 61d171a has no human bounds incident. Keep recursive ingress depth repair #120274 and total count bound #63977; remove duplicate executor depth plumbing.
- Abort firing between synchronous resetTransport checks: #126407 added synthetic lifecycle coverage. No async work intervenes, so keep entry and post-await invocation checks.
- Taxonomy file disappearing after successful parse: #91500/#92558 introduced reporting, not a human mid-report deletion incident. Finish with parsed facts; the next read notices deletion.

The named standalone session-memory backend and tests remain untouched.

Proof: fresh independent P0-P2 review scoped-clean after repairing a reproduced
false-coverage descendant-admission defect; targeted source graph types and
syntax-boundary lint pass; runtime/static cycles both zero; format/diff clean.
Browser focused owner/sibling cohort: 12 files, 194 tests pass.
Invocation/containment/staging: 3 files, 34 tests pass, including the reproduced
false-coverage regression. Both unchanged Gateway-child staging-cleanup cases
pass after retaining staging-directory creation before root metadata parsing.

Below-500 coordinator packet: 442 net production LOC removed (+198/-640).
No cleanup PR or merge claim. Full check-changed, type-aware package lint and
Telegram command-menu Gateway E2E remain unproven under host saturation.
The remaining full QA owner cohort was interrupted before assertions; not green.
Suppression inventory fails only on untouched UI rows, reproduced on clean main
45b463f; no suppression allowance changed.
Publish Chrome MCP handles synchronously and wait only for transport readiness.
Keep process identity, close settlement, waiter sharing and effect authority.
Remove character-eval callback injection and private projection/type mirrors;
reuse canonical lifecycle cancellation and timer bounds.

Best-effort tradeoffs accepted

- Delayed asynchronous MCP factory handles existed only through the test seam (ea2b558/#104601; extracted by #113114). Linked #103784 is a forced Delay launch/source-proof matrix, not a human actual-use incident. Production constructs the handle synchronously; readiness remains asynchronous and cancellable, and exact owned process cleanup still settles before replacement.
- Same-tick lifecycle completion and abort now follow the canonical SDK Promise.race ordering rather than a private listener implementation (#127761/22e12267f68, synthetic lifecycle qualification). Shared work is not cancelled; synchronous pre-abort and effect authority stay intact.
- A private already-clamped timer no longer repeats the SDK maximum check (4abde61; centralized by 5f4fc75). The same canonical grace helper caps the result, with no timeout change.

Character-eval test callbacks were never supplied by its sole production CLI
caller (3101d81; #92606). Tests now mock the actual suite/manual-lane owners.
Six private pwAi projections had only test consumers; canonical session exports
remain. Port reservation accepts the actual node:net.Server instead of a mirror.

Full-branch production reduction: 610 net lines (+241/-851), excluding tests,
fixtures, test-support, generated files and declarations. No public/config/SDK,
storage, protocol or dependency contract changes. Phase E remains untouched.
@clawsweeper

clawsweeper Bot commented Oct 15, 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.

@steipete
steipete marked this pull request as ready for review October 15, 2026 11:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-15T11:48:26.794204Z e6999fc 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.

Restore character-eval and CLI runtime byte-for-byte to the cleanup base after
exact-head CI found concurrent mock bypass and captured-taxonomy failures.
Keep every original behavioral assertion; no retry, timeout or skip changes.
The local character replay was inconclusive, so drop its whole cleanup cluster
instead of waiting for host capacity. Restore CLI snapshot capture as well.

Declare the imported credential-restorer's receiver-free function contract.
The canonical exported function never uses this; no runtime guard or credential
validation changes. This fixes the typed unbound-method lint finding.

Branch production reduction is now 568 net lines (+229/-797), tests/fixtures/
test-support/generated/declarations excluded. Prior full autoreview remains
valid for this strict restoration subset; independent repair review confirms
exact base blobs and the type-only correction. Source-graph types, focused
syntax-boundary lint, formatting and diff checks pass.
Restore the two Telegram files to current main for #173065. Park their rewrite and receiver-free lint contract on deslop/y13-telegram-userbot-credential-20261015 pending Test Server userbot proof with Convex-leased credentials. Coordinator waives the floor for the remaining 474 net production lines.
@steipete

Copy link
Copy Markdown
Contributor Author

Exact reviewed/pushed head: e6999fc. CI run: https://github.com/openclaw/openclaw/actions/runs/38729417685. All failed leaf jobs are inherited, as detailed below. Landing uses the coordinator-authorized inherited-only admin exception; CI is not claimed green.

Failed job Observed failure Attribution/proof
check-additional-extension-package-boundary (116404250568) WhatsApp inbound-dispatch.ts@18008 TS4058: PLUGIN_COMMAND_DISPATCH cannot be named Inherited, same signature on scheduled main 38721065715 / job 116375657356. No lane file in failure path.
checks-node-changed-13 (116404252365) memory-dreaming-provenance E2E: cron.add rejects a direct configuration credential because automation needs a stored inference account Inherited: serial same-test replay reproduces the exact rejection on CI-tested merge 22c6557bbf015fc165f4cfafd90decbfc82f1a6f (137404ms) and its main parent 85c4751 (78484ms), not timeouts. The unchanged mock-openai fixture configures a direct key but stages stored profiles only for openai/anthropic; unchanged cron owner blob 9e41bd1401fa94926674b86734a7d604201fc3ab rejects it. Those sources and the test also match current main 7816d8b. Unrelated run 38728769386/job116401736888 supports the same cron rejection mechanism in a different test, not used as the same-test replay.
checks-node-changed-17 (116404252186) Telegram message-tool failure settlement E2E times out at its existing 120000ms limit Inherited test failure: serial same-test replay reproduces the same existing 120000ms timeout on CI-tested merge 22c6557bbf015fc165f4cfafd90decbfc82f1a6f and its main parent 85c4751 (baseline case duration122356ms). The test, transport and lifecycle owners are unchanged and match current main7816d8b6542. createQaPreparedRepoCliCommand sets usePackagedPlugins=true, so this test bypasses the modified source-plugin staging path; the port reservation change is type-only. The timeout's underlying cause remains unresolved; these are reproduced failures, not a claimed repair or load-only diagnosis.
openclaw/ci-gate (116411246613) Aggregate red Downstream of the three inherited leaf failures above; no separate test failure.

The exact CI source pair was captured from preflight: merge22c6557 has ordered parents main85c475 and PRe6999fc. Both local runs used native current-head JS runtime preparation, canonical run-vitest with its supported prebuilt-runtime contract, the same two unchanged files, maxWorkers1, and isolated HOME/OpenClaw/XDG roots, serially. The memory sibling passed on both:94587ms on merge,88226ms on main. Each replay finished2failed/1passed; baseline Vitest552.53s/wrapper566.99s. No timeout was raised and no assertions were weakened.

All 145 exact-head check runs were enumerated: 85 success, 53 skipped, 1 neutral, 4 failure including the aggregate, 2 superseded non-test cancellations. Both extension lint lanes, all type lanes, security-fast, all six Security High boundary suites, and all four QA Smoke CI profiles passed. Dependency and security-sensitive review statuses are successful; live reviewDecision is null and there are no unresolved review threads. Scope touches no restricted CODEOWNERS paths.

Superseded non-test cancellations: context job 116403200286 replaced by successful 116403225229; dispatch job 116403200520 replaced by successful 116403226775. They are not missing test-suite proof. No CI reruns/dispatches, timeout increases, retries, skips or suppression allowance changes.

Local reduced-owner proof: Browser177 and QA Lab143 assertions pass; source-graph types, boundary lint and formatting pass. Fresh independent P0–P2 review scoped-clean. Full extension lint local prerequisite timed out before lint; both exact-head hosted extension lint lanes passed. Local suppression inventory retains coordinator-accepted unrelated UI drift97actual/95expected. Runtime and Madge cycles both0; the split adds no graph edges. Net production removal474lines(+209/-683), explicit coordinator floor waiver.

Telegram credential rewrite is parked, no PR, at 3e20381 on deslop/y13-telegram-userbot-credential-20261015. It still requires Test Server userbot proof with Convex-leased credentials. No Phase E changes.

Required Telegram command-menu replay passed on exact reduced head e6999fc: 1 file / 1 test, case 72680 ms / Vitest 336.32 s / wrapper 350.02 s. Command: node scripts/run-vitest.mjs test/e2e/qa-lab/runtime/telegram-command-menu-gateway.e2e.test.ts --maxWorkers=1, after successful native current-head private-QA JS runtime preparation (6m 4.3s), under its supported prebuilt-runtime contract and task-isolated state. Original assertions and 120000 ms deadline unchanged. Real-Gateway/mock-transport boundary proof, not live userbot proof.

@steipete
steipete merged commit a5a2798 into main Oct 15, 2026
150 of 157 checks passed
@steipete
steipete deleted the deslop/y13-ext-qalab-browser-cleanup-20261015 branch October 15, 2026 13:05
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
openclaw#173065)

* refactor(browser,qa-lab): consolidate internal validation and capture

Keep external validation, navigation and credential authority, selected evidence
integrity, process settlement and public contracts. Trust canonical normalized
actions and fresh internal evidence instead of repeating their owners' work.
Stage bundled sources and compute their runtime host floor in one pass.

Best-effort tradeoffs accepted

- Internal child evidence changing completed/pending history: openclaw#147756/openclaw#168841 describe synthetic ownership foundations, not human mutation incidents. Keep the first captured facts; canonical publication still validates the graph.
- Invalid internal evidence selection/combination: duplicate preflights from openclaw#147756 are not external boundaries. Invalid snapshots fail at canonical publication instead of every adapter/select step.
- Fresh V3 snapshots or local taxonomy objects mutating between private calls: no external writer holds them. Use owner-held facts; path rebasing still copies because it mutates paths.
- Gallery roots/symlinks changing during one request: private consumers use the canonical ingress root. Actual artifact containment and download authorization remain at their boundaries.
- Gallery model rows not belonging to their own declaration list: impossible because those rows are created from that exact list. Actual arbitrary-path downloads keep the allowlist.
- Configured replacement Telegram skill returning malformed internal results: openclaw#133030 introduced a canonical leased-skill producer, not a human malformed-result incident. Canonical credential validation and effect-time lease health remain; malformed replacements fail at use.
- Local filesystem calls hanging during Mantis cleanup: openclaw#111051/openclaw#158313 provide synthetic timeout qualification, not a human uncancellable-local-FS incident. Await the OS; preserve Git deadlines, exact path/inode authority and process settlement.
- Mantis path replacement between consecutive ownership probes: preserve one precheck plus child-side pinned identity at destructive dispatch; a disappeared/replaced path fails safely.
- Typed log collector returning an impossible bad cursor: openclaw#137622 added the retirement mode as a review defense. Trust its paired owner; retain bounded rollover, redaction and legacy fallback.
- Fetch implementation ignoring AbortSignal: Matrix's removed outer timer defended fake-only behavior. Native request deadline/cancellation, parallel healthy-peer probes, response-body and loser cleanup remain.
- Artifact disappearing immediately after its successful own write: openclaw#92606/a5445ce41eb add the redundant access check, with no human disappearance report. Real write failures propagate; actual readers detect later deletion.
- Private Browser leaves receiving unnormalized values: openclaw#63977 owns external /act normalization; extraction openclaw#113771 retained mirror checks. Keep external fill repair openclaw#131231 and all effect authority. Invalid internal calls may fail at Playwright rather than a second validator.
- Unnormalized oversized/deep batches reaching the private executor: restored executor 1034ccb has no human bounds incident. Keep recursive ingress depth repair openclaw#120274 and total count bound openclaw#63977; remove duplicate executor depth plumbing.
- Abort firing between synchronous resetTransport checks: openclaw#126407 added synthetic lifecycle coverage. No async work intervenes, so keep entry and post-await invocation checks.
- Taxonomy file disappearing after successful parse: openclaw#91500/openclaw#92558 introduced reporting, not a human mid-report deletion incident. Finish with parsed facts; the next read notices deletion.

The named standalone session-memory backend and tests remain untouched.

Proof: fresh independent P0-P2 review scoped-clean after repairing a reproduced
false-coverage descendant-admission defect; targeted source graph types and
syntax-boundary lint pass; runtime/static cycles both zero; format/diff clean.
Browser focused owner/sibling cohort: 12 files, 194 tests pass.
Invocation/containment/staging: 3 files, 34 tests pass, including the reproduced
false-coverage regression. Both unchanged Gateway-child staging-cleanup cases
pass after retaining staging-directory creation before root metadata parsing.

Below-500 coordinator packet: 442 net production LOC removed (+198/-640).
No cleanup PR or merge claim. Full check-changed, type-aware package lint and
Telegram command-menu Gateway E2E remain unproven under host saturation.
The remaining full QA owner cohort was interrupted before assertions; not green.
Suppression inventory fails only on untouched UI rows, reproduced on clean main
a7fbdc2; no suppression allowance changed.

* refactor(browser,qa-lab): remove test-only execution indirection

Publish Chrome MCP handles synchronously and wait only for transport readiness.
Keep process identity, close settlement, waiter sharing and effect authority.
Remove character-eval callback injection and private projection/type mirrors;
reuse canonical lifecycle cancellation and timer bounds.

Best-effort tradeoffs accepted

- Delayed asynchronous MCP factory handles existed only through the test seam (2f7b3f8/openclaw#104601; extracted by openclaw#113114). Linked openclaw#103784 is a forced Delay launch/source-proof matrix, not a human actual-use incident. Production constructs the handle synchronously; readiness remains asynchronous and cancellable, and exact owned process cleanup still settles before replacement.
- Same-tick lifecycle completion and abort now follow the canonical SDK Promise.race ordering rather than a private listener implementation (openclaw#127761/71473724074, synthetic lifecycle qualification). Shared work is not cancelled; synchronous pre-abort and effect authority stay intact.
- A private already-clamped timer no longer repeats the SDK maximum check (e8241d3; centralized by ca3aad3). The same canonical grace helper caps the result, with no timeout change.

Character-eval test callbacks were never supplied by its sole production CLI
caller (46ad8dd; openclaw#92606). Tests now mock the actual suite/manual-lane owners.
Six private pwAi projections had only test consumers; canonical session exports
remain. Port reservation accepts the actual node:net.Server instead of a mirror.

Full-branch production reduction: 610 net lines (+241/-851), excluding tests,
fixtures, test-support, generated files and declarations. No public/config/SDK,
storage, protocol or dependency contract changes. Phase E remains untouched.

* fix(qa-lab): drop unproven cleanup paths and type standalone restorer

Restore character-eval and CLI runtime byte-for-byte to the cleanup base after
exact-head CI found concurrent mock bypass and captured-taxonomy failures.
Keep every original behavioral assertion; no retry, timeout or skip changes.
The local character replay was inconclusive, so drop its whole cleanup cluster
instead of waiting for host capacity. Restore CLI snapshot capture as well.

Declare the imported credential-restorer's receiver-free function contract.
The canonical exported function never uses this; no runtime guard or credential
validation changes. This fixes the typed unbound-method lint finding.

Branch production reduction is now 568 net lines (+229/-797), tests/fixtures/
test-support/generated/declarations excluded. Prior full autoreview remains
valid for this strict restoration subset; independent repair review confirms
exact base blobs and the type-only correction. Source-graph types, focused
syntax-boundary lint, formatting and diff checks pass.

* refactor(qa-lab): split pending Telegram credential cleanup

Restore the two Telegram files to current main for openclaw#173065. Park their rewrite and receiver-free lint contract on deslop/y13-telegram-userbot-credential-20261015 pending Test Server userbot proof with Convex-leased credentials. Coordinator waives the floor for the remaining 474 net production lines.
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