Repository navigation
refactor: drop comments that restate the code - #59
Merged
Merged
Conversation
Delete about 6,400 comment lines across cmd/ and internal/: doc comments that repeat a name, step narration, banners, "X is TS Y" notes the parity and oracle tests already pin, history of fixed bugs, issue tags, and divergence notes that docs/DIVERGENCES.md or docs/go-only-features.md already record. Kept: comments about behaviour we cannot change (Docker, BuildKit, Compose, git, POSIX shell, Go's standard library, JavaScript and V8 semantics the reference forces), the recipe that regenerates the ts-features-build goldens, and divergences recorded nowhere else. Every //go:, //nolint, mutate-lane and mutate-exempt comment is untouched. Only comments change: each file parses to the same AST once comments are stripped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Comment cleanup across all of
cmd/andinternal/(385 Go files, 368 changed). Comment lines go from 6,869 to about 520.Deleted: doc comments that repeat a name, step narration and banners, "X is TS Y" notes the parity and oracle tests already pin, history of fixed bugs ("Go used to…", "0.88: …"), bare issue tags, and divergence notes already recorded in
docs/DIVERGENCES.mdordocs/go-only-features.md.Kept: comments about behaviour we can't change (Docker, BuildKit, Compose, git, POSIX shell, Go's stdlib, JavaScript/V8 semantics the reference forces), the recipe that regenerates the
ts-features-buildgoldens, and divergences recorded nowhere else (listed below).Only comments change
//go:and//nolintare compared too.mutate-lane22,mutate-exempt37,//go:9,//nolint1. Everymutate-lanestill sits directly above itsfunc.featureRequestHeaders), now rewritten.Validation (local)
go tool task lint: pass (golangci-lint 0 issues,mutate -stale-exemptsOK, deadcode, testquality).go tool task test:racewithTMPDIRoutside/tmp: pass. With the defaultTMPDIR,TestOpen*andTestComputeWorkspaceConfigOutsideARepositoryfail identically onmainbecause the dev machine has a/tmp/.git.go tool task parity:contract: 104 pass. The 2read-configuration.features-configuration-local-feature-*cases also fail locally without this change and pass in CI.Follow-ups found during the cleanup (not changed here)
Bugs
internal/docker/client.goFindDockerDriverBuilder:ctxRes, _ := c.Run(...)then readsctxRes.Stdout;Runreturnsnil, errwhendockercan't be executed, so this panics.internal/cli/feature_install.goisGitHubTarballURI:HasPrefix(u, "https://github.com")also matcheshttps://github.com.attacker.example, which then getsGITHUB_TOKEN. The TS reference does the same (containerFeaturesConfiguration.ts:406, v0.89.0), so fixing it is a deliberate, security-motivated divergence.Silent fallbacks (AGENTS.md error handling)
internal/cli/secrets.gosecretValuesFromFile/buildSecretsFromFile: nil on any read or parse error.internal/cli/stop.goresolveWorkspaceContainer: drops theresolveContainerIDerror.internal/lifecycle/probe.goProbedRemoteEnv: a probe error becomes an empty env.internal/docker/dockerfile.gofinalStageName: ignores theinstructions.Parseerror.internal/log/log.gojsonHandler: drops a failedstringify.JSON.internal/oci/push.goPushArtifact: a failed tag push is only a warning.internal/features/lockfile.gojsonTruthy: returns true on a decode error.Divergences recorded only in a code comment (should move to
docs/DIVERGENCES.md)gpu.godetectGPU(nvidia-container-cli probe, #319)build [path]positional (chore(deps): bump the actions group across 1 directory with 2 updates #8).dockerignorecopy (#969)LABEL devcontainer.metadata(#1225)--label(#930)containerEnv(#308)ENVkey order ingenerateContainerEnvsRun:events for Engine SDK callssecretservicevssecretcredential helperDead code
internal/cli/exec.govar _ = json.Marshalinternal/cli/e2e_test.gounusedcmd := exec.Command(...);_ = cmd🤖 Generated with Claude Code