Skip to content

chore: release main - #506

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

chore: release main#506
stainless-app[bot] wants to merge 3 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app

@stainless-app stainless-app Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

✨ Stainless prepared a new release

agentex-client: 0.26.0

0.26.0 (2026-08-31)

Full Changelog: agentex-client-v0.25.0...agentex-client-v0.26.0

Features

  • tracing: add opt-in commit SHA stamping for SGP spans (#505) (76252a9)
agentex-sdk: 0.26.0

0.26.0 (2026-08-31)

Full Changelog: agentex-sdk-v0.25.0...agentex-sdk-v0.26.0

Chores

  • agentex-sdk: Synchronize agentex versions

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

The PR releases agentex-client and agentex-sdk 0.26.0 and adds opt-in source-revision metadata to SGP spans.

  • Adds a process-wide API for resolving commit SHAs from an explicit value or deployment environment.
  • Copies dictionary-shaped span metadata before adding __commit_sha__, avoiding mutation of shared span data.
  • Exposes the feature through the ADK and updates package versions, changelogs, and tests.

Confidence Score: 4/5

The PR appears safe to merge after addressing the non-blocking commit-length validation and test-formatting issues.

The feature preserves existing span metadata and remains opt-in, but the validator can label invalid-length hexadecimal values as commits, and several new test lines violate repository formatting standards.

Files Needing Attention: src/agentex/lib/core/tracing/code_revision.py; tests/lib/core/tracing/processors/test_sgp_tracing_processor.py

Important Files Changed

Filename Overview
src/agentex/lib/core/tracing/code_revision.py Adds opt-in process-wide commit resolution, but its validation accepts invalid 41–63-character object identifiers.
src/agentex/lib/core/tracing/processors/sgp_tracing_processor.py Adds commit metadata to copied dictionary-shaped SGP metadata without mutating the shared span.
src/agentex/lib/adk/init.py Exposes code_revision through the established ADK public-module pattern.
tests/lib/core/tracing/processors/test_sgp_tracing_processor.py Covers opt-in and metadata-isolation behavior but introduces three formatting violations.
tests/lib/core/tracing/test_code_revision.py Covers revision-source precedence and common validation cases but omits invalid hexadecimal lengths between 41 and 63.
adk/pyproject.toml Updates agentex-sdk to version 0.26.0.
pyproject.toml Updates agentex-client to version 0.26.0.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  App[Agent calls code_revision.enable] --> Resolve[Resolve explicit SHA or environment]
  Resolve --> Validate[Validate SHA-shaped value]
  Validate --> Registry[Process-wide commit revision]
  Span[AgentEx span] --> Processor[SGP tracing processor]
  Registry --> Processor
  Processor --> Copy[Copy dictionary metadata]
  Copy --> Stamp[Add __commit_sha__]
  Stamp --> SGP[SGP tracing backend]
Loading

Fix all with Greploop Fix All in Cursor Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
### Issue 1
src/agentex/lib/core/tracing/code_revision.py:32
**Reject invalid commit lengths**

If an opted-in deployment supplies a 41–63-character hexadecimal value, this regex accepts it even though it cannot be a SHA-1 or SHA-256 object name, causing SGP to store misleading `__commit_sha__` metadata that cannot identify a real commit.

```suggestion
_GIT_SHA_RE = re.compile(r"(?:[0-9a-fA-F]{7,40}|[0-9a-fA-F]{64})")
```

### Issue 2
tests/lib/core/tracing/processors/test_sgp_tracing_processor.py:67
**Split compound test statements**

The new tests place span construction and mutation on the same line at lines 67, 76, and 93, introducing repeated violations of the repository’s Python formatting and linting standard.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "chore: release main" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

  • Context used - Formatting, linting, and type checking standards (source)
  • Knowledge Base — Tracing pipeline


# A git object name: 40 hex for SHA-1, 64 for SHA-256, or an abbreviation down to
# git's own 7-character minimum.
_GIT_SHA_RE = re.compile(r"[0-9a-fA-F]{7,64}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Reject invalid commit lengths

If an opted-in deployment supplies a 41–63-character hexadecimal value, this regex accepts it even though it cannot be a SHA-1 or SHA-256 object name, causing SGP to store misleading __commit_sha__ metadata that cannot identify a real commit.

Suggested change
_GIT_SHA_RE = re.compile(r"[0-9a-fA-F]{7,64}")
_GIT_SHA_RE = re.compile(r"(?:[0-9a-fA-F]{7,40}|[0-9a-fA-F]{64})")

Knowledge Base Used: Tracing pipeline

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agentex/lib/core/tracing/code_revision.py
Line: 32

Comment:
**Reject invalid commit lengths**

If an opted-in deployment supplies a 41–63-character hexadecimal value, this regex accepts it even though it cannot be a SHA-1 or SHA-256 object name, causing SGP to store misleading `__commit_sha__` metadata that cannot identify a real commit.

```suggestion
_GIT_SHA_RE = re.compile(r"(?:[0-9a-fA-F]{7,40}|[0-9a-fA-F]{64})")
```

**Knowledge Base Used:** [Tracing pipeline](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/scale-agentex-python/-/docs/tracing-pipeline.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Cursor Fix in Claude Code Fix in Codex

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.

1 participant