4 Commits

Author SHA1 Message Date
444f8cd015 fix: 修复知识图谱模块 P0/P1/P2/P3 问题
【P0 - 安全风险修复】
- InternalTokenInterceptor: fail-open → fail-closed
  - 未配置 token 时直接拒绝(401)
  - 仅 dev/test 环境可显式跳过校验
- KnowledgeGraphProperties: 新增 skipTokenCheck 配置项
- application-knowledgegraph.yml: 新增 skip-token-check 配置

【P1 - 文档版本控制】
- .gitignore: 移除 docs/knowledge-graph/ 忽略规则
- schema 文档现已纳入版本控制

【P2 - 代码质量改进】
- InternalTokenInterceptor: 错误响应改为 Response.error() 格式
- 新增 InternalTokenInterceptorTest.java(7 个测试用例)
  - fail-closed 行为验证
  - token 校验逻辑验证
  - 错误响应格式验证

【P3 - 文档一致性】
- README.md: 相对链接改为显式 GitHub 链接

【验证结果】
- 编译通过
- 198 个测试全部通过(0 failures)
2026-02-19 13:03:42 +08:00
42069f82b3 feat(kg): P0-04 同步结果元数据增强
实现同步历史记录和元数据功能:

新增功能:
- 添加 SyncHistory 节点记录同步历史
- 添加 /history 和 /history/range API 查询同步历史
- 添加 /full API 返回完整同步结果(含元数据)

问题修复:
- [P1] syncId 改为完整 UUID (36位),添加 (graph_id, sync_id) 唯一约束
- [P2-1] /history limit 添加 @Min(1) @Max(200) 边界校验
- [P2-2] /history/range 添加分页 (page, size),skip 越界保护 (>2M)
- [P2-3] 添加 SyncHistory 索引:(graph_id, started_at), (graph_id, status, started_at)

测试:
- 182 tests 通过 (新增 2 个测试)
- GraphSyncServiceTest, GraphInitializerTest, SyncMetadataTest 全部通过

代码变更:+521 行,-27 行
新增文件:4 个 (SyncMetadata, SyncHistoryRepository, SyncMetadataVO, SyncMetadataTest)
修改文件:5 个
2026-02-18 16:55:03 +08:00
Jason Wang
c097a06fbe feat: Improve makefile readability, Add user control on volume keep at uninstallation, Add Label Studio install and uninstall via Make. (#106)
* feature: Add label studio installation and uninstallation commands to Makefile

* feature: Enhance Makefile with detailed help commands and improve install/uninstall targets for services

* feature: Update Makefile help commands to clarify usage of local images

* feature: Improve error handling in Makefile for build, install, and uninstall targets

* feature: Enhance uninstall process in Makefile to prompt for volume deletion and update README with usage details

---------

Co-authored-by: Jason Wang <wjl_jason@qq.com>
2025-11-25 17:37:28 +08:00
Dallas98
1c97afed7d init datamate 2025-10-21 23:00:48 +08:00