Skip to content

fix(qa): preserve monotonic gateway log cursors - #137622

Merged
vincentkoc merged 5 commits into
mainfrom
fix/qa-monotonic-gateway-log-cursors
Sep 4, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/qa-monotonic-gateway-log-cursors

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

QA scenarios could miss fresh Gateway logs after the bounded log collector truncated older output. The collector's mark is an absolute monotonic offset, but scenario code sliced that offset against a bounded recent-log snapshot whose indexes restart at zero.

Why This Change Was Made

The Gateway child now exposes a paired markLogs / readLogsSince surface backed by the collector's absolute coordinate system. The suite runtime uses it only when both methods exist and the mark is a nonnegative safe integer.

All six affected scenarios pass their cursor directly to readGatewayLogs(cursor) instead of slicing a bounded snapshot. Collector-owned reads preserve fresh bytes across truncation and independently redact only complete-line suffixes.

Fresh review found and repaired three connected boundary defects:

  • Mapping a raw cursor through an independently redacted prefix length could reconstruct a GitHub workflow command. The collector now discards the entire line when a cursor splits it, then independently redacts only subsequent complete lines.
  • An invalid or incomplete cursor API could fall back to offsets into a rolling bounded snapshot and stall forever after rollover. That path now returns the explicit full-snapshot sentinel and scans the current snapshot from zero.
  • The private restart-marker observer briefly used the public complete-line reader, which could hide its only marker after an unterminated prefix. That non-exposing boolean check now uses the raw collector suffix while scenario and diagnostic reads remain redacted.

User Impact

No product behavior changes. QA restart, media, model, and channel scenarios can reliably observe fresh Gateway output after more than 64 KiB of earlier logs without leaking cursor-split credentials or reconstructing workflow commands.

There is no configuration, schema, protocol, persistence, or changelog impact. The changed qa/scenarios/**/*.yaml files are executable scenario definitions, not persisted user or operator state, so no data migration applies.

Evidence

Root cause and regression contract

  • Pre-fix consumers called readGatewayLogs().slice(cursor).
  • cursor was the collector's absolute end offset, while readGatewayLogs() returned only its bounded recent snapshot.
  • After truncation advanced the snapshot origin, slicing by the obsolete absolute offset returned an empty string and hid fresh evidence.
  • The catalog regression rejects every readGatewayLogs().slice(...) form across the scenario pack.
  • Child regressions cover Bearer and Telegram credentials split at the cursor, a split ::error::warning::credential sequence, truncation through a credential-bearing line, bounded diagnostics, and fresh absolute reads.
  • Flow regressions cover the paired monotonic API, invalid marks, incomplete APIs, bounded snapshot rollover, and sentinel scanning.
  • Restart regression coverage proves the private marker remains visible after an unterminated prefix while the public redacted reader discards that split line.

Exact-head local proof

Authoritative head: 86b551d39a1e814d6c2415a4216cff17228aaf6d
Rebased parent: 2b5ee4c31b3e81aa0e25cfa3ec3a3f526135d033

  • Red regression on a8c6039844c: expected fresh line\n, received reconstructed ::warning::credential\nfresh line\n.
  • Focused QA owner suite: 3 files, 132 passed, 1 intentional skip.
  • Current-main owner plus sibling suite: 4 files, 156 passed, 1 intentional skip.
  • The prerequisite Code Mode fixture repair landed separately in fix(ci): restore lifecycle test reliability #138238 as e7fffcf7a0935ac4abdd6a0efa8bb4dc5a585e6b; its formerly failing catalog-abort file passes 10/10 on the composed main.
  • Proportional check-changed gate: passed, including extension typecheck, dead-export scan, lint, and import-cycle checks.
  • Scoped oxfmt, oxlint, and git diff --check: passed.
  • Fresh independent gpt-5.6-sol P0-P2 autoreview: scoped-clean.
  • All five PR commits have verified Git signatures after current-main composition.

Exact-head hosted proof

