From 6c32550345b8dcf1380034a4541c848595f79dbf Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Fri, 31 Jul 2026 02:15:05 +1000 Subject: [PATCH] chore: replace personal owner names in tests and config with generic values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test fixtures used 'sam', 'samcharles93', and 'sam/' 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 --- cmd/archied/main_test.go | 14 ++++---- config.example.toml | 2 +- examples/skills/archie-wf-node/SKILL.md | 2 +- examples/skills/archie-wf-python/SKILL.md | 2 +- internal/daemon/daemon_test.go | 8 ++--- internal/gateway/gateway_test.go | 16 ++++----- internal/gateway/tasks_test.go | 36 +++++++++---------- .../infrastructure/configuration/dir_test.go | 6 ++-- .../configuration/loader_test.go | 8 ++--- 9 files changed, 47 insertions(+), 47 deletions(-) diff --git a/cmd/archied/main_test.go b/cmd/archied/main_test.go index 67dfb40bd..1981928a5 100644 --- a/cmd/archied/main_test.go +++ b/cmd/archied/main_test.go @@ -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) } diff --git a/config.example.toml b/config.example.toml index 62ab35411..454eae747 100644 --- a/config.example.toml +++ b/config.example.toml @@ -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" diff --git a/examples/skills/archie-wf-node/SKILL.md b/examples/skills/archie-wf-node/SKILL.md index 0c80c93c4..99c3f8371 100644 --- a/examples/skills/archie-wf-node/SKILL.md +++ b/examples/skills/archie-wf-node/SKILL.md @@ -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" diff --git a/examples/skills/archie-wf-python/SKILL.md b/examples/skills/archie-wf-python/SKILL.md index 018f0984e..0277fe207 100644 --- a/examples/skills/archie-wf-python/SKILL.md +++ b/examples/skills/archie-wf-python/SKILL.md @@ -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" diff --git a/internal/daemon/daemon_test.go b/internal/daemon/daemon_test.go index fd1682470..d25e3fa7e 100644 --- a/internal/daemon/daemon_test.go +++ b/internal/daemon/daemon_test.go @@ -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") } } diff --git a/internal/gateway/gateway_test.go b/internal/gateway/gateway_test.go index 335925603..789e50cae 100644 --- a/internal/gateway/gateway_test.go +++ b/internal/gateway/gateway_test.go @@ -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) } } diff --git a/internal/gateway/tasks_test.go b/internal/gateway/tasks_test.go index d56938ac2..3099c85f8 100644 --- a/internal/gateway/tasks_test.go +++ b/internal/gateway/tasks_test.go @@ -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"}) diff --git a/internal/infrastructure/configuration/dir_test.go b/internal/infrastructure/configuration/dir_test.go index 96cafa909..ed68f3773 100644 --- a/internal/infrastructure/configuration/dir_test.go +++ b/internal/infrastructure/configuration/dir_test.go @@ -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", ` diff --git a/internal/infrastructure/configuration/loader_test.go b/internal/infrastructure/configuration/loader_test.go index 6ef2c3192..1f6f896f7 100644 --- a/internal/infrastructure/configuration/loader_test.go +++ b/internal/infrastructure/configuration/loader_test.go @@ -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 {