strategy, trailers, clusterdiscovery: delete dead code and its tests · Entire

Strategy, Trailers, Cluster Discovery: Delete Dead Code and Its Tests

10892ce→main· Soph·2w ago·13 files·+9 added/-1,133 removed

Everything here is unreachable from the CLI entry points (verified with x/tools deadcode + reference grep) and exercised only by tests dedicated to it:

Test helpers still exercising live code (hasCheckpointURL, IsAncestorOf, ManagedGitHookNames, sessionStateFile, tokenstore fault seams, OPF config seams, contexts.Save) are kept.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

Sessions

e64c28c66fb4View transcript

Changes

13

// contextReauthError maps the two re-auth sentinels a per-context manager can
// return into a friendly message that names the context and its core (so a
// multi-core user logs back into the right one — matching
// clusterdiscovery.RenderLoginHint's idiom), preserving the sentinel for
// errors.Is. Returns nil when err is neither sentinel, leaving the caller to
// wrap the residual error in its own terms (refresh vs exchange).
// multi-core user logs back into the right one — matching the
// "no auth context, run `entire login`" hint style used by clusterdiscovery),
// preserving the sentinel for errors.Is. Returns nil when err is neither
// sentinel, leaving the caller to wrap the residual error in its own terms
// (refresh vs exchange).
func contextReauthError(c *contexts.Context, err error) error {
    coreURL := strings.TrimRight(c.CoreURL, "/")
    switch {
    
}
}

checkpointSummaryLite

func ReadCheckpointMetadata(tree checkpoint.FileReader, checkpointPath string) (*CheckpointInfo, error) {
    metadataPath := checkpointPath + "/metadata.json"
    file, err := tree.File(metadataPath)
    if err != nil {
        return nil, fmt.Errorf("failed to find metadata at %s: %w", metadataPath, err)
    }

// Session metadata paths in the summary are absolute (e.g., "/ca/b75de47439/0/metadata.json").
    // For a full tree, strip the leading "/" to get tree-relative paths.
    normalizePath := func(raw string) string {
        return strings.TrimPrefix(raw, "/")
    }
    return decodeCheckpointInfo(file, tree, checkpointPath, normalizePath)
}