Skip to content

Bound complete encoded Python failure reports - #216

Merged
rmcdaniel merged 11 commits into
mainfrom
fix/225-bounded-failure-reports
Oct 23, 2026
Merged

rmcdaniel merged 11 commits into
mainfrom
fix/225-bounded-failure-reports

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Delivered as Python SDK 2.11.0, immutable source/tag 091593099697fc9c048457992ae72c9643d73f58, after all eighteen fresh-main checks and protected OIDC 40032164415 pass. Normal PyPI install matches 39 production files / 51 hashed RECORD entries; 37 focused and 15 actual published-Server 2.11.1 / MySQL 8.0.46 controls pass with original budgets. Stopped state and actual 22:25 cleanup are recorded on #215, now delivered. Shared #225 follow-through remains open.

Historical source qualification

Current combined source: 4452d069e29a96111c84daaf363b6c4aa3aa354d merges exact shutdown source c376605af929e9466e7f04099fb5985df7483c8f. Both behavior changes are retained; only version/changelog conflicts required manual resolution. This branch keeps the planned 2.11.0 version and includes the separate 2.10.1 shutdown notes. Fresh source/integration/quality/analyzer checks are required on this tree; previous component counts do not qualify it. The exact combined local source suite now passes 3,497 tests, with two existing optional Avro-reference skips and 125 integration deselections. Repository CI-scope Ruff (src/ tests/) and mypy (38 source files) pass. These are source results, not a normal installed artifact or current hosted integration claim. Normal 2.10.1 publication remains ahead of 2.11.0 publication; no new package is claimed here.

Large exceptions can leave Python work without a recorded failure when Server rejects an oversized report. This implements #215, the Python component of shared #225.

Reports default to 62 KiB UTF-8 message, 128 KiB stack and 64 KiB combined serialized details/diagnostics, including markers. The complete HTTPX-encoded JSON body is capped at 1 MiB, including escaping, identities and command batches. failure_report_limit_bytes can lower the cap; a lower discovered Server limit applies too. Existing payload warning settings remain advisory.

Preserve claim identity, failure type/class/code, retry decisions and authored delay. An impossible required identity raises FailureReportTooLarge before sending. Avro details remain intact or are omitted whole with bounded diagnostics. Cover task failure/rejection APIs, terminal workflow/update commands and local/prepared-local reports. Reporting refusal remains separate from application failure.

Local failures are now normalized before workflow code observes them. Once observed, their messages cannot change during final request fitting. An unfit later batch is explicitly refused. Prepared local activities read the canonical persisted failure before workflow observation. The new corpus input exercises first execution, actual JSON encoding and cold replay, with its expected observation derived from a genuine fresh published-Server/MySQL cohort. No raw export is recreated or relabeled.

Earlier component eec09fbcb2759a976a264d7746aa0d99b5f7b57c prepares compatible 2.11.0, separately from #175's 2.10.1 patch. 100 failure/local/corpus controls pass, the unchanged corpus guard admits one additional replay reproducer, and Ruff/mypy pass. The full source suite passes 3,428 tests, with two existing optional Avro-reference skips and 120 integration deselections. A normal non-editable wheel installation matches all 38 source files and 52 hashed RECORD entries, with 124 failure/local/corpus/query-authority controls and 15 actual MySQL integration controls passing. Fresh raw receipts retain four additional delivery cases. Five helper cleanups address the reviewed Sonar findings; the required dictionary-key snapshot is separately documented as a specific false positive. The earlier full run's query-cancellation fixture failure is retained. Its unchanged 100 ms lease now begins at actual mock delivery, preserving all timeouts and cancellation assertions. The exact artifacts pass metadata, Twine and both maintained isolated package smokes:

  • Wheel SHA256: 0b537d827d62e450a33b65e143990ecfea801c2c98eff627a361eda77b4f9ea5.
  • Sdist SHA256: 565d3778b2636c3df3c2795008192aae5ceb6532b6f83091d75c682c4d40558e.

Fresh published Server 2.11.1, image c53162134a94025a0b87b995e9b14896c1fdfffbeeace3b530d3fbd0f2b23c6c, digest bf8bed13f5f809ee3425233180a581353eac4683adbee5c4ecbf63bb18bbd102, contains Core 2.10.2. All 313 Server and 641 Core source files match exact sources 5336a98dd256e046edfdb67c81764cde4babd360 and aca7928484083635e68a5a384b2dcecef842108e; PHP 8.3.36 and MySQL 8.0.46 are actually verified. No producer/native source overlay.

15 actual MySQL controls pass: separate 3 MiB messages/stacks, escaped Unicode with nested details, small controls, workflow-task failure semantics, ordinary Worker exceptions, and legacy/prepared local first/persisted/cold equality at 1 MiB/3500-byte caps with both retry flags. The original non-importable prepared test handler correctly failed its supervision guard; the failed runner cohort is retained. The earlier 64 KiB b8 artifacts and PyPI 2.9.0 negative controls remain independent historical evidence.

Current-head CI/analyzer review, source merge, registry publication and normal registry acceptance remain required. Shared SDK/embedded parity, History/Waterline, Core's derived-summary fix and eight-guide completion remain with their owners on #225. No protocol floor or automatic consumer/Cloud adoption follows.

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 23, 2026 17:03
@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact unpublished candidate eec09fbcb2759a976a264d7746aa0d99b5f7b57c / 2.11.0 passes the complete source suite: 3,428 passed, two existing optional Avro-reference skips, 120 integration deselections. Ruff/mypy pass. Both exact distributions pass metadata, Twine and maintained isolated wheel/sdist smokes. A separate non-editable wheel install matches all 38 source files and 52 hashed RECORD entries and passes 124 focused controls plus 15 actual published-Server/MySQL integration controls.

Fresh installed delivery receipts through published Server 2.11.1 / Core 2.10.2 / PHP 8.3.36 / MySQL 8.0.46, without producer/native overlays:

Input Complete encoded report bytes HTTP
3 MiB message 63,806 200
3 MiB stack 131,453 200
4.9 MB escaped/Unicode message +3 MiB stack + nested details 913,589 200
Small control 304 200

All reach the original workflow with the original type/class/code and retryability. Large cases show the truncation marker; the small report stays unmarked. Eight legacy/prepared local combinations separately prove first observation equals the persisted message and cold replay at 1 MiB and 3,500-byte caps, with both retry flags. The committed corpus input derives its expected observation from that genuine cohort and exercises first execution plus the encoded-report/cold-replay boundary; it is not a raw export.

The earlier full-run query-cancellation fixture failure is retained. Its 100 ms lease now begins when the mock runtime actually delivers the task; 60-second blocked discovery, 1-second outer timeout and all cancellation assertions are unchanged. Earlier 64 KiB artifacts and failed runner cohorts remain historical.

Wheel SHA256 0b537d827d62e450a33b65e143990ecfea801c2c98eff627a361eda77b4f9ea5; sdist 565d3778b2636c3df3c2795008192aae5ceb6532b6f83091d75c682c4d40558e. Current normal CI/analyzer review, merge and actual registry publication/installation remain open. This does not close root shared #225 or Core's separate derived-summary defect.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit 0915930 into main Oct 23, 2026
18 checks passed
@rmcdaniel
rmcdaniel deleted the fix/225-bounded-failure-reports branch October 23, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant