fix: isolate agent sessions and retain runtime resource ownership (#7149)

* fix: arbitrate subscription identity and restore workflow state

* fix: isolate agent sessions and retain runtime resource ownership

* test: preserve legacy empty-owner subscription transactions

* test: handle reaped terminal descendants during shutdown polling

* fix: align shared atomic configuration method with lifecycle prerequisite

* test: cover subagent cancellation and completion lifecycle boundaries

---------

Co-authored-by: jxxghp <jxxghp@gmail.com>
This commit is contained in:
Aqr-K
2026-10-23 08:20:59 +08:00
committed by GitHub
parent 951cdc5b27
commit 7584d4b9fc
33 changed files with 1345 additions and 88 deletions

View File

@@ -211,9 +211,12 @@ def test_apply_patch_detects_version_conflict_during_write(tmp_path):
)
original_write = apply_patch_module.atomic_write_text
def _conflicting_write(path, content, expected_sha256=None):
def _conflicting_write(path, content, expected_sha256=None, *, overwrite=True):
"""
在补丁提交前模拟另一写者修改,验证正式原子写入口拒绝旧版本。
"""
file_path.write_text("changed elsewhere\n", encoding="utf-8")
original_write(path, content, expected_sha256)
return original_write(path, content, expected_sha256, overwrite=overwrite)
with patch.object(
apply_patch_module, "atomic_write_text", _conflicting_write