Skip to content

Stop activity lease maintenance after settlement when cancellation is consumed - #185

Merged
rmcdaniel merged 4 commits into
mainfrom
fix/python310-ci-hang-diagnostics
Oct 21, 2026
Merged

rmcdaniel merged 4 commits into
mainfrom
fix/python310-ci-hang-diagnostics

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Stop settled activity lease maintenance

The original supported-version CI stall now has a controlled source reproduction. ActivityLeaseAuthority.run() cancelled its maintenance task and then awaited it unconditionally. An in-flight renewal that consumes cancellation can leave that loop running after the operation has settled. The caller then waits indefinitely during cleanup.

Tests-first 73db146 fails that controlled cancellation case and passes original-authority reuse between loading and callback. Correction d2939d4ee8a931e7183017e8b78262062d137bc0 adds a per-operation stop event, checked before another renewal. It preserves the same original claim across input loading and callback stages. Original identity, deadlines, retry rules, application-progress authority and transport options are unchanged.

Actual Python 3.10.22 verification on the corrected source:

  • Focused lease-worker file: 15 passing tests.
  • Full normal unit selection: 3,103 passing tests, three skips and 105 integration deselections, 173.65 seconds.
  • Ruff passes; mypy passes all 36 source files.

The first broad local run used a container without an init process and retained orphan-test failures: 3,099 passes, four failures, three skips and one teardown error. Actual unreaped zombie children had sleep as PID 1. The successful repeat added Docker --init, preserving source, assertions and deadlines. The failed original remains a failure.

The diagnostic workflow follow-through remains: verbose names, Pytest's built-in 120-second thread dump and a duration summary; a strict 13-minute suite ceiling plus ten-second kill grace within the unchanged 15-minute job; and at most 12,000 bytes of failure diagnostics in a GitHub annotation. Tests, runner images and dependencies are unchanged. This tighter diagnostic ceiling does not turn timeouts into passes.

Original fresh-main 39554306509 and diagnostic 39562776942 retain their Python 3.10 timeouts. Diagnostic 39566620625 passes Python 3.10 but fails Python 3.11 at the diagnostic ceiling. Those observations establish that the race is not confined to one supported Python version. Recovered ordinary public logs and the controlled source counterexample inform this fix; no old failure is rescued.

The exact corrected head passes every required candidate check: Python 3.10/3.11/3.12, source-Server integration, lint, package, corpus, advisory throughput, portal, boundary, final target-branch qualification and Sonar. Independent PR issue review has zero findings. Merged fe40c6477d71dbacf8db6035875a0f52dfef7a49 preserves exact tested tree 61eefba3ceb838a095942fec098978fe036720db; fresh-main gates are independent and pending.

This PR publishes no version and does not complete the cross-product acceptance in Workflow #878. Genuine installed long-running activity, worker-loss and PHP/embedded automatic maintenance remain separate requirements. All local Python tools/dependencies are actually absent by the 08:39 inventory, before 09:00; recovered logs/config scratch was removed 08:26:54 before 08:30. No application, database or paid host was used.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel rmcdaniel changed the title Diagnose stalled supported-version unit tests without relaxing the gate Stop activity lease maintenance after settlement when cancellation is consumed Oct 21, 2026
@rmcdaniel
rmcdaniel merged commit fe40c64 into main Oct 21, 2026
16 checks passed
@rmcdaniel
rmcdaniel deleted the fix/python310-ci-hang-diagnostics branch October 21, 2026 09:14
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.

2 participants