Skip to content

Commit 04317af

Browse files
authored
[aw] Pin Daily Go Function Namer experiment to concrete Claude models (#37325)
1 parent d1d9241 commit 04317af

3 files changed

Lines changed: 45 additions & 5 deletions

File tree

.github/workflows/daily-function-namer.lock.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/daily-function-namer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ engine:
2020

2121
experiments:
2222
model_size:
23-
variants: [agent, small-agent]
24-
description: "Tests whether a small-agent model identifies function rename candidates with equivalent quality at lower token cost."
25-
hypothesis: "H0: no change in issue creation rate or run success rate. H1: small-agent reduces effective token usage >=30% with equivalent run success rate (>=0.90)."
23+
variants: [claude-sonnet-4-6, claude-haiku-4-5-20251001]
24+
description: "Tests whether Claude Haiku identifies function rename candidates with equivalent quality at lower token cost versus Claude Sonnet."
25+
hypothesis: "H0: no change in issue creation rate or run success rate. H1: Claude Haiku reduces effective token usage >=30% with equivalent run success rate (>=0.90)."
2626
metric: effective_tokens_total
2727
secondary_metrics: [run_success_rate, run_duration_ms]
2828
guardrail_metrics:

pkg/workflow/prompts_test.go

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"strings"
99
"testing"
1010

11+
"github.com/github/gh-aw/pkg/parser"
1112
"github.com/github/gh-aw/pkg/stringutil"
1213
)
1314

@@ -241,6 +242,45 @@ func TestDailyFunctionNamerColdStartHandling(t *testing.T) {
241242
}
242243
}
243244

245+
func TestDailyFunctionNamerUsesConcreteClaudeModelsForExperiment(t *testing.T) {
246+
repoRoot, err := findRepoRoot()
247+
if err != nil {
248+
t.Fatalf("Failed to find repo root: %v", err)
249+
}
250+
251+
workflowFile := filepath.Join(repoRoot, ".github", "workflows", "daily-function-namer.md")
252+
content, err := os.ReadFile(workflowFile)
253+
if err != nil {
254+
t.Fatalf("Failed to read workflow file: %v", err)
255+
}
256+
257+
parsed, err := parser.ExtractFrontmatterFromContent(string(content))
258+
if err != nil {
259+
t.Fatalf("Failed to parse workflow frontmatter: %v", err)
260+
}
261+
262+
experiments, ok := parsed.Frontmatter["experiments"].(map[string]any)
263+
if !ok {
264+
t.Fatal("Expected daily-function-namer workflow to define experiments")
265+
}
266+
modelSize, ok := experiments["model_size"].(map[string]any)
267+
if !ok {
268+
t.Fatal("Expected daily-function-namer workflow to define experiments.model_size")
269+
}
270+
variants, ok := modelSize["variants"].([]any)
271+
if !ok {
272+
t.Fatal("Expected daily-function-namer workflow to define experiments.model_size.variants")
273+
}
274+
if len(variants) != 2 || variants[0] != "claude-sonnet-4-6" || variants[1] != "claude-haiku-4-5-20251001" {
275+
t.Fatalf("Expected concrete Claude variants [claude-sonnet-4-6, claude-haiku-4-5-20251001], got %#v", variants)
276+
}
277+
for _, variant := range variants {
278+
if variant == "agent" || variant == "small-agent" {
279+
t.Fatalf("Expected concrete model variants, found alias %q", variant)
280+
}
281+
}
282+
}
283+
244284
// ============================================================================
245285
// Playwright Prompt Tests
246286
// ============================================================================

0 commit comments

Comments
 (0)