You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P2][Review] Delete redundant SDK telemetry transport if unused; otherwise stop its thread and blocking flush #105
No implementation, PR merge, package publication or production mutation until the owner approves the full sprint plan.
Evidence
Reviewed main 31b8d80686495c5d6dcac0846d6e5a2c8d4bce8b.
oilpriceapi/telemetry.py track_request calls synchronous _flush on the caller every 10 events; _flush performs httpx.post(timeout=5) despite its non-blocking comment. AsyncOilPriceAPI invokes it on the event loop. close() only flushes and never sets enabled=False/stops the daemon; configure_telemetry replaces global instances without stopping prior threads. Disabled-by-default status limits affected users; enabled consumers are not yet inventoried.
Preferred smallest change
First establish whether the opt-in external collector has a maintained consumer and useful data unavailable from existing request attribution. Prefer deleting that collector/thread with a documented compatibility/deprecation decision if not. If a real consumer requires it, minimally bound nonblocking delivery and stop lifecycle correctly; no new telemetry platform. Do not silently remove an advertised option.
Acceptance / negative-path tests
Decision evidence plus tests: disabled mode no thread/network; enabled ten calls cannot synchronously block API/event loop; close is idempotent and stops background activity; replacing global config leaves no prior thread; telemetry failure cannot alter request results.
Risk and PR gate
Low/medium risk unless public option removal requires a breaking release.
One focused issue PR; independent adversarial review must challenge deletion safety, public compatibility, failure recovery and whether a smaller deletion suffices. Include red/green test evidence and packed/installable artifact proof for any published SDK/MCP change. Merge only in the approved priority order after reviewer objections are resolved. Do not publish a breaking change as a patch. If already fixed at execution time, record evidence and skip without a cosmetic PR.
Reproduce on the execution-day main and confirm exact files/callers; the review baseline was the current-main SHA recorded in this issue. If already fixed or unnecessary, record proof and close without a cosmetic PR.
Record why deletion alone does or does not solve this; delete redundant code before adding a helper/guard/automation.
A focused failing regression/fixture first where practical; test the relevant malformed, absent, stale, rejected or timeout path as well as success. No production customer mutations or raw-secret evidence.
One independently revertible PR, containing the narrow correction and targeted tests; no unrelated cleanup. Explain public/API compatibility and rollback.
Independent adversarial reviewer tests the failure case, challenges the assumptions and simpler alternatives, and resolves every blocking finding.
Refresh against the actual merge base and rerun checks before merging in this plan's numbered order. Preserve all existing required checks; no bypass to hit ten.
Link merge SHA plus approved deployed/published artifact and post-release proof where relevant; otherwise mark release pending rather than claiming shipped.
Risk window: Only isolated low/medium-risk changes. If admission discovers authentication/entitlement, destructive migration, live ingestion semantics or a breaking interface change, hold and move to the next approved Friday/Saturday window.
Coverage-audit revision — current sprint admission
Plan v2: oilpriceapi-api#8015 supersedes earlier scheduling comments. Rank 61/70; Thursday, 2026-09-10, America/New_York. Low/medium-risk only; reclassify to a Friday/Saturday slot if boundary/compatibility risk is higher.
Intended outcome: Retire unused telemetry transport or repair its lifecycle.
Gate: Conditional deletion; no breaking patch release if option has consumers.
Coverage ledger: #8056. Inventory/pattern screening is complete; exhaustive semantic/runtime sign-off is not. Before implementation, review the complete affected file set and callers, revalidate against current main, supply the missing negative-path proof, and retain prior scope corrections. Prefer deletion, then simplification; correct behavior needs no PR.
No implementation is approved yet. After Karl approves: focused reversible PR → independent adversarial review → passing affected checks → merge in plan order → separately approved release/publish and artifact/customer-path verification. Maximum ten planned slots per night, not ten forced merges. If the dated window elapses before approval, re-anchor the calendar rather than backdate execution.
Activity
karlwaldman commentedon Sep 5, 2026
Adversarial sprint admission — rank 34/70
Scheduled Monday, 2026-09-07 (America/New_York) in the approval-gated seven-night plan. Planning only; no implementation or merge yet.
Narrow outcome: Retire unused telemetry transport or repair its lifecycle.
Dependency/gate: Conditional deletion; no breaking patch release if option has consumers.
Required issue → PR → independent review → ordered merge evidence
Risk window: Only isolated low/medium-risk changes. If admission discovers authentication/entitlement, destructive migration, live ingestion semantics or a breaking interface change, hold and move to the next approved Friday/Saturday window.
karlwaldman commentedon Sep 5, 2026
Coverage-audit revision — current sprint admission
Plan v2: oilpriceapi-api#8015 supersedes earlier scheduling comments. Rank 61/70; Thursday, 2026-09-10, America/New_York. Low/medium-risk only; reclassify to a Friday/Saturday slot if boundary/compatibility risk is higher.
Intended outcome: Retire unused telemetry transport or repair its lifecycle.
Gate: Conditional deletion; no breaking patch release if option has consumers.
Coverage ledger: #8056. Inventory/pattern screening is complete; exhaustive semantic/runtime sign-off is not. Before implementation, review the complete affected file set and callers, revalidate against current main, supply the missing negative-path proof, and retain prior scope corrections. Prefer deletion, then simplification; correct behavior needs no PR.
No implementation is approved yet. After Karl approves: focused reversible PR → independent adversarial review → passing affected checks → merge in plan order → separately approved release/publish and artifact/customer-path verification. Maximum ten planned slots per night, not ten forced merges. If the dated window elapses before approval, re-anchor the calendar rather than backdate execution.
test(telemetry): drop respx so the new tests run on CI's dev extras (#…
fix(telemetry): stop blocking the caller and leaking the flush thread (…
chore(release): 1.15.0 (#141)