chore: replace personal owner names in tests and config with generic values

Test fixtures used 'sam', 'samcharles93', and 'sam/<repo>' as owner
names. These are personal and machine-specific — the repo should use
generic placeholders like 'acme' (matching the existing convention in
worktree_test.go).

config.example.toml: samcharles93 -> your-github-username
Test owner: sam -> acme
Repo refs: sam/archie-core -> acme/archie-core, etc.
Example skills: sam -> acme
This commit is contained in:
sam committed 2026-07-31 02:15:41 +10:00
1 parent 82b420520a
commit 6c32550345
9 files changed
+47 -47

No files matched your search

+7 -7
View File
@@ -275,10 +275,10 @@ func TestChatTaskProfilesUsesIdentityRepositories(t *testing.T) {
cfg := config.Config{
Repos: []config.Repo{{Owner: "legacy", Name: "ignored"}},
Identities: []config.IdentityConfig{
{Name: "builder", Repos: []config.Repo{{Owner: "sam", Name: "archie-core"}}},
{Name: "builder", Repos: []config.Repo{{Owner: "acme", Name: "archie-core"}}},
{Name: "reviewer", Repos: []config.Repo{
{Owner: "sam", Name: "example-service"},
{Owner: "sam", Name: "ai-sdk"},
{Owner: "acme", Name: "example-service"},
{Owner: "acme", Name: "ai-sdk"},
}},
},
}
@@ -290,9 +290,9 @@ func TestChatTaskProfilesUsesIdentityRepositories(t *testing.T) {
if len(profiles) != 2 {
t.Fatalf("profiles = %d, want 2", len(profiles))
}
if profiles[1].Identity != "reviewer" || profiles[1].DefaultOwner != "sam" ||
if profiles[1].Identity != "reviewer" || profiles[1].DefaultOwner != "acme" ||
profiles[1].DefaultRepo != "example-service" ||
len(profiles[1].Repos) != 2 || profiles[1].Repos[1] != "sam/ai-sdk" {
len(profiles[1].Repos) != 2 || profiles[1].Repos[1] != "acme/ai-sdk" {
t.Errorf("reviewer profile = %+v", profiles[1])
}
}
@@ -355,7 +355,7 @@ func TestChatTaskCommandsEndToEnd(t *testing.T) {
profiles, defaultIdentity := chatTaskProfiles(config.Config{
Identities: []config.IdentityConfig{{
Name: "reviewer",
Repos: []config.Repo{{Owner: "sam", Name: "archie-core"}},
Repos: []config.Repo{{Owner: "acme", Name: "archie-core"}},
}},
})
creator := gateway.NewStoreTaskCreatorForProfiles(
@@ -385,7 +385,7 @@ func TestChatTaskCommandsEndToEnd(t *testing.T) {
t.Fatal(err)
}
if task == nil || task.Source != store.SourceChat || task.Identity != "reviewer" ||
task.Owner != "sam" || task.Repo != "archie-core" ||
task.Owner != "acme" || task.Repo != "archie-core" ||
task.Workflow != "feasibility" {
t.Fatalf("spawned task = %+v", task)
}
+1 -1
View File
@@ -125,7 +125,7 @@ gate_max_failures = 5
# pull_policy = "missing" # "missing" or "always"
[[repos]]
owner = "samcharles93"
owner = "your-github-username"
name = "todo"
base = "main"
ecosystem = "go" # "go", "python", "node", "rust", or "custom"
+1 -1
View File
@@ -20,7 +20,7 @@ When archie-core's `[[repos]]` entry sets `ecosystem = "node"`, the daemon runs
```toml
[[repos]]
owner = "sam"
owner = "acme"
name = "my-node-project"
ecosystem = "node"
+1 -1
View File
@@ -20,7 +20,7 @@ When archie-core's `[[repos]]` entry sets `ecosystem = "python"`, the daemon run
```toml
[[repos]]
owner = "sam"
owner = "acme"
name = "my-python-project"
ecosystem = "python"
+4 -4
View File
@@ -931,19 +931,19 @@ func TestRepoForPrefersOwningIdentityRepoList(t *testing.T) {
d, _, _, _, _ := twoIdentityDaemon(t)
// Identity-only repo, absent from the root Cfg.Repos list.
identityOnlyRepo := config.Repo{Owner: "sam", Name: "identity-only"}
identityOnlyRepo := config.Repo{Owner: "acme", Name: "identity-only"}
d.Identities[0].Repos = append(d.Identities[0].Repos, identityOnlyRepo)
got, ok := d.repoFor(&store.Task{Owner: "sam", Repo: "identity-only", Identity: "archie"})
got, ok := d.repoFor(&store.Task{Owner: "acme", Repo: "identity-only", Identity: "archie"})
if !ok {
t.Fatal("repoFor did not find an identity-only repo via the owning identity's repo list")
}
if got.Owner != "sam" || got.Name != "identity-only" {
if got.Owner != "acme" || got.Name != "identity-only" {
t.Fatalf("repoFor = %+v, want sam/identity-only", got)
}
// The same repo name must NOT resolve for an unrelated identity.
if _, ok := d.repoFor(&store.Task{Owner: "sam", Repo: "identity-only", Identity: "winter"}); ok {
if _, ok := d.repoFor(&store.Task{Owner: "acme", Repo: "identity-only", Identity: "winter"}); ok {
t.Fatal("repoFor leaked archie's identity-only repo to winter")
}
}
+8 -8
View File
@@ -376,7 +376,7 @@ func TestRouteSpawnParsesRepoAndWorkflow(t *testing.T) {
r := NewRouter(nil, nil, "test-gw")
r.Tasks = tc
r.Identity = "archie"
reply, err := r.Route(context.Background(), Message{Text: "/spawn repo=sam/example-service workflow=tdd Fix the flaky test"})
reply, err := r.Route(context.Background(), Message{Text: "/spawn repo=acme/example-service workflow=tdd Fix the flaky test"})
if err != nil {
t.Fatalf("Route: %v", err)
}
@@ -387,8 +387,8 @@ func TestRouteSpawnParsesRepoAndWorkflow(t *testing.T) {
t.Fatalf("requests = %d, want 1", len(tc.requests))
}
got := tc.requests[0]
if got.Repo != "sam/example-service" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" || got.Identity != "archie" {
t.Errorf("request = %+v, want {Repo:sam/example-service Workflow:tdd Title:\"Fix the flaky test\" Identity:archie}", got)
if got.Repo != "acme/example-service" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" || got.Identity != "archie" {
t.Errorf("request = %+v, want {Repo:acme/example-service Workflow:tdd Title:\"Fix the flaky test\" Identity:archie}", got)
}
}
@@ -399,7 +399,7 @@ func TestRouteSpawnParsesIdentity(t *testing.T) {
r.Identity = "default"
reply, err := r.Route(context.Background(), Message{
Text: "/spawn identity=reviewer repo=sam/example-service workflow=tdd Fix the flaky test",
Text: "/spawn identity=reviewer repo=acme/example-service workflow=tdd Fix the flaky test",
})
if err != nil {
t.Fatalf("Route: %v", err)
@@ -408,7 +408,7 @@ func TestRouteSpawnParsesIdentity(t *testing.T) {
t.Errorf("reply = %q, want task creation confirmation", reply)
}
got := tc.requests[0]
if got.Identity != "reviewer" || got.Repo != "sam/example-service" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" {
if got.Identity != "reviewer" || got.Repo != "acme/example-service" || got.Workflow != "tdd" || got.Title != "Fix the flaky test" {
t.Errorf("request = %+v, want selected identity, repo, workflow, and full title", got)
}
}
@@ -436,12 +436,12 @@ func TestRouteSpawnTitleLooksLikeKeyValueIsPreserved(t *testing.T) {
tc := &fakeTaskCreator{}
r := NewRouter(nil, nil, "test-gw")
r.Tasks = tc
if _, err := r.Route(context.Background(), Message{Text: "/spawn repo=sam/example-service Fix x=y in config"}); err != nil {
if _, err := r.Route(context.Background(), Message{Text: "/spawn repo=acme/example-service Fix x=y in config"}); err != nil {
t.Fatalf("Route: %v", err)
}
got := tc.requests[0]
if got.Repo != "sam/example-service" || got.Title != "Fix x=y in config" {
t.Errorf("request = %+v, want Repo:sam/example-service Title:\"Fix x=y in config\"", got)
if got.Repo != "acme/example-service" || got.Title != "Fix x=y in config" {
t.Errorf("request = %+v, want Repo:acme/example-service Title:\"Fix x=y in config\"", got)
}
}
+18 -18
View File
@@ -29,7 +29,7 @@ func (f *fakeChatTaskWriter) EnqueueChatTask(ctx context.Context, owner, repo, t
func TestStoreTaskCreatorCreatesTask(t *testing.T) {
sw := &fakeChatTaskWriter{}
tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"})
tc := NewStoreTaskCreator(sw, "acme", "example-service", []string{"acme/example-service"})
id, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "Fix the login bug"})
if err != nil {
t.Fatalf("CreateTask: %v", err)
@@ -37,8 +37,8 @@ func TestStoreTaskCreatorCreatesTask(t *testing.T) {
if id == 0 {
t.Error("task id should be non-zero")
}
if sw.owner != "sam" || sw.repo != "example-service" {
t.Errorf("owner/repo = %s/%s, want sam/example-service", sw.owner, sw.repo)
if sw.owner != "acme" || sw.repo != "example-service" {
t.Errorf("owner/repo = %s/%s, want acme/example-service", sw.owner, sw.repo)
}
if sw.title != "Fix the login bug" {
t.Errorf("title = %q", sw.title)
@@ -55,7 +55,7 @@ func TestStoreTaskCreatorRejectsEmptyRepo(t *testing.T) {
func TestStoreTaskCreatorSyntheticNumbersDiffer(t *testing.T) {
sw := &fakeChatTaskWriter{}
tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"})
tc := NewStoreTaskCreator(sw, "acme", "example-service", []string{"acme/example-service"})
if _, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "first"}); err != nil {
t.Fatal(err)
}
@@ -77,7 +77,7 @@ func TestStoreTaskCreatorReturnsRealID(t *testing.T) {
// ID (whatever EnqueueChatTask returns), never the synthetic issue
// number used for uniqueness.
sw := &fakeChatTaskWriter{nextID: 999}
tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"})
tc := NewStoreTaskCreator(sw, "acme", "example-service", []string{"acme/example-service"})
id, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "task"})
if err != nil {
t.Fatal(err)
@@ -92,19 +92,19 @@ func TestStoreTaskCreatorReturnsRealID(t *testing.T) {
func TestStoreTaskCreatorExplicitRepoAllowed(t *testing.T) {
sw := &fakeChatTaskWriter{}
tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service", "sam/archie-core"})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Repo: "sam/archie-core"})
tc := NewStoreTaskCreator(sw, "acme", "example-service", []string{"acme/example-service", "acme/archie-core"})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Repo: "acme/archie-core"})
if err != nil {
t.Fatalf("CreateTask: %v", err)
}
if sw.owner != "sam" || sw.repo != "archie-core" {
t.Errorf("owner/repo = %s/%s, want sam/archie-core", sw.owner, sw.repo)
if sw.owner != "acme" || sw.repo != "archie-core" {
t.Errorf("owner/repo = %s/%s, want acme/archie-core", sw.owner, sw.repo)
}
}
func TestStoreTaskCreatorExplicitRepoNotAllowedRejected(t *testing.T) {
sw := &fakeChatTaskWriter{}
tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"})
tc := NewStoreTaskCreator(sw, "acme", "example-service", []string{"acme/example-service"})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Repo: "someone-else/private-repo"})
if err == nil || !strings.Contains(err.Error(), "not configured for this identity") {
t.Errorf("err = %v, want repo-not-allowed error", err)
@@ -115,7 +115,7 @@ func TestStoreTaskCreatorExplicitRepoNotAllowedRejected(t *testing.T) {
}
func TestStoreTaskCreatorMalformedRepoRejected(t *testing.T) {
tc := NewStoreTaskCreator(&fakeChatTaskWriter{}, "sam", "example-service", []string{"no-slash"})
tc := NewStoreTaskCreator(&fakeChatTaskWriter{}, "acme", "example-service", []string{"no-slash"})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Repo: "no-slash"})
if err == nil || !strings.Contains(err.Error(), "owner/name") {
t.Errorf("err = %v, want owner/name format error", err)
@@ -124,7 +124,7 @@ func TestStoreTaskCreatorMalformedRepoRejected(t *testing.T) {
func TestStoreTaskCreatorPropagatesWorkflowAndIdentity(t *testing.T) {
sw := &fakeChatTaskWriter{}
tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"})
tc := NewStoreTaskCreator(sw, "acme", "example-service", []string{"acme/example-service"})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Workflow: "tdd", Identity: "archie"})
if err != nil {
t.Fatal(err)
@@ -136,7 +136,7 @@ func TestStoreTaskCreatorPropagatesWorkflowAndIdentity(t *testing.T) {
func TestStoreTaskCreatorPropagatesStoreError(t *testing.T) {
sw := &fakeChatTaskWriter{err: fmt.Errorf("store unavailable")}
tc := NewStoreTaskCreator(sw, "sam", "example-service", []string{"sam/example-service"})
tc := NewStoreTaskCreator(sw, "acme", "example-service", []string{"acme/example-service"})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x"})
if err == nil || !strings.Contains(err.Error(), "store unavailable") {
t.Errorf("err = %v, want store error propagated", err)
@@ -146,23 +146,23 @@ func TestStoreTaskCreatorPropagatesStoreError(t *testing.T) {
func TestStoreTaskCreatorSelectsIdentityProfile(t *testing.T) {
sw := &fakeChatTaskWriter{}
tc := NewStoreTaskCreatorForProfiles(sw, []TaskProfile{
{Identity: "builder", DefaultOwner: "sam", DefaultRepo: "archie-core", Repos: []string{"sam/archie-core"}},
{Identity: "reviewer", DefaultOwner: "sam", DefaultRepo: "example-service", Repos: []string{"sam/example-service"}},
{Identity: "builder", DefaultOwner: "acme", DefaultRepo: "archie-core", Repos: []string{"acme/archie-core"}},
{Identity: "reviewer", DefaultOwner: "acme", DefaultRepo: "example-service", Repos: []string{"acme/example-service"}},
})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "review this", Identity: "reviewer"})
if err != nil {
t.Fatalf("CreateTask: %v", err)
}
if sw.owner != "sam" || sw.repo != "example-service" || sw.identity != "reviewer" {
t.Errorf("created task = %s/%s identity=%s, want sam/example-service identity=reviewer", sw.owner, sw.repo, sw.identity)
if sw.owner != "acme" || sw.repo != "example-service" || sw.identity != "reviewer" {
t.Errorf("created task = %s/%s identity=%s, want acme/example-service identity=reviewer", sw.owner, sw.repo, sw.identity)
}
}
func TestStoreTaskCreatorRejectsUnknownIdentity(t *testing.T) {
sw := &fakeChatTaskWriter{}
tc := NewStoreTaskCreatorForProfiles(sw, []TaskProfile{
{Identity: "builder", DefaultOwner: "sam", DefaultRepo: "archie-core", Repos: []string{"sam/archie-core"}},
{Identity: "builder", DefaultOwner: "acme", DefaultRepo: "archie-core", Repos: []string{"acme/archie-core"}},
})
_, err := tc.CreateTask(context.Background(), SpawnRequest{Title: "x", Identity: "unknown"})
@@ -365,7 +365,7 @@ host = "https://github.test"
token_env = "GH_TOKEN"
[[repos]]
owner = "sam"
owner = "acme"
name = "legacy-repo"
`)
@@ -742,7 +742,7 @@ type = "github"
token = { engine = "env", key = "GH_TOKEN" }
[[repos]]
owner = "sam"
owner = "acme"
name = "old-repo"
`)
@@ -765,7 +765,7 @@ max_retries = 2
type = "github"
token = { engine = "env", key = "BASE_TOKEN" }
[[repos]]
owner = "sam"
owner = "acme"
name = "base-repo"
`)
writeFile(t, overlayDir, "config.toml", `
@@ -328,7 +328,7 @@ bot_user = "archie"
forge = { type = "gitea", host = "https://git.example.test", token = { engine = "env", key = "ARCHIE_TOKEN" } }
[[identities.repos]]
owner = "sam"
owner = "acme"
name = "archie-core"
base = "main"
ecosystem = "go"
@@ -339,7 +339,7 @@ bot_user = "winter"
forge = { type = "gitea", host = "https://git.example.test", token = { engine = "env", key = "WINTER_TOKEN" } }
[[identities.repos]]
owner = "sam"
owner = "acme"
name = "example-service"
base = "main"
ecosystem = "go"
@@ -382,7 +382,7 @@ bot_user = "solo"
forge = { type = "github", host = "https://github.test", token_env = "GH_TOKEN" }
[[repos]]
owner = "sam"
owner = "acme"
name = "my-repo"
`))
if err != nil {
@@ -419,7 +419,7 @@ bot_user = "archie"
forge = { type = "github" }
[[identities.repos]]
owner = "sam"
owner = "acme"
name = "archie-core"
`))
if err == nil {