Implement offline workload intake and record blocked owner dependencies

Assistant: codex
Assistant-Model: gpt-6.1-sol
Assistant-Session: 01a1029c-c003-7283-acc9-930b434e6cae
This commit is contained in:
tegwick 2026-10-03 18:45:10 +02:00
parent c1a75e85aa
commit c1cf6cf54c
13 changed files with 790 additions and 25 deletions

View file

@ -12,11 +12,16 @@ from test_durable_store import storage,present
from test_durable_component import receiver
def test_schema_one_upgrade_preserves_existing_evidence(storage):
@pytest.mark.parametrize("version", [1, 2])
def test_schema_upgrade_preserves_existing_evidence(storage, version):
store,memo=storage;p=present(store,memo)
before=store.evidence()
with sqlite3.connect(store.path) as db:
db.execute('DROP TABLE policy_observations');db.execute('PRAGMA user_version=1')
db.execute('DROP TABLE intake_deliveries')
db.execute('DROP TABLE intake_ledger')
if version == 1:
db.execute('DROP TABLE policy_observations')
db.execute(f'PRAGMA user_version={version}')
reopened=Store(store.path)
assert reopened.retrieve_presentation(p.id)[0]==memo and reopened.evidence()==before
assert reopened.policy_observations()==[]