Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: uv run python scripts/check_forge_msgs_schema.py

- name: Run Python tests
run: uv run pytest packages/common/tests packages/msgs/tests packages/policy/tests packages/robot/tests packages/kinematics/tests packages/tool/tests
run: uv run pytest packages/common/tests packages/msgs/tests packages/policy/tests packages/robot/tests packages/kinematics/tests packages/tool/tests scripts/tests

- name: Build and validate all Python distributions
run: uv run python scripts/build_python_distributions.py
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
tag:
description: "Immutable family tag to publish (for example, forge-common-v2.0.0)"
description: "Existing annotated family tag (for example, forge-msgs-v2.1.0); this input does not create a tag"
required: true
type: string

Expand All @@ -19,6 +19,8 @@ concurrency:
jobs:
resolve:
runs-on: ubuntu-latest
permissions:
contents: read

outputs:
tag: ${{ steps.release.outputs.tag }}
Expand All @@ -32,6 +34,7 @@ jobs:
shell: bash
env:
REQUESTED_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail

Expand All @@ -43,6 +46,15 @@ jobs:
family="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}.${BASH_REMATCH[3]}.${BASH_REMATCH[4]}"

if ! tag_type=$(gh api "repos/${GITHUB_REPOSITORY}/git/ref/tags/${REQUESTED_TAG}" --jq '.object.type'); then
echo "::error::Release tag '${REQUESTED_TAG}' does not exist or cannot be read. Run workflow does not create tags. Create the annotated family tag on the reviewed release commit before retrying." >&2
exit 1
fi
if [[ "$tag_type" != "tag" ]]; then
echo "::error::Release '${REQUESTED_TAG}' must be an annotated tag; a lightweight tag is not supported." >&2
exit 1
fi

echo "tag=$REQUESTED_TAG" >> "$GITHUB_OUTPUT"
echo "family=$family" >> "$GITHUB_OUTPUT"
echo "version=$version" >> "$GITHUB_OUTPUT"
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ Forge package families are versioned independently. Python, Rust, and C++ implem

## Unreleased

### forge-msgs 2.0.1
## forge-msgs 2.1.0 - 2026-11-12

Family tag: `forge-msgs-v2.1.0`

- Require Pillow 13 (`>=13.0.0,<14`) for the Python compressed-image codec to consume its security fixes. Python 3.11 remains supported.
- Cover RGB/grayscale JPEG, PNG and WebP codecs, strided arrays, malformed input, and exact raw-depth round trips without changing the Arrow wire schema.
- Keep Msgs package-family versions synchronized across Python, Rust and C++; Rust/C++ codec behavior and the `forge_msgs.v1` interface are unchanged.
- Publish as the independently versioned `forge-msgs-v2.1.0` family tag. The earlier 2.0.1 candidate was not released to PyPI.
- Reject nonexistent and lightweight release tags before checkout, with an actionable error for manual workflow runs.

## forge-common 2.1.0 - 2026-09-08

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages, for example a separate `forge_robots` repository.
## Status

Forge tracks six package families: Common, Msgs, Robot, Policy, Kinematics, and Tool.
Common is `2.1.0`; Msgs is `2.0.1`; Robot, Policy, Kinematics and Tool remain
Common is `2.1.0`; Msgs is `2.1.0`; Robot, Policy, Kinematics and Tool remain
at the coordinated Dora 1.x `2.0.0` baseline. Families can receive independent minor and patch releases.
Package versions within one family remain synchronized across languages;
capabilities may differ, and language-neutral interface versions are tracked
Expand Down Expand Up @@ -321,6 +321,13 @@ Local release-family mode rejects dirty trees and requires the expected protecte
tag not to exist. A family tag CI run selects that family automatically and
requires its tag to exist and point to the checked-out `HEAD`.

For the Python Msgs release, use the annotated tag `forge-msgs-v2.1.0` on the
reviewed, merged release commit. Creating that tag in `PhyAgentOS/forge` triggers
`publish-pypi.yml`. Manually entering a tag in **Run workflow** does not create it;
the workflow rejects missing or lightweight tags before checking out the release.
PyPI Trusted Publishing must authorize `PhyAgentOS/forge`, workflow
`publish-pypi.yml`, environment `pypi-msgs`. See [RELEASING.md](RELEASING.md).

Run the C++ tests:

