mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-12-01 08:26:28 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user