fix: preserve logical projection provenance
This commit is contained in:
parent
1d258626e0
commit
055cf4980c
2 changed files with 9 additions and 4 deletions
|
|
@ -323,8 +323,10 @@ def _now() -> datetime:
|
|||
|
||||
def _rebuild_sources(projection_id: str) -> list[str]:
|
||||
return {
|
||||
"hub_registry": ["runtime_registrations"],
|
||||
"messages": ["runtime_messages"],
|
||||
"progress_events": ["runtime_progress_events"],
|
||||
"interaction_events": ["runtime_interaction_events"],
|
||||
# Provenance names are logical authority collections in the extension
|
||||
# contract, not backend-specific SQL table names.
|
||||
"hub_registry": ["hub_descriptors", "hub_manifests"],
|
||||
"messages": ["messages"],
|
||||
"progress_events": ["progress_events"],
|
||||
"interaction_events": ["interaction_events"],
|
||||
}[projection_id]
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ def test_durable_store_survives_reopen_and_keeps_event_families_separate(tmp_pat
|
|||
assert {item["family"] for item in progress["data"]["items"]} == {"progress"}
|
||||
assert {item["family"] for item in interaction["data"]["items"]} == {"interaction"}
|
||||
assert progress["provenance"]["source_system"] == "hub-core-postgresql"
|
||||
assert registry["data"]["rebuild_from"] == ["hub_descriptors", "hub_manifests"]
|
||||
assert progress["data"]["rebuild_from"] == ["progress_events"]
|
||||
assert interaction["data"]["rebuild_from"] == ["interaction_events"]
|
||||
|
||||
async def audit_count() -> int:
|
||||
async with second_store.sessions() as session:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue