Summary
Found 2 minor discrepancies between documentation and implementation during nightly reconciliation check.
Minor Issues 🔵
Small inconsistencies or missing details that don't break user workflows.
1. internal/tracing/ package missing from CONTRIBUTING.md project structure
Location: CONTRIBUTING.md — Project Structure section (directory tree) and Key Directories section
Problem: The internal/tracing/ package exists in the codebase but is not listed in either the directory tree or the "Key Directories" reference section of CONTRIBUTING.md.
Actual Behavior: internal/tracing/ is a real package providing OpenTelemetry OTLP trace export helpers (WrapHTTPHandler, Tracer, Provider) used by the MCP gateway middleware and the GitHub API proxy.
Impact: Contributors looking up internal package locations won't find tracing/ in the reference and may be surprised to discover it.
Suggested Fix:
Add to the directory tree:
├── tracing/ # OpenTelemetry OTLP tracing helpers
```
And add to the Key Directories section:
```
- **`internal/tracing/`** - OpenTelemetry OTLP trace export helpers (HTTP handler wrapping, provider management)
```
**Code Reference:** `internal/tracing/http.go`, `internal/tracing/provider.go`
---
### 2. OpenTelemetry dependency missing from CONTRIBUTING.md Dependencies section
**Location:** `CONTRIBUTING.md` — Dependencies section
**Problem:** `go.opentelemetry.io/otel` (and related `otel/sdk`, `otel/trace`, `otel/exporters/otlp/otlptrace/otlptracehttp`) are direct dependencies used for distributed tracing, but the Dependencies section only lists 8 packages and omits OpenTelemetry entirely.
**Actual Behavior:** `go.mod` lists OpenTelemetry packages as direct (non-indirect) dependencies:
```
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0
go.opentelemetry.io/otel/sdk v1.43.0
go.opentelemetry.io/otel/trace v1.43.0
```
**Impact:** Contributors adding tracing features won't know the library is already available as a direct dependency.
**Suggested Fix:** Add to the Dependencies section:
```
- `go.opentelemetry.io/otel` - OpenTelemetry distributed tracing (OTLP export, span/trace management)
Code Reference: go.mod:17-20, internal/tracing/provider.go
Documentation Completeness
Missing Documentation
internal/tracing/ package (implemented but not mentioned in CONTRIBUTING.md)
- OpenTelemetry as a direct dependency (in go.mod but not in CONTRIBUTING.md Dependencies)
Accurate Sections ✅
- README Quick Start — JSON config structure (
type, container, env, gateway.apiKey) matches StdinServerConfig and StdinGatewayConfig structs exactly
- README API endpoints —
/health response shape (status, specVersion, gatewayVersion, servers) matches HealthResponse struct in internal/server/health.go
- README Docker quick start —
MCP_GATEWAY_PORT, MCP_GATEWAY_DOMAIN, MCP_GATEWAY_API_KEY env vars are all used by run_containerized.sh and validated; port mapping guidance is correct
- CONTRIBUTING.md build commands — All documented make targets (
build, test, test-unit, test-integration, test-all, test-race, coverage, test-ci, lint, format, clean, install, test-serena, test-serena-gateway, test-container-proxy) exist in the Makefile with correct descriptions
- CONTRIBUTING.md prerequisites — Go 1.25.0 matches
go.mod exactly; Docker requirement is accurate
- CONTRIBUTING.md project structure — All 21 listed internal packages exist (only
tracing/ is omitted)
- CONTRIBUTING.md testing instructions — Unit vs integration split, coverage, CI targets all accurate
- CONTRIBUTING.md curl examples — Port 3000 default (
DefaultListenPort = "3000" in internal/cmd/root.go) matches the binary default; run.sh default of 8000 is correctly noted
- docs/CONFIGURATION.md server fields — All fields (
container, entrypoint, entrypointArgs, args, mounts, env, url, headers, auth, tools, guard, registry, working_directory) match StdinServerConfig struct definitions; behavioral notes (e.g., tools not enforced, working_directory not yet implemented) verified against code
- docs/ENVIRONMENT_VARIABLES.md — All documented env vars verified against code (
MCP_GATEWAY_PORT, MCP_GATEWAY_DOMAIN, MCP_GATEWAY_API_KEY, MCP_GATEWAY_LOG_DIR, MCP_GATEWAY_PAYLOAD_DIR, MCP_GATEWAY_PAYLOAD_PATH_PREFIX, MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD, MCP_GATEWAY_SESSION_TIMEOUT, MCP_GATEWAY_WASM_GUARDS_DIR, MCP_GATEWAY_GUARDS_MODE, MCP_GATEWAY_GUARDS_SINK_SERVER_IDS, MCP_GATEWAY_GUARD_POLICY_JSON, MCP_GATEWAY_ALLOWONLY_*, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME, RUNNING_IN_CONTAINER)
- config.example.toml — Note that the
port field does not control the listen address (verified: GatewayConfig.Port is validated but not passed to --listen in internal/cmd/root.go)
Tested Commands
All commands from CONTRIBUTING.md were dry-run validated against the Makefile:
- ✅
make build — target exists, builds awmg binary
- ✅
make test — alias for test-unit (confirmed in Makefile line 52-53)
- ✅
make test-unit — runs go test -v ./internal/...
- ✅
make test-integration — auto-builds if binary missing, runs ./test/integration/...
- ✅
make test-all — depends on build, runs all tests
- ✅
make test-race — runs go test -race ./internal/...
- ✅
make coverage — generates coverage.out
- ✅
make test-ci — generates JSON output with coverage
- ✅
make lint — runs go vet, gofmt, golangci-lint
- ✅
make format — runs gofmt -w .
- ✅
make clean — removes binary, coverage.out, tidies modules
- ✅
make install — checks Go version, installs golangci-lint, downloads deps
- ✅
make test-serena / test-serena-gateway — shell scripts in test/serena-mcp-tests/
- ✅
make test-container-proxy — Docker-dependent integration tests
- ⚠️ Build test skipped — Go 1.25.0 toolchain download blocked in sandbox (network restriction); binary not verifiable in this environment
Recommendations
Nice to Have:
- Add
internal/tracing/ to the CONTRIBUTING.md project structure tree and Key Directories section
- Add OpenTelemetry to the CONTRIBUTING.md Dependencies section
Code References
- Project structure source:
internal/ (directory listing)
- Configuration structs:
internal/config/config_core.go, internal/config/config_stdin.go
- CLI flags and defaults:
internal/cmd/root.go, internal/cmd/flags_core.go
- Health endpoint:
internal/server/health.go
- Tracing package:
internal/tracing/http.go, internal/tracing/provider.go
- go.mod:
go.mod:17-20
Generated by Nightly Documentation Reconciler · ● 2.5M · ◷
Summary
Found 2 minor discrepancies between documentation and implementation during nightly reconciliation check.
Minor Issues 🔵
Small inconsistencies or missing details that don't break user workflows.
1.
internal/tracing/package missing from CONTRIBUTING.md project structureLocation:
CONTRIBUTING.md— Project Structure section (directory tree) and Key Directories sectionProblem: The
internal/tracing/package exists in the codebase but is not listed in either the directory tree or the "Key Directories" reference section of CONTRIBUTING.md.Actual Behavior:
internal/tracing/is a real package providing OpenTelemetry OTLP trace export helpers (WrapHTTPHandler,Tracer,Provider) used by the MCP gateway middleware and the GitHub API proxy.Impact: Contributors looking up internal package locations won't find
tracing/in the reference and may be surprised to discover it.Suggested Fix:
Add to the directory tree:
Code Reference:
go.mod:17-20,internal/tracing/provider.goDocumentation Completeness
Missing Documentation
internal/tracing/package (implemented but not mentioned in CONTRIBUTING.md)Accurate Sections ✅
type,container,env,gateway.apiKey) matchesStdinServerConfigandStdinGatewayConfigstructs exactly/healthresponse shape (status,specVersion,gatewayVersion,servers) matchesHealthResponsestruct ininternal/server/health.goMCP_GATEWAY_PORT,MCP_GATEWAY_DOMAIN,MCP_GATEWAY_API_KEYenv vars are all used byrun_containerized.shand validated; port mapping guidance is correctbuild,test,test-unit,test-integration,test-all,test-race,coverage,test-ci,lint,format,clean,install,test-serena,test-serena-gateway,test-container-proxy) exist in the Makefile with correct descriptionsgo.modexactly; Docker requirement is accuratetracing/is omitted)DefaultListenPort = "3000"ininternal/cmd/root.go) matches the binary default; run.sh default of 8000 is correctly notedcontainer,entrypoint,entrypointArgs,args,mounts,env,url,headers,auth,tools,guard,registry,working_directory) matchStdinServerConfigstruct definitions; behavioral notes (e.g.,toolsnot enforced,working_directorynot yet implemented) verified against codeMCP_GATEWAY_PORT,MCP_GATEWAY_DOMAIN,MCP_GATEWAY_API_KEY,MCP_GATEWAY_LOG_DIR,MCP_GATEWAY_PAYLOAD_DIR,MCP_GATEWAY_PAYLOAD_PATH_PREFIX,MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD,MCP_GATEWAY_SESSION_TIMEOUT,MCP_GATEWAY_WASM_GUARDS_DIR,MCP_GATEWAY_GUARDS_MODE,MCP_GATEWAY_GUARDS_SINK_SERVER_IDS,MCP_GATEWAY_GUARD_POLICY_JSON,MCP_GATEWAY_ALLOWONLY_*,OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_SERVICE_NAME,RUNNING_IN_CONTAINER)portfield does not control the listen address (verified:GatewayConfig.Portis validated but not passed to--listenininternal/cmd/root.go)Tested Commands
All commands from CONTRIBUTING.md were dry-run validated against the Makefile:
make build— target exists, buildsawmgbinarymake test— alias fortest-unit(confirmed in Makefile line 52-53)make test-unit— runsgo test -v ./internal/...make test-integration— auto-builds if binary missing, runs./test/integration/...make test-all— depends onbuild, runs all testsmake test-race— runsgo test -race ./internal/...make coverage— generatescoverage.outmake test-ci— generates JSON output with coveragemake lint— runsgo vet,gofmt,golangci-lintmake format— runsgofmt -w .make clean— removes binary, coverage.out, tidies modulesmake install— checks Go version, installs golangci-lint, downloads depsmake test-serena/test-serena-gateway— shell scripts intest/serena-mcp-tests/make test-container-proxy— Docker-dependent integration testsRecommendations
Nice to Have:
internal/tracing/to the CONTRIBUTING.md project structure tree and Key Directories sectionCode References
internal/(directory listing)internal/config/config_core.go,internal/config/config_stdin.gointernal/cmd/root.go,internal/cmd/flags_core.gointernal/server/health.gointernal/tracing/http.go,internal/tracing/provider.gogo.mod:17-20