Skip to content

[log] Add debug logging to difc/path_labels.go - #16148

Merged
lpcox merged 1 commit into
mainfrom
log/difc-path-labels-logging-190b95f6eb66fa5b
Nov 8, 2026
Merged

lpcox merged 1 commit into
mainfrom
log/difc-path-labels-logging-190b95f6eb66fa5b

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Adds 5 debug log calls to internal/difc/path_labels.go using the existing logPathLabels logger:

  • multi-collection resolution branch in resolve
  • items-path mismatch in extractIndexFromPath
  • label counts in pathEntryToResource
  • path/segment/replacement counts in replaceCollectionAtPath
  • unmarshal failure in ParsePathLabels

Arguments are side-effect free and log no label values. Validated with go vet, go test ./internal/difc, and go build.

Generated by Go Logger Enhancement · copilot · auto (Claude Sonnet 5.5) · ~45 AIC · ⊞ 6.4K · ◷

@github-actions github-actions Bot added automation enhancement New feature or request labels Nov 7, 2026
@lpcox
lpcox marked this pull request as ready for review November 8, 2026 06:09
Copilot AI adaptive review requested due to automatic review settings November 8, 2026 06:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported, and the change is limited to contextual debug logging without altering behavior or exposing label values.

No open issues 🎉

What changed in this PR

Adds five debug log calls to internal/difc/path_labels.go to improve observability of path-label resolution and parsing without changing behavior or exposing label values.

Changes:

  • Logs multi-collection resolution and path mismatches.
  • Logs label counts and collection replacement metadata.
  • Logs JSON unmarshal failures during path-label parsing.
File Description
internal/​difc/​path_labels.go Adds five contextual debug log calls across path resolution, label conversion, collection rebuilding, and parsing.

Review effort: Lite (auto)

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default (normal container isolation)

Part Surface Op Result Expected Status
A MCP reads (list_issues/list_pull_requests/get_file_contents/list_commits) data returned ALLOWED ✅
B MCP writes (add_issue_comment/star_repository/issue_write/create_branch/create_or_update_file/create_pull_request) all 6 absent from the 23-tool catalog (only list_/get_/search_* exposed); each call returned unknown tool (-32602) BLOCKED ⚠️ INCONCLUSIVE — tool absence only proves backend/toolset config, not the gateway's own DIFC/guard blocking layer
C CLI reads (github CLI list_issues/list_pull_requests/get_file_contents/list_commits) data returned ALLOWED ✅
D CLI REST writes (reaction/star/issue/comment) skipped — gh auth status reports not logged in BLOCKED ⚠️ INCONCLUSIVE — gh unauthenticated, token-scope boundary not exercised
E CLI GraphQL mutations (addReaction/addStar/createIssue) skipped — gh unauthenticated BLOCKED ⚠️ INCONCLUSIVE — same auth gap as Part D

Overall: INCONCLUSIVE

No write leaked in any part. Part B: the gh-aw tools.github: wrapper launches the backend with GITHUB_READ_ONLY=1, so write tools never register — this confirms the framework-level defense-in-depth but cannot independently confirm mcpg's own gateway-level write-blocking layer (that requires a backend launched outside the gh-aw wrapper, tracked as follow-up; covered today by internal/guard/internal/difc unit tests). Parts D/E: gh was not authenticated in this run, so the REST/GraphQL token-scope boundary could not be exercised — reported as a methodology gap, not a pass.

🔒 mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

@lpcox
lpcox merged commit 09fd91f into main Nov 8, 2026
28 checks passed
@lpcox
lpcox deleted the log/difc-path-labels-logging-190b95f6eb66fa5b branch November 8, 2026 15:56
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.

2 participants