Skip to content

release: 0.12.0#350

Open
stainless-app[bot] wants to merge 7 commits into
mainfrom
release-please--branches--main--changes--next
Open

release: 0.12.0#350
stainless-app[bot] wants to merge 7 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app
Copy link
Copy Markdown
Contributor

@stainless-app stainless-app Bot commented May 8, 2026

Automated Release PR

0.12.0 (2026-05-12)

Full Changelog: v0.11.0...v0.12.0

⚠ BREAKING CHANGES

  • remove AgentexTracingProcessor from default tracing processors (#349)

Features

  • internal/types: support eagerly validating pydantic iterators (2c528c6)
  • remove AgentexTracingProcessor from default tracing processors (#349) (73eca7a)

Bug Fixes

  • client: add missing f-string prefix in file type error message (dcb1cb4)
  • render .env.example template in agentex init (#351) (6092595)
  • tracing: make SGP processor stateless to stop dropping span closes (#354) (5e9f28d)
  • wire SGP_CLIENT_BASE_URL and silence openai-agents tracer in templates (#352) (870324e)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

Greptile Summary

  • Refactors SGPSyncTracingProcessor and SGPAsyncTracingProcessor to be stateless by removing the per-instance _spans dict; span data is now rebuilt idempotently on both on_span_start and on_span_end, fixing dropped span-close events in cross-pod Temporal deployments.
  • Adds EagerIterable type alias backed by a custom Pydantic validator that eagerly materialises iterables/generators upfront, fixing the pydantic ValidatorIterator exhaustion bug on repeated model_dump() calls.
  • Removes AgentexTracingProcessor from default tracing processors (breaking change), wires SGP_CLIENT_BASE_URL into all templates, and silences the openai-agents native tracer to prevent traces leaking to api.openai.com.

Confidence Score: 4/5

Safe to merge with one outstanding P1: the temporal-openai-agents workflow template registers SGP tracing unconditionally, initialising an SGP client with empty credentials for users without SGP configured.

A single isolated P1 caps the score at 4. The core tracing refactor is well-tested and the stateless design correctly handles the cross-pod Temporal scenario. All other changes (f-string fix, EagerIterable, version bump, CI action pinning) are clean.

src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 — missing credential guard around add_tracing_processor_config

Important Files Changed

Filename Overview
src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py Stateless refactor: extracted _build_sgp_span and _add_source_to_span as module-level helpers, removed per-instance _spans dict from both sync and async processors to eliminate cross-pod span-drop bugs in Temporal.
src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2 Adds set_tracing_disabled and SGP_CLIENT_BASE_URL wiring, but still registers SGPTracingProcessorConfig unconditionally without guarding on non-empty SGP_API_KEY/SGP_ACCOUNT_ID (unlike the acp.py.j2 sibling template).
src/agentex/lib/cli/templates/sync-openai-agents/project/acp.py.j2 Adds set_tracing_disabled(True), SGP_CLIENT_BASE_URL env var, and correctly guards add_tracing_processor_config behind if SGP_API_KEY and SGP_ACCOUNT_ID.
src/agentex/_models.py Adds EagerIterable TypeAlias backed by _EagerIterable pydantic validator that eagerly consumes iterables/generators, validates items, and reconstructs the original container type; fixes the pydantic ValidatorIterator exhaustion bug.
src/agentex/lib/core/tracing/tracing_processor_manager.py Removes AgentexTracingProcessorConfig from default lazy-initialisation, completing the breaking change to stop auto-registering the Agentex processor.

Comments Outside Diff (1)

  1. src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2, line 44-50 (link)

    P1 Unconditional SGP tracing registration with empty credentials

    add_tracing_processor_config is called unconditionally, meaning users who generate this template without SGP credentials will have SGPSyncTracingProcessor.__init__ invoked, which calls tracing.init(SGPClient(api_key="", account_id="", ...), disabled=True). This constructs the client and initialises the SGP tracing subsystem on every import even when credentials are absent. The sibling template acp.py.j2 guards this call with if SGP_API_KEY and SGP_ACCOUNT_ID: — the same guard should be applied here so the processor is only registered when credentials are actually present.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2
    Line: 44-50
    
    Comment:
    **Unconditional SGP tracing registration with empty credentials**
    
    `add_tracing_processor_config` is called unconditionally, meaning users who generate this template without SGP credentials will have `SGPSyncTracingProcessor.__init__` invoked, which calls `tracing.init(SGPClient(api_key="", account_id="", ...), disabled=True)`. This constructs the client and initialises the SGP tracing subsystem on every import even when credentials are absent. The sibling template `acp.py.j2` guards this call with `if SGP_API_KEY and SGP_ACCOUNT_ID:` — the same guard should be applied here so the processor is only registered when credentials are actually present.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Cursor Fix in Claude Code Fix in Codex

Fix All in Cursor Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
src/agentex/lib/cli/templates/temporal-openai-agents/project/workflow.py.j2:44-50
**Unconditional SGP tracing registration with empty credentials**

`add_tracing_processor_config` is called unconditionally, meaning users who generate this template without SGP credentials will have `SGPSyncTracingProcessor.__init__` invoked, which calls `tracing.init(SGPClient(api_key="", account_id="", ...), disabled=True)`. This constructs the client and initialises the SGP tracing subsystem on every import even when credentials are absent. The sibling template `acp.py.j2` guards this call with `if SGP_API_KEY and SGP_ACCOUNT_ID:` — the same guard should be applied here so the processor is only registered when credentials are actually present.

Reviews (6): Last reviewed commit: "release: 0.12.0" | Re-trigger Greptile

@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from cac40be to c646eb3 Compare May 8, 2026 18:27
…plates (#352)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from c646eb3 to 7ad5b19 Compare May 8, 2026 19:01
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 7ad5b19 to 5eaf474 Compare May 8, 2026 21:16
@stainless-app stainless-app Bot changed the title release: 0.11.1 release: 0.12.0 May 8, 2026
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 5eaf474 to ec02cb4 Compare May 8, 2026 21:16
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from ec02cb4 to 6d194bb Compare May 11, 2026 21:24
stainless-app Bot added 2 commits May 12, 2026 19:05
Pin all GitHub Actions referenced in generated workflows (both
first-party `actions/*` and third-party) to immutable commit SHAs.
Updating pinned actions is now a deliberate codegen-side bump rather
than implicit on every workflow run.
@stainless-app stainless-app Bot force-pushed the release-please--branches--main--changes--next branch from 6d194bb to c47090f Compare May 12, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants