Skip to content

[log] Add debug logging to isEnclaveSession - #13602

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
log-enclave-session-1790033468-2e3218e9a5b888e1
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
log-enclave-session-1790033468-2e3218e9a5b888e1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds debug logging to internal/server/enclave_session.go to aid troubleshooting of enclave-scoped session detection.

Changes

  • Reused the existing logUnified logger (server:unified namespace) declared in internal/server/unified.go — no new logger was created.
  • Added a log line when a session is identified as a delegated executor (treated as enclave-scoped).
  • Added a log line for the agent-policy-derived enclave decision for non-delegated sessions.
  • Session IDs are hashed via util.FormatSessionIDForLog before logging to avoid leaking raw identifiers.

Why this file

This was the smallest new (previously unprocessed) candidate file with zero existing logging calls, in a package with clear logging conventions already established (logUnified). Most other candidate files in internal/ were already extensively logged.

Validation

  • go vet ./internal/server/... — passed
  • go test ./internal/server/... — passed (ok)
  • go build -o awmg . — passed, no compilation errors

No side effects were introduced by the log arguments (only existing computed values and a pure formatting helper are passed).

Generated by Go Logger Enhancement · copilot · auto · 105 AIC · ⊞ 12.8K ·

Adds debug log statements to internal/server/enclave_session.go to aid
troubleshooting of enclave-scoped session detection. Reuses the existing
logUnified logger (server:unified namespace) rather than creating a new one.

- Logs when a session is identified as a delegated executor (enclave-scoped)
- Logs the agent-policy-derived enclave decision for non-delegated sessions

Session IDs are hashed via util.FormatSessionIDForLog before logging to avoid
leaking raw identifiers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels Sep 21, 2026
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.

0 participants