Skip to content

[log] Add debug logging to registerCoreFlags in internal/cmd/flags_core.go - #11468

Merged
lpcox merged 1 commit into
mainfrom
log-enhance-flags-core-1787095886-6505f6df4dc52f66
Aug 19, 2026
Merged

[log] Add debug logging to registerCoreFlags in internal/cmd/flags_core.go#11468
lpcox merged 1 commit into
mainfrom
log-enhance-flags-core-1787095886-6505f6df4dc52f66

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Adds debug logging to registerCoreFlags in internal/cmd/flags_core.go.

Changes

  • Reused the existing shared debugLog logger in the cmd package (namespace cmd:root), no new logger declaration needed.
  • Logged entry into registerCoreFlags.
  • Logged completion after flag registration and mutual-exclusivity/required-flag validation setup.

Validation

  • go build -o awmg . — succeeds
  • go vet ./internal/cmd/... — clean
  • go test ./internal/cmd/... — passes
  • Manually verified with DEBUG=cmd:* ./awmg --config nonexistent.toml --listen :0 that both new log lines are emitted.

Single-file, focused change per task constraints.

Generated by Go Logger Enhancement · auto · 86.8 AIC · ⊞ 12.8K ·

Log flag registration entry/exit using the existing shared debugLog
logger (namespace cmd:root) to aid troubleshooting of CLI flag setup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels Aug 18, 2026
@lpcox
lpcox marked this pull request as ready for review August 19, 2026 04:42
Copilot AI balanced review requested due to automatic review settings August 19, 2026 04:42

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.

Pull request overview

Adds debug visibility around core CLI flag registration.

Changes:

  • Logs entry into registerCoreFlags.
  • Logs completion after validation groups are configured.
Show a summary per file
File Description
internal/cmd/flags_core.go Adds start and completion debug logs for core flag registration.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

Copy link
Copy Markdown
Contributor Author

🔒 mcpg Read-Only Stress — docker-sbx

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: docker-sbx (KVM-isolated microVM)

Part Surface Op Result Expected Status
A MCP reads (issues/PRs/file/commits) data returned ALLOWED
B MCP writes (reaction/star/issue/comment/branch/file/PR) all 6 tools absent from catalog BLOCKED ⚠️
C CLI reads (list_issues, get_file_contents) data returned ALLOWED
D CLI REST writes gh unauthenticated (Bad credentials) BLOCKED ⚠️
E CLI GraphQL mutations gh unauthenticated (Bad credentials) BLOCKED ⚠️

Overall: INCONCLUSIVE

⚠️ Part B: All 6 write tools (add_issue_comment, star_repository, issue_write, create_branch, create_or_update_file, create_pull_request) are absent from the MCP tool catalog (23 read-only tools only). This confirms the gh-aw framework's GITHUB_READ_ONLY=1 defense-in-depth — write tools were never registered. Gateway-level DIFC/guard enforcement could not be independently confirmed for this surface since no write call ever reached a write-capable backend.

⚠️ Parts D/E: gh CLI reports Failed to log in to github.com using token (GH_TOKEN) — token invalid/unauthenticated. All REST write attempts and GraphQL mutations return Bad credentials. Cannot distinguish gateway enforcement from token-scope rejection. No writes succeeded.

No writes leaked. Run ID: 32197597360

🔒 Read-only stress test — §32197597360

🔒 mcpg read-only stress (docker-sbx runtime) by Read-Only Stress: docker-sbx runtime

@lpcox
lpcox merged commit 4fde17b into main Aug 19, 2026
32 of 35 checks passed
@lpcox
lpcox deleted the log-enhance-flags-core-1787095886-6505f6df4dc52f66 branch August 19, 2026 13: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