Expand description
Detached/workspace-mode repo resolution: turn a filesystem path into a
RepoBinding (via the path’s git remote + the server), and pick the
effective binding for an event/command from the precedence chain
(--path flag → subagent worktree override → session active → bound
.tracevault/config.toml). See design §2/§3/§4.
Structs§
- Resolve
Inputs - Inputs for the effective-binding precedence chain.
repo_flagandboundare resolved by the caller (the--pathoverride and the boundconfig.toml, respectively);session/worktree_pathcome from the per-session state.
Enums§
- Binding
Source - Which precedence tier produced the
effective_bindingresult.
Functions§
- binding_
from_ config - A RepoBinding from a pinned
.tracevault/config.toml(bound mode), if it has both org_slug and repo_id. Pure — caller supplies the already-loaded config. - effective_
binding - The binding that applies, and which tier produced it:
--pathflag → subagent worktree override → session active → bound config → none. - org_
slug_ for - Resolve the org slug for
project_root:TRACEVAULT_ORG_SLUG(non-empty) →credentials.jsonorg_slug→ boundconfig.tomlorg_slug. - org_
slug_ precedence - Pure precedence for the org slug: first non-
Noneof env, credentials, bound config. Callers passNonefor an env value that was empty. - resolve_
path_ to_ binding - Resolve a filesystem path to a registered-repo binding: read its origin
remote URL and ask the server.
Ok(None)when the path has no remote or the server has no matching repo (pre-registered-only).