Skip to content

fix(ci): align release validation fixtures - #117494

Merged
vincentkoc merged 9 commits into
mainfrom
fix-release-validation-e2e-20260801
Aug 1, 2026
Merged

vincentkoc merged 9 commits into
mainfrom
fix-release-validation-e2e-20260801

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

  • forward-port the validated beta release E2E fixture repairs onto current main
  • preserve doctor startup evidence when state initialization happens before integrity reporting
  • align embedded-agent, SDK package, Docker setup, QA, and model-list fixtures with current runtime contracts
  • accept durable Code Mode exec/wait transcript evidence for nested plugin tool calls
  • remove stale live-test config (cron.store) and add the required explicit agent roster

Why

The immutable full release-validation run for 355295bfef4abadeb94286dce2b911d12531b98b exposed deterministic failures in the normal E2E, plugin prerelease, Docker update, and live-plugin-tool lanes. This PR ports the release-branch repairs to main and adds the main-only forward-port adjustments required by newer registry and config contracts.

No release or publish action is included.

Proof

Follow-up

After merge, freeze the exact new main SHA and rerun the full non-publishing release validation (rerun_group=all).

@openclaw-barnacle openclaw-barnacle Bot added channel: whatsapp-web Channel integration: whatsapp-web gateway Gateway runtime scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling extensions: qa-lab labels Aug 1, 2026
@vincentkoc vincentkoc self-assigned this Aug 1, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Aug 1, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 1, 2026 16:11
@vincentkoc
vincentkoc requested a review from a team as a code owner August 1, 2026 16:11
@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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 12:34 PM ET / 16:34 UTC.

ClawSweeper review

What this changes

The branch aligns release-validation fixtures with current agent, session, Docker, model, and channel contracts; it also records when Doctor initializes a previously missing state directory during startup.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This maintainer-authored PR remains necessary: current main does not contain its head commit, while the reusable release E2E job still lacks the private-QA build flags the branch adds. The patch has focused Testbox and CI evidence and no discrete correctness defect was established, but enabling those artifacts also affects scheduled live validation, so a maintainer should confirm that caller scope before merge.

Priority: P2
Reviewed head: 16871bf94525265b5bddda1a0efb289f4c2f1e12
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The branch has substantive focused validation and no established patch defect, with one maintainer-owned reusable-workflow scope decision remaining.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This MEMBER-authored CI and fixture repair is exempt from the external-contributor proof gate; its PR body nevertheless provides focused Testbox output and an Actions run for the changed validation paths.
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 CI and fixture repair is exempt from the external-contributor proof gate; its PR body nevertheless provides focused Testbox output and an Actions run for the changed validation paths.
Evidence reviewed 5 items Current-main workflow gap: Current main's repository-E2E job builds with only the Vitest worker limit; the two private-QA environment flags are absent, so the branch's central workflow change is not already implemented on main.
Workflow caller scope: The reusable workflow is called by release checks and scheduled live checks with repository E2E enabled; package acceptance and plugin prerelease callers disable that job. This makes the added build flags scoped to the repository-E2E job, but not solely to release runs.
Doctor repair provenance: The branch commit introducing the Doctor startup-state fact changes the health-flow owner, state-integrity reporter, and focused E2E coverage together.
Findings None None.
Security None None.

How this fits together

The reusable release-validation workflow builds a distribution and runs repository E2E checks for release and scheduled-live callers. Its fixtures exercise runtime contracts across agents, channels, Docker setup, and package artifacts, while Doctor reports the state-directory condition discovered at startup.

flowchart LR
  A[Release and scheduled callers] --> B[Reusable validation job]
  B --> C[Private QA-capable build]
  C --> D[Repository E2E fixtures]
  E[Doctor startup] --> F[State directory fact]
  F --> G[State integrity report]
Loading

Decision needed

Question Recommendation
Should scheduled live validation, in addition to release validation, intentionally build private QA artifacts whenever it invokes the reusable repository-E2E job? Confirm shared repository-E2E scope: Retain the job-level flags so release and scheduled-live repository E2E use the same QA-capable artifact, then rely on exact-head validation after merge.

