clusterdiscovery: recompute account per op; cache only cluster->cores · Entire

clusterdiscovery: recompute account per op; cache only cluster->cores

b75fe5e→main·

toothbrush·1mo ago·4 files·+282 added/-291 removed

Reworks ResolveContextForCluster around the cluster_cores cache and a fresh per-operation account selection, replacing the cluster->context binding model:

Drops the post-success bind hook from git-remote-entire (makeBindHook) and adds a cacheDir argument to ResolveContextForCluster. The binding APIs in contexts/ and the auth command surface are removed in a follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Sessions

32bbd6549652 View transcript

Changes

4

26 unmodified lines

... // elided for brevity

Code Implementation

package clusterdiscovery

import (
    "encoding/json"
    "net/http"
    "sync/atomic"
    "testing"
)

func TestResolveContextForClusterBindingShortCircuits(t *testing.T) {
    // Test of context resolution behavior
}

// Additional tests omitted for brevity
// Test if binding works correctly
func TestMakeBindHook(t *testing.T) { 
    // Test implementation
}

Error Handling