docs(sync): correct the ownership precedence the fix inverted
Review found the owning documentation still describing the behaviour this branch replaced, in one case stacked directly above the new docstring saying the opposite. Holding a session proves containment, not ownership, so every text that called store membership the authoritative mapping was actively misleading for the module whose wrong answer misroutes every send. Corrected in the module docstring, the resolution module's precedence description, the sync-refs helper it points at, and the sync DOCUMENTATION.md table and rules. The debug report built its authoritative value membership-first, so for exactly the scenario this branch fixes it reported the parent directory and could raise a source-disagreement alert while routing was in fact correct. It now uses the same record-first order as the resolver. The CLI timeout comment claimed the wait and provisioning windows were additive while the code took the larger of the two. The server provisions the worktree inside session creation, before it waits for the session to go idle, so they do run in sequence: the windows are now summed and the tests pin both cases.
This commit is contained in:
@@ -406,14 +406,12 @@ const getAttachmentForSession = (sessionId: string | null | undefined): SessionW
|
||||
return useSessionWorktreeStore.getState().getAttachment(sessionId)
|
||||
}
|
||||
|
||||
/**
|
||||
* Authoritative directory for a session: the child store that holds it, and
|
||||
* only then the session record's own fields. `null` means "not indexed yet",
|
||||
* never "no directory" — callers must fall back rather than treat it as empty.
|
||||
*/
|
||||
/**
|
||||
* The directory that owns a session, from the two server-backed signals.
|
||||
*
|
||||
* `null` means "not indexed yet", never "no directory" — callers must fall back
|
||||
* rather than treat it as empty.
|
||||
*
|
||||
* The session's own record wins. Holding a session in a child store proves
|
||||
* containment, not ownership: a project's session list legitimately includes
|
||||
* the sessions of its worktrees so the sidebar can group them, so the parent
|
||||
|
||||
Reference in New Issue
Block a user