Documentation
¶
Index ¶
- Variables
- func AssignSessionForDir(ctx context.Context, store session.Store, sess *session.Session, dir string) (*session.Project, error)
- func CanonicalStoragePath(path string) string
- func CanonicalStoragePathForOS(path, goos string) string
- func ClaimMatchingSessions(ctx context.Context, store session.Store, p session.Project) (int, error)
- func MatchesWorkspace(ctx context.Context, cwd, worktreeDir string, project Resolved) bool
- func MatchingSessions(ctx context.Context, store session.Store, p session.Project) ([]session.ProjectSessionMatch, error)
- func MatchingSessionsForResolved(ctx context.Context, store session.Store, root Resolved) ([]session.ProjectSessionMatch, error)
- func ReconcileAll(ctx context.Context, store session.Store) (int, error)
- func SameIdentity(actual, stored string) bool
- func SamePath(a, b string) bool
- type Resolved
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AssignSessionForDir ¶
func AssignSessionForDir(ctx context.Context, store session.Store, sess *session.Session, dir string) (*session.Project, error)
AssignSessionForDir fills an unassigned session's project identity from its execution directory. Lack of project support or a matching active project is a normal no-op.
func CanonicalStoragePath ¶
CanonicalStoragePath normalizes a project path for durable identity.
func CanonicalStoragePathForOS ¶
CanonicalStoragePathForOS exposes deterministic platform normalization for tests.
func ClaimMatchingSessions ¶
func ClaimMatchingSessions(ctx context.Context, store session.Store, p session.Project) (int, error)
ClaimMatchingSessions assigns every still-unassigned matching session to p. It is idempotent and safe to race with session creation or another repair.
func MatchesWorkspace ¶
MatchesWorkspace reports whether an immutable session execution snapshot belongs to project. Git snapshots resolve to the main repository; non-Git projects require an exact resolved directory match.
func MatchingSessions ¶
func MatchingSessions(ctx context.Context, store session.Store, p session.Project) ([]session.ProjectSessionMatch, error)
MatchingSessions returns prevalidated, currently unassigned session workspaces belonging to p. The store rechecks each snapshot when claiming it.
func MatchingSessionsForResolved ¶
func MatchingSessionsForResolved(ctx context.Context, store session.Store, root Resolved) ([]session.ProjectSessionMatch, error)
MatchingSessionsForResolved finds unassigned snapshots for a validated root. It is also used before the first bootstrap project has received an identity.
func ReconcileAll ¶
ReconcileAll claims historical unassigned sessions for every active, currently available project. Unavailable project paths are skipped so a later run can repair them when the filesystem is mounted again.
func SameIdentity ¶
SameIdentity compares two already-canonical project paths using platform identity rules.