feat(news): index news packages and research persistent events
Extract reusable literal keywords once per source revision, assign complete news packages to long-lived events, and research all event members with immutable evidence and references. Add additive research storage, vocabulary snapshots, the two-stage workspace, isolated acceptance coverage, and a paused rollout with an initial fixed 50-news production trial.
This commit is contained in:
1 parent
07252fea0f
commit
4929a32a0a
69 files changed
+8215
-2092
No files matched your search
@@ -178,6 +178,12 @@ async def delete(node_id: int, session: Annotated[AsyncSession, Depends(get_sess
|
||||
(RiskSettings.grouping_skill_id == node_id) | (RiskSettings.analysis_skill_id == node_id) | (RiskSettings.outlook_skill_id == node_id)))
|
||||
if referenced:
|
||||
raise HTTPException(409, "请先解除新闻模型的Skill绑定")
|
||||
from alphapulse.news_research.models import ResearchSettings
|
||||
research = await session.scalar(select(ResearchSettings).where(
|
||||
ResearchSettings.config.contains({'index': {'skill_id': node_id}}) |
|
||||
ResearchSettings.config.contains({'research': {'skill_id': node_id}})).with_for_update())
|
||||
if research:
|
||||
raise HTTPException(409, '请先解除两阶段新闻研究的Skill绑定')
|
||||
# 先解除对版本的引用,版本随节点级联删除
|
||||
node.published_version_id = None
|
||||
await session.flush()
|
||||
|
||||
Reference in new issue
Block a user