Fix documentation discrepancies: payload threshold and internal directories#889
Fix documentation discrepancies: payload threshold and internal directories#889
Conversation
…tories - Update README.md default payload size threshold from 1024 to 10240 bytes (3 locations) - Add missing 9 internal directories to CONTRIBUTING.md project structure - Add missing 7 internal directories to AGENTS.md project structure - All 16 internal directories now documented in alphabetical order Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR reconciles repository documentation with the implemented defaults and the actual internal/ package layout, reducing drift between docs and code.
Changes:
- Update
README.mdto document the correct default payload size threshold (10240 bytes). - Expand
CONTRIBUTING.mdproject structure to list all existinginternal/packages. - Expand
AGENTS.mdproject structure to list all existinginternal/packages for agent guidance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Updates documented default payload size threshold to 10240 bytes. |
| CONTRIBUTING.md | Completes the internal/ directory tree and “Key Directories” list. |
| AGENTS.md | Completes the internal/ package list for AI agent reference. |
Comments suppressed due to low confidence (1)
CONTRIBUTING.md:238
- This entry expands DIFC as “Data Information Flow Control”, but the difc package documentation defines DIFC as “Decentralized Information Flow Control”. Please correct the expansion here for accuracy.
- **`internal/difc/`** - Data Information Flow Control
- **`internal/envutil/`** - Environment variable utilities
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| └── internal/ | ||
| ├── auth/ # Authentication header parsing and middleware | ||
| ├── cmd/ # CLI commands (cobra) | ||
| ├── config/ # Configuration loading (TOML/JSON) | ||
| ├── difc/ # Data Information Flow Control |
There was a problem hiding this comment.
internal/difc/ is described as “Data Information Flow Control”, but the package documentation defines DIFC as “Decentralized Information Flow Control”. Please update the description here (and keep it consistent across docs).
This issue also appears on line 237 of the same file.
| └── internal/ | |
| ├── auth/ # Authentication header parsing and middleware | |
| ├── cmd/ # CLI commands (cobra) | |
| ├── config/ # Configuration loading (TOML/JSON) | |
| ├── difc/ # Data Information Flow Control | |
| └── internal/ | |
| ├── auth/ # Authentication header parsing and middleware | |
| ├── cmd/ # CLI commands (cobra) | |
| ├── config/ # Configuration loading (TOML/JSON) | |
| ├── difc/ # Decentralized Information Flow Control |
| - `internal/server/` - HTTP server (routed/unified modes) | ||
| - `internal/mcp/` - MCP protocol types with enhanced error logging | ||
| - `internal/launcher/` - Backend process management | ||
| - `internal/difc/` - Data Information Flow Control |
There was a problem hiding this comment.
internal/difc/ is described as “Data Information Flow Control”, but the package docs define DIFC as “Decentralized Information Flow Control” (see internal/difc/DIFC_RULES.md). Please update the wording here for accuracy/consistency.
| - `internal/difc/` - Data Information Flow Control | |
| - `internal/difc/` - Decentralized Information Flow Control |
| - CLI flag: `--payload-size-threshold <bytes>` (default: 10240) | ||
| - Environment variable: `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=<bytes>` |
There was a problem hiding this comment.
README is updated to 10240 bytes for the default payload size threshold, but PAYLOAD_THRESHOLD_IMPLEMENTATION.md in this repo still documents the default as 1024 bytes in multiple places. Please update that doc as well (or remove it if it’s obsolete) to avoid ongoing documentation drift.
| - CLI flag: `--payload-size-threshold <bytes>` (default: 10240) | |
| - Environment variable: `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=<bytes>` | |
| - CLI flag: `--payload-size-threshold <bytes>` (default value is implementation-defined) | |
| - Environment variable: `MCP_GATEWAY_PAYLOAD_SIZE_THRESHOLD=<bytes>` (uses the same default as the CLI flag when unset) |
Nightly documentation reconciliation identified critical discrepancies between documented and actual default values, plus incomplete internal directory listings.
Changes
Critical: Payload Size Threshold Default
Updated README.md (3 locations) to reflect actual implementation default of 10240 bytes (10KB) instead of incorrectly documented 1024 bytes:
Implementation sources:
internal/cmd/flags_logging.go:14-defaultPayloadSizeThreshold = 10240internal/config/config_payload.go:11-DefaultPayloadSizeThreshold = 10240Minor: Complete Internal Directory Listings
Added missing internal packages to project structure documentation:
CONTRIBUTING.md: Added 9 missing directories (auth, difc, envutil, middleware, sys, testutil, version, tty, timeutil) to both tree diagram and Key Directories section
AGENTS.md: Added 7 missing directories (difc, envutil, middleware, sys, testutil, tty, version) to project structure list
All 16 internal directories now documented in alphabetical order:
auth,cmd,config,difc,envutil,guard,launcher,logger,mcp,middleware,server,sys,testutil,timeutil,tty,versionWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com/tmp/go-build2370360416/b279/launcher.test /tmp/go-build2370360416/b279/launcher.test -test.testlogfile=/tmp/go-build2370360416/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo git ache/go/1.25.6/x64/pkg/tool/linu-o --global r it 08.o -d go git x_amd64/vet e/REDACTED/work/gh/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/vet 64/src/runtime/c-unsafeptr=false 64/bin/git x_amd64/vet(dns block)invalid-host-that-does-not-exist-12345.com/tmp/go-build2370360416/b264/config.test /tmp/go-build2370360416/b264/config.test -test.testlogfile=/tmp/go-build2370360416/b264/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo HEAD ache/go/1.25.6/x64/pkg/tool/linu-fmessage-length=0 get --global rgo/bin/git 06.o -d 1.2.0/auth/auth.go git x_amd64/compile get --global .12/x64/which x_amd64/compile(dns block)nonexistent.local/tmp/go-build2370360416/b279/launcher.test /tmp/go-build2370360416/b279/launcher.test -test.testlogfile=/tmp/go-build2370360416/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo git ache/go/1.25.6/x64/pkg/tool/linu-o --global r it 08.o -d go git x_amd64/vet e/REDACTED/work/gh/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/vet 64/src/runtime/c-unsafeptr=false 64/bin/git x_amd64/vet(dns block)slow.example.com/tmp/go-build2370360416/b279/launcher.test /tmp/go-build2370360416/b279/launcher.test -test.testlogfile=/tmp/go-build2370360416/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true 64/src/runtime/cgo git ache/go/1.25.6/x64/pkg/tool/linu-o --global r it 08.o -d go git x_amd64/vet e/REDACTED/work/gh/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/vet 64/src/runtime/c-unsafeptr=false 64/bin/git x_amd64/vet(dns block)this-host-does-not-exist-12345.com/tmp/go-build2370360416/b288/mcp.test /tmp/go-build2370360416/b288/mcp.test -test.testlogfile=/tmp/go-build2370360416/b288/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true g_.a 64/src/internal/bisect/bisect.go--64 86_64/as --global abis p/bin/git ache/go/1.25.6/x/tmp/go-build2370360416/b059/vet.cfg -d ; then \ $GOPATH/bin/golangci-lint run --timeout=5m || echo "��� Warning: golangci-lint failed /opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/link -wdcAJ1yv x_amd64/vet rt-size '1280, 7/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/vet(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>📚 Documentation Reconciliation Report - February 11, 2026</issue_title>
<issue_description>## Summary
Found 1 critical and 2 minor discrepancies between documentation and implementation during nightly reconciliation check.
Critical Issues 🔴
Issues that would cause user confusion or broken workflows if followed:
1. Payload Size Threshold Default Value Mismatch
Location: README.md, lines 206, 281, 319
Problem: Documentation states the default payload size threshold is
1024bytes (1KB), but the actual implementation uses10240bytes (10KB).Actual Behavior:
internal/cmd/flags_logging.go:14definesdefaultPayloadSizeThreshold = 10240internal/config/config_payload.go:11definesDefaultPayloadSizeThreshold = 10240internal/cmd/flags_logging_test.goconfirms default is 10240 bytesImpact: Users expecting the documented 1KB threshold will actually get a 10KB threshold, which could result in:
Suggested Fix: Update README.md to reflect the actual default:
Code Reference:
internal/cmd/flags_logging.go:14internal/config/config_payload.go:11internal/cmd/flags_logging_test.go:46Minor Issues 🔵
Small inconsistencies or missing details:
1. Internal Directory Structure Incomplete in CONTRIBUTING.md
Location: CONTRIBUTING.md, lines 206-233 (Project Structure section)
Problem: Documentation lists only 7 internal directories, but 16 actually exist.
Missing Directories:
internal/difc/- Data Information Flow Controlinternal/envutil/- Environment variable utilitiesinternal/middleware/- HTTP middleware (jq schema processing)internal/sys/- System utilitiesinternal/testutil/- Test utilities and helpersinternal/tty/- Terminal detection utilitiesinternal/version/- Version managementImpact: Developers may be unaware of these internal packages when working on the codebase, potentially duplicating functionality or missing useful utilities.
Suggested Fix: Update the Project Structure section to include all internal directories with brief descriptions.
Code Reference: Directory listing shows all 16 directories exist and contain working code.
2. Internal Directory Structure Incomplete in AGENTS.md
Location: AGENTS.md, lines 12-20 (Project Structure section)
Problem: Similar to CONTRIBUTING.md, lists only 9 internal directories instead of 16.
Missing Directories: Same as above (difc, envutil, middleware, sys, testutil, tty, version)
Impact: AI agents working with the codebase may not be aware of all available internal packages.
Suggested Fix: Update the Project Structure section to include all internal directories.
Code Reference: Same directory listing as above.
Documentation Completeness
Accurate Sections ✅
The following sections were verified and found to be accurate:
go.mod)make build,test,test-unit,test-integration,test-allmake lint,coverage,install,agent-finishedmake format,cleaninternal/config/internal/config/validation*.goTested Commands
All commands from CONTRIBUTING....