Prior repaired-head CI run: https://github.com/openclaw/openclaw/actions/runs/33858955689

  • security-fast: passed, including the npm production advisory surface.
  • checks-node-compact-small-6: passed.
  • Full a8c6039844c check set settled with 134 success, 42 skipped, 1 neutral, zero failed, and zero pending.
  • Intermediate 40ecd23358c CI exposed an unrelated documentation-reference failure. PR fix: keep Code Mode tasks running after tool failures #138044 repaired that current-main fixture to retained docs/plugins/building-plugins.md; the post-rebase catalog assertion now passes.
  • The subsequent live-main commit 245c5bac43653208bde0991496638b9048b147b1 changes only src/infra/outbound/message-action-runner.ts and has zero overlap with this PR.
  • Current main 975e8192f23bcd3023bf8373bbf161293bb9d982 has zero changed-path overlap with the 13-file PR delta after the rebased parent.
  • One fresh exact-head check graph for 86b551d39a1e is pending after the prerequisite repair and patch-identical rebase.

ClawSweeper disposition

  • Cursor-split redaction: fixed at the collector-owned read boundary by discarding split lines, with focused Bearer, Telegram, workflow-command, and truncation regressions.
  • Restart-marker liveness: the private non-exposing observer uses the raw collector suffix; all scenario-visible and diagnostic reads remain line-boundary redacted.
  • Security concern and missing changed-surface proof: resolved by the exact-head focused suite, extension typecheck, independent review, and hosted security gate.
  • Runtime growth: justified by one paired monotonic coordinate system plus collector-owned sanitization; incomplete legacy cursor surfaces now use one full-snapshot fallback instead of unsafe rolling offsets.
  • Legacy fallback review: all non-test standard, manual, and live scenario paths construct createQaGatewayChild, which always supplies both monotonic methods. The optional full-snapshot fallback remains compatibility/test-only; a focused P0-P2 re-review found no production path into it.
  • Data-model compatibility item: inapplicable because scenario YAML is executable QA configuration, not persisted schema or state.
  • Rank-up moves: completed; contextual redaction, the private restart exception, and focused regression coverage are present.

LOC

  • QA harness runtime: +107/-16
  • Tests: +172/-13
  • Scenario definitions: +8/-8
  • Total: +287/-37

@vincentkoc vincentkoc self-assigned this Sep 3, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 3, 2026 22:45
@vincentkoc
vincentkoc force-pushed the fix/qa-monotonic-gateway-log-cursors branch from 601882c to 96dd3b6 Compare September 3, 2026 22:52
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 9:08 AM ET / 13:08 UTC.

ClawSweeper review

What this changes

The PR gives QA scenarios paired monotonic Gateway-log cursors and collector-owned redacted reads so bounded log rollover does not hide fresh diagnostics.

Merge readiness

⛔ Blocked before merge - 2 items remain

The patch correctly moves absolute-cursor handling and redaction to the QA Gateway-log collector, and the previously raised split-line restart case is addressed. Keep this protected maintainer PR open until its exact-head required checks finish green.

Priority: P2
Reviewed head: 86b551d39a1e814d6c2415a4216cff17228aaf6d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has a coherent owner-boundary repair and focused regression coverage, with final hosted exact-head validation still pending.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored internal QA reliability repair is exempt from the external-contributor real-behavior-proof gate; the supplied focused regression and hosted-check evidence remains supplemental.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal QA reliability repair is exempt from the external-contributor real-behavior-proof gate; the supplied focused regression and hosted-check evidence remains supplemental.
Evidence reviewed 6 items Collector owner boundary: The collector retains an absolute end offset while bounding retained text; its new redacted reader drops cursor-split and rollover-partial lines before independently redacting the remaining suffix.
Runtime consumer: The scenario runtime uses the paired mark/read methods only together, passes valid absolute marks directly to the collector, and uses -1 only for a full legacy snapshot.
Scenario migration and regression coverage: The changed restart scenarios now pass their cursor to the read API instead of slicing a bounded snapshot; focused tests cover rollover, invalid paired APIs, split credentials, workflow commands, and the private restart observer.
Findings None None.
Security None None.

How this fits together

QA Lab launches an isolated Gateway child and exposes its diagnostic output to executable scenario assertions. Those assertions detect failures in restart, media, model, and channel flows before the QA suite reports a result.

flowchart LR
  A[Gateway child output] --> B[Bounded log collector]
  B --> C[Absolute log cursor]
  C --> D[Line-safe redacted read]
  D --> E[Scenario assertions]
  E --> F[QA suite result]
Loading

Before merge

  • Resolve merge risk (P1) - The exact-head check graph is still in progress, so the rebased final head does not yet have complete hosted validation.
  • Complete next step (P2) - Let the exact PR-head required checks complete green before merging.
Agent review details

Security

None.

PR surface

Source +91, Tests +159, Other 0. Total +250 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 4 107 16 +91
Tests 3 172 13 +159
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 6 8 8 0
Total 13 287 37 +250

Review metrics

Metric Value Why it matters
Production versus test delta QA runtime +91 net; tests +159 net; scenario definitions ±0 net The added runtime code centralizes the paired absolute-cursor and redaction boundary instead of retaining scenario-local offset arithmetic.

Stored data model

Persistent data-model change detected: serialized state: qa/scenarios/runtime/gateway-restart-inflight-run.yaml, serialized state: qa/scenarios/runtime/gateway-restart-multi-live.yaml. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the single collector-owned cursor/read boundary and merge only after the exact PR head has a green required check set.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the single collector-owned cursor/read boundary and merge only after the exact PR head has a green required check set.

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

Yes, source-reproducible: after retained output exceeds 64 KiB, the previous scenario pattern sliced an absolute collector mark against a zero-based bounded snapshot and could return no fresh logs. The focused regression tests encode that rollover path, although this read-only review did not execute them.

Is this the best way to solve the issue?

Yes. Pairing the mark with a collector-owned read fixes the coordinate mismatch at its owner and keeps credential/workflow-command sanitization out of individual scenarios.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d492a4b84f2d.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored internal QA reliability repair is exempt from the external-contributor real-behavior-proof gate; the supplied focused regression and hosted-check evidence remains supplemental.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 availability: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This repairs bounded QA diagnostic reliability without changing end-user Gateway behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored internal QA reliability repair is exempt from the external-contributor real-behavior-proof gate; the supplied focused regression and hosted-check evidence remains supplemental.

Evidence

What I checked:

  • Collector owner boundary: The collector retains an absolute end offset while bounding retained text; its new redacted reader drops cursor-split and rollover-partial lines before independently redacting the remaining suffix. (extensions/qa-lab/src/gateway-child-process.ts:97, 86b551d39a1e)
  • Runtime consumer: The scenario runtime uses the paired mark/read methods only together, passes valid absolute marks directly to the collector, and uses -1 only for a full legacy snapshot. (extensions/qa-lab/src/suite-runtime-flow.ts:202, 86b551d39a1e)
  • Scenario migration and regression coverage: The changed restart scenarios now pass their cursor to the read API instead of slicing a bounded snapshot; focused tests cover rollover, invalid paired APIs, split credentials, workflow commands, and the private restart observer. (extensions/qa-lab/src/suite-runtime-flow.test.ts:371, 86b551d39a1e)
  • Exact PR integration: The host-verified test merge has the pinned main base as first parent and this exact PR head as second parent; its result changes only the 13 QA Lab and scenario paths under review. (76e80638dba9)
  • Head provenance: The locally verified raw commit record identifies the exact review head and its recorded parent; this is branch provenance, not current-main feature-introduction attribution. (86b551d39a1e)
  • Codex boundary check: Direct sibling Codex source inspection found the app-server protocol boundary but no matching producer for the OpenClaw QA sentinel text; the patch consumes OpenClaw-owned Gateway logs rather than a Codex protocol or runtime contract. (41e22fee981a63b3698df7ed36bad393cda24715)

Likely related people:

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

Rank-up moves

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

  • Let the exact-head required checks settle green before merge.

Rating scale

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

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

Workflow

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

History

