Skip to content

fix(ci): give native task-state proof its PowerShell budget - #157289

Merged
vincentkoc merged 1 commit into
mainfrom
fix/schtasks-native-probe-budget-20260924
Sep 24, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/schtasks-native-probe-budget-20260924

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes a native Windows CI test that treated the production probe's five-second responsiveness budget as a task-state correctness requirement.

User Impact

No product behavior changes. The native test can verify missing and registered Scheduled Tasks using the existing PowerShell caller budget, while unit coverage retains the production five-second default and timeout diagnostics.

Why This Change Was Made

Both real PowerShell probes now use the shared 60-second allowance. The outer test deadline accounts for two probes, the unchanged five-second create/delete operations, and the original cleanup headroom. Assertions, registration refusal, and finally cleanup are preserved; there are no retries or warmups.

The fixture was introduced for console and HRESULT semantics in #148671. The shared allowance and equivalent native LAN-test distinction already exist from #123633.

Evidence

  • Original failure: Windows row 2, CI attempt 3. The first missing-task query returned unknown with ETIMEDOUT after its 5,000 ms production budget; the case failed after 5.266 seconds. Whether the delay occurred during PowerShell startup or COM work is unknown.
  • One test file changed: +9/-5 lines; production code and the unit timeout matrix are unchanged.
  • Targeted oxfmt 0.68 and git diff --check passed. Fresh focused review found no actionable P2-or-higher issue.
  • Native Windows replay passed at exact source and workflow commit a99e487: Windows 2025, Node 24.20.0, pnpm 12.4.2, Vitest 5.0.1, one worker. The original nine-file selection recorded 44 passed and 21 platform skips. The changed case logged missing, then found with state 3 and enabled true; no registration-unavailable early return occurred, and its delete/finally assertions passed.
  • Observed costs: the native case took 2.734 seconds; the nine-file group took 66.94 seconds in Vitest and 74.16 seconds through the dispatcher. These are case/group measurements, not standalone file wall time. The original failing group took 74.54 seconds in Vitest; no causal performance claim is made from these two runs.
  • The retained replay artifact binds the exact command, frozen dependency inputs, source, runtime, and successful outcome. Actions post-checkout and job cleanup completed. The runner retained one temporary namespace and did not attest descendant settlement; Actions owns final teardown, with no persistent Testbox lease.
  • Standalone native Windows measurement passed the same file at a99e487 with the same toolchain and one worker: one passed, none skipped; missing and registered/found results plus delete/finally assertions passed. The case took 1.796 seconds, Vitest took 2.50 seconds, and the one-file dispatcher took 4.29 seconds. Actions job cleanup completed, with the same descendant-settlement limit above.
  • The same-head ClawSweeper request for native results and measured standalone/CI cost is addressed by these two runs. No source change or rating refresh is needed.
  • Unchanged production-budget unit matrix passed all 11 cases at the same exact head and toolchain, with no skips: the one-spawn/no-console case, both empty-output cases, and all eight default/clamped/caller-budget rows. The daemon project completed in 4.21 seconds in Vitest and 6.88 seconds through the one-file dispatcher; source and dependency inputs remained unchanged, and Actions job cleanup completed.
  • Exact-head hosted CI passed: 37 successful jobs and 20 intentional skips. The latest exact-head ClawSweeper review reports no actionable finding or remaining before-merge item.

@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority 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. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 8:58 AM ET / 12:58 UTC (Revision 2).

ClawSweeper review

What this changes

The PR gives both native Windows Scheduled Task inspections a 60-second PowerShell allowance and extends the test deadline to cover them.

Merge readiness

✅ Ready for maintainer review

Current main still has the five-second native test call. The exact-head Windows runs address the previous proof request, and this review found no introduced blocker.

Priority: P2
Reviewed head: a99e487296aa2835f260d74c648cfad73f422fa3

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrow test repair has exact-head native Windows evidence, measured cost, and separate coverage of the unchanged production timeout.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed native test calls the production PowerShell probe against real Windows Task Scheduler state. The PR body reports missing and registered/found results with cleanup on exact-head Windows runs, whose successful completion GitHub metadata confirms; direct job-log inspection was blocked by the reviewer proxy. The diff changes no stored-data contract.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed native test calls the production PowerShell probe against real Windows Task Scheduler state. The PR body reports missing and registered/found results with cleanup on exact-head Windows runs, whose successful completion GitHub metadata confirms; direct job-log inspection was blocked by the reviewer proxy. The diff changes no stored-data contract.
Evidence reviewed 8 items Introduced change: The pinned PR delta changes only the native test: both probe calls receive the existing 60-second allowance, and the outer deadline accounts for both probes and task operations.
Production timeout contract: The production probe still defaults to 5,000 ms and accepts a caller-supplied timeout; a timeout remains an unknown result with a diagnostic.
Separate timeout coverage: The unit matrix covers the five-second default, caller budgets, and timeout diagnostics, so the native test can focus on real Task Scheduler results.
Findings None None.
Security None None.

How this fits together

Windows Gateway management queries Task Scheduler through PowerShell to distinguish missing, registered, and uninspectable tasks. A native CI test checks those results against a temporary task; runtime callers retain their own timeout policy.

flowchart LR
A[Native Windows test] --> B[PowerShell task probe]
B --> C{Task lookup}
C --> D[Missing result]
C --> E[Registered state]
D --> F[Test assertions]
E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +4. Total +4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 9 5 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 9 5 +4

Review metrics

Metric Value Why it matters
Native test deadline 30 s → 140 s The deadline now covers two bounded PowerShell starts and the existing task operations.
Standalone Windows cost 1.796 s case; 4.29 s dispatcher The reported exact-head measurement remains below the five-second per-file test target.

Technical review

Best possible solution:

Keep native Task Scheduler assertions on the caller-controlled cold-start budget while the unit matrix protects the production five-second default.

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

No deterministic cold-start reproduction was run on current main. The recorded Windows failure and the unchanged five-second call on main establish a high-confidence source path for the intermittent timeout.

Is this the best way to solve the issue?

Yes. Passing the existing caller budget to the native fixture addresses its timing assumption without changing the production default or weakening the task-state assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed native test calls the production PowerShell probe against real Windows Task Scheduler state. The PR body reports missing and registered/found results with cleanup on exact-head Windows runs, whose successful completion GitHub metadata confirms; direct job-log inspection was blocked by the reviewer proxy. The diff changes no stored-data contract.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This is a focused repair for an intermittent Windows CI fixture failure with no production behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed native test calls the production PowerShell probe against real Windows Task Scheduler state. The PR body reports missing and registered/found results with cleanup on exact-head Windows runs, whose successful completion GitHub metadata confirms; direct job-log inspection was blocked by the reviewer proxy. The diff changes no stored-data contract.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed native test calls the production PowerShell probe against real Windows Task Scheduler state. The PR body reports missing and registered/found results with cleanup on exact-head Windows runs, whose successful completion GitHub metadata confirms; direct job-log inspection was blocked by the reviewer proxy. The diff changes no stored-data contract.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 243f71c adds src/daemon/schtasks-state-probe.windows.test.ts:7 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 243f71c53b26; files: src/daemon/schtasks-state-probe.windows.test.ts)

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 (1 earlier review cycle)
  • reviewed 2026-09-24T12:40:06.818Z sha a99e487 :: needs changes before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review September 24, 2026 12:41
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Sep 24, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 24, 2026
@vincentkoc
vincentkoc merged commit 440ec7d into main Sep 24, 2026
222 of 223 checks passed
@vincentkoc
vincentkoc deleted the fix/schtasks-native-probe-budget-20260924 branch September 24, 2026 15:05
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit 'c4333da677cbdfe1bbaf783ed01c363ff39e93b8': (100 commits)
  fix(test): stop preflight mocks leaking into shared workers (#157207)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (122 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* test(ui): cover stack-free tooltip disconnect cleanup

* fix(build): scope normalization declarations to package sources

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.

* Merge normalization declaration scope for tooltip proof

* commit '81aeccb3db80136a118d6d2f98b67d836ec25e51':
  fix(build): scope normalization declarations to package sources

* fix(ui): avoid retaining tooltip anchors in abort reasons

* Merge main to include native wrapper source inventory repair

* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...

Co-authored-by: Vincent Koc <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* test(ui): cover stack-free tooltip disconnect cleanup

* fix(build): scope normalization declarations to package sources

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.

* Merge normalization declaration scope for tooltip proof

* commit '81aeccb3db80136a118d6d2f98b67d836ec25e51':
  fix(build): scope normalization declarations to package sources

* fix(ui): avoid retaining tooltip anchors in abort reasons

* Merge main to include native wrapper source inventory repair

* commit 'f11e16cd65951f284264bd202b49984e21091cf5': (134 commits)
  fix(build): scope normalization declarations to package sources (openclaw#157174)
  fix: exit after validating Codex model references (openclaw#157323)
  fix(gateway): guard workspace adoption during active work (openclaw#157259)
  fix(update): rebuild stale Git runtimes when source is already current (openclaw#156996)
  fix: require a click before diagnosing failed updates (openclaw#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (openclaw#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (openclaw#157352)
  fix(skills): refresh skills after watched directories are replaced (openclaw#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (openclaw#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (openclaw#157334)
  fix(gateway): retain owned suspension status during restart (openclaw#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (openclaw#157337)
  test(daemon): use the native PowerShell probe budget (openclaw#157289)
  fix(exec): avoid gateway stalls during background task writes (openclaw#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (openclaw#157315)
  ...

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

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS 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