Skip to content

[log] Add debug logging to activation-job compiler split-outs#45179

Merged
pelikhan merged 1 commit into
mainfrom
add-activation-compiler-debug-logging-31475854076025ed
Jul 13, 2026
Merged

[log] Add debug logging to activation-job compiler split-outs#45179
pelikhan merged 1 commit into
mainfrom
add-activation-compiler-debug-logging-31475854076025ed

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds debug log statements to the activation-job compiler split-out files to improve observability during compilation.

Changes

All changes are additive — no logic, behaviour, or output is modified.

pkg/workflow/compiler_activation_daily_aic.go

  • Log entry at start of buildActivationDailyAICGuardrailStep with dedicated_app and cache_enabled flags.
  • Log entry before prepending the dedicated daily-AIC app-token mint step.
  • Log entry in buildDailyAICActivationJobEnv when max-daily-ai-credits is set but empty (env omitted).

pkg/workflow/compiler_activation_outputs.go

  • Log entry before adding the remove-trigger-label step.
  • Log entry before adding the get-trigger-label step.

pkg/workflow/compiler_activation_permissions.go

  • Log entry when skipping the activation app-token mint step (with reason).
  • Log entry when adding the activation app-token mint step.
  • Log entry after computing activation job permissions (logs scope count).
  • Log entry when rejecting an activation job due to write gh commands in activation scripts (logs command count).

pkg/workflow/compiler_yaml_post_agent.go

  • Log entry after collecting artifact paths for unified agent upload (logs path count).
  • Log entry at the start of generatePostAgentCollectionAndUpload.
  • Log entry before emitting the unified agent artifact upload (logs path count).

Motivation

The activation-job compiler logic was split across multiple files in a prior refactor. These log statements fill the observability gap left by that split, making it easier to trace compilation decisions (token minting, label handling, permission scoping, artifact collection) when debugging compiler output.

Testing

No functional changes; existing compiler tests cover correctness. Debug log output is gated by the existing compilerActivationJobLog / compilerYamlLog loggers.

Generated by PR Description Updater for #45179 · 25.9 AIC · ⌖ 4.46 AIC · ⊞ 4.7K ·

Adds namespaced debug logging at key decision points in four compiler
files that were newly split out from the (now deleted)
compiler_activation_job_builder.go and compiler_yaml_main_job.go.

- compiler_activation_permissions.go: app-token gate (add/skip),
  computed permission-scope count, write-command rejection.
- compiler_activation_daily_aic.go: guardrail step build flags,
  dedicated app-token prepend, empty max-daily-ai-credits env skip.
- compiler_yaml_post_agent.go: artifact-path collection count,
  post-agent phase entry, unified upload path count.
- compiler_activation_outputs.go: remove-label vs get-label branch.

All reuse the existing package-level compilerActivationJobLog /
compilerYamlLog loggers (no new imports or vars). Log arguments are
side-effect-free (field reads, len(), pointer nil checks).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor Author

Nice addition of structured debug logging across the compiler split-outs! The changes are well-scoped and reuse existing loggers. 👍

Since tests could not be run in the agent environment (Go version mismatch), CI will need to validate the build. Consider confirming CI passes before merging.

If you would like a hand:

Verify that the Go build and tests pass for the logging changes in compiler_activation_daily_aic.go, compiler_activation_outputs.go, compiler_activation_permissions.go, and compiler_yaml_post_agent.go. Ensure all format verbs match their arguments and no new imports are required.

Generated by ✅ Contribution Check · 65.8 AIC · ⌖ 7 AIC · ⊞ 6.2K ·

@pelikhan
pelikhan merged commit c4c2560 into main Jul 13, 2026
@pelikhan
pelikhan deleted the add-activation-compiler-debug-logging-31475854076025ed branch July 13, 2026 06:27
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.82.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant