Skip to content

Dext Framework v1.0.1

Latest

Choose a tag to compare

@cesarliws cesarliws released this 03 Nov 13:56

Dext Framework v1.0.1 — Release Notes

Focused on AI agent orchestration, IDE Test Explorer maturity with C++Builder support, ultra-low HTTP pipeline allocations, refined JSON engine compliance, and official package manager integration.

The v1.0.1 release solidifies and accelerates the Dext ecosystem post-1.0. Powered by active collaboration from the developer community and intensive engineering, this release introduces graph-based AI agent orchestration (Dext.AI.Graph), a massive leap forward for Dext Testing & Test Explorer (featuring native C++Builder support for Google Test and DUnit), official DPM package manager support, native HTMX 4 inspection, optional mimalloc memory allocator support, and unprecedented allocation reductions in the HTTP core.


🌟 Highlights

1. 🧪 Dext Testing & IDE Test Explorer: Major Stabilization, Performance & C++Builder Support

A centerpiece of v1.0.1 is the evolution of the Dext Testing framework and its IDE Test Explorer plugin:

  • First-Class C++Builder Support: The IDE Test Explorer plugin (available as a standalone Expert DLL) now fully supports C++Builder projects (.cbproj) via dedicated adapters in Sources\Testing\Cpp:
    • Google Test (GTest): Complete test discovery, runner adapter (DextGTestAdapter.hpp), real-time status reporting, and stack frame inspection.
    • DUnit C++: Native bridge (DextDUnitCppAdapter.hpp) enabling legacy and modern C++ DUnit test execution directly from the Dext UI.
    • Unified Protocol: C++ tests communicate over the exact same local HTTP host protocol (--port) as Delphi test adapters.
  • Explorer Performance & UX Stabilization:
    • Massive responsiveness optimizations across test tree discovery, execution logging, and UI docking across Delphi versions (from Delphi 10.4 Sydney to RAD Studio 13+ in both 32-bit and 64-bit IDE bitness).
    • Robust execution engine honoring Timeout, RepeatTest, non-zero exit codes, and test cancellation.
  • Integrated Code Coverage (LCOV & Win64x):
    • External LCOV coverage ingestion without relying on ToolsAPI internal locks.
    • Native storage in Dext collections and full UI visualization of code coverage directly inside the Test Explorer for Win32 and Win64x targets.
  • Reporting & CI: Enhanced SonarQube XML and HTML report generation binding test cases directly to source files.

2. 🤖 Dext.AI.Graph: Stateful AI Agent Orchestration (LangGraph-style)

Expanding the initial capabilities of Dext.AI, version 1.0.1 introduces a comprehensive graph-based orchestration framework for complex, multi-agent, cyclic, and stateful workflows:

  • Stateful Execution & Cyclic Graphs: Define nodes (LLM invocations, tools, decision branches) and conditional edges with full support for subgraphs-as-nodes (ICompiledAgent.AsNode).
  • Pluggable Checkpointers: Snapshot, pause, resume, and audit agent execution states (includes TFileCheckpointer).
  • Unified Ecosystem: Re-architected on top of Dext.Collections and Dext's native high-performance JSON serializers, eliminating System.JSON conversion overhead.
  • Documentation & Sample: Documented as Chapter 16 of the Dext Book (EN and PT-BR) and showcased in the new GraphDemo project.

3. ⚡ High-Throughput Performance: HTTP Pipeline & mimalloc

  • Massive Allocation Reduction: A baseline HTTP request that previously required ~110 memory allocations across the pipeline now requires only 13 allocations, drastically reducing heap pressure and memory churn under heavy concurrency.
  • mimalloc Support (Dext.MM): Added optional compile-time integration with Microsoft's high-performance mimalloc memory manager (DEXT_USE_MIMALLOC), designed for multi-threaded workloads.
  • HTTP.sys & IOCP Hardening:
    • Default worker thread and receive count tuned to available logical processors (OutstandingReceives).
    • Support for chunked/streaming bodies exceeding 10,000 segments.
    • Fixed Keep-Alive connection leaks, hostname (SNI) SSL binding validation, and clean teardown sequence when shutting down server engines.