Review history (7 earlier review cycles)
  • reviewed 2026-09-03T23:09:37.981Z sha 96dd3b6 :: blocked before merge. :: none
  • reviewed 2026-09-04T01:34:40.044Z sha 96dd3b6 :: blocked before merge. :: none
  • reviewed 2026-09-04T08:58:50.266Z sha c8554ff :: blocked before merge. :: [P2] Preserve credential context before slicing fresh logs
  • reviewed 2026-09-04T09:41:57.951Z sha a8c6039844cbe68d44aab459ea0676d68ce46424 :: blocked before merge. :: none
  • reviewed 2026-09-04T10:43:14.696Z sha 40ecd23 :: blocked before merge. :: [P2] Keep raw reads for the private restart marker
  • reviewed 2026-09-04T11:01:19.506Z sha 40ecd23 :: blocked before merge. :: [P2] Keep raw reads for the private restart marker
  • reviewed 2026-09-04T11:24:27.651Z sha d8d1bf93c148bcecb24cd233d6d3d6f66562d09c :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/qa-monotonic-gateway-log-cursors branch from 96dd3b6 to c8554ff Compare September 4, 2026 08:19
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head a8c6039844cbe68d44aab459ea0676d68ce46424 repairs the prior cursor-split credential finding plus the independently found bounded-fallback liveness defect. Focused QA tests, extension typecheck, fresh P0-P2 autoreview, security-fast, checks-node-compact-small-6, and the full exact-head check set are green. The PR body contains the complete proof and disposition.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer disposition for exact head a8c6039844cbe68d44aab459ea0676d68ce46424:

  • Accept the +100 net QA-harness runtime growth. The added capability is the collector-owned absolute-cursor plus context-preserving redaction boundary; the fallback was compressed to one full-snapshot path. Further reduction would reintroduce scenario-local cursor translation or the credential-boundary defect.
  • Data-model compatibility proof is not applicable. The changed YAML files are executable QA scenario definitions; this PR changes no SQLite schema, persistent store, serialized runtime representation, migration, or upgrade contract.
  • The prior rank-up move is complete: contextual cursor-split redaction and focused regressions are present.

@vincentkoc
vincentkoc force-pushed the fix/qa-monotonic-gateway-log-cursors branch from a8c6039 to 40ecd23 Compare September 4, 2026 10:34
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head 40ecd23358cb6514a050e372c195be4ff58d11a0 replaces the unsafe raw-offset/redacted-prefix mapping with complete-line suffix redaction. The focused regression proves old head a8c6039844c reconstructed ::warning::credential; the corrected head passes 132 focused tests with 1 intentional skip, the proportional changed gate, and fresh P0-P2 autoreview. The PR body contains the exact evidence and dispositions.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 4, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact head 09a04ba09c4a2c04c2591b1d49820043eea7676f resolves the prior P2 by keeping raw collector reads only inside the private restart-marker observer, with a regression for an unterminated prefix. Public scenario and diagnostic reads still discard split lines before independent redaction. Focused tests remain 132 passed with 1 intentional skip; the proportional changed gate passed; final P0-P2 autoreview is scoped-clean. The PR body contains the exact proof and legacy-fallback disposition.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

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

Re-review progress:

@vincentkoc
vincentkoc force-pushed the fix/qa-monotonic-gateway-log-cursors branch from 09a04ba to d8d1bf9 Compare September 4, 2026 11:14
@vincentkoc

Copy link
Copy Markdown
Member Author

Maintainer disposition for exact head d8d1bf93c148bcecb24cd233d6d3d6f66562d09c:

@vincentkoc
vincentkoc force-pushed the fix/qa-monotonic-gateway-log-cursors branch from d8d1bf9 to 86b551d Compare September 4, 2026 12:59
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 4, 2026
@vincentkoc
vincentkoc merged commit 6f841c6 into main Sep 4, 2026
189 checks passed
@vincentkoc
vincentkoc deleted the fix/qa-monotonic-gateway-log-cursors branch September 4, 2026 13:15
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
* fix(qa): preserve monotonic gateway log cursors

* fix(qa): redact gateway logs across cursor boundaries

* fix(qa): keep invalid log cursors live

* fix(qa): discard split gateway log lines

* fix(qa): keep restart marker reads private
steipete added a commit that referenced this pull request Oct 15, 2026
#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: #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.

* 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 (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.

* 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 #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.
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

Labels

extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant