docs(enterprise): ApeRAG 企业版仓库迁移方案 v1#1953
Closed
earayu wants to merge 3 commits into
Closed
Conversation
per earayu2 directive (#企业版 msg=c2c8d8f2 + msg=c0b009e2): 团队讨论收口后总架构师起草完整详细中文方案 + 走 PR 合并流程. ## 方案核心 企业版仓库 (apecloud/aperag-enterprise) 作为日常开发主战场, 但保留 apecloud/ApeRAG 开源版的完整历史和社区 PR 流程, 通过 PR 标签 + 代码目录硬隔离 + 双向同步机制, 让两边自然协同. ## 关键决策 (10 lane 团队讨论收口) - 渐进式启动 (NOT hard cut force-push) - 现有开源代码目录不动, 企业代码新增到独立目录 (additive) - PR 标签强制 (oss-safe / enterprise-only / mixed) - 双向同步: oss-safe cherry-pick + 周期 OSS->EE merge - 4 道防泄漏闸 (路径 + license header + 关键词扫描 + 同步预演) - 启动 dual gate: earayu2 ratify + in-flight epic drain (PR #1951/#1952 + task #89 + task #11 + sediment queue) ## 写作风格 (per earayu2 #可观测性 msg=32bfe34b directive) 自然中文, 不堆内部术语 (fold-in / family / sediment / mini-pattern 19/20 / Lesson #18 等都换成自然语言), 跟 task #31 Phase A 实施方案 (PR #1934) 同风格. ## 时间表 (启动后约 1-1.5 周) - Step 0: freeze in-flight 1-3 天 - Step 1: 建仓 ~1 天 (Planetegg) - Step 2: 加企业目录 + 4 道闸 + 策略文档 ~3 天 (架构师 + 明书) - Step 3: 双向同步 bot + 培训 + round-trip 验证 ~3 天 (Planetegg + 架构师) ## Phase 2 重评 (1-3 个月后数据驱动) - 企业代码 > 30% 总代码 → 评估 packages 化 - 手工 cherry-pick 月 > 30 → 加强自动化 - 同步预演 false-positive 月 > 5 → 加强静态分析 ## 法务边界 (启动前 earayu2 + 法务拍板) - 开源必有: 现有 ApeRAG 全部基础功能 - 企业独占 (候选): License / SSO / audit / 客户定制 connectors / 高级部署 / 企业 dashboard / LLM ledger UI ## 不做 (避免折腾) - 不一次性 packages/ 重组 - 不 force-push 开源仓 - 不锁死开源仓 bot-only 写权 - 不单仓 build flag (IP 风险) - 不依赖 commit message 黑名单作主防线 - 不开 alembic 多 head Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
per dongdong msg=4d773716 NIT: § 10 把 "audit log" 列进企业独占候选会误读为现有 OSS audit log 被移走. 实际 main grep 实证 (aperag/domains/governance/db/models.py:116 AuditLog 表 + aperag/domains/governance/schemas.py AuditLog/AuditLogList Pydantic schema): admin audit logs 是开源版基础能力, 现有 OSS 已有. 修正 § 10 企业独占候选措辞: - 从 "SSO / 高级权限管理 / audit log" - 改为 "SSO / 高级权限管理" + 单独条目 "高级审计 / 合规报表 / 审计日志导出 (现有 AuditLog 是开源版基础能力, 企业版只增强: 高级审计 dashboard / 合规报表 / 长期归档 / 审计导出)" 防止启动时误读把现有 OSS 能力移走. architect own-up: 起草时未 grep main verify 现有 audit log 能力假设, 跟 PR #1949 cuiwenbo own-up "Pydantic schema 落点 verify 必 grep references X" 同 family. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…spatch 不需完成 per Weston msg=fedaba61 BLOCKER + PM msg=9dd572f0 + 明书 msg=ae36913d ACK + huangzhangshu msg=033fb371: BLOCKER (§ 3.2 alembic 表述歧义): - 原文「企业新表用 enterprise_ 前缀, alembic migration 仍走开源主链」会被解读为 EE-only revision 进 OSS 主链 (泄漏 + chain 断风险) - 修正为 5 条显式规则: 1. OSS alembic chain 只放开源 schema 变更 2. EE-only 表放 enterprise/migrations/, 独立版本表 + 独立迁移工具 3. 部署顺序: 先 OSS migration -> 再 EE migration (两个独立链, 各自线性) 4. 跨 cutting schema 变更必须作 oss-safe PR 入 OSS 主链, 再 sync 回企业 5. 禁止 EE revision 混入 OSS 主链, 禁止 OSS revision down_revision 接 EE revision - 「不开多 head」精确表述: 两条链各自线性, 不在同一 alembic head 交叉 NIT (§ 5.1 X1-X5 完成 vs dispatch): - 改为 X1-X5 dispatch 即可启动 POC, 不需子任务全 merge (POC 独立 lane) - task #11 + huangheng sediment fold-in 标 backlog 不阻塞 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collaborator
Author
|
Testing re-final hold: The alembic wording blocker is fixed from my lane: §3.2 now separates OSS migration chain and EE migration chain clearly, and §5.1 now uses X1-X5 dispatch rather than completion. Please run a whitespace/format fix for the two lines above, then I can final LGTM. |
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.
Summary
per earayu2 directive (#企业版 msg=c2c8d8f2 + msg=c0b009e2): 团队 10 lane 讨论收口后, 总架构师起草完整详细中文方案。直接看文档决策。
方案核心
企业版仓库 (apecloud/aperag-enterprise) 作为日常开发主战场, 但保留 apecloud/ApeRAG 开源版的完整历史和社区 PR 流程, 通过 PR 标签 + 代码目录硬隔离 + 双向同步机制, 让两边自然协同。
文档结构
写作风格 (per earayu2 #可观测性 msg=32bfe34b directive)
自然中文, 跟 task #31 Phase A 实施方案 (PR #1934) 同风格 — 用自然语言回答业务问题, 不堆 internal team jargon (没有 fold-in / sediment / family / mini-pattern / Lesson 等术语)。
Test plan / 跨域协作方对齐
🤖 Generated with Claude Code