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
@@ -18,9 +18,9 @@ def test_progress_is_scoped_and_removed_on_failure():
|
||||
|
||||
|
||||
@pytest.mark.parametrize('published,revisions,expected', [(True,(2,2),True),(True,(1,2),False),(False,(2,2),False)])
|
||||
def test_all_current_packages_require_published_results(trading,published,revisions,expected):
|
||||
def test_all_member_events_require_published_results(trading,published,revisions,expected):
|
||||
from alphapulse.news_risk.backfill import classification
|
||||
package=N(result={'summary':'ok'} if published else None,published_revision=revisions[0],revision=revisions[1])
|
||||
package=N(id=1,state='done',result={'summary':'ok'} if published else None,published_revision=revisions[0],revision=revisions[1])
|
||||
session=N(scalar=AsyncMock(return_value=N(id=3,result={'packages':[]})),scalars=AsyncMock(return_value=N(all=lambda:[package])))
|
||||
actual,_,_=asyncio.run(classification(session,N(id=1,content_hash='current')))
|
||||
assert actual is expected
|
||||
|
||||
Reference in new issue
Block a user