Skip to content

[Feature]: W6: Gradual Structured slog Call-Site Migration & Linter Guardrails (sloglint + depguard) #1848

Open

Description

@skevetter

Parent Epic: #1841

Overview

Convert existing structured log.*w call sites and high-value daemon/devcontainer boundaries to log.*Context with typed slog.Attrs, while keeping log.*f working for gradual migration and enforcing sloglint + depguard in .golangci.yml.


Subtasks & Engineering Specifications

  • Task 6.1: Convert High-Value Subsystem Call Sites to Structured slog (size/m)

    • Target Files:
      • pkg/ide/vscode/open.go
      • pkg/ghcredentials/*
      • pkg/transport/lifecycle.go
      • pkg/tunnel/browser.go
      • pkg/ssh/config.go
      • pkg/devcontainer/config/host_requirements.go
      • pkg/daemon/*
      • pkg/devcontainer/setup/*
    • Implementation Details:
      1. Convert all 28 existing log.*w call sites across the 6 packages above to log.DebugContext / log.InfoContext / log.WarnContext / log.ErrorContext using typed slog.Attrs (pkg/log/attrs.go), and remove the log.*w functions from pkg/log.
      2. Convert high-value operational boundaries in pkg/daemon and pkg/devcontainer/setup to use context-aware structured logging.
  • Task 6.2: golangci-lint Rules (sloglint + depguard) & Provider Author Docs (size/s)

    • Target Files:
      • .golangci.yml
      • AGENTS.md
      • sites/docs-devsy-sh/content/docs/developing-providers/
    • Implementation Details:
      1. Configure sloglint in .golangci.yml (enforcing attr-only on slog calls, snake_case keys, and static messages) and depguard blocking go.uber.org/zap and github.com/go-logr/zapr from being re-introduced.
      2. Update AGENTS.md and provider author documentation with the --log-level / --log-format / --result-format / --no-status CLI contract and DEVSY_LOG_LEVEL / DEVSY_LOG_FORMAT=json provider contract.

Verification & Acceptance Criteria

  • Zero log.*w call sites remain in the repository.
  • mise run cli:lint:ci and mise run cli:test pass cleanly.

Activity

  1. coderabbitai commented on Nov 15, 2026

    @coderabbitai
    🔗 Related PRs

    #1716 - fix(ide): stage-specific VS Code-family launch diagnostics (#1617) [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions