diff --git a/pkg/agentic/commands_forge.go b/pkg/agentic/commands_forge.go index 7132e20..f74176d 100644 --- a/pkg/agentic/commands_forge.go +++ b/pkg/agentic/commands_forge.go @@ -90,7 +90,7 @@ func parseForgeArgs(options core.Options) (org, repo string, num int64) { return } -func fmtIndex(n int64) string { return strconv.FormatInt(n, 10) } +func formatIndex(n int64) string { return strconv.FormatInt(n, 10) } // c.Command("issue/get", core.Command{Description: "Get a Forge issue", Action: s.cmdIssueGet}) // c.Command("pr/merge", core.Command{Description: "Merge a Forge PR", Action: s.cmdPRMerge}) diff --git a/pkg/agentic/commands_forge_example_test.go b/pkg/agentic/commands_forge_example_test.go index 4a45b9d..1dd9a9e 100644 --- a/pkg/agentic/commands_forge_example_test.go +++ b/pkg/agentic/commands_forge_example_test.go @@ -13,7 +13,7 @@ func Example_parseForgeArgs() { // Output: core go-io 42 } -func Example_fmtIndex() { - core.Println(fmtIndex(42)) +func Example_formatIndex() { + core.Println(formatIndex(42)) // Output: 42 } diff --git a/pkg/agentic/commands_forge_test.go b/pkg/agentic/commands_forge_test.go index f340b04..bc1d425 100644 --- a/pkg/agentic/commands_forge_test.go +++ b/pkg/agentic/commands_forge_test.go @@ -54,13 +54,13 @@ func TestCommandsforge_ParseForgeArgs_Bad_InvalidNumber(t *testing.T) { assert.Equal(t, int64(0), num, "invalid number should parse as 0") } -// --- fmtIndex --- +// --- formatIndex --- -func TestCommandsforge_FmtIndex_Good(t *testing.T) { - assert.Equal(t, "1", fmtIndex(1)) - assert.Equal(t, "42", fmtIndex(42)) - assert.Equal(t, "0", fmtIndex(0)) - assert.Equal(t, "999999", fmtIndex(999999)) +func TestCommandsforge_FormatIndex_Good(t *testing.T) { + assert.Equal(t, "1", formatIndex(1)) + assert.Equal(t, "42", formatIndex(42)) + assert.Equal(t, "0", formatIndex(0)) + assert.Equal(t, "999999", formatIndex(999999)) } // --- parseForgeArgs Ugly --- @@ -84,20 +84,20 @@ func TestCommandsforge_ParseForgeArgs_Ugly_NegativeNumber(t *testing.T) { assert.Equal(t, int64(-5), num, "negative numbers parse but are semantically invalid") } -// --- fmtIndex Bad/Ugly --- +// --- formatIndex Bad/Ugly --- -func TestCommandsforge_FmtIndex_Bad_Negative(t *testing.T) { - result := fmtIndex(-1) +func TestCommandsforge_FormatIndex_Bad_Negative(t *testing.T) { + result := formatIndex(-1) assert.Equal(t, "-1", result, "negative should format as negative string") } -func TestCommandsforge_FmtIndex_Ugly_VeryLarge(t *testing.T) { - result := fmtIndex(9999999999) +func TestCommandsforge_FormatIndex_Ugly_VeryLarge(t *testing.T) { + result := formatIndex(9999999999) assert.Equal(t, "9999999999", result) } -func TestCommandsforge_FmtIndex_Ugly_MaxInt64(t *testing.T) { - result := fmtIndex(9223372036854775807) // math.MaxInt64 +func TestCommandsforge_FormatIndex_Ugly_MaxInt64(t *testing.T) { + result := formatIndex(9223372036854775807) // math.MaxInt64 assert.NotEmpty(t, result) assert.Equal(t, "9223372036854775807", result) } diff --git a/pkg/agentic/content.go b/pkg/agentic/content.go index 151dc20..17a8d5a 100644 --- a/pkg/agentic/content.go +++ b/pkg/agentic/content.go @@ -308,7 +308,7 @@ func (s *PrepSubsystem) handleContentFromPlan(ctx context.Context, options core. // core.Option{Key: "title", Value: "Set up the workspace"}, // // )) -func (s *PrepSubsystem) handleContentSchemaGenerate(_ context.Context, options core.Options) core.Result { +func (s *PrepSubsystem) handleContentSchemaGenerate(ctx context.Context, options core.Options) core.Result { input := ContentSchemaInput{ Type: optionStringValue(options, "schema_type", "schema-type", "type", "kind"), Title: optionStringValue(options, "title", "headline"), @@ -327,7 +327,7 @@ func (s *PrepSubsystem) handleContentSchemaGenerate(_ context.Context, options c input.Steps = contentSchemaStepsValue(value) } - _, output, err := s.contentSchemaGenerate(context.Background(), nil, input) + _, output, err := s.contentSchemaGenerate(ctx, nil, input) if err != nil { return core.Result{Value: err, OK: false} }