Isolate admitted transactional callers and retain retry policy
Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a119cf-56d0-7fa3-840b-eb8732e1db0b
This commit is contained in:
parent
5f80c6f307
commit
f703bf637e
8 changed files with 1137 additions and 96 deletions
|
|
@ -72,7 +72,7 @@ def fingerprint(path):
|
|||
"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'"
|
||||
)
|
||||
}
|
||||
if tables != TABLES:
|
||||
if tables not in (TABLES, TABLES | {"caller_buckets"}):
|
||||
raise Refused("unexpected_ledger_schema")
|
||||
schema = list(
|
||||
database.execute("SELECT type,name,tbl_name,sql FROM sqlite_master ORDER BY type,name")
|
||||
|
|
@ -82,7 +82,7 @@ def fingerprint(path):
|
|||
"user_version": database.execute("PRAGMA user_version").fetchone()[0],
|
||||
"tables": {},
|
||||
}
|
||||
for name in sorted(TABLES):
|
||||
for name in sorted(tables):
|
||||
rows = [
|
||||
json.dumps(
|
||||
row, separators=(",", ":"), default=lambda value: {"bytes_hex": value.hex()}
|
||||
|
|
|
|||
|
|
@ -41,10 +41,13 @@ class ForbiddenProvider:
|
|||
app=TransactionalApplication(store,ForbiddenProvider(),'synthetic-recovery-token','https://issuer.example.test')
|
||||
checks={'accepted_verifications':0,'unknown_verifications':0,'invalidated_handles':0,
|
||||
'suppressions':0,'accepted_deliveries':0,'unknown_sends':0}
|
||||
query=("SELECT v.registration_id,v.email,v.username,v.client_id,v.tenant,v.display_name,a.state "
|
||||
caller_column="v.caller_id" if "caller_id" in {r[1] for r in store.db.execute("PRAGMA table_info(verifications)")} else "''"
|
||||
query=("SELECT v.registration_id,v.email,v.username,v.client_id,v.tenant,v.display_name,a.state,"+caller_column+" "
|
||||
"FROM verifications v JOIN verification_attempts a ON a.request_id=v.request_id "
|
||||
"WHERE a.state IN ('accepted','in_flight')")
|
||||
for row in store.db.execute(query).fetchall():
|
||||
app=TransactionalApplication(store,ForbiddenProvider(),'synthetic-recovery-token',
|
||||
'https://issuer.example.test',**({'verification_namespace':row[7]} if row[7] else {}))
|
||||
payload=dict(zip(['registration_id','normalized_email','preferred_username','client_id','tenant','display_name'],row[:6]))
|
||||
payload['correlation_id']='synthetic-recovery-probe'
|
||||
raw=json.dumps(payload).encode();response={}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue