Skip to content

Add AGENTS.md agent guidance and run staticcheck on the root module - #629

Merged
fortuna merged 4 commits into
mainfrom
fortuna/agents-md-staticcheck
Jul 9, 2026
Merged

Add AGENTS.md agent guidance and run staticcheck on the root module#629
fortuna merged 4 commits into
mainfrom
fortuna/agents-md-staticcheck

Conversation

@fortuna

@fortuna fortuna commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What

Two related sets of changes:

Agent/contributor docs

  • Replace the AGENTS.md → CONTRIBUTING.md symlink with a real guidance file for AI coding agents: module structure (root vs x/, no local replace), commands (test/lint/license check), gotchas (psiphon on Go 1.25, gomobile wrapper packages, vanity import path), and workflow conventions.
  • Add CLAUDE.md as a one-line @AGENTS.md import so Claude Code and other tools share the same source of truth.
  • Extract the Cross-platform Development section of CONTRIBUTING.md into docs/cross-platform.md, linked from both CONTRIBUTING.md and AGENTS.md.

Staticcheck on the root module

Staticcheck was already declared as a tool in the root go.mod, but CI only ran it on x/. This adds a Staticcheck SDK CI step and fixes the findings it surfaced:

  • Real bug: dns/resolver_net_test.go had // go:build nettest (extraneous space), making the build constraint ineffective — the network-dependent test was not actually gated behind -tags nettest (SA9009). Now it is; CI still runs it since it passes -tags nettest.
  • Line-scoped //lint:ignore SA1019 directives in network/lwip2transport for the intentional PacketProxy compat path, pending the PacketRelay migration (Refactor PacketProxy to PacketRelay (Side-by-Side) #618).
  • //lint:ignore U1000 for the happyeyeballs_test.go helper used only by the commented-out flaky "IP order" test.

Testing

  • go tool staticcheck ./... passes clean on the root module
  • go vet ./... and go test -race pass on the touched packages

🤖 Generated with Claude Code

fortuna and others added 2 commits July 7, 2026 21:30
Staticcheck was declared as a tool in the root go.mod but CI only ran it
on x/. Add a CI step for the root module and fix the findings:

- dns/resolver_net_test.go: "// go:build nettest" had an extraneous
  space, making the build constraint ineffective, so the network test
  was not actually gated behind -tags nettest (SA9009).
- lwip2transport: line-scoped SA1019 ignores for the intentional
  PacketProxy compat path, pending the PacketRelay migration (#618).
- happyeyeballs_test.go: U1000 ignore for the helper kept for the
  commented-out flaky "IP order" test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the AGENTS.md -> CONTRIBUTING.md symlink with a real agent
guidance file covering module structure, commands, gotchas, and
workflow. CLAUDE.md imports it so Claude Code and other tools share the
same source.

Move the Cross-platform Development section of CONTRIBUTING.md to
docs/cross-platform.md and link it from both files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fortuna
fortuna requested a review from ohnorobo July 8, 2026 01:32
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds agent guidance and brings root-module Staticcheck into CI. The main changes are:

  • Replaces the AGENTS.md symlink with a standalone guidance file.
  • Adds CLAUDE.md as an import of the shared agent guidance.
  • Moves cross-platform development docs into docs/cross-platform.md.
  • Adds a root go tool staticcheck ./... workflow step.
  • Fixes the malformed nettest build tag on the DNS network tests.
  • Adds targeted lint ignores for intentional deprecated PacketProxy compatibility and one unused test helper.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The new Staticcheck step matches the root module tooling pattern.
  • The corrected nettest tag matches the documented and CI test commands.
  • The lint ignores are placed on the intended deprecated or unused declarations.

Important Files Changed

Filename Overview
.github/workflows/test.yml Adds root-module Staticcheck to CI before the existing x/ Staticcheck step.
AGENTS.md Replaces the symlink with standalone agent guidance for module layout, commands, gotchas, and workflow conventions.
CLAUDE.md Adds a one-line import pointing Claude-oriented tooling at AGENTS.md.
CONTRIBUTING.md Replaces the embedded cross-platform section with a link to the extracted document.
docs/cross-platform.md Adds the extracted cross-platform development guide.
dns/resolver_net_test.go Corrects the nettest build constraint so network-dependent resolver tests are gated as documented.
network/lwip2transport/device_test.go Adds targeted Staticcheck ignores for test-only deprecated PacketProxy compatibility helpers.
network/lwip2transport/udp.go Adds targeted Staticcheck ignores around the intentional deprecated PacketProxy compatibility path.
network/lwip2transport/udp_test.go Adds targeted Staticcheck ignores for deprecated PacketProxy test stubs.
transport/happyeyeballs_test.go Adds a Staticcheck ignore for a helper retained for a commented-out flaky test.

Reviews (1): Last reviewed commit: "docs: add AGENTS.md guidance and extract..." | Re-trigger Greptile

fortuna and others added 2 commits July 7, 2026 21:35
The project is no longer under Google, and the Outline Foundation has
not set up a CLA yet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The project is no longer under Google. Point to the current
"API Proposals and Ideas" discussion category.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@fortuna

fortuna commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Ping

@ohnorobo ohnorobo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@fortuna
fortuna merged commit 831cb82 into main Jul 9, 2026
7 checks passed
@fortuna
fortuna deleted the fortuna/agents-md-staticcheck branch July 9, 2026 13:27
@dosubot

dosubot Bot commented Jul 9, 2026

Copy link
Copy Markdown

📄 Knowledge review

🆕 New pages

1 new page was drafted from this PR.

Page Library
Outline SDK Development Guide for AI Agents and Contributors Outline Foundation's Space

Leave Feedback Ask Dosu about outline-sdk Add Dosu to your team

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants