Skip to content

[log] Add debug logging to under-instrumented wasm/console helpers - #51508

Merged
pelikhan merged 1 commit into
mainfrom
add-debug-logging-wasm-helpers-df2960e6733065a2
Aug 9, 2026
Merged

[log] Add debug logging to under-instrumented wasm/console helpers#51508
pelikhan merged 1 commit into
mainfrom
add-debug-logging-wasm-helpers-df2960e6733065a2

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds pkg/logger debug instrumentation to five previously under-instrumented helper files spanning color-profile handling, Wasm console rendering, Wasm parser include/virtual-filesystem resolution, and AWF workflow-call helpers. No functional logic changes; only trace-level Printf/Print calls were inserted and one boolean was captured into a local variable to allow logging before return.

Change Classification

  • Type: infra
  • Scope: pkg/colorwriter, pkg/console, pkg/parser, pkg/workflow
  • Breaking: No

Key Changes

File Change Impact
pkg/colorwriter/colorprofile_writer.go Added colorwriterLog namespace logger; logs writer creation, NO_COLOR detection, and write-error fallback Low — stderr-only, gated by DEBUG
pkg/console/console_wasm.go Added consoleWasmLog namespace logger; logs FormatError invocation/context rendering and RenderTree invocation Low — Wasm build only
pkg/parser/remote_fetch_wasm.go Logs each branch of ResolveIncludePath (workflowspec rejection, security boundary violation, file-not-found) via existing parserLog Low — aids debugging Wasm import resolution
pkg/parser/virtual_fs_wasm.go Logs SetVirtualFiles/ClearVirtualFiles calls and each readFileFunc resolution path (builtin, user, not-found) Low — aids debugging virtual FS
pkg/workflow/awf_helpers.go Added awfHelpersLog; logs shouldUseWorkflowCallNetworkAllowedInput result (captured into local var before return), buildModelsJSONPathExportScript, and buildWorkflowCallNetworkAllowedUpdateScript (including marshal failure) Low — refactors early return into named variable, behavior unchanged

Impact Assessment

  • No downstream impact identified — all changes are additive debug logging gated by the DEBUG environment variable and write only to stderr.
  • One minor refactor in shouldUseWorkflowCallNetworkAllowedInput (return value captured in result before returning) preserves identical behavior.

Commits

87363651d Add debug logging to under-instrumented wasm/console helpers
```> Generated by [PR Description Updater](https://github.com/github/gh-aw/actions/runs/31309936841) for #51508 · auto · 13.9 AIC · ⌖ 4.21 AIC · ⊞ 7.2K · [◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw+%22gh-aw-workflow-call-id%3A+github%2Fgh-aw%2Fpr-description-caveman%22&type=pullrequests)

<!-- gh-aw-agentic-workflow: PR Description Updater, engine: copilot, model: auto, id: 31309936841, workflow_id: pr-description-caveman, run: https://github.com/github/gh-aw/actions/runs/31309936841 -->

Adds logger.New-based debug logging to five files that had zero or
minimal logging: parser wasm include-path resolution and virtual
filesystem lookups, the AWF network-allowed helper functions, the
color-profile writer, and the wasm console error/tree formatters.
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Hey @github-actions[bot] - thanks for adding debug logging to the under-instrumented wasm/console helpers! This is a focused, well-described improvement. Heres one thing that would strengthen the PR:

  • Add unit tests - The new logging calls in pkg/parser/remote_fetch_wasm.go, pkg/parser/virtual_fs_wasm.go, pkg/workflow/awf_helpers.go, pkg/colorwriter/colorprofile_writer.go, and pkg/console/console_wasm.go dont have test coverage yet. Unit tests for key logging paths (e.g., ResolveIncludePath entry and rejection cases, Degrade fallback) would validate that the Printf verbs and arguments are correct and that no unintended side effects occur.

Once tests are in place, this PR will be well-positioned for review!

Generated by ✅ Contribution Check · auto · 80.4 AIC · ⌖ 4.92 AIC · ⊞ 8.8K ·

@pelikhan
pelikhan merged commit de32b27 into main Aug 9, 2026
@pelikhan
pelikhan deleted the add-debug-logging-wasm-helpers-df2960e6733065a2 branch August 9, 2026 11:05
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.86.2

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