Repository navigation
fix(runtime): retain the cache watchdog after flush failures - #6561
Open
loopx-agent wants to merge 2 commits into
Open
loopx-agent wants to merge 2 commits into
loopx-agent wants to merge 2 commits into
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
This branch has not been deployed
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.
Problem And Result
After a compile-cache flush threw, the drained runtime discarded its ready watchdog and sent self-
SIGKILLfrom the main Node environment. Node runs that environment's native exit callbacks before the OS kill, which could retry the cache write the failure path intended to abandon.Keep the cache-disabled watchdog armed after a thrown flush and retire under the existing locator fence and one-second allowance. Healthy persistence still completes; admitted effects drain before retirement, and replacement locators retain their lock/token/PID/fingerprint protection. The new actual-cache-file negative fails on baseline
ec327628fa18df4b772350851ac7e26796624422and passes with this repair. This identifies unsafe native-hook re-entry, without claiming the cause of every intermittent Windows failure.Sources: the native Windows failure, Node24.21's self-kill hook, and the after-drain/cache-retirement contract in
docs/development/testing-and-quality.md.Source And Ownership
Author head
b290547c9313f7b5ac5c2170a72c38b9dcb0bc36integrates selected maina99cb07addfc163fda9435c6455cc9462b657855with previous author head736ba7d960a2b1d60576f466b9b12bf0b7d61302. The five repair-file blobs are unchanged; the current session-wide worker-isolation fixture is included.Natural hosted checkout
b17e3703563b90d7cb047f91168616fa9b3c960ahas parentsa99cb07+b290547and the same entire Git tree as the author head. The native results below come from this new cohort. Older checkout9799d6042c9aaebf14e232c118f0a9db58ca3f3eremains historical evidence only.Written by: model_agent, OpenAI Codex (GPT-6 family). Current repository instructions and CODEOWNERS apply. TypeScript remains the shutdown owner; no new launcher, configuration, capability or Python decision rule. The bounded companion refactor unifies failed/overdue waiting and corrects a misleading helper name. Diagnostic event names and boolean thread identity stay local to test observations.
Validation
Inputs: synthetic and public_fixture; failure injection uses disposable isolated runtime state. Local checks ran on the author integration; hosted logs and uploaded artifacts bind the exact checkout above.
uv run --extra test python -m pytest -q tests/control_plane/test_effect_runtime_integration.py:97 passed,0 skipped/failed/errors on each of real Node22.22.3 and Node24.21.0, Python3.12/macOS. Real journals, sockets, cache files, locks and OS processes; blocked writes cross two idle windows before journal/PID readback.cqr_69cb90840f404bca5a0averifies. Actual premerge execution:4 direct +11 selected passed,0 failures/advisories/timeouts/holds. An unexecuted preview mislabel is not an executed result or baseline waiver. This is author evidence, not independent review.Remaining Qualification
At readback the current Python workflow has30 materialized jobs:22 success,2 expected skips and six pending Python shards with no runners or steps. Complete Python results, JUnit/coverage union and full merge readiness are unqualified. No review was present at this readback; this completed proposal remains a normal PR.
Separately, CI Maintenance failed while waiting for cancellation of superseded
736ba7drun38781049281. That older run subsequently readscompleted/cancelled; this does not make the failed cleanup check or incomplete full qualification green.Worker-startup failure retains the existing main-thread best-effort fallback, which cannot guarantee bypassing the native cache hook. Robust unavailable-worker handling, historical intermittent Windows root cause and sustained operation remain open in the existing runtime reliability work. One source-bound native composition does not establish a latency/SLO guarantee, cost savings or hard release priority. No local green suite was repeated or manual hosted run dispatched for this readback.
The ready-worker repair is independently reviewable and reversible. No timeout, cache default, effect admission/replay rule, permission or authority boundary is relaxed. Existing S4/S10/S12 acceptance remains open. Exact-head review, required validation and explicit maintainer merge authority remain separate gates; this update includes no merge, installation or resource change.
Delivery Boundary
UI impact:none. This internal shutdown repair adds no frontend, Lark or CLI operation, editor, first viewport or visual surface; screenshots and first-screen approval do not apply. The five authored paths remain one reproduced defect plus its documentation and regression coverage. All author/integration commits carry DCO sign-off. Public diff and description exclude private state, credentials, raw traces, internal links and local machine paths.