[Repo Assist] docs: add package-level godoc comments to all packages; enable revive package-comments rule#2307
Draft
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
… package-comments lint rule Add missing package-level documentation comments to 11 internal packages that previously had no package doc. This improves discoverability via 'go doc', pkgsite, and IDE tooling. Packages updated: - internal/difc: DIFC security label management (new doc.go) - internal/launcher: backend process lifecycle and connection pooling (new doc.go) - internal/mcp: MCP protocol types and transports (new doc.go) - internal/middleware: HTTP middleware for JQ schema processing (new doc.go) - internal/server: HTTP server in routed/unified modes (new doc.go) - internal/testutil/mcptest: test harness for MCP integration tests (new doc.go) - internal/envutil: env var helpers with typed defaults - internal/strutil: string deduplication and truncation helpers - internal/sys: MCPG system tools server - internal/timeutil: duration formatting utilities - internal/version: gateway version management Also enables the revive linter's package-comments rule in .golangci.yml so missing package docs are caught by CI going forward. Only the package-comments rule is enabled to avoid unrelated revive noise. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7 tasks
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
This PR improves code discoverability and documentation tooling by adding package-level
// Package ...doc comments to all 11 internal packages that previously lacked them. It also enables therevivelinter'spackage-commentsrule so any future missing package docs are caught by CI.Changes
Task 5 – Coding Improvements: Package godoc comments
Six packages got new
doc.gofiles, five packages had comments added to their primary file:internal/difcdoc.gointernal/launcherdoc.gointernal/mcpdoc.gointernal/middlewaredoc.gointernal/serverdoc.gointernal/testutil/mcptestdoc.gointernal/envutilenvutil.gointernal/strutildeduplicate.gointernal/syssys.gointernal/timeutilformat.gointernal/versionversion.goPackages that already had docs (auth, cmd, config, guard, logger, proxy, tty) are untouched.
Task 4 – Engineering Investment: Enable revive
package-commentsruleUpdated
.golangci.ymlto:revivefrom thedisablelistenablewith only thepackage-commentsrule configuredThis is a scoped enablement — only the
package-commentsrule runs, so no existing code is flagged for unrelatedreviveissues.Rationale
go doc,pkgsite, and IDE tooling all surface package-level docs prominently; without them these packages appear undocumented to users and contributors.revivepackage-commentsrule enforces this going forward with zero false-positive risk (it only fires when the doc is entirely absent).Test Status
The changes are purely additive (new doc comments and a linter config tweak). No logic is modified. The environment does not have network access to download Go modules, so the full test suite could not be executed locally. CI will verify correctness on push.
The
go build ./...command succeeded with the installed Go 1.25.8 toolchain, confirming there are no syntax errors in the new files.Warning
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.