Repository navigation
fix: close dormant Agent handles before cross-Space move - #218
Merged
Merged
Conversation
Close the runtime before detaching persistence listeners and notification streams. Cover failed close, successful retry, final close reports, and rehome recovery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve existing admission checks, restore durable ownership before Agent nodes during compensation, and recover closed handles lazily. Normalize Move failures into redacted server responses and localized toasts, with storage-backed regression coverage and architecture updates. Fixes #212. Control-operation locking remains tracked separately in #217. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Yuge Zhang (ultmaster)
added a commit
to ultmaster/Huabu
that referenced
this pull request
Sep 20, 2026
Reconciles the async Agenetes persistence with two upstream changes. microsoft#218 made `close()` tear the runtime down before detaching persistence and notification wiring, so a failed driver teardown can be retried. The async close keeps that order and drains the thread's queued state writes before either notification scope ends: a snapshot reported during teardown is the driver's last word, and the scoped stream now closes with the listener rather than ahead of the drain. Its new suites — Agent close retry, close-before-rehome, and the Move lifecycle cases — await the persistence surfaces they assert on, and the Move service awaits `close()` and `rehome()` inside the phase boundaries that map failures onto redacted responses. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Fixes #212.
Control-operation locking is deliberately unchanged. The separately confirmed stale ACP realization race is tracked in #217.
Validation
pnpm format,pnpm lint:fix, and repository-levelpnpm typecheckpassed. Lint reported 276 warnings and no errors; no unrelated formatter/linter changes remain.pnpm check:i18nandgit diff --checkpassed. Web tests retain React act-environment warnings. Dependency manifests and lockfile are unchanged.Commit boundaries
The Agenetes subtree fix and Huabu-only changes are separate commits so the subtree change can be independently propagated upstream. This PR does not change control locking, ordinary undo policy, or introduce a new transaction framework.