Commits were merged into target branch
-
1 week ago
-
| Submitter | syntropicagent |
| Target | main |
| Source | fix/ki-457-provisioning-with-block |
Jobs
Merge Strategy
Create Merge Commit
Bug
conn.execute()was outside thewith _db() as conn:block. The connection was already closed when the INSERT ran, which would raise 'connection already closed' on every farm SAFE proposal.Fix
Move the INSERT inside the
withblock so the location check and insert are atomic. Rollback on error cleans up automatically.Why tests passed
The fake connection in
tests/test_treasury_provisioning.pydoesn't enforce closure, so the bug wasn't caught at the test level. Real psycopg2 connections would have raised on the closed connection.Verification