4. 🎯 JSON Engine: Security, Consistency & Serialization Attributes

  • DoS Protection via Max Depth: Configurable recursion limit (DEFAULT_MAX_JSON_DEPTH = 64 or UNLIMITED_JSON_DEPTH = -1) raising catchable EJsonParserException to prevent stack overflow exploits from deeply nested payloads.
  • Declarative Format Attributes: Added [JsonFormat], [JsonString], [JsonNumber], and [JsonBoolean] attributes for both classes and records, applied during serialization and deserialization.
  • Strict RFC 3339 & Date Improvements:
    • Unified RFC 3339 timestamp generation with explicit UTC offsets across all paths.
    • Year-based UTC offset caching for fast date formatting.
    • Added TJsonSettings.NullDates to define application-specific empty date sentinels.
    • ZeroDateAsNull enabled by default across all date-writing paths.
  • Base64 Binary Serialization: Arrays of TBytes serialize to and deserialize from Base64 strings by default.
  • Domain Separation: [NotMapped] is now strictly scoped to ORM/database schemas; JSON exclusion is managed exclusively via [JsonIgnore].
  • UTF-8 Multibyte Fix: Resolved an issue in NextGen JSON writer where characters from code points U+0800 and above were dropped.

5. 📦 DPM (Delphi Package Manager) Integration

  • Added official package specification (dotpas.dext.dspec), enabling automated installation and dependency resolution via DPM.
  • Improved Linux build toolchains and package pathing compatibility.

6. 🌐 Web & Model Binding

  • Native HTMX 4 Support: Dedicated helpers for inspecting HTMX 4 request headers and rendering partial responses seamlessly.
  • Strict Model Binding:
    • Type-safe record binding with validation rejecting invalid route integers and malformed bodies.
    • Preserved HTTP status codes when custom exceptions are thrown from inside route handlers or controller actions.
  • Pluggable API Versioning: Integrated IApiVersionReader interface with granular version conflict handling (answering 400 for unserved versions and prioritizing exact version matches).

7. 🗄️ ORM & Data Layer

  • Firebird Index Optimization: Mapped StartsWith queries to Firebird's STARTING WITH operator, allowing Firebird query plans to leverage existing indexes.
  • Literal Escaping: StartsWith, EndsWith, and Contains now properly escape wildcard literals across all supported SQL generators.
  • Batch Operations: Fixed Unicode string parameter binding (ftWideString) during batch inserts and updates.
  • Change Tracker & Ownership: Entities are adopted upfront in DbSet.PersistUpdate, preventing manual IsModified status overrides from being dropped by DetectChanges.

👥 Community Contributors

This release was made possible by outstanding contributions from the community. A warm thank you to:

  • Stefano Monterisi (@Stemonik): Exceptional engineering across the HTTP pipeline allocation reduction, JSON format attributes, RFC 3339 unification, mimalloc memory manager integration, and HTTP.sys hardening.
  • Alexandre Medeiros (@alepmedeiros): Design and full implementation of the Dext.AI.Graph engine, documentation, demo examples, and batch ORM Unicode fixes.
  • Vincent Parrett (@vincentparrett): Authoring the official DPM specification (dotpas.dext.dspec) and Linux build compatibility improvements.
  • Yosof (@usofm): Native HTMX 4 inspection support and SSL certificate configuration ID fixes for HTTP.sys.

⚠️ Breaking Changes & Upgrading Notes

  1. Empty Dates in JSON: ZeroDateAsNull is now enabled by default. If your API relies on writing "1899-12-30", set Settings.ZeroDateAsNull := False.
  2. Byte Arrays as Base64: TBytes properties now default to Base64 strings instead of JSON arrays of integers.
  3. [NotMapped] Scoping: [NotMapped] no longer excludes fields from JSON serialization. Use [JsonIgnore] for JSON payload exclusion.
  4. JSON Nesting Limit: Payloads exceeding 64 levels of nesting will raise EJsonParserException. If your application processes deeper documents, adjust Settings.MaxDepth.