Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
docs: add release guide and align SDK tag format (#2765)
Jiahui Zhou5a433e5a756d
diff --git a/.github/workflows/python-sdk-release.yml b/.github/workflows/python-sdk-release.ymlindex 2aef3ec66..5f123920b 100644--- a/.github/workflows/python-sdk-release.yml+++ b/.github/workflows/python-sdk-release.yml@@ -3,7 +3,7 @@ name: Python SDK Releaseon:push:tags:- - "python-sdk/v*"+ - "python-sdk@*"workflow_dispatch:inputs:target:@@ -73,7 +73,7 @@ jobs:TAG_NAME: ${{ github.ref_name }}SDK_VERSION: ${{ steps.version.outputs.sdk_version }}run: |- EXPECTED_TAG="python-sdk/v${SDK_VERSION}"+ EXPECTED_TAG="python-sdk@${SDK_VERSION}"if [ "$TAG_NAME" != "$EXPECTED_TAG" ]; thenecho "Tag $TAG_NAME does not match resolved SDK version $SDK_VERSION"exit 1diff --git a/RELEASE.md b/RELEASE.mdnew file mode 100644index 000000000..677b7846f--- /dev/null+++ b/RELEASE.md@@ -0,0 +1,183 @@+# OpenViking Release Guide++This document explains the release goals, version and tag conventions, primary release flows, republishing paths, and verification steps for the OpenViking repository. It is based on the tracked GitHub Actions workflows, build configuration, and package configuration in this repository.++## Release Goals++OpenViking does not release a single artifact. A release publishes a set of related assets for different usage paths:++- `openviking` Python package: for users who need the local runtime, server, CLI, and full feature set.+- Python SDK `openviking-sdk`: for lightweight HTTP clients that call an existing OpenViking server.+- Docker images: for containerized deployments, published to GHCR and Docker Hub.+- TOS release assets: for source archives, installation scripts, and stable download paths.+- Rust CLI / npm packages: for users who install the `ov` CLI through npm.+- OpenClaw / ClawHub plugin: for OpenClaw plugin distribution.+- VikingBot: currently distributed through `openviking[bot]` and the official Docker image; historical standalone release entries are documented separately to avoid misuse.++A formal main-package release should keep the Python package, Docker images, and TOS assets on the same main release tag. SDK, CLI, and ClawHub plugin releases use their own tag or version namespaces.++## Version and Tag Conventions++Use the following tag conventions:++| Artifact | Recommended tag / version | Notes |+| --- | --- | --- |+| `openviking` main package | `vX.Y.Z` | Main release tag, for example `v0.3.26`. |+| `openviking-sdk` | `[email protected]` | SDK-only tag, for example `[email protected]`. |+| Rust CLI / npm CLI | `[email protected]` | CLI-only tag, for example `[email protected]`. |+| ClawHub plugin latest | `YYYY.M.D` or `YYYY.M.D-N` | Generated by the workflow or specified manually. |+| ClawHub plugin dev | `YYYY.M.D-dev.N` | Used for the dev channel. |++The main package version is resolved from Git tags through `setuptools_scm`; formal main releases should use `vX.Y.Z`. The SDK also uses `setuptools_scm`, but it only matches `python-sdk@*` tags so it does not conflict with main package tags.++## Formal Main Package Release Flow++Formal main package releases go through GitHub Releases in the root repository:++1. Confirm the release changes are merged into the target branch and PR / main branch checks have passed.+2. Create a main package tag, for example `v0.3.26`.+3. Publish a GitHub Release based on that tag.+4. The `03. Release` workflow runs when the Release is published.+5. The workflow reuses `_Build Distribution` to build the sdist and multi-platform wheels.+6. The workflow publishes the distributions to PyPI.+7. The workflow builds and pushes multi-architecture Docker images.+8. The `Release TOS Upload` workflow uploads the source archive and installation scripts to TOS.++A formal main release publishes to:++- PyPI: `openviking`+- GHCR: `ghcr.io/<owner>/<repo>`+- Docker Hub: `<dockerhub-user>/openviking`+- TOS: versioned release paths and optional `latest` stable paths++## Manual Main Package Builds, Test Publishing, and Republishing++The root release workflow also supports manual dispatch with these targets:++- `none`: build only, without publishing.+- `testpypi`: publish to TestPyPI.+- `pypi`: publish to PyPI.+- `both`: publish to both TestPyPI and PyPI.++If Python distributions were built successfully but publishing failed, use the `_Publish Distribution` workflow with the relevant build run id. This path is intended for recovery and republishing, not as the normal release entry point.++## Docker Image Publishing and Republishing++During a formal main release, Docker images are built and published by the main release workflow. Images are pushed to GHCR and Docker Hub with the release version tag and `latest` tag.++The repository also provides a standalone `Build and Push Docker Image` workflow for:++- Rebuilding an image with a manually specified version.+- Building images from the `main` branch.+- Rebuilding or republishing images after a tag-triggered run.++Note: the standalone Docker workflow currently also runs on `v*.*.*` tag pushes. The formal GitHub Release source of truth is still the `03. Release` workflow; treat the standalone Docker workflow as an image-specific build or republish path to avoid confusing it with the formal release artifact set.++To avoid duplicate publishing, use the main release workflow for formal versions. Use the standalone Docker workflow only for image republishing or special verification.++## TOS Release Assets++The TOS release flow creates a source archive and uploads these assets:++- `releases/<tag>/openviking-<tag>-source.zip`+- Claude Code memory plugin install script+- Codex memory plugin install script+- Matching TOS install scripts++Formal GitHub Releases trigger the TOS upload automatically. Manual republishing can specify a tag and use `update_latest` to decide whether to overwrite stable paths.++If TOS secrets are not fully configured, the workflow skips uploading and reports it in the step summary without failing the whole workflow.++## Python SDK Release Flow++The Python SDK lives under `sdk/python`, and its PyPI package name is `openviking-sdk`. SDK releases use an independent tag namespace:++```text+```++Typical flow:++1. Merge SDK-related changes.+2. Create and push a tag, for example `[email protected]`.+3. The `Python SDK Release` workflow runs from the tag.+4. The workflow resolves the SDK version with `setuptools_scm`.+5. The workflow verifies that the current tag equals `python-sdk@<resolved-version>`.+6. The workflow builds `sdk/python` and publishes it to PyPI.++The SDK workflow also supports manual dispatch with `testpypi`, `pypi`, or `both`. Manual dispatch is useful for validation and recovery; formal SDK releases should use `[email protected]` tags.++## Rust CLI / npm Release Flow++The Rust CLI tag format is:++```text+```++After a `cli@*` tag is pushed, the `Rust CLI Build` workflow builds the `ov` binary for multiple platforms and publishes npm packages:++- Platform packages: `@openviking/cli-linux-x64`, `@openviking/cli-linux-arm64`, `@openviking/cli-darwin-x64`, `@openviking/cli-darwin-arm64`, `@openviking/cli-win32-x64`+- Wrapper package: `@openviking/cli`++The workflow injects the version from the tag into the platform packages and wrapper package. If the same version already exists on npm, the workflow skips the already published package.++## OpenClaw / ClawHub Plugin Release++The OpenClaw plugin is published manually through the `ClawHub release (OpenViking plugin)` workflow. Inputs include:++- `version`: optional; when empty, the workflow generates a date-based version.+- `channel`: `auto`, `dev`, or `latest`.+- `changelog`: release notes for the plugin release.++The workflow resolves the channel and version, packs `examples/openclaw-plugin`, pushes a generated package branch, and then calls ClawHub's official trusted publishing workflow.++Recommended usage:++- Use `latest` or `auto` for the formal channel.+- Use `dev` for development validation.+- When specifying `version` manually, ensure it matches the required format for the selected channel.++## VikingBot Release Notes++VikingBot is no longer maintained as a recommended standalone PyPI release path. The current distribution model is through the main package:++- Python install entry point: `pip install "openviking[bot]"`.+- Source development entry point: `uv pip install -e ".[bot]"`.+- The official Docker image already includes VikingBot by default; disable it with `--without-bot` or `OPENVIKING_WITH_BOT=0`.++The root repository still contains a `First Release to PyPI` workflow, but it builds an independent Python package from the `bot` directory. The current `bot/` directory does not contain an independent `pyproject.toml`, `setup.py`, or `setup.cfg`, so this workflow should be treated as historical leftover configuration and should not be used for new VikingBot releases.++The file `bot/.github/workflows/release.yml` lives under the `bot` subdirectory. Treat it as a historical bot subproject or split-repository release reference, not as a GitHub Actions workflow that the current root repository can directly trigger. Restoring an independent `vikingbot` package would first require adding standalone Python package metadata, a versioning strategy, and a publishing credential strategy under `bot/`.++## Pre-release Checklist++Before releasing, confirm that:++- The changes to be released are merged into the target branch.+- CI / PR checks have passed.+- The version has not already been published to PyPI, npm, or the Docker registry.+- The tag name follows the convention for the target artifact.+- Python dependencies, build configuration, and README files are synchronized.+- Required secrets or trusted publishing settings are configured for Docker Hub, PyPI/TestPyPI, TOS, npm, and ClawHub.+- Release notes are ready and document breaking changes, migration steps, and important fixes.++## Post-release Verification Checklist++After releasing, verify that:++- The package version on PyPI / TestPyPI matches the tag.+- `pip install openviking==<version>` or `pip install openviking-sdk==<version>` succeeds.+- Docker registries contain the version tag and the expected `latest` / `main` tag.+- The multi-architecture Docker manifest can be pulled.+- TOS versioned paths and stable paths are accessible.+- npm contains the expected CLI platform packages and wrapper package.+- The ClawHub plugin channel and version match expectations.++## Failure Handling and Republishing Principles++- PyPI and npm versions generally cannot be overwritten; if package content is wrong, publish a new version.+- Docker `latest`, `main`, and manually specified tags can be rebuilt through the image republishing workflow, but keep released version tags traceable.+- Treat TOS versioned paths as immutable assets; stable paths may be overwritten through the manual workflow.+- If build succeeds but publishing fails, prefer the republishing workflow or manual dispatch instead of recreating the same tag with different content.+- If a tag is wrong, delete and recreate it only if it has not triggered irreversible publishing.diff --git a/RELEASE_CN.md b/RELEASE_CN.mdnew file mode 100644index 000000000..e36ad1afd--- /dev/null+++ b/RELEASE_CN.md@@ -0,0 +1,183 @@+# OpenViking 发版说明++本文说明 OpenViking 仓库的发版目标、版本与 tag 约定、主要发版流程,以及补发和验证方式。内容以仓库中已追踪的 GitHub Actions、构建配置和包配置为准。++## 发版目标++OpenViking 的发版目标不是单一产物,而是围绕不同使用入口发布一组相互关联的资产:++- `openviking` Python 主包:面向本地运行时、服务端、CLI 及完整功能用户。+- Python SDK `openviking-sdk`:面向只通过 HTTP 调用已有 OpenViking 服务的轻量客户端用户。+- Docker 镜像:面向容器化部署,发布到 GHCR 和 Docker Hub。+- TOS 发布资产:面向源码包、安装脚本和稳定下载路径。+- Rust CLI / npm 包:面向通过 npm 安装 `ov` CLI 的用户。+- OpenClaw / ClawHub 插件:面向 OpenClaw 插件分发渠道。+- VikingBot:当前随 `openviking[bot]` 和官方 Docker 镜像分发;历史独立发版入口单独说明,避免误用。++一次正式主版本发版应确保 Python 包、Docker 镜像和 TOS 资产使用同一个主版本 tag;SDK、CLI、ClawHub 插件则使用各自独立的 tag 或 version 命名空间。++## 版本与 tag 约定++推荐使用以下 tag 约定:++| 产物 | 推荐 tag / version | 说明 |+| --- | --- | --- |+| `openviking` 主包 | `vX.Y.Z` | 主 release tag,例如 `v0.3.26`。 |+| `openviking-sdk` | `[email protected]` | SDK 专用 tag,例如 `[email protected]`。 |+| Rust CLI / npm CLI | `[email protected]` | CLI 专用 tag,例如 `[email protected]`。 |+| ClawHub 插件 latest | `YYYY.M.D` 或 `YYYY.M.D-N` | 由 workflow 自动生成或手动指定。 |+| ClawHub 插件 dev | `YYYY.M.D-dev.N` | dev channel 使用。 |++主包版本通过 `setuptools_scm` 从 Git tag 解析;正式主发版建议统一使用 `vX.Y.Z`。SDK 版本同样通过 `setuptools_scm` 解析,但只匹配 `python-sdk@*` tag,以避免和主包 tag 混淆。++## 正式主包发版流程++主包正式发版走根目录 GitHub Release:++1. 确认待发布改动已合入目标分支,且 PR / main 分支检查通过。+2. 创建主包 tag,例如 `v0.3.26`。+3. 在 GitHub 上基于该 tag 发布 Release。+4. `03. Release` workflow 会在 Release published 时触发。+5. workflow 复用 `_Build Distribution` 构建 sdist 和多平台 wheel。+6. workflow 将构建产物发布到 PyPI。+7. workflow 构建并推送多架构 Docker 镜像。+8. `Release TOS Upload` workflow 会上传源码 zip 和安装脚本到 TOS。++正式主发版的发布目标包括:++- PyPI:`openviking`+- GHCR:`ghcr.io/<owner>/<repo>`+- Docker Hub:`<dockerhub-user>/openviking`+- TOS:版本化 release 路径和可选 `latest` 稳定路径++## 主包手动构建、测试发布与补发++根目录 release workflow 也支持手动触发,可选择发布目标:++- `none`:只构建,不发布。+- `testpypi`:发布到 TestPyPI。+- `pypi`:发布到 PyPI。+- `both`:同时发布 TestPyPI 和 PyPI。++如需基于已有构建产物补发 Python 包,可使用 `_Publish Distribution` workflow,并传入对应的 build run id。该流程适合发布失败后的补发,不建议作为正常主发版入口。++## Docker 镜像发布与补发++正式主发版时,Docker 镜像由主 release workflow 自动构建并发布。镜像会推送到 GHCR 和 Docker Hub,并在正式 release 下写入版本 tag 与 `latest` tag。++仓库还提供独立的 `Build and Push Docker Image` workflow,适用于:++- 手动指定版本重建镜像。+- `main` 分支镜像构建。+- tag 触发后的镜像补发。++注意:独立 Docker workflow 当前也会在 `v*.*.*` tag push 时自动触发。正式 GitHub Release 的发布口径仍以 `03. Release` workflow 为准;独立 Docker workflow 应视为镜像专用构建或补发路径,避免与正式 release 产物口径混淆。++为避免重复发布,正式版本优先使用主 release workflow;只有镜像补发或特殊验证时才使用独立 Docker workflow。++## TOS 发布资产++TOS 发布流程会生成源码 zip,并上传以下类型资产:++- `releases/<tag>/openviking-<tag>-source.zip`+- Claude Code memory plugin 安装脚本+- Codex memory plugin 安装脚本+- 对应 TOS install 脚本++正式 GitHub Release 会自动触发 TOS 上传。手动补发时可指定 tag,并通过 `update_latest` 决定是否覆盖稳定路径。++如果 TOS 相关 secrets 未配置完整,workflow 会跳过上传并在 step summary 中说明,不会使整个流程失败。++## Python SDK 发版流程++Python SDK 位于 `sdk/python`,PyPI 包名为 `openviking-sdk`。SDK 使用独立 tag 命名空间:++```text+```++典型流程:++1. 合入 SDK 相关改动。+2. 创建并推送 tag,例如 `[email protected]`。+3. `Python SDK Release` workflow 被 tag 触发。+4. workflow 使用 `setuptools_scm` 解析 SDK 版本。+5. workflow 校验当前 tag 是否等于 `python-sdk@<resolved-version>`。+6. workflow 构建 `sdk/python` 并发布到 PyPI。++SDK workflow 也支持手动触发,并可选择 `testpypi`、`pypi` 或 `both`。手动触发适合验证和补发;正式 SDK 发版建议使用 `[email protected]` tag。++## Rust CLI / npm 发版流程++Rust CLI 的 tag 格式为:++```text+```++推送 `cli@*` tag 后,`Rust CLI Build` workflow 会为多个平台构建 `ov` 二进制,并发布 npm 包:++- 平台包:`@openviking/cli-linux-x64`、`@openviking/cli-linux-arm64`、`@openviking/cli-darwin-x64`、`@openviking/cli-darwin-arm64`、`@openviking/cli-win32-x64`+- wrapper 包:`@openviking/cli`++workflow 会把 tag 中的版本写入平台包和 wrapper 包。如果 npm 上已存在同版本包,workflow 会跳过已发布版本。++## OpenClaw / ClawHub 插件发布++OpenClaw 插件通过 `ClawHub release (OpenViking plugin)` workflow 手动发布。输入参数包括:++- `version`:可选;为空时由 workflow 按日期自动生成。+- `channel`:`auto`、`dev` 或 `latest`。+- `changelog`:本次插件发布说明。++workflow 会先解析 channel 和 version,再打包 `examples/openclaw-plugin`,推送生成的 package branch,最后调用 ClawHub 官方 trusted publishing workflow 发布。++推荐做法:++- 正式渠道使用 `latest` 或 `auto`。+- 开发验证使用 `dev`。+- 手动指定 version 时,确保符合对应 channel 的格式要求。++## VikingBot 发布说明++VikingBot 当前不再作为推荐的独立 PyPI 包发版路径维护。现行分发方式是随主包发布:++- Python 安装入口:`pip install "openviking[bot]"`。+- 源码开发入口:`uv pip install -e ".[bot]"`。+- 官方 Docker 镜像默认已包含 VikingBot,可通过 `--without-bot` 或 `OPENVIKING_WITH_BOT=0` 关闭。++根仓库中仍保留 `First Release to PyPI` workflow,但它会在 `bot` 目录执行独立 Python 包构建;当前 `bot/` 目录没有独立的 `pyproject.toml`、`setup.py` 或 `setup.cfg`,因此该 workflow 应视为历史遗留配置,不建议用于新的 VikingBot 发版。++同时,`bot/.github/workflows/release.yml` 位于 `bot` 子目录,它应视为历史上的 bot 子项目或拆分仓库发布参考,不应当作根仓库当前可直接触发的 GitHub Actions workflow。如需恢复独立 `vikingbot` 包,需要先补齐 `bot/` 下独立 Python 包配置、版本策略和发布凭证策略。++## 发版前检查清单++发版前建议逐项确认:++- 待发布改动已合入目标分支。+- CI / PR 检查已通过。+- 版本号未在 PyPI、npm 或 Docker registry 中发布过。+- tag 命名符合对应产物约定。+- Python 包依赖、构建配置和 README 已同步更新。+- Docker Hub、PyPI/TestPyPI、TOS、npm、ClawHub 等发布所需 secrets 或 trusted publishing 配置可用。+- Release notes 已准备好,且说明破坏性变更、迁移步骤和重要修复。++## 发版后验证清单++发版后建议验证:++- PyPI / TestPyPI 上的包版本与 tag 一致。+- `pip install openviking==<version>` 或 `pip install openviking-sdk==<version>` 可成功安装。+- Docker registry 中存在版本 tag 和预期的 `latest` / `main` tag。+- 多架构 Docker manifest 可正常拉取。+- TOS 版本化路径和稳定路径可访问。+- npm 上存在对应 CLI 平台包和 wrapper 包。+- ClawHub 插件 channel 和 version 符合预期。++## 故障处理与补发原则++- PyPI 和 npm 已发布版本通常不可覆盖;如包内容有误,应发布新版本。+- Docker 的 `latest`、`main` 和手动指定 tag 可通过镜像补发 workflow 重建,但应保留已发布版本 tag 的可追溯性。+- TOS 的版本化路径应视为不可变资产;稳定路径可通过手动 workflow 覆盖。+- 如果构建成功但发布失败,优先使用补发 workflow 或手动 dispatch,避免重新创建不同内容的同名 tag。+- 如 tag 命名错误,优先删除错误 tag 并重新创建正确 tag,前提是该 tag 尚未触发不可逆发布。diff --git a/build_support/versioning.py b/build_support/versioning.pyindex b41991aa5..65261ff8b 100644--- a/build_support/versioning.py+++ b/build_support/versioning.py@@ -4,7 +4,8 @@ import osfrom pathlib import Pathfrom typing import Mapping-SCM_TAG_REGEX = r"^(?:v)?(?:[a-zA-Z0-9_]+@)?(?P<version>[0-9]+(?:\.[0-9]+)*)$"+SCM_TAG_REGEX = r"^v(?P<version>[0-9]+(?:\.[0-9]+)*)$"+SCM_GIT_DESCRIBE_COMMAND = "git describe --dirty --tags --long --match v[0-9]*"PROJECT_ROOT = Path(__file__).resolve().parent.parent@@ -16,6 +17,7 @@ def _get_scm_version(project_root: Path) -> str:relative_to=__file__,local_scheme="no-local-version",tag_regex=SCM_TAG_REGEX,+ git_describe_command=SCM_GIT_DESCRIBE_COMMAND,)diff --git a/pyproject.toml b/pyproject.tomlindex 3c5924960..b36c306e2 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -211,6 +211,7 @@ vikingbot = "vikingbot.cli.commands:app"write_to = "openviking/_version.py"local_scheme = "no-local-version"tag_regex = "^v(?P<version>[0-9]+(?:\\.[0-9]+)*)$"+git_describe_command = "git describe --dirty --tags --long --match v[0-9]*"[tool.setuptools.packages.find]where = [".", "bot"]diff --git a/sdk/python/README.md b/sdk/python/README.mdindex 80f7d15c1..4344a999c 100644--- a/sdk/python/README.md+++ b/sdk/python/README.md@@ -259,7 +259,7 @@ python -m buildThe SDK version is derived from git tags with this format:```text-python-sdk/v0.1.3```That tag namespace is independent from the main package release tags such as:@@ -275,6 +275,6 @@ The repository is configured so SDK releases can be driven by SDK-only tags.Typical flow:1. Merge SDK changes.-2. Create and push a tag like `python-sdk/v0.1.3`.+2. Create and push a tag like `[email protected]`.3. GitHub Actions builds `sdk/python`.4. GitHub Actions publishes `openviking-sdk` to PyPI.diff --git a/sdk/python/README_CN.md b/sdk/python/README_CN.mdindex 1f0ec1a5e..3c84adac1 100644--- a/sdk/python/README_CN.md+++ b/sdk/python/README_CN.md@@ -259,7 +259,7 @@ python -m buildSDK 版本号来自以下格式的 git tag:```text-python-sdk/v0.1.3```这个 tag 命名空间独立于主包的发布 tag,例如:@@ -275,6 +275,6 @@ v0.3.26典型流程:1. 合并 SDK 相关改动-2. 创建并推送类似 `python-sdk/v0.1.3` 的 tag+2. 创建并推送类似 `[email protected]` 的 tag3. GitHub Actions 构建 `sdk/python`4. GitHub Actions 将 `openviking-sdk` 发布到 PyPIdiff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.tomlindex c28f9a5b4..315ab9413 100644--- a/sdk/python/pyproject.toml+++ b/sdk/python/pyproject.toml@@ -22,5 +22,5 @@ include = ["openviking_sdk*"][tool.setuptools_scm]root = "../.."local_scheme = "no-local-version"-tag_regex = "^python-sdk/v(?P<version>[0-9]+(?:\\.[0-9]+)*)$"-git_describe_command = "git describe --dirty --tags --long --match python-sdk/v*"+tag_regex = "^python-sdk@(?P<version>[0-9]+(?:\\.[0-9]+)*)$"+git_describe_command = "git describe --dirty --tags --long --match python-sdk@*"diff --git a/tests/misc/test_release_tag_selection.py b/tests/misc/test_release_tag_selection.pynew file mode 100644index 000000000..9ef9b36a4--- /dev/null+++ b/tests/misc/test_release_tag_selection.py@@ -0,0 +1,46 @@+import sys+from pathlib import Path+from types import ModuleType++ROOT = Path(__file__).resolve().parents[2]+++def test_main_package_versioning_ignores_non_main_release_tags() -> None:+ pyproject = (ROOT / "pyproject.toml").read_text()++ assert 'tag_regex = "^v(?P<version>[0-9]+(?:\\\\.[0-9]+)*)$"' in pyproject+ assert (+ 'git_describe_command = "git describe --dirty --tags --long --match v[0-9]*"' in pyproject+ )+++def test_python_sdk_versioning_uses_sdk_only_at_sign_tags() -> None:+ pyproject = (ROOT / "sdk/python/pyproject.toml").read_text()++ assert 'tag_regex = "^python-sdk@(?P<version>[0-9]+(?:\\\\.[0-9]+)*)$"' in pyproject+ assert (+ 'git_describe_command = "git describe --dirty --tags --long --match python-sdk@*"'+ in pyproject+ )+ assert "python-sdk/v" not in pyproject+++def test_build_support_versioning_uses_main_release_tags_only(monkeypatch) -> None:+ from build_support import versioning++ captured_kwargs = {}+ fake_setuptools_scm = ModuleType("setuptools_scm")++ def fake_get_version(**kwargs):+ captured_kwargs.update(kwargs)+ return "0.3.18"++ fake_setuptools_scm.get_version = fake_get_version+ monkeypatch.setitem(sys.modules, "setuptools_scm", fake_setuptools_scm)++ assert versioning._get_scm_version(ROOT) == "0.3.18"+ assert captured_kwargs["tag_regex"] == r"^v(?P<version>[0-9]+(?:\.[0-9]+)*)$"+ assert (+ captured_kwargs["git_describe_command"]+ == "git describe --dirty --tags --long --match v[0-9]*"+ )