Skip to content

fix(sdk-ts): scope polling pause time to each wait - #1163

Merged
santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
remote-controlled-man:codex/prflow-848e400b2d02
Nov 7, 2026
Merged

santoshkumarradha merged 1 commit into
Agent-Field:mainfrom
remote-controlled-man:codex/prflow-848e400b2d02

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Summary

Reusing a parent PauseClock currently extends a new waitForExecutionResult timeout by all time the execution previously spent paused. For example, an earlier 4-second pause turns the next 200 ms polling budget into roughly 4.2 seconds.

Snapshot the cumulative paused time when each wait starts, then subtract only additional paused time. The shared execution clock, WAITING transitions, and status callbacks retain their existing behavior.

Type of change

  • Bug fix

Test plan

  • ./scripts/test-all.sh — control plane and Go SDK passed; Python SDK: 2,959 passed, 4 skipped, 38 deselected; TypeScript SDK: 1,392 passed, 1 skipped; Web UI: 837 passed.
  • make fmt tidy — passed; unrelated formatting output from the existing baseline was reverted.
  • cd sdk/typescript && npm run lint — passed.
  • Client/pause regression tests — 46 passed. New cases use a real local HTTP server and controlled Date values to cover successful polls, HTTP 503 retries, and new WAITING intervals.

Go checks ran in the existing isolated Linux Go 1.25.14 environment with an offline public-DNS fixture; Python and Node checks ran locally. The suite's default exclusions were retained. The two past-pause cases fail on the original implementation and pass with this fix.

Test coverage

  • I ran tests for the changed surface locally.
  • New code paths are covered by regression tests.
  • Coverage Summary is green in CI before requesting review.

CI coverage and hosted CLA checks remain to be evaluated after PR creation.

Checklist

  • I read docs/CONTRIBUTING.md and docs/DEVELOPMENT.md.
  • The commit is signed and follows conventional-commits style.

Copilot AI balanced review requested due to automatic review settings November 7, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
TS 391 B +12% 1.42 µs -29% ✓ ✓

✓ No regressions detected

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 84%, aggregate ≥ 85%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 88.20% 87.40% ↑ +0.80 pp 🟡
sdk-go 93.70% 92.00% ↑ +1.70 pp 🟢
sdk-python 94.73% 93.73% ↑ +1.00 pp 🟢
sdk-typescript 92.44% 90.42% ↑ +2.02 pp 🟢
web-ui 84.89% 84.79% ↑ +0.10 pp 🟡
aggregate 86.11% 85.75% ↑ +0.36 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 — ➖ no changes
sdk-go 0 — ➖ no changes
sdk-python 0 — ➖ no changes
sdk-typescript 2 100.00% ✅
web-ui 0 — ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the implementation and its focused tests. The change is scoped, the CLA and required checks are green, and I found no blocking issue.

@santoshkumarradha
santoshkumarradha added this pull request to the merge queue Nov 7, 2026
Merged via the queue into Agent-Field:main with commit 62a8c6e Nov 7, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants