Skip to content

[log] Add debug logging to package manifest imports and project file merge - #58707

Merged
pelikhan merged 1 commit into
mainfrom
log-enhance-package-manifest-imports-project-file-c4be4dc5c8718337
Sep 5, 2026
Merged

[log] Add debug logging to package manifest imports and project file merge#58707
pelikhan merged 1 commit into
mainfrom
log-enhance-package-manifest-imports-project-file-c4be4dc5c8718337

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Added debug logging to 2 files from the candidate manifest that genuinely lacked instrumentation. Uses logger.New-backed variables that already exist for the package (addPackageManifestLog, addLog), following the one-logger-per-file/package convention in AGENTS.md.

Files changed

  • pkg/cli/add_package_manifest_imports.go — logs manifest import-graph resolution (entry/result), import-cycle detection, and path-traversal rejection in readLocalImportedManifest.
  • pkg/cli/add_project_file.go — logs project-file merge entry, symlink-destination rejection, and successful write.

Note on candidate selection

Of the 40 files in the deterministic candidate manifest, only these 2 genuinely lacked logging without producing duplicate or trivial instrumentation:

  • Most other candidates (e.g. pkg/actionpins/*, pkg/agentdrain/*, most pkg/cli/add_*.go) already have thorough logging through a shared package-level logger variable (e.g. actionPinsLog, addInteractiveLog, addPackageManifestLog) that the manifest's per-file var log = detection heuristic does not recognize.
  • pkg/actionpins/types.go and pkg/agentdrain/types.go / config.go are trivial (pure type definitions, or a single static-struct constructor) and were skipped per the avoid-trivial-files guidance.

Kept the PR to these 2 quality additions rather than padding to 5 with duplicate or trivial logging.

Validation

  • make build — passed
  • make fmt (Go) — passed. The fmt-cjs (prettier/npm) step failed with an unrelated 403 Forbidden response from the npm registry in this sandbox — no JS/TS files were touched by this change.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.anthropic.com
  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"
    - "registry.npmjs.org"

See Network Configuration for more information.

Generated by 📝 Go Logger Enhancement · claude · agent · 249.3 AIC · ⌖ 5.75 AIC · ⊞ 7.7K ·

  • expires on Sep 6, 2026, 7:35 PM UTC-08:00

…ject file merging

Both files lacked debug instrumentation despite non-trivial control flow
(import cycle/path-traversal detection, symlink validation, JSON merge/write).
@github-actions github-actions Bot added automation enhancement New feature or request labels Sep 5, 2026
@pelikhan
pelikhan merged commit dac6662 into main Sep 5, 2026
@pelikhan
pelikhan deleted the log-enhance-package-manifest-imports-project-file-c4be4dc5c8718337 branch September 5, 2026 03:50
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