chore(wiki): 采纳 #437 review 小建议(import 规范 + Javadoc 英文)#449
Merged
mateaix merged 1 commit intoJun 28, 2026
Merged
Conversation
- WikiRawMaterialService.listFailures: inline FQN return type (java.util.List<vip.mate.wiki.dto.WikiFailureItem>) replaced with top-level import + simple name, per repo convention - WikiRawMaterialEntity: Javadoc on new fields (errorCode, warningCode, warningMessage, progressPhase, progressTotal, progressDone) translated to English, per repo convention
Owner
|
感谢这么快跟进 #437 的两个建议 🙏 改动正是预期的: 一个可选的小尾巴(不影响本次合并): |
ncw1992120
added a commit
to ncw1992120/mateclaw
that referenced
this pull request
Jun 28, 2026
…x#449 nit) Per mateaix#449 review (4825113234): the internal RFC-012 reference should not appear in code. progressPhase/progressTotal/progressDone Javadocs still carried the "RFC-012 M2 v2 UI:" prefix after mateaix#449's English translation pass — drop it now that these lines are touched. Zero behavior change.
Contributor
Author
mateaix
pushed a commit
that referenced
this pull request
Jun 30, 2026
* feat(kb-open): P0-B 9 open API endpoints Implements the 9 read-only KB Open API endpoints on top of the P0-A auth skeleton (#441). Each returns an explicit DTO (A5: never raw entities) and delegates assembly to service-layer methods that return pure DTOs (A6: no HTTP coupling, MCP-ready). Endpoints: - GET /pages/{slug} entity card (mode=summary/full/section:{heading}) - POST /search hybrid retrieval (granularity=entity/chunk) - POST /search/chunks chunk-level semantic search - POST /pages/{slug}/traverse entity relation graph (depth ≤ 2) - GET /pages/{slug}/trace provenance (page → chunk → raw) - GET /taxonomy pageType/entityType/relationType enumeration - GET /whats-new recent changes + stale pages - GET /stats KB statistics - GET /pages lightweight page list Components: - KbOpenApiController: 9 endpoints, each @RequireKbScope annotated - KbOpenApiService: assembly layer (card, traverse BFS, metadata parsing) - KbOpenApiDtos: all response DTOs as records (PageCard, TraceResult, TaxonomyResult, KbStats, WhatsNewResult, TraverseResult, PageList) Traverse (pragmatic version): - depth ≤ 2 with explosion guard, predicate LIKE matching - slug → pageId → mention → primaryEntity (salience-highest) - neighbor nodes echo slug when available (R11) - edge sourceHandle via evidenceChunkId → citing page Tests (4 new, all green): - KbOpenApiControllerTest: 404 on missing page/slug, delegation to service Closes #442 * fix(kb-open): address review feedback on #445 BLOCKERS: - stats.pagesWithLinks always returned 0 because listByKbId() nulls out content. Switch to listByKbIdWithContent() so [[wiki link]] detection works. - Test file: replace inline java.util.List.of() FQN with import + simple name (sync-opensource would expose the unidiomatic style). NITS (inherited from P0-A rebase): - V162→V164, prefix VARCHAR(12), FQN imports, parseScopes trim, ?token= fallback removal, design doc moved to rfcs/ — all now in ancestor commit 6fd6244. EXTRA: - whatsNew staleReason: hardcoded Chinese "上游 fact 页面变更" → English "Upstream fact page changed" (external-facing API response). * chore(wiki): drop RFC-012 prefix from progress field Javadocs (#449 nit) Per #449 review (4825113234): the internal RFC-012 reference should not appear in code. progressPhase/progressTotal/progressDone Javadocs still carried the "RFC-012 M2 v2 UI:" prefix after #449's English translation pass — drop it now that these lines are touched. Zero behavior change. * chore(kb-open): drop inline FQN in parseScopes (#444 nit) Per #444 review (4825157096): parseScopes used `.collect(java.util.stream.Collectors.toUnmodifiableSet())` while `Collectors` is already imported at the top of the file. Use the simple name. Zero behavior change.
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.
跟进 #437 review 中的两个不阻塞建议:
WikiRawMaterialService.listFailures内联全限定名 → 改为顶部 import + 简单名(List<WikiFailureItem>),符合仓库规范WikiRawMaterialEntity的errorCode/warningCode/warningMessage/progressPhase/progressTotal/progressDone六个字段的中文 Javadoc 翻译为英文纯代码风格清理,零行为变化。(重建分支,干净的 1 个 commit)