refactor(workspace): extract idle-loop pending-check guard for direct unit-testing #451

Merged
infra-runtime-be merged 2 commits from runtime/432-followup-helper-extraction into main 2026-05-11 11:02:38 +00:00

2 Commits

Author SHA1 Message Date
df2e69b32f ci: re-trigger Gitea Actions status reporting (infra-runtime-be-agent)
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 18s
CI / Detect changes (pull_request) Successful in 1m1s
E2E API Smoke Test / detect-changes (pull_request) Successful in 1m13s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 1m17s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 22s
sop-tier-check / tier-check (pull_request) Successful in 29s
Runtime PR-Built Compatibility / detect-changes (pull_request) Successful in 1m31s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 1m44s
CI / Canvas (Next.js) (pull_request) Successful in 9s
CI / Platform (Go) (pull_request) Successful in 9s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 9s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 10s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 7s
audit-force-merge / audit (pull_request) Successful in 20s
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Successful in 2m38s
CI / Python Lint & Test (pull_request) Failing after 7m26s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
2026-05-11 10:49:40 +00:00
4a7e1bd988 refactor(workspace): extract idle-loop pending-check guard for direct unit-testing
Follows up on #432 (merged). Extracts _check_delegation_results_pending()
from the inline guard in _run_idle_loop() so tests can call the real
production function directly via patch(builtins.open, ...).

Fixes #401: the previous test used a mirror copy of the guard logic,
which risks drifting from the production implementation over time.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 10:49:40 +00:00