Skip to content

fix: avoid premature timeouts when completing native AI setup - #1582

Merged
karkarl merged 4 commits into
mainfrom
karkarl-native-gateway-timing
Oct 2, 2026
Merged

karkarl merged 4 commits into
mainfrom
karkarl-native-gateway-timing

Conversation

@karkarl

@karkarl karkarl commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes premature AI-ready completion and post-restart destination timeouts when successful native connection, recovery and model verification take longer than the previous combined deadlines.

User Impact

Users get separate bounded completion phases and localized timeout guidance while exact model, route, device, session and listener ownership remain mandatory. An unused destination handle still expires after five minutes. First exclusive acquisition grants one non-renewable execution window shared by explicit retries and process restarts.

Installed-package blocker remains: MSIX 2026.9.700.0 at packaging commit 133deeb1a5efac2bcbc6564c90c038a999e6e842 returns exit 1 for Starting after 90 seconds and omits structured Gateway state from that response. Pending status does not attest launch identity. This PR still rejects that ambiguous failure. Conditional polling fixtures do not establish support for that installed contract. Draft pending upstream packaging and current-head native/UI proof.

Why This Change Was Made

The chooser separates a 30-second page drain from six-minute verification. Authorization can start/roll back its owned runtime; provider writes and finalization are excluded from that deadline. Successful finalization remains one-shot.

SetupNativeCompletionTiming centralizes two 210-second authenticated connection/authorization phases, a 210-second join of already-admitted Local AI recovery, 150 seconds for exact-model verification including its existing 120-second RPC, and 30 seconds for navigation. Total execution ceiling: 810 seconds. Underlying owner failures or shorter caller deadlines still win.

SetupDashboardHandoffStore retains five-minute unused admission and atomically persists execution start and absolute expiry under its exclusive file lock. Retries cannot refresh either value. Malformed, expired, interrupted in-flight and legacy retry records without execution provenance fail closed. The launcher consumes only after fresh authority checks and successful presentation. Gateway credential lifetimes are unchanged.

IsolatedGatewayRuntime polls only after a successfully acknowledged own start. The 180-second start/readiness budget permits a bounded ten-second confirmation allowance after late acknowledgement, at most 190 seconds for start/status and always subordinate to the caller deadline. A pending-status/listener transition gets one fresh status recheck, not another Start. Only fresh Running plus unchanged complete port/process attribution can succeed. Terminal states, unattributed listeners and identity drift fail closed.

Native credential reauthorization now has 210 seconds; non-native five-second behavior is unchanged. Typed phase diagnostics preserve safe startup messages, localize specific completion timeouts and log only exception type/finite phase. The coordinator's aggregate deadline uses neutral readiness guidance rather than incorrectly blaming inference.

Docs pin the needed upstream pending-start/launch-identity/guarded-stop contract. Gateway 9.4 success versus 9.7 failure is correlation, not a controlled regression measurement. Local AI ownership recovery remains separate.

Evidence

Deterministic fixtures cover 275-second verification and 745-second recovery/reconnection/verification plus 25-second navigation, reaching the destination exactly once. Receipt tests cover concurrent first acquisition, unchanged deadlines across restart/retries, malformed/legacy records, expiry, backward clocks and late callbacks. Runtime tests cover 68 successive two-second polls, cancellation during awaited start/status, late acknowledgement, a safe listener-transition recheck and rejected attribution drift.

Actual runtime/authorizer composition succeeds with 197 seconds of preflight/start/confirmation/inspection, while slower preflight correctly hits the outer 210-second deadline and rolls back. Native reconnect tests allow 187 seconds and reject deadline expiry, cancellation and record drift. Real local fixture Gateway/manager tests exercise verifier phase cancellation and subsequent successful exact-model verification. Six-locale presentation contracts reject arbitrary exception-message rendering. None of these fixtures starts the installed Gateway.

Hanselman verdict: independent Claude Opus 5.5 and GPT-6 Astra found no HIGH/CRITICAL regression. All actionable Companion findings are addressed in ac86c3a9 and 8d8fd60c; the disputed support claim and read-only wording were clarified. Narrow Opus re-review found no blocking/HIGH/MEDIUM defects. Its two LOW notes were addressed by real deadline-composition tests/documentation and neutral aggregate timeout labeling. Source review does not substitute for native/UI proof.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-11-arm64: native startup/completion; Release ARM64 build passed, real native delayed-start/completion not verified.
  • windows-wsl-mxc: required setup regression proof. Current head blocked by active user manual testing. Baseline 2b44d33 passed 18/18; that is not current-head proof.
  • windows-wsl-gateway-e2e: current head needs coordinated isolated Gateway setup/pairing/invocation proof; same shared-host blocker.
  • windows-winui-interactive: current-head visible completion/recovery/cold navigation and timeout guidance remain unverified.

Validation

Final source: 8d8fd60c3cecfe6293b0acff53ad9b5c3a47d96c. OPENCLAW_REPO_ROOT set to the isolated worktree; Tray settings isolated. Tests actually ran, sequentially.

  • powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1: previous attempt BLOCKED at Debug WinUI output copy by user-driven manual app PID 15008. App was not stopped. Full Release build below used unlocked output.
  • powershell -NoProfile -ExecutionPolicy Bypass -File .\build.ps1 -Configuration Release: PASS, all five projects, ARM64, final sources.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --logger "trx;LogFileName=Shared-all-flags-closeout.trx" --results-directory .\TestResults\Timing --verbosity quiet: PASS, 4222 passed, 35 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --logger "trx;LogFileName=Tray-all-flags-closeout.trx" --results-directory .\TestResults\Timing --verbosity quiet: PASS, 3885 passed, 0 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore --logger "trx;LogFileName=Connection-all-flags-closeout.trx" --results-directory .\TestResults\Timing --verbosity quiet: PASS, 1526 passed, 5 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore --logger "trx;LogFileName=SetupEngine-all-flags-closeout.trx" --results-directory .\TestResults\Timing --verbosity quiet: PASS, 2214 passed, 1 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore --filter FullyQualifiedName~NativeGatewaySetupConnectionTests --logger "trx;LogFileName=NativeConnection-all-flags-rerun.trx" --results-directory .\TestResults\Timing --verbosity quiet: PASS, 27 passed, 0 failed.
  • powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\validate-mxc-e2e.ps1 -NoBuild: NOT RERUN for this head. Shared-host manual-test slot remains held; no app/service was stopped to obtain it. Baseline 2b44d33 strict run passed 18/18 with no skips and fixture teardown exit 0.

The preceding full SetupEngine run failed one case with the previously observed FixtureGatewayServer.CloseConnectionsAsync disposed-semaphore teardown race. All 27 native connection fixture tests then passed, followed by another complete build and all four full suites passing without source changes. Earlier build-contention failures also passed sequential reruns. Final local evidence: TestResults\Timing\*-all-flags-closeout.trx; these are not uploaded artifact links.

Real Behavior Proof

  • Environment tested: Windows ARM64, isolated unit/integration fixtures and Release build; no installed Companion/Gateway/Local AI mutation.
  • PR head or commit tested: 8d8fd60c3cecfe6293b0acff53ad9b5c3a47d96c for automated fixtures/build only.
  • Exact steps or command run: the full build and test commands above, including actual local fixture Gateway/manager phase-token tests.
  • Evidence after fix: full suites passed; slow composed handoff fixtures navigate once; leases cannot renew or replay; actual runtime/authorizer allows a 197-second path but cancels at its outer limit; invalid listener ownership fails closed.
  • Observed result: automated evidence supports bounded timing and ownership invariants. Current-head real native completion and visible UI behavior are NOT VERIFIED.
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A; no external artifacts or screenshots attached.
  • Not verified or blocked: current-head strict MXC and interactive/native proof because user-driven manual apps still hold the shared host. Baseline manual setup reached a separate Local AI ownership rejection before native completion. Baseline strict WSL MXC 18/18 is historical regression evidence only. Installed ambiguous 90-second failed-start contract remains upstream-blocked. Cold navigation within its 30-second phase, recovery/restart destination handoff, localized timeout rendering and controlled 9.4/9.7 attribution remain unverified. Original external autoreview CLI was unavailable; app-native dual-model review did run.

Security Impact

  • New permissions or capabilities? (Yes/No): No
  • Secrets or tokens handling changed? (Yes/No): Yes, only the opaque profile-local completion receipt gains persisted execution timing. Gateway/device tokens and their lifetimes are unchanged.
  • New or changed network calls? (Yes/No): No
  • Command or tool execution surface changed? (Yes/No): No new surface; acknowledged startup can repeat read-only package status calls.
  • Data access scope changed? (Yes/No): No
  • If any answer is Yes, explain the risk and mitigation: Active execution may last up to 810 seconds after acquisition, but unused admission remains five minutes. Exclusive lease, immutable deadline, explicit retry, exact route/device/session/model proof, cancellation and single-use consumption remain mandatory. Malformed or provenance-less records cannot gain time. Longer native reauthorization preserves record/generation checks; diagnostics use fixed safe text and finite phases, never raw command output or arbitrary exception messages.

Compatibility and Migration

  • Backward compatible? (Yes/No): Partially. Legacy unused records remain admissible only within their original five minutes; legacy retry/in-flight records lacking execution provenance are rejected, never renewed. No new packaging fields are assumed.
  • Config or environment changes? (Yes/No): No user configuration changes; only transient handoff receipt metadata changes.
  • Migration needed? (Yes/No): No automatic migration of authority.
  • If yes, list the exact upgrade steps: N/A. A rejected legacy handoff requires fresh setup verification. The installed pending-start failure requires a separately agreed packaging contract update, not a settings reset.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

The user-requested verdict is posted above; actionable Companion findings are implemented. This is a same-repository PR. GitHub rejected enabling the fork-collaboration flag with HTTP 422: "Fork collab can only be enabled on cross-repo pull requests." The template's maintainer-edit flag is therefore not applicable here.

Bound acknowledged owned startup polling without relaxing listener provenance. Separate previous-page drain from read-only exact-model proof and allow native handoff startup overhead. Document the installed package's ambiguous pending-start contract blocker.

Co-authored-by: Copilot App <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed October 2, 2026, 3:27 AM ET / 07:27 UTC (Revision 7).

ClawSweeper review

What this changes

The branch gives native AI setup separate readiness deadlines, persists a non-renewable destination handoff window, and adds localized timeout guidance and regression tests.

Merge readiness

⛔ Blocked before merge - 4 items remain

The timing fix remains necessary on current main, and the merged recovery PR does not supersede it. No discrete blocking code defect was found, but the previous upgrade-compatibility decision and repository-required runtime proof remain unresolved.

Priority: P2
Reviewed head: 1fbca3177ecaa8d8013a4fc929191a0b1ef7634b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation and reported regression validation are useful, but runtime coverage and persisted-state upgrade readiness remain incomplete.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 10 items Repository policy: Read the complete root AGENTS.md and the applicable proof-validation skill. No additional ancestor AGENTS.md files were found under the changed source, test, or documentation paths; .agents/maintainer-notes is absent. Current-head native/UI evidence and strict MXC validation affect merge readiness. No build or tests were executed during this read-only review.
Pinned introduced changes: Inspected the introduced delta from pinned base da8f98a to exact head 1fbca31. The supplied test merge is marked stale and was not used to infer removal of current-main behavior.
Current main still has the restrictive deadline: Fetched main retains one 30-second deadline across page drain and verification, and its destination launcher retains the 4.5-minute attempt ceiling. The central timing improvement is therefore still missing from main; no merged fixing PR or fixing release was established.
Findings None None.
Security None None.

How this fits together

Windows Companion verifies the selected Gateway and AI model before finishing onboarding and opening the selected app destination. After a restart, a profile-local handoff record carries that selection through fresh connection, ownership, model, and navigation checks.

flowchart TD
 A[Verified AI selection] --> B[Completion chooser]
 B --> C[Persisted destination handoff]
 C --> D[Exclusive bounded execution]
 D --> E[Gateway and model verification]
 E --> F{Authority still matches?}
 F -->|Yes| G[Open destination and consume handoff]
 F -->|No or timeout| H[Visible recovery guidance]
Loading

Decision needed

Question Recommendation
May upgrading reject settled legacy retry handoffs, provided users can obtain fresh AI verification entirely through the app? Approve rejection with visible recovery: Retain the fail-closed rule after demonstrating that an upgraded user can return to AI setup and complete fresh verification through the app.

Why: The new persisted execution provenance intentionally changes an existing retry contract; rejection tests and contributor documentation do not establish accepted user impact or successful recovery.

Before merge

  • Resolve merge risk (P1) - Upgrading rejects previously usable settled legacy retry records and clears their restart recovery path. Explicit acceptance and demonstrated in-product return to fresh AI verification remain unresolved.
  • Resolve merge risk (P2) - Current-head native startup/completion, visible WinUI recovery and timeout guidance, strict MXC, and coordinated Gateway proof remain unverified under the repository's scoped validation requirements.
  • Complete next step (P2) - Resolve the legacy retry upgrade decision and provide current-head fresh-install, upgrade-recovery, native/WinUI, strict MXC, and coordinated Gateway evidence before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test growth production +242/-36 (net +206); tests +961/-18 (net +943) Production growth has a stated purpose in timing, persisted execution provenance, and localized diagnostics, with substantial regression coverage.

Merge-risk options

Maintainer options:

  1. Approve and prove upgrade recovery (recommended)
    Explicitly accept legacy retry rejection and demonstrate fresh-install completion plus recovery from a previous-format retry record through the app.
  2. Retain bounded legacy compatibility
    Preserve legacy retries only within their original expiry, with fresh verification and focused compatibility coverage.

Technical review

Best possible solution:

Keep finite phase budgets and fresh authority checks, with an approved handoff upgrade contract and a visible app path for obtaining new verification when an old retry record is rejected.

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

Yes, from source: current main shares a 30-second deadline across page drain and model verification, so otherwise successful work exceeding that combined limit is cancelled. Deterministic regression fixtures cover this collision; no live current-main reproduction was executed.

Is this the best way to solve the issue?

Unclear overall: separate finite deadlines are a focused repair, but the persisted retry-format change still needs an approved upgrade contract and demonstrated app recovery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4c9a7a829a27.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a focused native onboarding reliability improvement; pending checks alone do not increase its priority.
  • merge-risk: 🚨 compatibility: The persisted handoff format intentionally rejects previously admissible legacy retries, and upgrade recovery has not been demonstrated or explicitly accepted.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

  • Repository policy: Read the complete root AGENTS.md and the applicable proof-validation skill. No additional ancestor AGENTS.md files were found under the changed source, test, or documentation paths; .agents/maintainer-notes is absent. Current-head native/UI evidence and strict MXC validation affect merge readiness. No build or tests were executed during this read-only review. (AGENTS.md, 1fbca3177eca)
  • Pinned introduced changes: Inspected the introduced delta from pinned base da8f98a to exact head 1fbca31. The supplied test merge is marked stale and was not used to infer removal of current-main behavior. (1fbca3177eca)
  • Current main still has the restrictive deadline: Fetched main retains one 30-second deadline across page drain and verification, and its destination launcher retains the 4.5-minute attempt ceiling. The central timing improvement is therefore still missing from main; no merged fixing PR or fixing release was established. (src/OpenClaw.SetupEngine/SetupNativeCompletionCoordinator.cs:37, 4c9a7a829a27)
  • Persisted-format compatibility change: Acquisition now rejects retry/inflight records without execution timestamps. Previously settled retry records were admissible within their original five-minute expiry. Tests cover rejection and legacy-unused admission, but do not demonstrate an upgraded user's complete in-product recovery. The previous review raised this same unresolved tradeoff. (src/OpenClaw.Tray.WinUI/Services/SetupDashboardHandoffStore.cs:97, 1fbca3177eca)
  • Authority fences retained: The extended lease still requires fresh exact verification and active-endpoint checks before navigation, linked navigation cancellation, and single-use consumption. Tests reject expiry, endpoint drift, malformed timing, concurrent acquisition, and late verification. Native reconnect authorization rechecks the active record and attempt after awaiting readiness. No introduced authorization bypass was established. (src/OpenClaw.Tray.WinUI/Services/SetupNativeHandoffLauncher.cs:49, 1fbca3177eca)
  • Complete captured body and current-head validation: Read the full GitHub body and verified that its SHA256 remains 1702ec897344ba492ed2910a2f247a00937dd22d0ba63cc4218c3f6abdbb7e0c, matching the supplied 15,444-unit snapshot. The latest comment reports head 1fbca31 passing the Debug ARM64 build and Shared 4222, Tray 3889, Connection 1526, and SetupEngine 2258 tests. It explicitly leaves current-head native/UI and strict MXC proof unverified: fix: avoid premature timeouts when completing native AI setup #1582 (comment). (1fbca3177eca)

Likely related people:

  • bkudiess: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • karkarl: 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.

  • Resolve legacy retry acceptance and demonstrate fresh-install completion plus previous-record recovery through the app.
  • Complete the repository-required current-head native/WinUI, strict MXC, and coordinated Gateway proof. Attach redacted screenshots, logs, or transcripts; updating the PR body triggers re-review, or a maintainer can request @clawsweeper re-review.

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 (6 earlier review cycles)
  • reviewed 2026-10-01T21:49:29.931Z sha 2b44d33 :: needs changes before merge. :: none
  • reviewed 2026-10-01T23:48:16.887Z sha ac86c3a :: blocked before merge. :: none
  • reviewed 2026-10-01T23:58:27.880Z sha ac86c3a :: blocked before merge. :: none
  • reviewed 2026-10-02T00:53:21.226Z sha 8d8fd60 :: blocked before merge. :: none
  • reviewed 2026-10-02T01:45:32.216Z sha 8d8fd60 :: blocked before merge. :: none
  • reviewed 2026-10-02T07:18:22.747Z sha 8d8fd60 :: blocked before merge. :: none

@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 1, 2026
Keep unused handoff admission at five minutes while persisting one non-renewable execution lease. Bound both connection borrows, recovery, exact-model proof and navigation; preserve authority and single-use checks. Cover cancellation, repeated polling and process-restart expiry with isolated fixtures.

Co-authored-by: Copilot App <[email protected]>
@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 1, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Oct 1, 2026
@karkarl

karkarl commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

Hanselman review verdict

Reviewed baseline 2b44d33e223cc57b3f664ee81af272a368990819 independently with Claude Opus 5.5 and GPT-6 Astra (long context). Neither found a HIGH/CRITICAL regression. The verified published-handoff timing gap was fixed in ac86c3a9fe19d94c31c73b0e6f37e9201ce1423c; narrow Opus follow-up review found no blocking/HIGH/MEDIUM defects in the new ownership/lifetime seam.

Both models agree: HIGH consensus

Issue Opus 5.5 GPT-6 Astra Fix confidence Status at ac86c3a
Published handoff deadline truncates valid startup/recovery/model phases LOW-MEDIUM MEDIUM 80% Fixed with enforced phases and a persisted non-renewable execution lease
Polling tests omit repeated polls and cancellation during package commands LOW LOW 95% Fixed; includes real fixture Gateway/manager verifier cancellation
UI/wrapper loses timeout phase details LOW LOW 95% Remaining

Only one model flagged: LOW consensus

Issue Opus 5.5 GPT-6 Astra Fix confidence Disposition at ac86c3a
Conditional pending-start tests/docs may imply installed-package support MEDIUM not flagged 95% Disputed; explicit installed limitation and conditional fixtures clarified
Start acknowledgement near the three-minute deadline leaves no time for final status LOW not flagged 75% Bounded-start trade-off; remaining improvement
Listener appears between pending status and host snapshot LOW-MEDIUM not flagged 70% Intentional fail-closed constraint; a fresh attested status recheck can improve availability without trusting the port
Preexisting five-second credential-reconnect deadline can preempt native startup MEDIUM not flagged 75% Remaining
“Read-only” verification can start/roll back its owned runtime LOW not flagged 99% Documentation corrected

The user has now requested fixes for all flagged issues. Remaining changes will preserve exact ownership, route/device/session/model checks and single-use handoff semantics; no arbitrary failed start response will be accepted.

Validation at ac86c3a9: full ARM64 Release build passed; Shared 4222 passed/35 skipped, Tray 3880 passed, Connection 1510 passed/5 skipped, SetupEngine 2213 passed/1 skipped. Default Debug output was locked by the user-driven app, which was left running.

Proof blockers remain: current-head strict MXC and native/UI completion are not verified while user manual testing holds the shared host. Baseline 2b44d33 MXC 18/18 is not follow-up proof. Installed package 2026.9.700.0 still returns an ambiguous failed start after 90 seconds, without the structured pending ownership contract required for safe waiting. This PR must not be described as fixing that installed-package path.

@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 1, 2026
Address remaining review findings with bounded late-start confirmation, a fresh attested listener transition check, native-specific credential reauthorization deadlines, and sanitized localized completion diagnostics.

Co-authored-by: Copilot App <[email protected]>
@karkarl

karkarl commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

Implemented the actionable Companion findings in 8d8fd60c3cecfe6293b0acff53ad9b5c3a47d96c, following the posted Hanselman verdict.

  • Bounded ten-second confirmation after late startup acknowledgement; at most 190 seconds for start/status, subordinate to caller deadlines.
  • One fresh Running attestation for the pending/listener race, with unchanged full port/process ownership checks.
  • Native credential reauthorization gets 210 seconds; non-native five-second behavior remains unchanged.
  • Typed, localized timeout guidance and sanitized finite-phase logging; aggregate readiness does not mislabel a stalled connection as inference.
  • Real deadline-composition, cancellation, drift and localization tests. Earlier ac86c3a9 already fixes the handoff-budget mismatch with a non-renewable execution lease.

Final full Release build passed. Shared: 4222 passed/35 skipped; Tray: 3885 passed; Connection: 1526 passed/5 skipped; SetupEngine: 2214 passed/1 skipped. One preceding SetupEngine run hit the known fixture disposed-semaphore teardown race; focused 27/27 and a repeated full build plus all suites then passed without source changes. Exact commands/results are in the updated PR body.

Still draft: current-head native/UI/strict MXC proof is blocked by the active manual-test slot. The installed package's ambiguous failed Starting response after 90 seconds still needs an upstream contract fix. Conditional fixtures do not prove that installed path. No installed apps, Gateway or Local AI state were changed or stopped.

@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 2, 2026
@karkarl
karkarl marked this pull request as ready for review October 2, 2026 01:42
@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 2, 2026
Preserve managed Local AI intent alongside bounded verification and fresh connection checks.

Co-authored-by: Copilot App <[email protected]>
@karkarl

karkarl commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

Resolved the conflict with main in 1fbca31 (merged main da8f98a). The verifier retains both RequiresManagedLocalAi propagation and timeProvider-based bounded verification. Fresh post-recovery borrowing and exact authority/model checks are unchanged. The resolved verifier matches the previously integrated 6ccddce0 file exactly. Focused rubber-duck merge review found no issues.

Current merge-head validation (isolated OPENCLAW_REPO_ROOT and OPENCLAW_TRAY_DATA_DIR; sequential suites):

  • powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\build.ps1: PASS, all five projects, Debug ARM64.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: PASS, 4222 passed, 35 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: PASS, 3889 passed, 0 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore: PASS, 1526 passed, 5 skipped, 0 failed.
  • dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore: PASS, 2258 passed, 1 skipped, 0 failed.

Test invocations also used --logger trx;LogFileName=merge-main-<suite>.trx --results-directory <session-files> --verbosity quiet; logs/TRX retained locally, not uploaded.

Not verified / blocked: strict .\scripts\validate-mxc-e2e.ps1 and current-head native/UI proof were not rerun while the shared host is in user-driven manual testing. No running app, Gateway, or model server was stopped or changed for conflict resolution. Historical proof in the PR body is not merge-head proof. The ambiguous failed-Starting package contract remains unsupported; this merge does not claim to fix it.

@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 2, 2026
@karkarl
karkarl merged commit 3e6ac76 into main Oct 2, 2026
25 checks passed
@karkarl
karkarl deleted the karkarl-native-gateway-timing branch October 2, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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