Why: The job-level environment change is mechanically bounded by include_repo_e2e, but current callers show that this includes scheduled live validation as well as release checks; that operational scope is a maintainer policy choice.

Before merge

  • Resolve merge risk (P1) - The two private-QA build flags alter the artifact assembled by a reusable job also used by scheduled live validation; the focused proof supports release validation, but maintainer confirmation is still needed that this broader caller set is intended.
  • Resolve merge risk (P1) - A full local base-to-head diff was unavailable because the partial clone could not fetch missing promisor objects after DNS resolution failed; no line-level defect is inferred from that infrastructure limitation.
Agent review details

Security

None.

PR surface

Source +75, Tests +101, Config +2, Other +13. Total +191 across 42 files.

View PR surface stats
Area Files Added Removed Net
Source 10 110 35 +75
Tests 27 472 371 +101
Docs 0 0 0 0
Config 1 2 0 +2
Generated 0 0 0 0
Other 4 24 11 +13
Total 42 608 417 +191

Review metrics

Metric Value Why it matters
Private QA build flags 2 added to the reusable repository-E2E job These flags change which private QA artifacts the build emits for every caller that enables repository E2E.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-config-snapshot.test-helpers.ts, migration/backfill/repair: src/commands/doctor-state-integrity.ts, migration/backfill/repair: src/commands/doctor.e2e-harness.ts, migration/backfill/repair: src/commands/doctor.fast-path-mocks.ts, migration/backfill/repair: src/commands/doctor.warns-state-directory-is-missing.e2e.test.ts, migration/backfill/repair: src/flows/doctor-health-contribution-runners.state.ts, and 9 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Confirm the shared artifact contract (recommended)
    Verify that scheduled live validation is meant to receive the same private QA build flags as release repository E2E, then merge with exact-head CI.
  2. Split caller behavior
    Gate the two environment flags behind an explicit release-only input if scheduled live checks should retain the public-only build.

Technical review

Best possible solution:

Keep the fixture and Doctor repairs together, confirm that every repository-E2E caller should build private QA artifacts, then merge against refreshed main and run the planned exact-head non-publishing full release validation.

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

No high-confidence local reproduction was run because this read-only checkout could not materialize every partial-clone diff object. Current main visibly lacks the workflow flags, and the PR body supplies focused Testbox and GitHub Actions evidence for the affected validation paths.

Is this the best way to solve the issue?

Yes, conditionally: the PR repairs the owning reusable workflow and updates fixtures to the canonical structured-session and state-reporting contracts. The remaining question is whether the job-level artifact change should apply to scheduled live validation as well as release validation.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The PR repairs bounded release-validation and diagnostic behavior without evidence of an active user-facing outage.
  • merge-risk: 🚨 automation: A reusable CI job now changes the build artifact contract for both release and scheduled-live repository E2E callers.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 CI and fixture repair is exempt from the external-contributor proof gate; its PR body nevertheless provides focused Testbox output and an Actions run for the changed validation paths.

Evidence

What I checked:

  • Current-main workflow gap: Current main's repository-E2E job builds with only the Vitest worker limit; the two private-QA environment flags are absent, so the branch's central workflow change is not already implemented on main. (.github/workflows/openclaw-live-and-e2e-checks-reusable.yml:882, e07d75dc091c)
  • Workflow caller scope: The reusable workflow is called by release checks and scheduled live checks with repository E2E enabled; package acceptance and plugin prerelease callers disable that job. This makes the added build flags scoped to the repository-E2E job, but not solely to release runs. (.github/workflows/openclaw-release-checks.yml:809, e07d75dc091c)
  • Doctor repair provenance: The branch commit introducing the Doctor startup-state fact changes the health-flow owner, state-integrity reporter, and focused E2E coverage together. (src/flows/doctor-health.ts:16, 8d414fb0c490)
  • Existing workflow ownership: Blame attributes the repository-E2E job shape, including its caller-controlled condition and build step, to the recent release-validation work by Dallin Romney; the branch changes that established surface rather than adding a parallel workflow. (.github/workflows/openclaw-live-and-e2e-checks-reusable.yml:882, fb9c8e74e6)
  • Inspection limitation: The checkout is a partial clone and some requested historical diff objects could not be materialized because DNS resolution for the promisor remote failed. Review of the broad branch therefore relies on supplied PR patches, locally available branch objects, current-main source, and available history rather than a complete local three-way diff.

Likely related people:

  • vincentkoc: Authored the PR's Doctor, release-fixture, and structured-session-target changes, and also authored the current-main commit at review time. (role: recent area contributor; confidence: high; commits: 8d414fb0c490, 944a9b3c8751, 16871bf94525; files: src/flows/doctor-health.ts, src/commands/doctor-state-integrity.ts, src/cron/isolated-agent/run-executor.ts)
  • Dallin Romney: Git blame ties the existing repository-E2E job structure and cron executor call shape to this recent release-validation and scheduled-agent surface. (role: feature-history contributor; confidence: medium; commits: fb9c8e74e6; files: .github/workflows/openclaw-live-and-e2e-checks-reusable.yml, src/cron/isolated-agent/run-executor.ts)

Rank-up moves

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

  • Confirm the scheduled-live caller scope for private QA artifacts.
  • Rebase or refresh against current main and run the planned exact-head non-publishing release validation.

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 (2 earlier review cycles)
  • reviewed 2026-08-01T16:18:38.588Z sha 069af7f :: needs maintainer review before merge. :: none
  • reviewed 2026-08-01T16:27:04.230Z sha 944a9b3 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc merged commit 263741b into main Aug 1, 2026
125 of 127 checks passed
@vincentkoc
vincentkoc deleted the fix-release-validation-e2e-20260801 branch August 1, 2026 16:39
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

