Skip to content

[log] Add debug logging to internal/sys/docker.go error paths - #16112

Merged
lpcox merged 1 commit into
mainfrom
log/sys-docker-logging-e7089ad7e978c37d
Nov 7, 2026
Merged

lpcox merged 1 commit into
mainfrom
log/sys-docker-logging-e7089ad7e978c37d

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

Adds 4 debug log calls (existing logDocker logger) to internal/sys/docker.go:

  • invalid container ID rejected in runDockerInspect
  • docker inspect failure (container ID + format + error)
  • CheckStdinInteractive and CheckLogDirMounted failure fallbacks

Previously these failures were silent in debug output. Log arguments have no side effects.

Validation: go vet ./internal/sys, go test ./internal/sys, go build all pass.

Generated by Go Logger Enhancement · copilot · auto · ~37 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 7, 2026 06:19
Copilot AI adaptive review requested due to automatic review settings November 7, 2026 06:19

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

The review evidence identifies no unresolved issues, and the change is limited to adding Docker-path diagnostics without altering runtime behavior.

No open issues 🎉

What changed in this PR

This pull request adds debug logging to Docker inspection and container-environment fallback paths in internal/sys/docker.go, improving diagnostics without changing runtime behavior.

Changes:

  • Logs invalid container IDs and Docker inspection failures.
  • Logs fallback behavior for stdin interactivity and log-directory mount checks.
  • Reuses the existing logDocker logger.
File Description
internal/​sys/​docker.go Adds debug logging to Docker inspection validation, command failures, and fallback branches.

Review effort: Lite (auto)

@github-actions

github-actions Bot commented Nov 7, 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 data ALLOWED ✅
B MCP writes (reaction/star/issue/comment/branch/file/PR) all 6 tools absent from catalog BLOCKED ⚠️
C CLI reads data ALLOWED ✅
D CLI REST writes (reaction/star/issue/comment) gh CLI unauthenticated (no GH_TOKEN) BLOCKED ⚠️
E CLI GraphQL mutations (addReaction/addStar/createIssue) gh CLI unauthenticated (no GH_TOKEN) BLOCKED ⚠️

Overall: INCONCLUSIVE

Details:

  • Part A: list_issues, list_pull_requests, get_file_contents, list_commits via the gateway-backed github CLI proxy all returned data successfully.
  • Part B: The proxied github catalog exposes only 23 read tools total (get_commit, get_file_contents, get_label, get_latest_release, get_release_by_tag, get_tag, issue_read, list_branches, list_commits, list_issue_fields, list_issue_types, list_issues, list_pull_requests, list_releases, list_repository_collaborators, list_starred_repositories, list_tags, pull_request_read, search_code, search_commits, search_issues, search_pull_requests, search_repositories). None of the 6 write targets (add_issue_comment, star_repository, issue_write, create_branch, create_or_update_file, create_pull_request) are present, so per the task's own criteria this confirms backend/toolset config (gh-aw's GITHUB_READ_ONLY=1) but does not independently confirm mcpg's own gateway-level DIFC/guard blocking layer for this run.
  • Part C: Same CLI reads as Part A succeeded identically through the proxy.
  • Part D/E: gh auth status showed not logged into any GitHub hosts — no GH_TOKEN was set in this environment, so all gh api/gh issue create write attempts failed with a "set GH_TOKEN" CLI error rather than a GitHub API 403/404/422. This means the REST/GraphQL token-scope boundary could not be exercised in this run.

No reaction, star, issue, comment, branch, file, or PR was created in any part — no write leaked. Per the task's validation criteria, INCONCLUSIVE results (absent Part B tools, unauthenticated Part D/E) do not constitute a FAIL, but are reported distinctly since gateway enforcement for writes could not be independently confirmed on this run via either surface.

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

@lpcox
lpcox merged commit e4cb0d4 into main Nov 7, 2026
28 checks passed
@lpcox
lpcox deleted the log/sys-docker-logging-e7089ad7e978c37d branch November 7, 2026 16:41
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