WeKnora/scripts
wizardchen fc6f160eff fix(retriever/doris): code review cleanup
针对 4cce6f2e(接入 Apache Doris)的 code review 修复,主要修正若干阻断性
问题与可读性问题,并剔除不应进入主仓的本地工作流文件。

阻断性修复:
- docker-compose: Doris 镜像由 2.1.0 升至 4.1.0。原 2.1.0 不支持 HNSW
  ANN、cosine_distance_approximate 与 Stream Load partial_columns,
  按当前 DDL 一启动就会失败。
- DSN 字面量拼接改用 mysql.Config.FormatDSN()。原 fmt.Sprintf 在用户名/
  密码包含 `@`/`:`/`/` 等字符时会跑偏。覆盖 health check 与 engine
  factory 两处。

健壮性修复:
- 新增 validateEmbedding,写入与查询前拒绝 NaN/±Inf;strconv.FormatFloat
  对非有限值会输出 "NaN"/"+Inf" 拼成无效 SQL。
- waitANNReady 改为后台 goroutine + 独立 context,避免新维度首次写入路径
  阻塞最长 30s;ANN 未就绪时 Doris 会自动退化为 brute-force。

清理:
- annIndexReady 移除最终两个分支都 return true 的冗余写法。
- Save 移除冗余的双重 toDorisVectorEmbedding。
- testDorisConnection 把 "5.7.99 Doris-4.1.0" 解析为裸 "4.1.0",与
  Postgres/ES 的版本格式对齐。

剔除(不应合入主仓):
- docs/wiki/集成扩展/Doris改动与上游同步.md:纯 fork 维护工作流文档。
- scripts/e2e-doris.sh:作者本地 E2E 验证清单。

测试:
- repository_test 用 require.Eventually 适配 ANN 异步轮询。
- 现有 doris 单测全部通过。
2026-05-09 00:31:03 +08:00
..
build_images.sh feat: enhance Dockerfile and build scripts for customizable APT mirror 2026-03-02 21:21:49 +08:00
check-env.sh feat(storage): 集成S3存储适配器 2026-03-09 10:39:46 +08:00
dev.sh fix:修复make dev-app里面脚本问题 2026-04-22 16:38:50 +08:00
docker-entrypoint.sh feat: enhance Docker setup with entrypoint script and skill management 2026-03-05 18:14:14 +08:00
get_version.sh feat: introduce WeKnora Lite edition with lightweight configuration and deployment 2026-03-02 21:21:49 +08:00
migrate.sh feat: 支持数据库迁移脏状态自动恢复和Neo4j连接重试机制 2025-12-08 19:38:16 +08:00
package-lite.sh Revert "chore: make Lite edition support and related configurations hidden" 2026-04-11 18:51:16 +08:00
package-mac-app.sh feat: implement desktop app structure with API base URL handling and bindings for Wails integration 2026-04-11 18:51:16 +08:00
quick-dev.sh chore: Update .gitignore and Makefile for development enhancements 2025-11-07 15:52:52 +08:00
start_all.sh feat: optimize security and deployment of agent skills 2026-02-04 20:08:49 +08:00
test-homebrew.sh Revert "chore: make Lite edition support and related configurations hidden" 2026-04-11 18:51:16 +08:00
update-homebrew-formula.sh Revert "chore: make Lite edition support and related configurations hidden" 2026-04-11 18:51:16 +08:00