Loading...
Loading...
Compare original and translation side by side
shared/references/task_delegation_pattern.md#audit-coordinator--worker-contractcontextStoretech_stackbest_practicesdb_configcodebase_rootdomain_modecurrent_domainshared/references/task_delegation_pattern.md#audit-coordinator--worker-contractcontextStoretech_stackbest_practicesdb_configcodebase_rootdomain_modecurrent_domainpg_notifyCREATE TRIGGERNOTIFYexpire_on_commitautocommitpg_notifyCREATE TRIGGERNOTIFYexpire_on_commitautocommitpg_notify|NOTIFY|CREATE TRIGGER|CREATE OR REPLACE FUNCTION.*triggeralembic/versions/migrations/repo.*update|session\.execute.*update|\.progress|\.statuscommit()commit()session.commit()alembic/versions/migrations/pg_notify|NOTIFY|CREATE TRIGGER|CREATE OR REPLACE FUNCTION.*triggerrepo.*update|session\.execute.*update|\.progress|\.statuscommit()commit()session.commit()async with session.begin()await httpx.await aiohttp.await requests.await grpc.open(.read(.write(async with session.begin()await httpx.await aiohttp.await requests.await grpc.open(.read(.write(session.commit()async with session.begin()session.commit()async with session.begin()session.commit()session.commit()try/exceptsession.commit()trysession.rollback()exceptawait session.commit()async with session.begin()async with session.begin()try/except/rollbacksession.commit()try/exceptsession.commit()tryexceptsession.rollback()session.commit()await session.commit()async with session.begin()async with session.begin()try/except/rollbackbegin()commit()awaittime.sleep()asyncio.sleep()begin()commit()awaittime.sleep()asyncio.sleep()shared/references/audit_scoring.mdshared/references/audit_scoring.md{
"category": "Transaction Correctness",
"score": 5,
"total_issues": 6,
"critical": 1,
"high": 2,
"medium": 2,
"low": 1,
"findings": [
{
"severity": "CRITICAL",
"location": "app/infrastructure/messaging/job_processor.py:412",
"issue": "Missing intermediate commits: progress UPDATEs trigger pg_notify but no commit() between updates; real-time SSE events deferred",
"principle": "Transaction Correctness / Trigger Semantics",
"recommendation": "Add session.commit() at progress milestones (throttled every 5%)",
"effort": "S"
}
]
}{
"category": "Transaction Correctness",
"score": 5,
"total_issues": 6,
"critical": 1,
"high": 2,
"medium": 2,
"low": 1,
"findings": [
{
"severity": "CRITICAL",
"location": "app/infrastructure/messaging/job_processor.py:412",
"issue": "Missing intermediate commits: progress UPDATEs trigger pg_notify but no commit() between updates; real-time SSE events deferred",
"principle": "Transaction Correctness / Trigger Semantics",
"recommendation": "Add session.commit() at progress milestones (throttled every 5%)",
"effort": "S"
}
]
}async with session.begin()async with session.begin()