diff --git a/pkg/cli/bootstrap_command.go b/pkg/cli/bootstrap_command.go index 9c8dcbfb1be..e2c6510c664 100644 --- a/pkg/cli/bootstrap_command.go +++ b/pkg/cli/bootstrap_command.go @@ -48,6 +48,7 @@ Sources use the same syntax as '` + string(constants.CLIExtensionPrefix) + ` add return fmt.Errorf("--repo is required. Example: %s --repo github/gh-aw\n\nRun '%s --help' for usage information", cmd.CommandPath(), cmd.CommandPath()) } + bootstrapLog.Printf("Bootstrap command invoked: repo=%s, createRepo=%t, planOnly=%t, noCompile=%t, sources=%d", repo, createRepo, planOnly, noCompile, len(args)) return RunBootstrap(BootstrapOptions{ Ctx: cmd.Context(), Repo: repo, diff --git a/pkg/cli/bootstrap_config.go b/pkg/cli/bootstrap_config.go index 1673dcf2029..e932e3b49ec 100644 --- a/pkg/cli/bootstrap_config.go +++ b/pkg/cli/bootstrap_config.go @@ -18,6 +18,7 @@ func printBootstrapConfigTODO(w io.Writer, profile *resolvedBootstrapProfile) { return } + bootstrapLog.Printf("Printing bootstrap config TODO: package=%s, actions=%d", profile.PackageID, len(profile.Profile.Config)) fmt.Fprintln(w, "") fmt.Fprintln(w, console.FormatInfoMessage("Post-installation steps from "+profile.PackageID+":")) @@ -77,6 +78,7 @@ func executeBootstrapConfigForAdd(ctx context.Context, repo string, sources []st return errors.New("--repo OWNER/REPO is required to apply bootstrap config steps interactively") } + bootstrapLog.Printf("Applying bootstrap config for add: repo=%s, package=%s, actions=%d, useCopilotRequests=%t", repo, profile.PackageID, len(profile.Profile.Config), useCopilotRequests) fmt.Fprintln(os.Stderr, "") fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Applying post-installation steps from "+profile.PackageID+"...")) diff --git a/pkg/cli/bootstrap_profile_manifest.go b/pkg/cli/bootstrap_profile_manifest.go index 02b25f2498c..af00794d447 100644 --- a/pkg/cli/bootstrap_profile_manifest.go +++ b/pkg/cli/bootstrap_profile_manifest.go @@ -52,6 +52,7 @@ type resolvedBootstrapProfile struct { } func resolveBootstrapProfileFromSources(ctx context.Context, sources []string) (*resolvedBootstrapProfile, error) { + bootstrapLog.Printf("Resolving bootstrap profile from %d source(s)", len(sources)) profiles := make([]*resolvedBootstrapProfile, 0, 1) seenPackageIDs := make(map[string]struct{}) @@ -100,9 +101,11 @@ func resolveBootstrapProfileFromSources(ctx context.Context, sources []string) ( } if len(profiles) == 0 { + bootstrapLog.Print("No bootstrap profile matched the selected sources") return nil, nil } if len(profiles) == 1 { + bootstrapLog.Printf("Resolved bootstrap profile: packageID=%s, actions=%d", profiles[0].PackageID, len(profiles[0].Profile.Config)) return profiles[0], nil } @@ -208,6 +211,7 @@ func extractManifestConfig(value any, manifestPath string) (*repositoryPackageBo bootstrap.Config = append(bootstrap.Config, action) } + bootstrapLog.Printf("Extracted bootstrap manifest config: actions=%d, manifest=%s", len(bootstrap.Config), manifestPath) return bootstrap, nil } diff --git a/pkg/cli/bootstrap_profile_runner.go b/pkg/cli/bootstrap_profile_runner.go index d8275364156..ec1c31facea 100644 --- a/pkg/cli/bootstrap_profile_runner.go +++ b/pkg/cli/bootstrap_profile_runner.go @@ -146,6 +146,7 @@ func buildBootstrapProfilePlan(ctx context.Context, repo string, profile *resolv } } + bootstrapLog.Printf("Built bootstrap profile plan: repo=%s, needsMutation=%t, planLines=%d", repo, needsMutation, len(lines)) return needsMutation, lines, nil } @@ -154,6 +155,8 @@ func executeBootstrapProfile(ctx context.Context, config bootstrapProfileRunConf return nil } + bootstrapLog.Printf("Executing bootstrap profile: repo=%s, actions=%d, useCopilotRequests=%t", config.Repo, len(config.Profile.Profile.Config), config.UseCopilotRequests) + state, err := bootstrapProfileState(ctx, config.Repo) if err != nil { return err @@ -169,9 +172,11 @@ func executeBootstrapProfile(ctx context.Context, config bootstrapProfileRunConf return err } if !pending && action.Type != "handoff" { + bootstrapLog.Printf("Skipping bootstrap action (no mutation needed): type=%s", action.Type) continue } + bootstrapLog.Printf("Applying bootstrap action: type=%s", action.Type) switch action.Type { case "require-owner-type": if err := runBootstrapRequireOwnerType(ctx, config.Repo, action); err != nil { @@ -546,6 +551,7 @@ func createBootstrapGitHubApp(ctx context.Context, repo, owner, repoName, ownerT server := &http.Server{} redirectURL := fmt.Sprintf("http://%s/callback", listener.Addr().String()) manifest := buildBootstrapGitHubAppManifest(action, appName, homepageURL, redirectURL, description) + bootstrapLog.Printf("Creating GitHub App via browser manifest flow: appOwner=%s, appName=%s, redirectURL=%s", appOwner, appName, redirectURL) registrationURL := buildBootstrapGitHubAppRegistrationURL(appOwner, appOwnerType, state) registrationPage, err := renderBootstrapGitHubAppRegistrationPage(registrationURL, manifest) if err != nil { @@ -695,6 +701,7 @@ func waitForBootstrapGitHubAppInstallation(ctx context.Context, repo string, cre if createdApp == nil || createdApp.InstallURL == "" || createdApp.Slug == "" { return nil } + bootstrapLog.Printf("Polling for GitHub App installation: repo=%s, slug=%s", repo, createdApp.Slug) deadlineTimer := time.NewTimer(bootstrapProfileManifestTimeout) defer deadlineTimer.Stop() pollTicker := time.NewTicker(bootstrapProfileInstallPollDelay) diff --git a/pkg/workflow/compiler_yaml_step_lifecycle.go b/pkg/workflow/compiler_yaml_step_lifecycle.go index 306563ca08d..a83ffc65a72 100644 --- a/pkg/workflow/compiler_yaml_step_lifecycle.go +++ b/pkg/workflow/compiler_yaml_step_lifecycle.go @@ -125,6 +125,8 @@ func (c *Compiler) generateCreateAwInfo(yaml *strings.Builder, data *WorkflowDat firewallType = "squid" } + compilerYamlStepLifecycleLog.Printf("Generating aw_info step: engine=%s, modelConfigured=%t, version=%s, firewallEnabled=%t, staged=%s", engineID, modelConfigured, version, firewallEnabled, stagedValue) + yaml.WriteString(" - name: Generate agentic run info\n") yaml.WriteString(" id: generate_aw_info\n") yaml.WriteString(" env:\n")