pull Bot pushed a commit to soitun/moltbot that referenced this pull request Aug 1, 2026
* origin/main: (44 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
abdulrahman305 pushed a commit to qenex-ai/openclaw that referenced this pull request Aug 1, 2026
* origin/main: (41 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* fix(release): align beta 6 e2e fixtures

* fix(doctor): preserve missing state startup signal

* test(release): align beta e2e contracts

* test(agents): use canonical empty auth store

* test(agents): isolate prompt cooldown scheduling

* test(release): align main validation fixtures

* test(release): accept Code Mode plugin tool evidence

* fix(test): repair release validation checks

* test(cron): assert structured session targets
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (44 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (27 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main: (41 commits)
  fix(plugins): compare authoring metadata by canonical JSON semantics (openclaw#117486)
  fix(doctor): reject contradictory lint check selectors (openclaw#117495)
  fix(anthropic): honor configured model pricing (openclaw#117275)
  refactor(plugins): reuse scoped loader for capability discovery (openclaw#117373)
  refactor(test): derive changed tooling routes (openclaw#117407)
  fix(kova): clarify extension memory attribution (openclaw#117500)
  fix(imessage): sanitize private context on every outbound path (openclaw#117501)
  fix(ci): align release validation fixtures (openclaw#117494)
  fix(talk): preserve owner authorization in realtime consults (openclaw#114163)
  fix(ui): surface aborted-run diagnostics (openclaw#117497)
  perf(models): skip Ollama row runtime loading (openclaw#117465)
  fix(cli): report user profile command outcomes (openclaw#117466)
  fix(active-memory): detect Chinese recall intent in escalate mode (openclaw#117338) (openclaw#117419)
  fix(workboard): ignore caller-supplied archivedAt when creating a card (openclaw#116412)
  fix(models): avoid waiting on promotions before listing models (openclaw#117322)
  refactor(plugins): inherit shared package boundary settings (openclaw#117474)
  fix(systemd): parse all inline environment assignments (openclaw#117484)
  feat(web-fetch): add tools.web.fetch.headers for operator request headers (openclaw#115545)
  fix(qa): Slack progress lane misses successful delivery (openclaw#117391)
  refactor: deduplicate Codex prompt snapshot fixtures (openclaw#117476)
  ...
obviyus added a commit that referenced this pull request Oct 12, 2026
Closes #169066

## What Problem This Solves

Fixes slow, misleading **Test connection** results that count model/credential preparation and internal agent-session work as provider latency.

## User Impact

Connection checks make a fresh request without creating an agent session. Each credential shows a labeled **Request round-trip**; the ambiguous aggregate header timing is gone. Empty or thinking-only responses fail the format check, timeouts remain timeouts, and provider diagnostics remain useful and secret-redacted.

## Why This Change Was Made

The original probe in [40181af](40181af) exercised a real provider request through an embedded agent. [#117494](#117494) added the structured internal session required by that runtime. Connectivity checks can now use the existing isolated-completion owner instead of paying for that agent-session lifecycle.

The deliberately isolated, read-only direct-credential generation from [#125816](#125816) stays intact. Every credential still uses raw OpenClaw transport, preserving [#121500](#121500). OAuth refresh remains with its normal persistent owner, including the historical-peer fencing and settlement from [#168957](#168957); no new cooldown/quota writes are introduced. Known configured models no longer trigger unnecessary catalog preparation.

Checked Sarah's [#159246](#159246): its Agents API restricted-session contract and runtime defaults are unchanged. No overlap with Pash's changes.

## Evidence

- Command/target/resource regressions: **38 passed**. Includes direct and stored credentials, immutable API-key auth state, expired OAuth refreshing once into the real shared store with owner/peer fences and peer settlement, and valid OAuth causing no credential/state write.
- Isolated-completion suite: **50 passed**; Gateway probe suite: **13 passed**.
- Models view: **38 passed**; i18n verification passed; Models browser E2E: **7 passed**.
- Discriminating negative control: removing the output/timeout/diagnostic fixes makes empty and thinking-only responses incorrectly report `ok`, aborted timeout output report `unknown`, and provider-detail assertions fail.
- Mock-export gate passes after six justified isolation annotations and removal of six retired baseline entries.

### Paired timing comparison

Real Gateway and Control UI button clicks against the same synthetic HTTP provider with a 250 ms response delay. Baseline `cbba7e2e2ef` versus candidate `994f04547a9`; five alternating measured samples per row, excluding one warmup per lane. These are local stub measurements, not live-provider speed claims.

| Scenario | Median full probe RPC, before → after | Median displayed credential duration, before → request-only after |
| --- | ---: | ---: |
| Successful response | 2,103 → 738 ms | 1,532 → 256 ms |
| HTTP 401 | 1,073 → 389 ms | 929 → 256 ms |

The stub's median HTTP duration was 251–253 ms. Each success made one HTTP request; the old 401 path made two, while the new isolated check made one. Full probe time still includes setup; it is not shown as provider request time.

### Desktop

Before — unlabeled aggregate and repeated credential timing:

![Desktop before: unlabeled aggregate timing](https://github.com/user-attachments/assets/026b85b9-4e7c-4c72-b2c9-401a4bdaee3a)

After — labeled per-credential request timing, no aggregate header duration:

![Desktop after: labeled per-credential request timing](https://github.com/user-attachments/assets/82c30402-0975-4d34-9584-0d97aa2d611a)

### Mobile

![Mobile before: unlabeled aggregate timing](https://github.com/user-attachments/assets/34770f2d-d1e1-4bab-b9dd-f3ccfaabf244)

![Mobile after: labeled per-credential request timing](https://github.com/user-attachments/assets/a54f20d2-f838-4cda-9cc6-d13a2dc72f08)

### CI context

The initial CI run also hit the main-owned `eager-import-closure.test.ts` duplicate-inventory failure. The same three duplicate paths are demonstrated on clean main `44f538c1855d` in [the existing main reproduction](#169511 (comment)), and in [this PR's failing job](https://github.com/openclaw/openclaw/actions/runs/38198084932/job/114645376204). This PR does not modify that test, wrapper inventory, or those source files.

Merge danger: two-way door. Reverting restores the old probe path without a schema or configuration migration. Blast radius is model connection diagnostics in the CLI and Control UI; ordinary chat and other runtime adapters are unchanged.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…#169554)

Closes openclaw#169066

## What Problem This Solves

Fixes slow, misleading **Test connection** results that count model/credential preparation and internal agent-session work as provider latency.

## User Impact

Connection checks make a fresh request without creating an agent session. Each credential shows a labeled **Request round-trip**; the ambiguous aggregate header timing is gone. Empty or thinking-only responses fail the format check, timeouts remain timeouts, and provider diagnostics remain useful and secret-redacted.

## Why This Change Was Made

The original probe in [5083dd5](openclaw@5083dd5) exercised a real provider request through an embedded agent. [openclaw#117494](openclaw#117494) added the structured internal session required by that runtime. Connectivity checks can now use the existing isolated-completion owner instead of paying for that agent-session lifecycle.

The deliberately isolated, read-only direct-credential generation from [openclaw#125816](openclaw#125816) stays intact. Every credential still uses raw OpenClaw transport, preserving [openclaw#121500](openclaw#121500). OAuth refresh remains with its normal persistent owner, including the historical-peer fencing and settlement from [openclaw#168957](openclaw#168957); no new cooldown/quota writes are introduced. Known configured models no longer trigger unnecessary catalog preparation.

Checked Sarah's [openclaw#159246](openclaw#159246): its Agents API restricted-session contract and runtime defaults are unchanged. No overlap with Pash's changes.

## Evidence

- Command/target/resource regressions: **38 passed**. Includes direct and stored credentials, immutable API-key auth state, expired OAuth refreshing once into the real shared store with owner/peer fences and peer settlement, and valid OAuth causing no credential/state write.
- Isolated-completion suite: **50 passed**; Gateway probe suite: **13 passed**.
- Models view: **38 passed**; i18n verification passed; Models browser E2E: **7 passed**.
- Discriminating negative control: removing the output/timeout/diagnostic fixes makes empty and thinking-only responses incorrectly report `ok`, aborted timeout output report `unknown`, and provider-detail assertions fail.
- Mock-export gate passes after six justified isolation annotations and removal of six retired baseline entries.

### Paired timing comparison

Real Gateway and Control UI button clicks against the same synthetic HTTP provider with a 250 ms response delay. Baseline `b372edb6424` versus candidate `994f04547a9`; five alternating measured samples per row, excluding one warmup per lane. These are local stub measurements, not live-provider speed claims.

| Scenario | Median full probe RPC, before → after | Median displayed credential duration, before → request-only after |
| --- | ---: | ---: |
| Successful response | 2,103 → 738 ms | 1,532 → 256 ms |
| HTTP 401 | 1,073 → 389 ms | 929 → 256 ms |

The stub's median HTTP duration was 251–253 ms. Each success made one HTTP request; the old 401 path made two, while the new isolated check made one. Full probe time still includes setup; it is not shown as provider request time.

### Desktop

Before — unlabeled aggregate and repeated credential timing:

![Desktop before: unlabeled aggregate timing](https://github.com/user-attachments/assets/026b85b9-4e7c-4c72-b2c9-401a4bdaee3a)

After — labeled per-credential request timing, no aggregate header duration:

![Desktop after: labeled per-credential request timing](https://github.com/user-attachments/assets/82c30402-0975-4d34-9584-0d97aa2d611a)

### Mobile

![Mobile before: unlabeled aggregate timing](https://github.com/user-attachments/assets/34770f2d-d1e1-4bab-b9dd-f3ccfaabf244)

![Mobile after: labeled per-credential request timing](https://github.com/user-attachments/assets/a54f20d2-f838-4cda-9cc6-d13a2dc72f08)

### CI context

The initial CI run also hit the main-owned `eager-import-closure.test.ts` duplicate-inventory failure. The same three duplicate paths are demonstrated on clean main `1abe83478663` in [the existing main reproduction](openclaw#169511 (comment)), and in [this PR's failing job](https://github.com/openclaw/openclaw/actions/runs/38198084932/job/114645376204). This PR does not modify that test, wrapper inventory, or those source files.

Merge danger: two-way door. Reverting restores the old probe path without a schema or configuration migration. Blast radius is model connection diagnostics in the CLI and Control UI; ordinary chat and other runtime adapters are unchanged.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: whatsapp-web Channel integration: whatsapp-web commands Command implementations docker Docker and sandbox tooling extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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