Commit f3ed8f1
authored
[log] Add debug logging to proxy/response_transform.go (#7739)
Add 5 debug log calls to `unwrapSingleObject` and `replaceNodesArray` in
`internal/proxy/response_transform.go`, reusing the existing
`logTransform` logger (`logger.New("proxy:response_transform")`).
## Changes
**`unwrapSingleObject`** – traces the 5 distinct code paths this
function takes when deciding how to reshape a GitHub API response after
DIFC filtering:
| Path | New log call |
|---|---|
| Wrapped empty array restored to top-level | `logTransform.Print("...
restoring wrapped empty array ...")` |
| Wrapped array matches original, restored | `logTransform.Printf("...
restoring wrapped array ..., len=%d")` |
| Search envelope skipped (`total_count` present) |
`logTransform.Print("... skipping search envelope ...")` |
| GraphQL response envelope skipped (`data` present) |
`logTransform.Print("... skipping GraphQL response envelope ...")` |
| Single-element filtered array unwrapped | `logTransform.Print("...
unwrapping single-element filtered array ...")` |
**`replaceNodesArray`** – logs which key (`nodes` or `edges`) was
replaced and how many DIFC-accessible items remain:
```
logTransform.Printf("replaceNodesArray: replacing %q array with %d accessible item(s)", key, len(items))
```
## Validation
- `go build ./...` ✅
- `go test ./...` ✅ (all 25 packages)
- `go vet ./...` ✅
- No import cycles — `proxy` is a higher-level package that safely
imports `logger`
- No side effects in log arguments — all values are already-computed
locals
## Activation
```bash
DEBUG=proxy:* ./awmg --config config.toml
```
> [!WARNING]
> <details>
> <summary>Firewall blocked 1 domain</summary>
>
> The following domain was blocked by the firewall during workflow
execution:
>
> - `index.crates.io`
>> To allow these domains, add them to the `network.allowed` list in
your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "index.crates.io"
> ```
>
> See [Network
Configuration](https://github.github.com/gh-aw/reference/network/) for
more information.
>
> </details>
> Generated by [Go Logger
Enhancement](https://github.com/github/gh-aw-mcpg/actions/runs/27796617195)
· 2.3K AIC · ⊞ 34.9K ·
[◷](https://github.com/search?q=repo%3Agithub%2Fgh-aw-mcpg+%22gh-aw-workflow-id%3A+go-logger%22&type=pullrequests)
<!-- gh-aw-agentic-workflow: Go Logger Enhancement, engine: copilot,
version: 1.0.60, model: claude-sonnet-4.6, id: 27796617195, workflow_id:
go-logger, run:
https://github.com/github/gh-aw-mcpg/actions/runs/27796617195 -->
<!-- gh-aw-workflow-id: go-logger -->
<!-- gh-aw-workflow-call-id: github/gh-aw-mcpg/go-logger -->1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| |||
0 commit comments