```bash
Expand Down
8 changes: 7 additions & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Forge 是面向 Dora 数据流的机器人基础框架,提供公共消息 sche
## 版本状态

Forge 按 Common、Msgs、Robot、Policy、Kinematics、Tool 六个包家族维护。
Common 为 `2.1.0`,Msgs 为 `2.0.1`;Robot、Policy、Kinematics、Tool 保持 Dora 1.x 对齐的 `2.0.0` 基线。
Common 为 `2.1.0`,Msgs 为 `2.1.0`;Robot、Policy、Kinematics、Tool 保持 Dora 1.x 对齐的 `2.0.0` 基线。
各家族可独立发布次版本和修订版本;同一家族跨语言包版本保持一致,
实际能力允许不同,语言无关接口版本另行跟踪。

Expand Down Expand Up @@ -283,6 +283,12 @@ uv run python scripts/build_python_distributions.py --release-family msgs
本地家族发布模式拒绝脏工作区,并要求预期受保护标签尚不存在。
家族标签 CI 自动选择该家族,并要求标签已存在且指向当前 `HEAD`。

Python Msgs 本次发布使用附注标签 `forge-msgs-v2.1.0`,指向已审核并合并的发布提交。
在 `PhyAgentOS/forge` 创建该标签会自动触发 `publish-pypi.yml`。
在 **Run workflow** 填写标签名称不会创建标签;流水线会在检出前拒绝不存在或轻量标签。
PyPI Trusted Publishing 应绑定 `PhyAgentOS/forge`、工作流 `publish-pypi.yml`、
环境 `pypi-msgs`。详细流程见 [RELEASING.md](RELEASING.md)。

运行 C++ 测试:

```bash
Expand Down
12 changes: 9 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Forge is a Monorepo with independently versioned logical package families. Imple
```toml
[packages]
common = "2.1.0"
msgs = "2.0.0"
msgs = "2.1.0"
robot = "2.0.0"
policy = "2.0.0"
kinematics = "2.0.0"
Expand Down Expand Up @@ -245,14 +245,20 @@ Environment per package family and add the matching trusted publisher to each
PyPI project (or as a pending publisher before the first upload). For Msgs:

```text
Owner: Forgelab-Robotics
Owner: PhyAgentOS
Repository: forge
Workflow: publish-pypi.yml
Environment: pypi-msgs
```

Existing release tags can be published with `workflow_dispatch` by entering the
full immutable family tag. Future `forge-*-v*` tag pushes trigger the same
full immutable family tag. Entering a name does not create its tag. Create an
annotated tag on the reviewed, merged release commit first; for the current Msgs
candidate the package version is `2.1.0` and its tag is `forge-msgs-v2.1.0`.
The resolver rejects absent and lightweight tags before checkout. A tag whose
version differs from `versions.toml` is also rejected. Do not move an existing tag.

Future `forge-*-v*` tag pushes trigger the same
workflow automatically. In both cases the workflow checks out and verifies the
annotated tag, builds only that family, stores the artifacts for audit, and
publishes only its wheel and source archive.
Expand Down
2 changes: 1 addition & 1 deletion cpp/forge_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20)

project(forge_msgs_cpp VERSION 2.0.1 LANGUAGES CXX)
project(forge_msgs_cpp VERSION 2.1.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
2 changes: 1 addition & 1 deletion crates/forge_msgs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "forge_msgs"
version = "2.0.1"
version = "2.1.0"
edition.workspace = true
license.workspace = true
authors.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion packages/msgs/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "forge-msgs"
version = "2.0.1"
version = "2.1.0"
description = "Python message models and Arrow serialization for Forge robotics dataflows."
readme = "README.md"
authors = [
Expand Down
55 changes: 55 additions & 0 deletions scripts/tests/test_publish_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
"""Exercise the actual release resolver against remote tag API outcomes."""
import os
from pathlib import Path
import subprocess

import pytest
import yaml

ROOT = Path(__file__).resolve().parents[2]


@pytest.mark.parametrize(
"tag_type,api_status,expected_status",
[("tag", 0, 0), ("commit", 0, 1), ("", 1, 1)],
ids=["annotated-tag", "lightweight-tag", "missing-tag"],
)
def test_release_resolver_rejects_missing_or_lightweight_tags(
tmp_path, tag_type, api_status, expected_status
):
workflow = yaml.safe_load((ROOT / ".github/workflows/publish-pypi.yml").read_text())
script = workflow["jobs"]["resolve"]["steps"][0]["run"]
fake_gh = tmp_path / "gh"
fake_gh.write_text(
'#!/bin/sh\nprintf "%s\\n" "$FAKE_TAG_TYPE"\nexit "$FAKE_API_STATUS"\n'
)
fake_gh.chmod(0o755)
output = tmp_path / "output"
result = subprocess.run(
["bash", "-c", script],
env={
**os.environ,
"PATH": str(tmp_path) + os.pathsep + os.environ["PATH"],
"GITHUB_REPOSITORY": "PhyAgentOS/forge",
"REQUESTED_TAG": "forge-msgs-v2.1.0",
"GITHUB_OUTPUT": str(output),
"GH_TOKEN": "unused-test-token",
"FAKE_TAG_TYPE": tag_type,
"FAKE_API_STATUS": str(api_status),
},
capture_output=True,
text=True,
check=False,
)
assert result.returncode == expected_status, result.stderr
if expected_status == 0:
values = dict(line.split("=", 1) for line in output.read_text().splitlines())
assert values == {
"tag": "forge-msgs-v2.1.0",
"family": "msgs",
"version": "2.1.0",
"distribution": "forge-msgs",
}
else:
assert "annotated" in result.stderr
assert not output.exists()
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schema_version = 1

[packages]
common = "2.1.0"
msgs = "2.0.1"
msgs = "2.1.0"
robot = "2.0.0"
policy = "2.0.0"
kinematics = "2.0.0"
Expand Down
Loading