Skip to content

Documentation vs source-code consistency audit (2026-10-13) ​

Run against ~/workspaces/standards/文档与源码一致性审计规范.md: enumerate the documentation surface → collect evidence per item (file:line) → sort into three buckets → record in a table → fix (the source code is the truth; never change code to flatter the docs) → re-check the gates.

  • Surface audited: root README.md / README.zh.md, apps/, services/ READMEs, docs/** site pages, and the gh repository facade (description / topics). Negative claims ("not created / not implemented") all had their search paths verified first.
  • Bucket counts: A docs ahead of code 19 · B code ahead of docs 32 · C description mismatch 31 (82 items, all fixed).
  • P0: 1 item (the facade's mini-program). P1: 18 items. The rest P2.
  • Fix principle: the code is always authoritative; docs either drop the ahead-of-code claim or mark it "planned", fill in missing surfaces, and correct mismatched wording. Zero code changes this round.

P0 / P1 list ​

IDSeveritySummary
D-01P0The gh facade description/topics claim a mini-program, which was decided not to start
D-02P1Root README (EN/ZH) calls realtime-hub "not yet created" while the service is fully landed
D-06P1Root README has no current-state section for community/realtime-hub/user-service-rpc
D-12P1Root README says "seven services with a dual-driver data layer" and "every service has its own Dockerfile"; only 5 services are dual-driver and rpc has no image
D-13P1apps/README claims "design system / routing conventions / i18n are all supported through packages/", but packages/ holds only config
D-14P1services/README attributes "friends/achievements/points/notification preferences" to user-service
D-18P1services/README calls realtime-hub an "M1 skeleton" while voice signalling / push / tunnel are all landed
D-20P1Gateway README says "if BaseURL is not configured the routes are not registered (optional deployment)", but startup panics for everything except RealtimeHub
D-32P1content-service README metric prefix content_service_gamecatalog_client_* is entirely wrong
D-40P1docs/index.md says "api-gateway manages login issuing"; login is a proxy and issuing lives in user-service
D-44P1docs/clients.md calls realtime-hub "not yet created", contradicting its own 2026-10-11 record
D-48P1The development guide's service tree says "all seven landed" and has no realtime-hub
D-49P1The development guide's Dockerfile excerpt shows golang:1.22, which is actually 1.26
D-51P1The development guide's cross-service metric names disagree with the implementation
D-57P1The development guide's demo-account login example — the service has no seed users, so it always 401s
D-64P1mobile_plan calls realtime-hub "not landed"
D-65P1mobile_plan calls image upload "a separate backend task" while gateway /upload is landed and wired on both clients
D-67P1The backlog deferred table still lists realtime-hub as "decided not to start", contradicting line 10 of the same document
D-83P1apps/mobile-app has no README (its only doc is the generic AGENTS.md)

Audit table ​

Legend: A = docs ahead of code / B = code ahead of docs / C = description mismatch. Every item was fixed this round.

IDPageClaimSource evidence (file:line)CategorySeverityFix
D-01gh facadedescription/topics claim a mini-program clientapps/mini-program does not exist; docs/backlog.md deferred table says "decided not to start"AP0remove mini-program from the description and delete the topic
D-02README.md:53-55 / README.zh.md:53-54Seven services have code; realtime-hub "not yet created"services/realtime-hub/realtime-hub.go:1, etc/realtime-hub.yaml:2, DockerfileBP1say eight services and move realtime-hub out of the unbuilt list
D-03README.md:14 / README.zh.md:14nightly artifacts ×6 (six backend services).github/workflows/nightly.yml:47-53 has seven build_serviceCP2×7 (seven services)
D-04README.md:77 / README.zh.md:74mobile-app aggregates teaming/stats/eventsapps/mobile-app/src/app/(tabs)/_layout.tsx has five tabs with no teaming/eventsAP2say stats/guides/community/notifications
D-05README.md:87 / README.zh.md:84"M0–M3 landed" stated absolutely; "CI lint+typecheck + expo export walkthrough" implies CI runs exportdocs/mobile_plan.md (device regression unfinished); .github/workflows/ci.yml:87-91 runs lint+typecheck onlyCP2say "code slices landed + device regression pending" and "CI runs lint+typecheck only; export walkthroughs are recorded"
D-06README.md service-status section / README.zh.mdNo sections for community/realtime-hub/rpcservices/community/internal/handler/routes.go:28-258; services/realtime-hub/internal/handler/routes.go:63-66BP1add sections 6/7/8 and renumber web to 9
D-07README.md port table / README.zh.mdNo realtime-hub rowservices/realtime-hub/etc/realtime-hub.yaml:2 (:8893)BP2add the row
D-08README.md quick start / README.zh.mdThe startup checklist omits realtime-hubservices/realtime-hub/realtime-hub.go:21BP2add a go run line
D-10README.md:153 / README.zh.md:150web community has only a "following mode"apps/web-client/src/pages/CommunityPage.tsx:31 (latest/hot/mine/followed/search)BP2add the four modes plus keyword search
D-11README.md:141 / README.zh.md:138The proxy list misses DMs/moderation (the Chinese version also misses notifications)services/api-gateway/internal/community/routes.go:58-67BP2add messages/moderation/notifications to the list
D-12README.md technical highlights / README.zh.md"Seven services with a dual-driver data layer", "every service directory has its own Dockerfile"Only 5 services are dual-driver; services/user-service-rpc/ has no DockerfileCP1limit it to the five SQLite services; note that rpc has no image and the hub is stateless
D-13apps/README.md:9Design system / routing conventions / i18n are all supported through packages/packages/ holds only config (env/lint/make)AP1describe the config reality and mark the rest as planned
D-14services/README.md:6user-service includes friends/achievements/points/notification preferencesservices/user-service/model/usermodel.go:246 (users table only)AP1trim to accounts/authz/profile/recommendations and mark the rest as planned
D-15services/README.md:7game-catalog includes version metadataservices/game-catalog/model/gamemodel.go:81 has no version fieldAP2delete it
D-16services/README.md:8content-service includes moderationservices/content-service/internal/handler/routes.go:15-89 has no moderation endpointsAP2say "publish-state management"
D-17services/README.md:10data-panel includes a leaderboard APIservices/data-panel/internal/handler/routes.go has only 4 routesAP2delete it
D-18services/README.md:13realtime-hub is an "M1 skeleton", with voice signalling / push fanout planned for M3services/realtime-hub/internal/hub/signal.go:16-34, push.go:39-53, README.md:41-46 all M3 items checkedBP1change the status to "landed" and list the full responsibilities
D-19services/README.md:9community's responsibilities miss DMs/moderationservices/community/internal/handler/routes.go:163-207BP2add direct messages and report moderation
D-20services/api-gateway/README.md:17,28An unconfigured upstream means that group is not registered (optional deployment)internal/proxy/upstream.go:20-22 panics; only internal/realtime/routes.go:17-19 skipsCP1say "startup fails for everything except RealtimeHub"
D-21services/api-gateway/README.md:14The community proxy list misses messages/moderation/commentsinternal/community/routes.go:58-67BP2complete the list
D-22services/api-gateway/README.md:7-15The route table has no user-proxy rowinternal/users/routes.go:25-27BP2add the row
D-23services/api-gateway/README.md:45Test file path internal/*/routes_integration_test.goActually internal/handler/routes_integration_test.go plus each group's internal/*/routes_test.goCP2correct the paths
D-24services/community/README.md:69DMs: "each side stores a row view"internal/model/directmessagemodel.go:66-79 stores a single rowCP2say "one shared row; is_read flips only for the recipient"
D-25services/community/README.md:154"No outbound calls"internal/realtime/publisher.go:27-36 POSTs to the hub's /internal/publishCP2limit to "no outbound calls to user-service" and add the hub publish
D-26services/community/README.md:237Dockerfile golang:1.22services/community/Dockerfile:3 golang:1.26CP2change to 1.26
D-27services/community/README.md:53-55Notification endpoints miss :id/readinternal/handler/routes.go:158BP2add the endpoint
D-28services/community/README.md:27-36Post endpoints miss the three comment routesinternal/handler/routes.go:87-104BP2add the endpoints
D-29services/community/README.md:172-191The config block misses Realtime/Prometheusetc/community-api.yaml has a Realtime section plus Prometheus 9094BP2add the config sections
D-30services/community/README.md:305"Current version v1.2"No version marker in the codeAP2delete the version line
D-31services/community/README.md:164-167The gateway entry list misses messagesservices/api-gateway/internal/community/routes.go:58-62BP2add /api/v1/messages**
D-32services/content-service/README.md:29Metric prefix content_service_gamecatalog_client_*internal/metrics/metrics.go:14,24,35,45 real names content_game_catalog_client_*CP1correct the metric names
D-33services/content-service/README.md:29"retries" is a separate metricThere is no retries counter, only a retry_exhausted status labelAP2change the wording
D-34services/content-service/README.md:71-72guiderepository.go/commentrepository.gomodel/guidemodel.go, commentmodel.goCP2correct the file names
D-35services/content-service/README.md:33-73The directory tree misses middleware/utils/client/cache/metrics/httperr/favourite filesAll the directories exist on diskBP2complete the tree
D-36services/content-service/README.md:7-14The feature list misses favouritesroutes.go:53-65 has four favourite endpointsBP2add "favourite a guide (idempotent)"
D-37services/content-service/README.md:217-224The config block misses Auth/Services.GameCatalog/PrometheusAll three sections are in etc/content-api.yamlBP2add the config sections
D-38services/realtime-hub/README.md:3"Direct-connect mode… tunnelisation is an M3 item"The gateway's internal/realtime/routes.go:26 tunnel is landed (M3-2 [x]); the Redis relay is landedBP2update the intro to landed
D-39docs/index.md:7The homepage hero omits the realtime channel and says only "seven go-zero microservices"go.work has eight modules (7 go-zero + realtime-hub)BP2add the realtime hub to the hero plus a new "realtime channel" feature
D-40docs/index.md:27"api-gateway manages login issuing"internal/users/routes.go:26 login is a proxy; issuing is in user-serviceCP1say "login/registration proxy"
D-41docs/index.md:31"Six services each open /metrics"etc/*.yaml has seven Prometheus ports 9091–9097CP2seven (9091–9097)
D-42docs/index.md:25The community feature misses DMs/moderationservices/community/internal/handler/routes.go:163-207BP2complete the feature
D-43docs/README.md:5"Six-service development guide"The guide's service tree now has eight modulesCP2say eight services
D-44docs/clients.md:52realtime-hub "not yet created"services/realtime-hub/ exists; earlier in the same document it landed 2026-10-11AP1move it out of the unbuilt list
D-45docs/clients.md:38-48The service table has no realtime-hub rowetc/realtime-hub.yaml:2BP2add the row (8893, no /metrics)
D-46docs/clients.md:46community's responsibilities miss DMs/moderationroutes.go:163-207BP2complete it
D-47docs/development-guide.md:13Go recommended 1.25+go.work:1 go 1.26.0CP2change to 1.26+
D-48docs/development-guide.md:48-55The service tree says "all seven landed" with no realtime-hubgo.work use lists eight modulesBP1add a realtime-hub row
D-49docs/development-guide.md:1070Excerpt says golang:1.22services/community/Dockerfile:3 golang:1.26CP1change to 1.26
D-50docs/development-guide.md:1213-1220The /metrics table misses data-panelservices/data-panel/etc/data-panel-api.yaml 9097BP2add the row
D-51docs/development-guide.md:1242-1246Cross-service metric names/labels disagree with the implementationinternal/metrics/metrics.go:14,24,35,45CP1rewrite using the real names (calls_total/duration/breaker_state/transitions)
D-52docs/development-guide.md:1275-1277"Six targets 9091–9096", "six-service Log block"deploy/prometheus/prometheus.yml has seven targets; realtime-hub has no Log blockCP2seven targets 9091–9097; note the hub exception in the Log block
D-53docs/development-guide.md:1299-1300"Five services added /metrics exposure (9091–9095)"docker-compose.yaml publishes 9091–9095 + 9097CP2six services (9091–9095, 9097)
D-54docs/development-guide.md:1312"Six targets up"Same as D-52, seven targetsCP2change to seven
D-55docs/development-guide.md:1399curl /health liveness for user-serviceservices/user-service/internal/handler/routes.go does not register /healthCP2use the registered /from/:name route
D-56docs/development-guide.md:1415setup-go@v5.github/workflows/ci.yml:14 @v7CP2change to @v7
D-57docs/development-guide.md:1352A demo account logs in directlymodel/usermodel.go has no seed usersAP1add a register step before login
D-58docs/development-guide.md:1331-1338The auth overview says "6 services" with no realtime-hubservices/realtime-hub/internal/auth/auth.go HS256BP2say 7 services and add a hub row
D-59docs/development-guide.md:1449"content-service guides have no image field"model/guidemodel.go CoverImageAP2say "guides have CoverImage; users have no avatar"
D-60docs/development-guide.md:1584The gateway's own-handler table misses /upload, /uploads/:fileservices/api-gateway/internal/handler/routes.go:37-43BP2add both
D-61docs/development-guide.md:1588"community has no outbound calls"services/community/internal/svc/service_context.go Realtime PublisherCP2say "no outbound calls to user-service; publishes to the hub"
D-62docs/development-guide.md:1572"All 6 services have a JWT system"The auth overview now covers 7 servicesCP2change to 7
D-63docs/development-guide.md:1065"Every service has a Dockerfile with the same pattern"user-service-rpc has none; api-gateway/realtime-hub are distrolessCP2add the qualification
D-64docs/mobile_plan.md:49"realtime-hub not landed"services/realtime-hub/ is fully landed (including voice signalling hub/signal.go)AP1say landed
D-65docs/mobile_plan.md:90"Upload capability is a separate backend task"gateway upload.go is landed (6642132) and wired on both clientsAP1say cleared
D-66docs/realtime-hub.md:32"JWT verified on handshake; disconnect on failure"internal/handler/routes.go:76-81 returns 401 before the UpgradeCP2say "refuse with 401 on failure (before upgrade)"
D-67docs/backlog.md:52The deferred table includes realtime-hub as "decided not to start"Line 10 of the same document says it landed 2026-10-11CP1remove realtime-hub from the deferred table
D-68docs/backlog.md:19-28The CI snapshot misses a realtime-hub row; package counts are stalerealtime-hub has 5 test packages; api-gateway 12 / community 19 packages (measured 2026-10-13)BP2add the row plus a snapshot-posture note
D-69docs/backlog.md:50-51community README:271/272 line numbers driftedActually :285/:286CP2correct the line numbers
D-70docs/architecture/overview.zh.md:28"Persist by data model (e.g. Postgres/ElasticSearch)" + a Kafka/PubSub message busNo Postgres/ES/Kafka anywhere in the repo; storage is SQLite/MySQLAP2describe the dual-driver reality and mark the candidate technologies "candidate"
D-71docs/architecture/overview.zh.md:30"Report through the shared-utils SDK to a data pipeline"packages/ holds only config; there is no data pipelineAP2say stats write straight to data-panel and mark the SDK as planned
D-72docs/architecture/overview.zh.md:49"Every service provides a docs/ subdirectory"No services/*/docs existsAP2say "each service's README.md"
D-73docs/architecture/overview.zh.md:50"Contract tests under tests/"tests/ holds only a README that describes itself as plannedAP2say "per-service test coverage; cross-service tests/ is planned"
D-74docs/architecture/overview.zh.md:51"A CI/CD pipeline provided by the platform layer"CI lives in .github/workflows; platform/ is plannedCP2use the workflows wording
D-75docs/architecture/topology.zh.md:10user-service's responsibilities include a "growth system"No growth/level code exists (grep has no hits)AP2delete it
D-76docs/architecture/topology.zh.md:13community's responsibilities miss DMs/moderation/searchroutes.go:130,163-207BP2complete the responsibilities
D-77docs/architecture/topology.zh.md:59The community proxy list misses search/comments/messages/moderationservices/api-gateway/internal/community/routes.go:32,42-44,58-67BP2complete the list
D-78docs/architecture/topology.zh.md:79"Every service directory has its own Dockerfile"user-service-rpc has no DockerfileCP2add the qualification (rpc has no image; two services are distroless)
D-79apps/web-client/README.md:25-26The route list misses 8 implemented routesapps/web-client/src/App.tsx:156-264BP2complete all 15
D-80apps/web-client/GUIDE.md:9-19The route table misses 6 implemented routesSame as above (/discover /games /games/:id /stats /profile /users/:id)BP2add the 6 rows (including the permission column)
D-81apps/web-client/GUIDE.md:35"The create-guide button on the homepage or the guide list page"Only GuidesPage.tsx:155 has that buttonCP2say "the guide list page"
D-82apps/web-client/GUIDE.md:118The gateway variable says "login/recommendations/featured prefer the gateway"Once configured, all calls go through the gateway (every fetcher in client.ts)CP2say "all service calls prefer the gateway"
D-83apps/mobile-appNo README.md (root README:26 and apps/README.md:4 both reference this client)A find over the whole directory shows only AGENTS.mdBP1create a README (routes/config/scripts/status)

Verification of negative claims (search paths verified before concluding) ​

The following "not landed" claims were confirmed true by a repo-wide grep (services/ apps/ packages/ platform/ deploy/ tools/ docker-compose.yaml go.work, excluding .md/.out), so the original verdict stands:

  • matchmaking, crawler-jobs, mini-program, admin-console: directories do not exist.
  • Elasticsearch / ML recommendations / video content / GraphQL: no implementation.
  • Postgres / Kafka: no implementation (the overview.md text now says "candidate").

Fix status and gates ​

  • All 82 items were fixed this round (the facade's 1 item via gh repo edit; the rest in repository commits).
  • Zero code changes this round; Go -race tests across all modules measured green 2026-10-13 (community 353 / gateway 124 / realtime-hub 45 / user-service 116 / game-catalog 100 / content-service 301 / data-panel 96 / user-service-rpc 5).
  • Docs site build gate: docs/ VitePress npm run build passes (this page ships with the site).

spawn · game community platform