Skip to content

Execution Semantics Profile (ESP) for ADP v0.2.0#4

Merged
casabre merged 5 commits into
mainfrom
feature/esp
Dec 2, 2025
Merged

Execution Semantics Profile (ESP) for ADP v0.2.0#4
casabre merged 5 commits into
mainfrom
feature/esp

Conversation

@casabre
Copy link
Copy Markdown
Owner

@casabre casabre commented Dec 2, 2025

Summary

This PR introduces the Execution Semantics Profile (ESP) for ADP v0.2.0, defining execution semantics for ADP agents while maintaining full backward compatibility with v0.1.0. The implementation includes comprehensive SDK support across Python, TypeScript, Go, and Rust, along with significant test coverage improvements.

What's New

Execution Semantics Profile (ESP)

  • New specification (spec/esp.md): Defines how ADP agents are interpreted and executed by conformant runners
    • Flow graph execution model (node readiness, edge traversal, state passing)
    • State model with core fields (inputs, context, memory, tool_responses)
    • Tool binding semantics via tool_ref field
    • Model and prompt reference resolution
    • Error and failure semantics (permanent vs transient)
    • Framework-neutral design compatible with LangGraph, LangChain, CrewAI, and custom frameworks

Schema Updates

  • schemas/flow.schema.json: Added optional tool_ref, prompt_ref, model_ref, system_prompt_ref fields to node definition
  • schemas/runtime.schema.json: Added optional models[] array for explicit model configuration
  • schemas/adp.schema.json: Updated to support adp_version: "0.2.0"

SDK Updates

All SDKs now fully support ADP v0.2.0:

  • Python SDK:

    • Updated Pydantic models for v0.2.0 fields
    • Enhanced validation logic
    • Improved ADPKG round-trip support
    • 100% test coverage with meaningful assertions
  • TypeScript SDK:

    • Updated TypeScript interfaces for v0.2.0 fields
    • Enhanced validation and ADPKG support
    • 100% statement coverage, 86.66% branch coverage
  • Go SDK:

    • Updated struct definitions for v0.2.0 fields
    • Enhanced validation and ADPKG support
    • 83.3% test coverage (remaining paths require mocking)
  • Rust SDK:

    • Updated struct definitions for v0.2.0 fields
    • Enhanced validation and ADPKG support
    • All tests passing

Documentation Updates

  • spec/esp.md: Complete ESP specification (897 lines)
  • spec/conformance.md: Added ESP-conformant runner requirements
  • spec/flow.md: Documented new tool_ref field
  • spec/runtime.md: Documented new runtime.models[] array
  • CHANGELOG.md: Documented v0.2.0 changes
  • fixtures/adp_v0.2.0.yaml: Example v0.2.0 manifest with ESP features

Backward Compatibility

Fully backward compatible: All ADP v0.1.0 manifests remain valid and continue to work unchanged. New v0.2.0 fields are optional.

Test Coverage

  • Python: 100% coverage
  • TypeScript: 100% statement coverage, 86.66% branch coverage
  • Go: 83.3% coverage (remaining paths require mocking)
  • Rust: All tests passing

Breaking Changes

None. This is a fully backward-compatible release.

Migration Guide

No migration required. Existing v0.1.0 manifests continue to work. To use ESP features:

  1. Set adp_version: "0.2.0" in your manifest
  2. Optionally add tool_ref to flow nodes that use tools
  3. Optionally add runtime.models[] for explicit model configuration
  4. Optionally add model_ref, prompt_ref, system_prompt_ref to flow nodes

Related Issues

  • Addresses semantic gaps identified in ADP v0.1.0 reconstruction evaluation
  • Enables deterministic agent reconstruction across implementations
  • Provides framework-neutral execution semantics

Checklist

  • ESP specification complete and validated
  • Schema updates for all new fields
  • Python SDK updated with tests
  • TypeScript SDK updated with tests
  • Go SDK updated with tests
  • Rust SDK updated with tests
  • Documentation updated
  • Backward compatibility verified
  • Test coverage improved across all SDKs
  • CHANGELOG updated

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.70%. Comparing base (03e7026) to head (da035e9).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
sdk/go/adpkg/adpkg.go 33.33% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   90.46%   93.70%   +3.23%     
==========================================
  Files          10       10              
  Lines         388      397       +9     
==========================================
+ Hits          351      372      +21     
+ Misses         22       13       -9     
+ Partials       15       12       -3     
Flag Coverage Δ
go 93.70% <71.42%> (+3.23%) ⬆️
python 93.70% <71.42%> (+3.23%) ⬆️
rust 93.70% <71.42%> (+3.23%) ⬆️
typescript 93.70% <71.42%> (+3.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@casabre casabre merged commit 2309e17 into main Dec 2, 2025
18 checks passed
@casabre casabre deleted the feature/esp branch December 2, 2025 18:47
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