Repository navigation
a float cap or timeout refuses a bool, nan, inf or a value that only rounds to zero (BACKLOG #3432) - #2277
Conversation
…G #3432)
float_setting in transports/base.py refuses a bool, NaN, infinity, a
non-number, and a value float() only rounds to zero ("1e-400"), naming
the key and withholding the value. cap_setting's float path and
poll_interval use it, and so do at least the timeout reads on MLLP,
TCP, X12, DICOM, DATABASE, reference sync, HTTP reply, FHIR, REST,
SOAP, DICOMweb, Email, Direct, REMOTEFILE, File, Timer, OAuth2, SMART.
Range refusals in positive_cap, resolve_poll_ceiling, poll_interval,
max_header_bytes, max_decompressed_members and the MLLP per-host and
frame-seconds guards withhold the value too.
Proposed PR title: a float cap or timeout refuses a bool, nan, inf or a
value that only rounds to zero (BACKLOG #3432)
Banner: BUILT -- engine branch fix-3432-float-caps, awaiting PR.
…cquire_timeout (BACKLOG #3432)
Review fixes on the float-cap reader:
- The Http factory refuses an int too large for a float by name,
instead of raising a raw OverflowError.
- float_setting reads any exact zero as zero: text whose digits are
all zeros, with no exponent ("0_0", a full-width zero). Its other
zero-reading refusals now state a true reason.
- DatabaseRef checks a literal acquire_timeout when declared, and
build_check_registry reads an env() one once resolved, through the
sync's own reader. So messagefoundry check refuses a bool or a NaN.
- The changelog fragment scopes the zero-timeout sentence to a
directly built HttpSource and splits its long sentence into a list.
Proposed PR title: a float cap or timeout refuses a bool, nan, inf or a
value that only rounds to zero (BACKLOG #3432)
Banner: BUILT -- engine branch fix-3432-float-caps, awaiting PR.
|
QA (BACKLOG #3432): (1) Builder round 1 code-review xhigh on the head before its repair; repair amended in. (2) Independent review of 69e8fae: QA: code-review xhigh on 69e8fae, 6 findings, 2 shipped defects (both low: Http factory raw OverflowError on a huge int; false refusal reason for '0_0'); full suite 43600 passed, 2 failed (local machine state). (3) Builder round 2 code-review xhigh on 76a62c992d before push: 8 findings, 3 fixed and amended into 0641231 (env() acquire_timeout at check; cap_setting docstring; changelog over-claim), 5 declined as not shipped defects. ~10 amended lines not re-reviewed -- narrow review please. |
|
Lander: narrow review of the amend 76a62c992d..0641231 (code-review skill at xhigh) returned SHIP on the code. The reviewer probed float_setting with bools, nan/inf, overflow, "1e-400", "0e0", Decimal and Fraction; all are refused with the value withheld. All 12 named timeout sites are converted. 1081 + 2814 tests passed, and ruff and mypy are clean on linux and win32. Two touched-file anchors expect the removed Two changelog lines would ship an overclaim, so please fix them before I enqueue:
|
… #3432) The check refuses an env() acquire_timeout only when it resolves at check time, and refuses at least a bool, a NaN or "1e-400". A bool on the bare-float timeouts read as zero or one second and now fails at build; a cap_setting float cap already refused one (BACKLOG #3431). Proposed PR title: a float cap or timeout refuses a bool, nan, inf or a value that only rounds to zero (BACKLOG #3432) Banner: BUILT -- engine branch fix-3432-float-caps, awaiting PR.
|
Lander: line check passed at 67b55ee. On main, mllp.py:753-754 reads timeout_seconds and connect_timeout with a bare float(), and float(False) is 0.0 and float(True) is 1.0, so the new bullet is true. The cap_setting case is correctly attributed to #3431. The acquire_timeout sentence is scoped to a literal and to an env() value that resolves at check time. I enqueue once checks finish. |
|
Lander: enqueuing at pinned head 67b55ee. Review proof: round 1's independent review, the Builder's round-2 pre-push review, and a Lander-dispatched narrow review of the 76a62c992d..0641231 amend, which returned SHIP. My line check passed on the changelog-only 67b55ee. Every check has finished green, including the win32 mypy leg. For the vault record: two anchors on the removed base.py line need a re-read; the body lists them. |
Ledger row #3432, filed by the Lander as the follow-up to merged #3431 (engine PR 2272). Engine transports, config readers and tests.
Behaviour change: an operator timeout or float cap refuses a bool (
Falsetoo), NaN, infinity, a number too large for a float, and text or a Decimal that only rounds to zero ("1e-400","0e0"). Each refusal names the key and withholds the value. Range refusals now withhold the value too.Merge danger
Reversible: yes -- a revert undoes it all.
Blast radius:
float_settingandpositive_secondsinmessagefoundry/transports/base.py;cap_setting's float path uses them.acquire_timeoutreads, reference_sync, the remotefileconnect_timeout, Filemin_age_seconds, Timerinterval_seconds,poll_seconds, the OAuth2 and SMART token timeouts and skews, the HTTPreply_timeoutandreply_write_timeout(through a newreply_seconds), the runner, and the Http factory.DatabaseRefchecksacquire_timeoutat declaration and inbuild_check_registry.Reachable routes: code-first factory calls and
env()casts. A connections.toml literal is typed at load. A TOML literal1e-400stays off, becausetomllibmakes it0.0before any reader sees it; that is recorded in thefloat_settingdocstring.Evidence
float(value) == 0read"1e-400"as off on a float cap, which would switch offreceive_timeout,idle_timeout_seconds,max_frame_secondsand the rate caps. Barefloat()timeout reads tookTrueas 1.0 and accepted NaN and infinity. With the new tests run against origin/main's engine code, 368 cases fail and 88 pass.[2.5], and accepts 2.5, "2.5", " 2.5 " andDecimal("2.5"). Exact zero spellings,"0_0"and the full-width zero among them, read as off on an off-by-zero cap. A huge intreply_timeoutis refused by name, and a badDatabaseRefacquire_timeoutis refused at declaration and atcheck.Builder reports (condensed). Branch
fix-3432-float-caps, head064123114e7cc47babf66c2fb0125f57d8573bbd.69e8faef2e, independently reviewed: 6 findings, 2 low shipped defects (a raw OverflowError in the Http factory; a false reason for"0_0").064123114efixes both, and adds theDatabaseRefdeclaration andcheckread plus changelog corrections. Its pre-push review ran on 76a62c992d; 3 findings fixed and amended in, 5 declined as not shipped defects. About 10 amended lines (thebuild_check_registryread, a docstring, the changelog) are not re-reviewed.connections_file._optional_floatdoes not refuse NaN or infinity at load;if float(value) == 0:line need a vault re-read.