Repository navigation
Fix failed pager cleanup inheriting its dead worker context - #1394
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
1 commit, 2 files, +65/-21. Fix the independent failed-pager cleanup defect; this does not deliver the runner/profiling overhaul in #1393.
Why cleanup failed
WorkingTranscript.execute → source_failed → retire_source → AwaitComplete → Worker.waitcreates a NEW join task.AwaitCompleteeagerly schedules it with the retiring pager'sactive_workercontext. Textual then rejects the independent join as a self-wait before waiting at all.The retained configured-fork attempt's primary
BrokenProcessPoolcame from its unguarded multiprocessing entrypoint. This hotfix repairs the separate cleanup exception; it does not relabel that attempt successful or replay its root.Before / after
TranscriptSourcePreparationcreatesAwaitComplete(join())in its caller's context.Context().run(AwaitComplete, join()). It owns only cancelled Worker handles, not the caller's worker/message pump.Controls and evidence
Production and test files are byte-identical to qualified #1393 source head
59d8218a4b70896aa0f8226367202cff035dd411; extracted onto current main as this recoverable hotfix at the integration owner's request. No pytest rerun.The existing two app controls passed 2/2 in 31.58s, rc0, under Core's shared
TestLease, with the actual Core/Toad source origins asserted and printed. I read the log, result code and controller. They exercise caller- and pager-initiated retirement/resume, a genuine self-wait refusal, saved error output, worker removal and no unhandled cleanup exception.Receipts:
/home/ts/.cache/agent-scratch/pi-commander/heartbeat-publication/pager-lifetime-controls-2.logand.rc. The controller's first attempt failed before pytest on a module/Path shadowing mistake; it is not a test run. The passing run paired Core's earliera5blifecycle source, not its subsequent parallel-reader correction.Deleted: own-method publication and failure-count patches in the tests; original
CoreEventStreampublications and persisted error files now establish outcomes. This is app-level lifecycle qualification, not installed or physical acceptance.Source scope
Before-edit NRA parser/syntax/canonical-family query covered 1,533 modules, 9,005 original classes, 8,966 canonical projections, 39 unprojected OPEN and 190 selected lifecycle sites, with source hashes. Actual imported saved-history MROs confirm shared preparation inheritance. Textual
worker.pyandawait_complete.pybyte-match between the retained f3 and current d4 packages. Dynamic/unresolved/native cases remain OPEN; this lexical query is not behavioral proof.Assumed: the passive join requires no retiring caller context. The genuine-self-wait and failed-read controls exercise that assumption without weakening the guard. Full runner/build admission, native attachment and physical/performance acceptance remain with #1393/#3825.