docs: README+模块技能同步项目归属口径(挖掘分项目,可见性对齐opp_reports,E2E 11项全过)

This commit is contained in:
yumoqing 2026-09-12 09:06:54 +08:00
parent 02b904164e
commit 3fadee97b9
2 changed files with 13 additions and 4 deletions

View File

@ -118,11 +118,17 @@ CRUD 页(`opp_reports/` `opp_approvals/`)保留供后台运维直接编辑
- `opp_reports`研发报告software/title/content/status/confirm_task_id/confirmed_by
- `opp_approvals`研发审批report_id/status/note/resolved_by
- `opp_mining_batches`需求挖掘批次org_id 隔离scope=top/targeted状态机
pulling→embedding→clustering→naming→done/failedstats_json 进度统计error_msg 可行动报错)
- `opp_mining_batches`需求挖掘批次org_id+project_id 隔离project_id 空=平台级挖掘;
scope=top/targeted状态机 pulling→embedding→clustering→naming→done/failed
stats_json 进度统计error_msg 可行动报错)
- `opp_demand_snap`需求快照batch_id+src_id 去重cluster_id 聚类回填embed_status
- `opp_clusters`需求类别heat_rank 热度排名/share 占比/naming_evidence 命名证据/centroid_snap_id
挖掘结果的项目可见性口径与 opp_reports 对齐2026-09-12 用户确认挖掘也分项目):
挂项目的批次仅本项目会话可见;平台级批次(无项目会话发起)本机构登录可见;
无当前项目的会话只见平台级批次。`_check_batch_visible` 是单一规则源
mining_status/list_clusters/cluster_detail 三层复用E2E 11 项断言实测全过)。
## 需求挖掘架构P12026-09-11
众包需求(爬虫平台 record_type=demand→ 语义聚类 → TopX/指定类型分析:

View File

@ -94,8 +94,11 @@ draft ──人工确认──> confirmed ──发起──> approval_initiated
- **编排** opp_mining_flow.py状态机 pulling→embedding→clustering→naming→done/failed
`asyncio.create_task` 后台跑,进度实时落 `stats_json`,失败落 `error_msg`(可行动报错,
禁前端挂起干等)。**算法/VDB/embedding** opp_mining.py。
- **机构隔离**(用户定夺):基础数据(需求快照+embedding缓存全机构共享分析结果
(批次/快照归属/类别)挂 `org_id`,所有查询按 ctx.org_id 强制过滤(伪 org 拒绝实测通过)。
- **机构隔离 + 项目归属**(用户定夺 2026-09-12挖掘也分项目基础数据需求快照+embedding缓存
全机构共享;分析结果(批次/快照归属/类别)挂 `org_id` + `project_id`(空=平台级挖掘),
可见性对齐 opp_reports 口径——挂项目批次仅本项目会话可见,平台级批次本机构登录可见,
无项目会话只见平台级。`_check_batch_visible` 单一规则源三层复用status/list_clusters/
cluster_detailE2E 11 项断言实测全过scripts/p1_proj_e2e.py
- **VDB 协议**(实测,详见技能 rag-module-operationskNN=`/v1/query`+vector+pagerows
(非 /v1/search标量过滤=`expr`(非 filterkNN+expr 组合可用output_fields 可取回
vectordropcollection 可用(旧批工作集自动清理,保留最近 opp_mine_keep_batches 个)。