Skip to content

[Feature]: Unified log/slog Logging, CLI/Desktop Flag Contract & Operational Telemetry #1841

Open

Description

@skevetter

Summary

Consolidate and unify logging (log/slog), CLI/Desktop output & logging flags (STDOUT vs STDERR), and operational telemetry/analytics across the Devsy CLI, Desktop app, and all 15 external provider repositories in devsy-org (plus devsy-runtime-sdk and built-in drivers).


1. Uniform CLI & Desktop Flag Contract (STDOUT vs STDERR)

Concern Stream Canonical Flag Environment Variable (BindEnv) Allowed Values Default
Log Verbosity STDERR --log-level DEVSY_LOG_LEVEL (fallback: context LOG_LEVEL) error, warn, info, debug, trace warn (CLI) / info (remote agent)
Log Encoding STDERR --log-format DEVSY_LOG_FORMAT auto, text, json, logfmt (alias: plain -> text) auto (text on TTY, json when piped / DEVSY_UI=true / internal)
Result Format STDOUT --result-format DEVSY_RESULT_FORMAT auto, text, plain, json auto (plain/text on TTY, json when piped / DEVSY_UI=true)
Live Progress STDOUT --no-status DEVSY_NO_STATUS true, false false

Removed Redundant Flags

  • -v / -vv / -vvv (--verbose) -> Replaced by --log-level=info|debug|trace
  • --debug ($DEVSY_DEBUG) -> Replaced by --log-level=debug
  • -q / --quiet -> Replaced by --log-level=error (and --no-status)
  • --log-output (and invalid --log-output=raw usages) -> Replaced by --log-format
  • Per-command --json (e.g. devsy provider versions --json) -> Replaced by global --result-format

2. Organization-Wide Repository Audit (devsy-org — All 37 Repositories)

Category Repositories Current Logging Mechanism Planned Action
1. Core Monorepo (1) devsy pkg/log (zap), desktop/src/main/logging.ts Migrate pkg/log to log/slog, unify CLI/Desktop flags, streamer, status, and telemetry (#1842–#1848).
2. Go Providers Importing devsy/pkg/log (12) Machine (8): devsy-provider-aws, devsy-provider-gcloud, devsy-provider-azure, devsy-provider-digitalocean, devsy-provider-civo, devsy-provider-terraform, devsy-provider-lima, devsy-provider-orbstack
Custom Driver (3): devsy-provider-kubernetes (also has direct go.uber.org/zap in go.mod), devsy-provider-ecs, devsy-provider-dockerless
Proxy (1): devsy-provider-ssh
All 12 use cmd/root.go:
cfg := log.Config{Verbosity: 1}
if os.Getenv("DEVSY_DEBUG") == "true" { cfg.Debug = true }
log.Init(cfg)
Add log.InitProvider(providerName) in devsy/pkg/log (retaining Verbosity/Debug as deprecated compatibility shims on log.Config), bump github.com/devsy-org/devsy in all 12 repos, switch cmd/root.go to log.InitProvider("<name>"), and remove direct zap from devsy-provider-kubernetes (#1845).
3. Standalone Go Machine Providers (2) devsy-provider-docker-sandbox, devsy-provider-harvester Standalone Go binaries (do not import devsy; minimal go.mod) invoked via machineExecutor. Configure stdlib log/slog JSON handler on os.Stderr honoring DEVSY_LOG_LEVEL and DEVSY_LOG_FORMAT=json (#1845).
4. Runtime SDK & External Plugin Providers (2) devsy-runtime-sdk, devsy-provider-microsandbox hashicorp/go-plugin + go-hclog (Stderr streamed to host). Add stdlib slog helper in devsy-runtime-sdk/log, adopt it in devsy-provider-microsandbox, and route plugin Stderr through JSONLogStreamer (#1845).
5. Legacy Logging Repo (1) devsy-org/log Legacy April 2026 repo wrapping zap + logrus + survey. Unused by any active repo. Archive/deprecate devsy-org/log on GitHub with README notice pointing to github.com/devsy-org/devsy/pkg/log (#1843).
6. K8s / SSH Libraries Imported by devsy (5) ssh, api, apiserver, agentapi, admin-apis ssh has zero logging deps; api, apiserver, agentapi, admin-apis use k8s.io/klog/v2. Automatically covered by pkg/log/logr.go migration from zapr to logr.FromSlogHandler (#1843).
7. Out-of-Scope / Non-Provider Repos (14) platform, k8s-apiserver, charts, agents, operating-system, examples, example-dotfiles, homebrew-tap, cla-signatures, cla-assistant-action, tailscale, docs, devsy-javascript-client, test_private_repo Static assets, Helm charts, CLA actions, forks, or legacy repos. No changes required.

3. Workstream Dependency Graph

flowchart LR
    W0["#1842 W0: CLI & Desktop Flag Unification"] --> W1["#1843 W1: Core pkg/log slog Engine"]
    W1 --> W2["#1844 W2: JSONLogStreamer & Remote Agent"]
    W0 --> W4["#1846 W4: Desktop Logging & IPC"]
    W1 --> W5["#1847 W5: Unified Telemetry & Metrics"]
    W2 --> W3["#1845 W3: All 15 Provider Repos & Runtime SDK"]
    W3 --> W5
    W2 --> W6["#1848 W6: Gradual Call-Site Migration & Linter"]
Loading

4. Workstream Tracking Checklist

5. Delivery progress

  • Completed the inventory of 37 repositories and 18 delivery targets.
  • Merge the standalone documentation. Docs PR
  • Prepared the approved standalone Go redactor migration as one source change. Publication follows the merged foundation.
  • Qualify and squash the shared foundation and lint prerequisite after Greptile and owner approval. Foundation PR · Lint PR
  • Recompose Core with real merged pins and the Windows fix. CodeRabbit skipped the 303-file Core PR against its effective 100-file limit. The successor plan uses smaller, independently testable changes.
  • Finish exact-head Core, SDK and provider reviews and native checks. Publish and verify the SDK and each provider release after its qualifying merge.

Activity

  1. coderabbitai commented on Nov 15, 2026

    @coderabbitai
    🔗 Related PRs

    #1858 - feat(desktop): add redacted renderer diagnostics [open]
    #1869 - fix(logging): share Desktop diagnostic masking [closed]
    #1851 - feat(logging): add shared Go logging module [merged]
    #1857 - refactor(log): adopt the shared redactor [open]


    📝 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!

  2. skevetter commented on Nov 20, 2026

    @skevetter
    ContributorAuthor

    Session update

  3. skevetter commented on Nov 20, 2026

    @skevetter
    ContributorAuthor

    All 15 provider repositories and the runtime SDK now have signed shared logging drafts. Private Go workspaces passed 637 race test results and repository hooks, including 20 race results on isolated Linux arm64 for Dockerless. The provider and SDK table lists the PRs and the hosted checks that stopped on missing dependency pins.

    Foundation fixes the CodeRabbit backslash finding. The Shared Logging job passed on the corrected head. Full CI is running, and CodeRabbit paused on that head.

    Lint prerequisite passed full CI and CodeRabbit and still requires Greptile. It comes before the foundation refresh. No PR is ready to merge, and no release was published.

  4. skevetter commented on Nov 20, 2026

    @skevetter
    ContributorAuthor

    CodeRabbit finished its review of the shared logging foundation on 7bb30803, with no actionable findings. All six review threads are resolved. Hosted Shared Logging also passed. Aggregate CI and Greptile remain open.

  5. skevetter commented on Nov 20, 2026

    @skevetter
    ContributorAuthor

    The lint prerequisite is merged. The foundation passed hosted CI on cf43b60f and is blocked by two findings from the final authorized review. The SSH draft passed hosted CI and still needs reviews. The prepared redactor, SDK and provider work awaits the actual merged pins.

  6. skevetter commented on Nov 20, 2026

    @skevetter
    ContributorAuthor

    The foundation passed all hosted workflows at e342ae64. The exact review found seven remaining issues, so the source stays open. The independent bootstrap fix passed hosted CI and exact-head CodeRabbit with zero open threads. Its main-repository Greptile gate remains open. The provider and SDK drafts still await the actual merged dependency pins.

  7. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The lint prerequisite is merged. The foundation passed hosted CI and CodeRabbit at 46778783 and awaits the lead’s squash. The SSH draft passed hosted CI and still needs reviews. The SDK and provider drafts and the independent redactor migration await their actual merged pins.

  8. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The first Core successors are published. Redactor adoption is 55 files, SSH diagnostics is four, and Desktop renderer diagnostics is 13. CI and exact-head reviews are pending. All 16 consumer pins are published and their dependency and release status is tracked in the delivery table.

  9. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The shared logging squash passed full main and Desktop CI. All 16 consumers pin its verified Go version. Harvester v1.1.0 is published with checksums and native Windows install verified.

    SDK and MicroSandbox adoption are merged. Their SDK release run and MicroSandbox main run remain active. The Docker Sandbox release needs maintainer-reviewed native evidence. Twelve providers still await a merged Core companion. Provider table.

    The Core stack now reaches the command and helper draft. The independent SSH and Desktop slices passed hosted workflows and still need reviews. Redactor adoption remains held for captured-tail and folded-header compatibility. The final CLI/Desktop scope needs another reviewable split or reviewer coverage for the atomic change. All incomplete workstreams remain open.

  10. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    Diagnostic compatibility passed full hosted CI and exact-head CodeRabbit. Greptile and the merged dependency pin remain open. The three-step CLI stack is published as signed drafts for additive controls, caller migration, and flag retirement. Hosted native, Desktop, and E2E qualification continues. The release table records verified Harvester, SDK, and MicroSandbox releases. Docker Sandbox still needs native release evidence. Twelve providers await the merged Core adapter pin.

    The additive draft passed Windows units. Its hosted run reproduced the older-pin redaction failures on Linux and macOS and exposed text output in the MicroSandbox JSON timing capture. The private capture fix passed a focused before-and-after test. Final platform qualification still needs the merged compatibility pin.

  11. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The merged diagnostic compatibility and bootstrap fixture fixes are in the updated Core stack. Ten signed heads are published, with the MicroSandbox capture correction in workspace diagnostics. Focused local regressions passed. The first hosted CI run is active. Current-head hosted CI and CodeRabbit remain gates, and the provider pins await the merged Core adapter.

  12. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The latest Core redactor review found a folded Authorization leak in diagnostic capture. The shared opt-in fix passed the local before-and-after capture proof, bounded-tail tests, and independent review. Its hosted checks are open. Core needs the actual merged pin before its next qualification. Renderer diagnostics remains independent and passed hosted CI on 27e2e8c5. It still needs exact-head CodeRabbit coverage.

  13. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    Desktop diagnostics is ready for review at signed 5c6b43f9. All four earlier privacy findings are resolved and 1,474 Desktop tests passed locally. The shared diagnostic fix at signed 3a87c8aa also preserves harmless JSON-shaped hook output after checking all decoded fields. The local recorder and subprocess race suites passed. Both current heads await hosted checks and automatic CodeRabbit reviews hit their rate limit. Core adoption still requires the merged module pin. See the Core and Desktop workstreams.

  14. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    CodeRabbit capacity returned and one full review ran on each unchanged head. Shared diagnostic redaction passed hosted CI and review with zero threads and was squash-merged. The real module revision resolves. Renderer diagnostics passed hosted CI and has two open findings from its exact-head review. The Core and Desktop workstreams have the evidence.

  15. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    Nine signed Core heads now use the merged shared redactor. The original PR bases and feature patches are preserved. Core redactor adoption CI is running. Both renderer diagnostic regressions passed after the signed fix. Hosted checks and fresh CodeRabbit reviews remain open.

  16. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    Both requested CodeRabbit reviews completed on the unchanged signed heads. Core redactor adoption has six open review findings and active hosted CI with recent passes. Renderer diagnostics passed both hosted workflows and has one open pre-IPC masking finding reproduced on the current code. The workstream issues record the review evidence.

  17. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The signed Core fix and Desktop fix passed local qualification. The final Core change carries through eight signed dependent PRs with their original bases. Current hosted checks continue on both. Exact-head reviews left four Core and two Desktop findings open after the two authorized correction rounds. Both workstreams remain open. See the Core review and Desktop review.

  18. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The shared Desktop scanner is published at signed 037b753 and awaits hosted CI and CodeRabbit. The Desktop integration passed 1,497 tests in the local preview and awaits the shared scanner merge. The Core diagnostic correction passed local qualification and independent review. Its 139-file scope needs a delivery decision to meet the previously observed CodeRabbit limit. The workstream checklist remains open.

  19. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    Three signed Core prerequisites are published and mergeable. The command prerequisite is based on main. The E2E and tool branches use its shared helper and will move to main after it merges. Local qualification and independent reviews passed. The private Core replay leaves 85 files and passed its writer guard and focused race suites. Hosted CI and final review remain open. The shared scanner passed its dedicated check and Linux and Windows unit tests. Its wider matrix has started. Command · E2E · Tools · Shared scanner

  20. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    CodeRabbit accepted the full review of the shared Desktop scanner on its current signed head. Linux and Windows unit tests and all three CLI builds passed. The remaining macOS unit and integration jobs are active. Scanner · Review · CI

  21. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The shared Desktop scanner now handles qualified compound credential labels. Its regression failed on the published baseline and passes on the signed correction. The README covers credential registration and Node.js test requirements. The three previous review threads are resolved. Exact-head CI and CodeRabbit are pending. Scanner · CI · Review

  22. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The shared scanner README now describes Desktop adoption as a follow-up. The correction is signed, the wording thread is resolved, and current Shared Logging and Pre-commit passed. Fresh platform checks and the accepted CodeRabbit review are active. Scanner · CI · Review

  23. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The shared scanner passed CI and completed exact-head CodeRabbit. The command prerequisite passed CI and its single exact-head review is in progress. Scanner CI · Scanner review · Command CI · Command review

  24. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The shared scanner is merged and the signed Desktop consumer now imports it. PR CI, Desktop lint and tests, and tray smoke passed. The accepted review and platform packaging are in progress. The command prerequisite has three reproduced findings, so its E2E and tool dependents await the command merge. Desktop · Review · Command

  25. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    The signed command correction addresses all three reproduced findings and resolves their threads. Fresh CI and the accepted exact-head review are active. Both Desktop workflows passed on the current consumer, including Flatpak. Its completed review has three open findings. Command · Command review · Desktop · Desktop review

  26. skevetter commented on Nov 21, 2026

    @skevetter
    ContributorAuthor

    Desktop diagnostics masks registered numeric values at signed head 83360bf6. All 1,498 local Desktop tests passed, the three prior threads are resolved, and CodeRabbit accepted one review. Desktop CI is running.

    Command diagnostics passed CI Success at 83cf9f17. Its completed CodeRabbit review has two open findings on carriage returns and Windows output truncation. The E2E and tool prerequisites still await its merge.

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