Skip to main content

project_from_config

Function project_from_config 

Source
pub fn project_from_config(config: &TracevaultConfig) -> Option<ProjectBinding>
Expand description

A RepoBinding from a pinned .visdom/tracing.toml (bound mode), if it has a repo_id. Pure — caller supplies the already-loaded config. Carries through the remote_id/codebase_name init persisted (best-effort, display-only) so bound-mode status can print the codebase without an extra network round-trip; git_url stays None here — bound mode has no live origin URL to hand back (that’s the older git_url fallback’s job, covering bindings that predate codebase_name). The workspace project tier of a .visdom/tracing.toml: its project_id, with the recorded project_name for display. None when the config has no project_id — in particular for a config that still carries only the legacy default_project name, which is never resolved here (VIS-1256: ingest never resolves names). A project_id that is not a UUID is returned as is; the capture path drops it via capture_project_id, and project status warns about it.