Skip to content

🔧 L0-Python v0.20.0 - Structured Retry Fixes + Canonical Runtime Alignment

Choose a tag to compare

@LZL0 LZL0 released this 03 Apr 19:11

L0 Python v0.20.0 fixes structured retry behavior for stream factories, improves canonical lifecycle and observability alignment with the TypeScript runtime.

⚙️ 1. Structured Stream Factory Retry Fix

  • Fixed structured retry behavior so stream factory functions are called fresh on each retry attempt.
  • This resolves cases where structured retries could accidentally reuse an already-consumed stream, leading to failures like:
    • locked/consumed stream errors
    • invalid retry behavior in structured()
    • invalid retry behavior in structured_array()
    • fallback retry reuse issues
  • Factory-based structured flows now retry correctly across:
    • normal retries
    • fallback retries
    • sync and async stream factories

📈 2. Canonical Lifecycle + Observability Alignment

  • Improved runtime parity with the canonical lifecycle and TypeScript event model.
  • Updates include:
    • FALLBACK_START now uses fromIndex / toIndex
    • retry attempts include isRetry
    • fallback attempt numbering resets correctly per fallback stream
    • error events now include richer recovery metadata
    • failure classification and recovery strategy mapping are now emitted more explicitly
  • Added new canonical lifecycle and network classification tests to lock this behavior in.

🛟 3. Network Error Classification Coverage

  • Added broader canonical tests for network error detection and classification.
  • Improves confidence around handling of:
    • connection drops
    • DNS failures
    • fetch/network request failures
    • timeout conditions
    • SSL-related failures
  • This strengthens parity between documented behavior and tested runtime behavior.

🗃️ 4. Documentation Updates

  • Updated docs across the project for correctness and consistency, including:
    • API documentation
    • lifecycle docs
    • custom adapter docs
    • multimodal docs
    • consensus docs
    • document window docs
    • guardrails docs
    • README usage fixes
  • Added a new WHITEPAPER.md describing L0 as a deterministic streaming execution substrate for AI.