Skip to content

refactor(detector): Manager interface lacks context.Context parameter on Version/ListInstalled #53

Closed

Description

@dipto0321

Describe the bug

CLAUDE.md (the project-instructions file read by AI coding assistants and contributors) has drifted out of sync with the actual code and with README.md/CHANGELOG.md:

  1. "Known bugs (do not re-introduce)" section describes an already-fixed bug. It says ManifestVersion.LTS is typed bool with a useless TS string fallback field. The actual code (internal/node/dist.go:25-62) already uses LTSCodename *string with a correct custom UnmarshalJSON that properly distinguishes the nodejs.org lts JSON union — matching CHANGELOG's "Unreleased" section, which documents this exact fix as already shipped. As written, this section could mislead a future contributor (or AI assistant) into "fixing" something that isn't broken, or cause confusion hunting for a bug that no longer exists.

  2. Phase-status table is stale. It lists Phase 5 (Config subsystem) as "Not started" and Phase 6 (Cross-platform polish) as "Not started." Both are fully implemented per CHANGELOG's Unreleased section (YAML config + subcommands; QuotePath; interrupted-upgrade sentinel; system-node classifier) and per README's own Project-status table, which marks Phases 1-6 all done.

  3. Architecture table is wrong about internal/packages/restore.go. It documents a file restore.go with Restore(ctx, managerName, version). No such file exists — Restore (and an additional, undocumented RestoreFromSnapshot(ctx, path)) both live in snapshot.go. The function signature is otherwise accurate; only the file location is wrong.

Suggested fix

Update CLAUDE.md's "Known bugs" section (remove or mark resolved), Phase-status table (sync to README's), and architecture table (restore.go → snapshot.go) to match current reality. Consider running this through the claude-md-management:claude-md-improver skill/workflow.

Severity

Medium (process/accuracy issue, not a code bug) — but actively misleading for anyone (human or AI) using this file as a source of truth about project state.

Activity

  1. dipto0321 commented on Jul 1, 2026

    @dipto0321
    OwnerAuthor

    Update: PR #56 (merged, closing #41) added a new Current() (semver.Version, error) method to the Manager interface (internal/detector/detector.go) for the post-upgrade cleanup feature, implemented across all 8 managers. Like every existing method on this interface, Current() was given no context.Context parameter, so all 7 non-Windows implementations hardcode context.Background() internally — roughly 22 new call sites across fnm.go, nvm.go, volta.go, asdf.go, mise.go, n.go, nodenv.go. This was the highest-leverage moment to fix this issue before the call-site count grew further (Install/Uninstall now do real, slow disk/network work — cancellation matters more here than for the old read-only stubs), but the interface change shipped without it. Scope of this issue has grown accordingly.

  2. added a commit that references this issue on Jul 3, 2026
    aa44b29
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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions