subagent: note the name-only concurrency guard now that dir adds a second axis
This commit is contained in:
parent
aa27334d76
commit
25499ce8df
1 changed files with 8 additions and 0 deletions
|
|
@ -45,6 +45,14 @@ use hive_claude::{Attach, Cancel, Claude, Config, NoopSink, SessionStore};
|
||||||
/// reviewer caught in the original check-then-insert version: checking "is
|
/// reviewer caught in the original check-then-insert version: checking "is
|
||||||
/// `name` free" and committing to it are two different lock acquisitions
|
/// `name` free" and committing to it are two different lock acquisitions
|
||||||
/// unless the check *is* the reservation — see `reserve`.
|
/// unless the check *is* the reservation — see `reserve`.
|
||||||
|
///
|
||||||
|
/// ⚠️ This concurrency guard is keyed by `name` alone — a `start`/`continue`
|
||||||
|
/// for `name` with a *different* `dir` than one already in flight under
|
||||||
|
/// that name is refused as "already running," even though the two would
|
||||||
|
/// resolve to entirely separate on-disk sessions. Deliberate: `name` is the
|
||||||
|
/// caller's one chosen identity for a subagent, not `(name, dir)` — reuse a
|
||||||
|
/// name across directories at your own risk, the tool doesn't disambiguate
|
||||||
|
/// it (flagged in review when `dir` was added).
|
||||||
pub struct State {
|
pub struct State {
|
||||||
running: Mutex<HashMap<String, Option<Cancel>>>,
|
running: Mutex<HashMap<String, Option<Cancel>>>,
|
||||||
dirs: Mutex<HashMap<String, String>>,
|
dirs: Mutex<HashMap<String, String>>,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue