Repository navigation
Merge main into accelerate - #2032
Merged
Merged
Conversation
## Why [AI-1892](https://linear.app/stream/issue/AI-1892) publishes the Go server-side SDK. A Go module is released by tagging the repository, and `go get ...@latest`, `@main` and pkg.go.dev read the default branch, which is `main`. `main` has no `sdks/` today, and `accelerate`, where the SDK is developed, stays the development branch. So `main` gets a copy of `sdks/go` from one `accelerate` commit, and the first version, `sdks/go/v0.1.0`, is tagged on this PR's merge commit. ## How it works ``` accelerate (development) main (release) #1812 Go SDK fixes this PR, from origin/main #1813 README, sdk-go skill ──┐ ├─ sdks/go = git checkout <SHA> -- sdks/go ... └──► ├─ sdk-go.yml (PR/push: Go 1.25 alone) ├─ release-sdk-go.yml (tag: verify via proxy) ├─ release.yml guard (PyPI only for v* tags) └─ merge ─► tag sdks/go/v0.1.0 ─► proxy.golang.org ``` | File | Why | | --- | --- | | `sdks/go/**` | Copied unchanged from `accelerate` at `68ffd61c2` (after #1812, #1813 and #1863). `git diff 68ffd61 HEAD -- sdks/go` is empty | | `.github/workflows/sdk-go.yml` | `main` has no other Go: gofmt, `go mod tidy -diff`, `go mod verify`, vet (e2e included) and `go test -race` on Go 1.25.0, `GOWORK=off`, `GOTOOLCHAIN=local` | | `.github/workflows/release-sdk-go.yml` | On a `sdks/go/v*` tag: checks the tag is exactly `sdks/go/vX.Y.Z` and on `main`, tests the tagged copy, then `go get`s the version through proxy.golang.org into an empty module and builds `examples/quickstart` with it. Publishes nothing, creates no GitHub Release. Dispatchable to re-verify a tag, since it lives on the default branch | | `.github/workflows/release.yml` | Runs only for a release tagged `v*`. A GitHub Release for `sdks/go/v0.1.0` or `sdk-js-v*` would otherwise reach `uv publish` | | `.github/workflows/run_tests.yml` | Runs a PulseAudio server before the Python tests, as `accelerate` does since #1562: Ubuntu 26.04's PortAudio fails `import sounddevice` without one, which has failed `main`'s unit job since 2026-11-05 | | `.gitattributes` | Marks `sdks/go/acceleration/generated.go` generated, so the diff stays reviewable | | `CLAUDE.md` | Never edit `sdks/go` here; merging `accelerate` into `main` conflicts on `sdks/go`, so take `accelerate`'s tree; tag the merge commit by SHA; retract, never move | `go generate` does not run on `main`: it needs `acceleration/api/openapi.yaml`, which only `accelerate` has. The generated code is committed, so consumers need nothing. ## Before merging 1. Done: #1812 and #1813 are merged into `accelerate` (`8160088e0`, `cf2e643db`), and #1863 (`68ffd61c2`). #1732 (a dispatch worker whose router falls silent) is still open and is not in this copy; it ships in the next patch. 2. Done: `sdks/go` re-copied from `68ffd61c2`, which adds #1863 (Leave reports a stop the router refused) and AI-2992's spend limits and teams; `git diff 68ffd61 HEAD -- sdks/go` prints nothing. 3. Not run: the release smoke set against a hosted router (it uses real models). It is the check to run before the next tag: ```bash cd sdks/go E2E_REQUIRED=1 go test -tags e2e -count=1 -v -run 'TestTheRouterIsReachable|TestAConversationInWriting|TestAFunctionRegisteredHere|TestASessionIsRecorded|TestSyncStores|TestTheUsageCallbackSeesEveryResponse' . ``` ## After merging ```bash git fetch origin MERGED=$(gh pr view 1814 --repo GetStream/Vision-Agents --json mergeCommit -q .mergeCommit.oid) git tag sdks/go/v0.1.0 "$MERGED" git push origin sdks/go/v0.1.0 # no GitHub Release ``` `release-sdk-go.yml` then verifies it. A broken version is never moved: retract it in `sdks/go/go.mod` on `accelerate`, copy again, and tag `v0.1.1`. ## Validation - In this branch at `68ffd61c2`'s copy, `sdks/go` with `GOWORK=off GOTOOLCHAIN=go1.25.0`: `go build`, `go vet` (e2e included), `go test -race ./...`, `go mod tidy -diff` and `go mod verify` pass, and `gofmt -l` is empty. - Through the public proxy, from an empty module outside the repo on Go 1.25.0 with `GOPRIVATE` cleared, `go get github.com/GetStream/Vision-Agents/sdks/go@52f871d4b` resolved `v0.0.0-20261106083818-52f871d4b173`, and the quickstart built against it. That is the consumer job's flow, run on this branch's head before a tag exists. - An independent review found no blockers; its fixes (strict tag check, merge guidance, tag by SHA) are in. `sdk-go.yml` is path-filtered, so it should not be made a required check on `main`. - Not run: the smoke set (above), and either workflow on GitHub until this PR's checks run.
Copies `sdks/go` from `accelerate` at 9de406a, checked to be an exact copy. It adds, among other things, `client.Query.Team` and `client.Query.Sort` (#1938). After merge, the merge commit gets the tag `sdks/go/v0.2.0`. The paid end-to-end smoke set (`E2E_REQUIRED=1`) was not run: this machine has no router credentials for it. Unit tests pass on accelerate.
…1946) GitHub only offers "Run workflow" for a workflow it knows from the default branch. `release-sdk-js.yml` lives only on `accelerate`, so `gh workflow run release-sdk-js.yml --ref accelerate` answers 404. This copies the file as it is. Its job runs only when `github.ref` is `refs/heads/accelerate`, so a run from `main` does nothing.
## Why
Two default log lines held data that should not sit in logs. The demo
join link was logged with the API key and a one-hour user token in its
query string, at INFO and again at WARNING when the browser failed to
open, so anyone who can read the logs can join the call as the demo user
while the token is valid. `TwilioCallRegistry` logged the caller's and
the called party's phone numbers in full. Found in the AI-3210 review.
## How it works
```
open_demo(call)
├─ log "Opening browser to: <base>/join/<call id>" no query string
├─ browser opens nothing else said
└─ browser fails to open
└─ print "Please manually open this URL: <full link>" terminal only, not the logger
TwilioCallRegistry.create(...)
└─ log "Created call CA123 from +*******4567 to +*******6543"
```
| Change | Result | Test that proves it |
| --- | --- | --- |
| `mask_phone_number` in `core/utils/text.py` | All but the last four
digits become `*`; separators and `+` stay | `TestMaskPhoneNumber` in
`tests/test_utils.py` |
| `call_registry.py` logs through it | No full number in the registry's
log line |
`TestTwilioCallRegistry::test_create_does_not_log_full_numbers` |
| `stream_edge_transport.py` logs the link without its query | No
`api_key=` or `token=` in the logs | Unverified by a test, see below |
## Validation
- `test_create_does_not_log_full_numbers` fails on the base commit
(`'+15551234567'` is in the captured log) and passes with the fix. It
catches a registry that logs a number unmasked.
- `TestMaskPhoneNumber` catches a mask that leaks digits, drops
separators, or breaks on a short or missing number.
- The demo link change has no test: `open_demo` needs a live Stream app
and opens a browser, and the repo's rules rule out mocking either. It
was checked by reading the two changed lines.
- `ruff check`, `ruff format --check` and `mypy` pass on the core
package and on the `twilio` and `getstream` plugins. The `twilio`,
`getstream` and `tests/test_utils.py` suites pass (78 tests).
- The full `dev.py check` could not finish locally: 14 unrelated test
modules fail at import because scipy's compiled extension does not load
on this machine, on the base commit as well. CI covers them.
Transcripts, model replies and tool arguments in the logs are left as
they are, on purpose: they are what a developer watches in the console
while building an agent.
) ## What Mirrors the `main` side of #2019 by hand, since the files have diverged and its diff does not apply here: - `run_tests.yml`: new `environment` input (default empty), used as `environment:` on the `test` job. - `daily.yml` and `release.yml` (`integration` job): pass `environment: integration`. The nightly schedule and `v*` releases run from `main`, so they need the same change as `accelerate`. It also ports to `release.yml` and its actions the hardening that `accelerate` has had since #1488: - `id-token: write` moves from the workflow to `build-core`, so the `integration` job, which holds every provider key, cannot mint a PyPI token. - `build-core` skips the uv cache, through a new `enable-cache` input on `python-uv-setup` (default `"true"`, so other callers keep the cache). A cache saved by another run in `main`'s scope cannot reach the job that publishes. - `astral-sh/setup-uv` and `slackapi/slack-github-action` are pinned by commit SHA, with the same pins as `accelerate` (`v7.6.0`, `v2.1.1`). - `python-uv-setup` installs uv `0.13.6`, as `accelerate` does, instead of `latest`. - In `build-core`, `hatch` is pinned (`hatch==1.18.2`) and `uv build --all` reads `.github/release-build-constraints.txt` through `UV_BUILD_CONSTRAINT` (hatchling, hatch-vcs, setuptools-scm, at the versions `uv.lock` resolves), so the job that holds the PyPI token pins the build tools it downloads; their own dependencies are not pinned. `uv build --all` was run locally with that file: all 41 packages built (sdist and wheel). actionlint on the workflows: clean, except one shellcheck warning (SC2046) in `release-sdk-js.yml`, which this PR does not touch. ## Order Pairs with #2019. This PR must merge before the admin moves the secrets into environments, or the nightly run and the release integration run lose their keys. With no environment configured yet, nothing changes. The first run after merge creates `integration` with no rules; the rules it needs (`main`, `accelerate` and tag `v*`, since a release runs on its tag) are step 7 of #2019. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copies `sdks/go` from `accelerate` at 43849c5 (`accelerate-v0.6.346`, the router now on staging and every prod shard). `git diff --stat 43849c5 -- sdks/go` on this branch prints nothing. After merge, the merge commit gets the tag `sdks/go/v0.3.0`. Since v0.2.0 it adds, among other things: `client.Document` / `DocumentFile` (AI-3197), `Responses.Regenerate`, `Edit`, `Siblings`, `Activate` and branch reads (AI-3198), `Rewind` on a kept conversation (AI-3209), `ForkOptions.ToolTimeout` (AI-3201), and the route listing (AI-3199). See `CHANGELOG.md` on `accelerate`. **Breaking for v0.2.0 callers: `client.Query` (#2001)** `Query` is now `Filter`, `Sort []Sort`, `Limit` and `Cursor`. The removed fields map to `Filter` keys as follows: | v0.2.0 | v0.3.0 | |---|---| | `ProjectID` | `Filter{"project_id": id}` | | `UserID` | `Filter{"user_id": id}` | | `State` | `Filter{"state": "live" \| "ended"}` | | `ConfigID` | `Filter{"config_id": id}` | | `Custom` | `Filter{"custom": map}` | | `CreatedAfter` / `CreatedBefore` | `Filter{"created_at": Filter{"$gte": t, "$lt": t}}` (RFC 3339) | | `Sort: acceleration.UpdatedAt` | `Sort: []Sort{{Field: SortLastMessageAt, Direction: -1}}` (the default) | | `Sort: acceleration.Relevance` | `Sessions.Search`, which orders by match and takes no sort | | `Modality`, `AgentID`, `Team` | no filter key; the router refuses unknown keys with a 400 | The README's "Conversations somebody comes back to" lists every filter field. **Checks** - `go vet ./...` and `go test ./...` pass on this copy. - Release smoke set (`E2E_REQUIRED=1`) against staging on v0.6.346: 5 of 6 pass. `TestSyncStoresTheAgentAndEditsItTheSecondTime` fails with the router's `a skill belongs to an agent config, so one has to be named`. The router has given that refusal since at least v0.6.300, so it is the test, not this release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Laurent Schaffner <laurentschaffner@Laurents-MacBook-Pro-Stream.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Brings main's 9 commits into accelerate so the accelerate -> main PR merges clean. Conflicts resolved: - CLAUDE.md, agents-core/.../utils/text.py, tests/test_utils.py: kept deleted; accelerate moved agents-core to sdks/python and already has mask_phone_number. - ci.yml, daily.yml, run_tests.yml, release-sdk-js.yml: accelerate's version, which already carries main's secrets changes (#2018, #2020). - sdks/go: accelerate's version; main's Go SDK is a subset of it. - release.yml: accelerate's version plus main's build constraints and pinned hatch. - .gitattributes: both sides. - CHANGELOG.md: dropped main's #1957 entry, already present on accelerate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#2030 (accelerate -> main) conflicts with main in 12 files. Main has 9 commits that accelerate lacks (Go SDK v0.1.0-v0.3.0, CI secrets changes, log masking). This PR merges them into accelerate once, so #2030 merges clean.
How it works
CLAUDE.md,agents-core/.../utils/text.py,tests/test_utils.pyagents-coretosdks/pythonand already hasmask_phone_number(sdks/python/vision_agents/core/utils/text.py);AGENTS.mdcarries main's Go release noteci.yml,daily.yml,run_tests.ymlintegrationenvironment)release-sdk-js.ymlregistry-publishenvironment, which main lackssdks/go/{acceleration/generated.go, agents/folder.go, stream/conversation.go}git diff origin/accelerate origin/main -- sdks/goadds no linerelease.ymlrelease-build-constraints.txtand pinnedhatch.gitattributesCHANGELOG.mdmerge=unioncopied it into an old section; accelerate already has itResult against
accelerate: 5 files, +172/-2, all CI and release config (.gitattributes,release.yml, and main's newrelease-build-constraints.txt,release-sdk-go.yml,sdk-go.yml). No Python or Go code changes.sdk-go.ymlduplicates thego-sdkjob inci.yml, and its comment callssdks/goon main a copy of accelerate's, which stops being true after #2030. Left as main has it; a follow-up can remove it.Validation
git merge-treeof the result withorigin/mainreports no conflicts.dev.py checknot run: no.pyorpyproject.tomldiffers fromaccelerate.🤖 Generated with Claude Code