PyCUBRID #367 - validate timeouts before resource acquisition
A real external engineering campaign: reproduce invalid timeout behavior, add a shared sync/async pre-transport validation control, verify the fix, submit upstream PR #576, then preserve the resulting ENTITY lineage.
The defect
Invalid negative, NaN and infinite timeout values reached connection setup instead of failing before transport/resource acquisition.
The engineering change
A shared validator was added to common connection initialization so sync and async paths reject invalid timeout values before socket acquisition while preserving None, zero and finite positive values.
Validation
Original red regression: 20 failed / 10 passed. After fix: 30/30 focused tests passed. Broad offline validation: 2980 passed, 10 skipped, 11 failures reproduced identically on untouched upstream SHA; coverage 97.67%.
Watch the engineering replay
This is a reproducible replay generated from the sealed PyCUBRID command/output evidence after the campaign. It is not claimed as the original live screen capture; the transcript and evidence hashes below remain authoritative.
Recorded terminal replay
The command record below is a reproducible replay against the recorded campaign workspace. Original campaign results remain preserved in the sealed evidence package.
# BTG external fix case study: pycubrid-367 # repository=cubrid-lab/pycubrid issue=367 # started=2026-10-01T01:45:48.908712Z ## NOTE · problem Invalid negative, NaN and infinite timeout values reached connection setup instead of failing before transport/resource acquisition. ## NOTE · engineering A shared validator was added to common connection initialization so sync and async paths reject invalid timeout values before socket acquisition while preserving None, zero and finite positive values. ## NOTE · validation Original red regression: 20 failed / 10 passed. After fix: 30/30 focused tests passed. Broad offline validation: 2980 passed, 10 skipped, 11 failures reproduced identically on untouched upstream SHA; coverage 97.67%. ## replay-head @ 2026-10-01T01:46:58.742874Z PS> <BTG_WORKSPACE>\TOOLS\PortableGit\cmd\git.exe rev-parse HEAD bd9e7121d5e30bfea576e4dbe4a0eb210bb7c6b4 [exit=0] ## replay-focused-tests @ 2026-10-01T01:47:07.905928Z PS> .\.venv\Scripts\python.exe -m pytest -q tests\test_timeout_validation.py ============================= test session starts ============================= platform win32 -- Python 3.10.11, pytest-9.1.1, pluggy-1.6.0 benchmark: 5.3.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) rootdir: <CAMPAIGN_WORKSPACE> configfile: pyproject.toml plugins: hypothesis-6.168.3, platformdirs-4.12.2, asyncio-1.4.0, benchmark-5.3.0, cov-7.1.0 asyncio: mode=strict, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collected 30 items tests\test_timeout_validation.py .............................. [100%] ============================= 30 passed in 0.29s ============================== [exit=0]
Open the plain-text command transcript
Evidence identifiers
| Campaign | pycubrid-367 |
|---|---|
| Repository | cubrid-lab/pycubrid |
| Issue | #367 |
| Launch receipt SHA-256 | A2C5D231C4AE1192C39D99980658C2D16913DC6B9E0C95EBE545D96EA693AFFE |
| Transcript SHA-256 | 656B3957C496D88DDC009B2E3DD37E7897DE552C64C33DDD665D09A1649EFD15 |
Sealed supporting artifacts
| Artifact | SHA-256 |
|---|---|
| implementation_evidence.json | 606470BA19C81690E00C6549A285AE6D12D17BBF248B77965C467ACEC548F83C |
| pycubrid-367-entity-derived-timeout-control-receipt.json | D42E2F2C2D2B14C57DFF6C2AE9E834D0A23E943D82842625DC0088250638D8C1 |
| pr-576.diff | 06F30D19D81518E630D8309AD43FC43FE816CD6B3F2C1C9169860B93157C1E08 |