fix: close scoped SubWorker command authority

This commit is contained in:
2026-09-06 02:37:13 +09:00
parent 68f00bc948
commit e7079e223f
2 changed files with 196 additions and 16 deletions
+6 -1
View File
@@ -690,7 +690,7 @@ impl SpawnedWorkerRegistry {
if !record.claim_scope_reclaim() {
return Ok(false);
}
record.workdir_tool_scope.release();
record.workdir_tool_scope.revoke();
let result = if let Some(parent_scope) = &self.parent_scope {
parent_scope
.update(|current| current.with_removed_deny_rules(delegated_write_rules(record)))
@@ -731,6 +731,11 @@ impl SpawnedWorkerRegistry {
.stop()
.await
.map_err(|error| io::Error::other(error.to_string()))?;
record
.workdir_tool_scope
.close()
.await
.map_err(|error| io::Error::other(error.to_string()))?;
let summary = record.stop_summary();
self.reclaim_record_scope(&record)?;
let removed =