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
4 changes: 2 additions & 2 deletions .agents/skills/option-berth-delivery/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ worktree、提交信息与用户确认的规则不变。
## 发布

发布和普通改动走同一条 PR 路径:版本 PR 只改 `VERSION`(协议版本发布同时改
`ProtocolVersion` 与生成的 schema),合并后在合并提交上创建注释标签 `vX.Y.Z` 与
`engine/vX.Y.Z` 并推送。`Verified release` 在 runner 上跑完整门槛,通过后才构建和发布资产。
`ProtocolVersion` 与生成的 schema),合并后在合并提交上创建注释标签 `vX.Y.Z` 并推送。
`Verified release` 在 runner 上跑完整门槛,通过后才构建和发布资产。
本机不再有创建版本提交、打标签或推送的快捷入口;`scripts/release.py` 只保留
`--verify-only` 与 `--validate-tag`。打标签仍是发布动作,需要单独授权。
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Windows (PowerShell):
irm https://raw.githubusercontent.com/SheathedSharp/option-berth/main/install.ps1 | iex
```

Homebrew, `go install`, Linux `.deb`/`.rpm`, pinned versions, uninstall, upgrades and the platform
Homebrew, Linux `.deb`/`.rpm`, pinned versions, uninstall, upgrades and the platform
boundaries are in [Install and uninstall](docs/install.md). The scripts only download and verify release
archives: they start no service and write no Git data.

Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Windows(PowerShell):
irm https://raw.githubusercontent.com/SheathedSharp/option-berth/main/install.ps1 | iex
```

Homebrew、`go install`、Linux `.deb`/`.rpm`、固定版本、卸载、升级与各平台边界见
Homebrew、Linux `.deb`/`.rpm`、固定版本、卸载、升级与各平台边界见
[安装与卸载](docs/install.zh.md)。安装脚本只下载并校验发布包:不启动服务,也不写 Git。

直接运行 `oberth` 会显示本机版本;有更新时给出本平台的升级命令。也可以随时运行
Expand Down
11 changes: 3 additions & 8 deletions docs/agent/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ This repository's release assets are the engine only:

No macOS application, DMG, notarized bundle, client screenshot or skill installer is published here.

The engine module path is `github.com/sheathedsharp/option-berth/engine`;
`go install github.com/sheathedsharp/option-berth/engine/cmd/oberth@vX.Y.Z` builds straight from the
Git tag without going through release assets and without needing an extra module repository.

The install entry points are `install.sh` (macOS/Linux) and `install.ps1` (Windows) at the repository
root, plus the matching `uninstall.sh` / `uninstall.ps1`; they are not release assets and are served
from `main`:
Expand Down Expand Up @@ -62,9 +58,8 @@ maintained only in their own repositories.

The product version is **X1.X2.X3**, and the root `VERSION` file is the single source of the engine
version (no `v`). Git tags use `vX1.X2.X3`, must be annotated, and must point at a verified commit that
belongs to `main`'s history. Every release also creates an annotated `engine/vX1.X2.X3` tag on the same
commit; it is the Go version tag for the `engine/` submodule, and
`go install .../engine/cmd/oberth@vX1.X2.X3` depends on it.
belongs to `main`'s history. The release assets are the only install channel the tag drives: the engine
is not published as a Go module, and a release creates no `engine/` tag.

| Change | Step | Example |
| --- | --- | --- |
Expand Down Expand Up @@ -101,7 +96,7 @@ pushing; `scripts/release.py` keeps only `--verify-only` and `--validate-tag` fo
1. Branch from `main`, change only `VERSION` (a protocol release also changes `ProtocolVersion` and
regenerates the schema), commit `chore(release): vX.Y.Z`, and open a PR.
2. Once the PR's required checks pass and it is confirmed, merge with a merge commit.
3. Create the annotated tags `vX.Y.Z` and `engine/vX.Y.Z` on the merge commit and push them.
3. Create the annotated tag `vX.Y.Z` on the merge commit and push it.
4. `Verified release` runs `policy` / `verify` / `windows` / `package` / `publish` against the tag,
executing the same gates as `scripts/release.py --verify-only` on the runner, and only then builds
assets and promotes the draft.
Expand Down
5 changes: 0 additions & 5 deletions docs/agent/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,6 @@ releases API, and do not contact real GitHub; cache reads and writes use a tempo
automatic check on the first screen is enabled only in terminal sessions, and does not fire when the
test process's stdout is not a terminal.

`scripts/go_install_test.py` runs a real `go install` through a local file module proxy, installing
`engine/cmd/oberth` and `engine/cmd/jev-attention`, and verifies that `version --json` uses the
module version. This validates the module paths, the binary name of `cmd/oberth`, and the version
fallback when `go install` does not go through `-ldflags`.

The Linux package tests generate `.deb`/`.rpm` from fixture archives with `nfpm` and check control
fields, install paths, license, and md5sums; when `dpkg-deb` is available the package is read with
dpkg, and when `rpm` is available the package contents are listed. `nfpm` does not depend on
Expand Down
26 changes: 0 additions & 26 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,6 @@ The Windows installer supports the same mirror fallback, and can also be launche
irm https://ghfast.top/https://raw.githubusercontent.com/SheathedSharp/option-berth/main/install.ps1 | iex
```

`go install` does not go through release assets, so a Go module proxy suffices and checksums are still
verified:

```sh
GOPROXY=https://goproxy.cn go install github.com/sheathedsharp/option-berth/engine/cmd/oberth@latest
```

Setting only `GOPROXY` is enough: Go verifies the module through the proxy's `/sumdb/` endpoint. Do not
append `,direct` — when the proxy misses, Go falls back to a direct GitHub connection, which is the path
that times out; `GOSUMDB=off` is unnecessary too.

A third-party proxy can see download traffic and can be replaced. When you need a strict origin, pin the
version with `--version` and compare against the `SHA256SUMS` in Releases; release-archive signature
verification is not available yet.
Expand All @@ -96,18 +85,6 @@ Pin a version or leave PATH alone: `.\install.ps1 -Version v1.0.0 -NoModifyPath`
Before replacing files, the Windows installer checks whether `oberth` / `jev-attention` are running; if
they are, it runs `oberth daemon stop` first and then reinstalls.

## go install (Go 1.25+)

```sh
go install github.com/sheathedsharp/option-berth/engine/cmd/oberth@latest

# Optional Jev adapter
go install github.com/sheathedsharp/option-berth/engine/cmd/jev-attention@latest
```

This needs v1.1.2 or later. Pin a version with `@v1.1.2`. The binaries land in `$(go env GOPATH)/bin`
(or `GOBIN`), which must be on PATH.

## Homebrew

A self-hosted tap, so there is no need to wait for homebrew-core inclusion. It installs the engine CLI
Expand Down Expand Up @@ -182,9 +159,6 @@ The uninstaller:
- Removes the exact line the installer wrote into a shell startup file (only that line; other PATH
configuration is untouched).

Binaries installed by `go install` are not managed by these uninstallers: delete
`$(go env GOPATH)/bin/oberth` and `jev-attention` directly; runtime state is handled as below.

By default it **keeps** `~/.option-berth` runtime state (database, logs, runs, configuration). When you
are sure it is no longer needed:

Expand Down
24 changes: 0 additions & 24 deletions docs/install.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ Windows 安装器同样支持镜像回退,也可以用代理入口启动:
irm https://ghfast.top/https://raw.githubusercontent.com/SheathedSharp/option-berth/main/install.ps1 | iex
```

`go install` 不经过 Release 资产,改用 Go 模块代理即可,校验和仍会核对:

```sh
GOPROXY=https://goproxy.cn go install github.com/sheathedsharp/option-berth/engine/cmd/oberth@latest
```

只设 `GOPROXY` 就够了:Go 会通过代理的 `/sumdb/` 端点校验模块。不要追加 `,direct`,
代理未命中时会回落到直连 GitHub,也就是超时的那条路径;也不需要 `GOSUMDB=off`。

第三方代理能看到下载流量,也可能被替换。需要严格来源时用 `--version` 固定版本,并对照
Releases 里的 `SHA256SUMS`;发布包签名校验尚未提供。

Expand All @@ -89,18 +80,6 @@ irm https://raw.githubusercontent.com/SheathedSharp/option-berth/main/install.ps
Windows 安装器在替换文件前会检查 `oberth` / `jev-attention` 是否正在运行;
正在运行就先执行 `oberth daemon stop`,再重新安装。

## go install(Go 1.25+)

```sh
go install github.com/sheathedsharp/option-berth/engine/cmd/oberth@latest

# Optional Jev adapter
go install github.com/sheathedsharp/option-berth/engine/cmd/jev-attention@latest
```

需要 v1.1.2 或更新版本。固定版本用 `@v1.1.2`。二进制进 `$(go env GOPATH)/bin`(或 `GOBIN`),
该目录需要在 PATH 中。

## Homebrew

自建 tap,不需要等 homebrew-core 收录。它安装引擎 CLI(`oberth` 和 `jev-attention`),
Expand Down Expand Up @@ -170,9 +149,6 @@ irm https://raw.githubusercontent.com/SheathedSharp/option-berth/main/uninstall.
- 删除安装器放在 `~/.local/share/option-berth` 的许可与构建清单;
- 删除安装器写进 shell 启动文件的那一行(只删自己写的精确行,不动其他 PATH 配置)。

`go install` 安装的二进制不由这些卸载器管理:直接删除 `$(go env GOPATH)/bin/oberth` 与
`jev-attention`;运行状态的处理与下面相同。

默认**保留** `~/.option-berth` 运行状态(数据库、日志、runs、配置)。确认不再需要时:

```sh
Expand Down
6 changes: 3 additions & 3 deletions engine/internal/buildinfo/buildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ func VersionString() string {

// VersionValue returns the normalized SemVer value stamped into this build.
//
// `go install module@version` does not apply this package's link flags, so the
// stamped value stays "dev". In that case the module version is still available
// through the build info and is what a user expects `oberth version` to show.
// A build that does not apply this package's link flags leaves the stamped
// value at "dev". In that case the module version is still available through
// the build info and is what a user expects `oberth version` to show.
// Development builds keep their explicit `dev` marker.
func VersionValue() string {
return versionValue(Version, debug.ReadBuildInfo)
Expand Down
4 changes: 2 additions & 2 deletions engine/internal/buildinfo/buildinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ func TestVersionValueFallsBackToModuleVersion(t *testing.T) {
}{
{name: "linked version wins", stamped: "1.2.3", read: installed, want: "v1.2.3"},
{name: "linked v prefix is kept", stamped: "v1.2.3", read: installed, want: "v1.2.3"},
{name: "go install falls back to module version", stamped: "dev", read: installed, want: "v1.2.3"},
{name: "go install normalizes bare module version", stamped: "dev", read: func() (*debug.BuildInfo, bool) {
{name: "unstamped build falls back to module version", stamped: "dev", read: installed, want: "v1.2.3"},
{name: "unstamped build normalizes bare module version", stamped: "dev", read: func() (*debug.BuildInfo, bool) {
return &debug.BuildInfo{Main: debug.Module{Version: "1.2.3"}}, true
}, want: "v1.2.3"},
{name: "development build keeps dev", stamped: "dev", read: devel, want: "dev"},
Expand Down
4 changes: 2 additions & 2 deletions engine/internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ var rootCmd = &cobra.Command{
}
printWelcome(cmd.OutOrStdout(), welcomeVersion())
// The first screen is the only place the product asks. It is also the
// only place that reaches every install channel — the scripts, brew,
// deb/rpm and `go install` all end up running this binary.
// only place that reaches every install channel — the scripts, brew and
// deb/rpm all end up running this binary.
askFeedbackOnce()
return nil
},
Expand Down
72 changes: 0 additions & 72 deletions scripts/go_install_test.py

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ def validate_tag(root: Path, tag: str) -> None:
raise ValueError("release tag must be annotated")
if run(root, "git", "rev-parse", "refs/tags/" + tag + "^{commit}") != run(root, "git", "rev-parse", "HEAD"):
raise ValueError("checkout is not the tagged commit")
module_tag = "engine/" + tag
if run(root, "git", "cat-file", "-t", "refs/tags/" + module_tag) != "tag":
raise ValueError("engine module tag must be annotated")
if run(root, "git", "rev-parse", "refs/tags/" + module_tag + "^{commit}") != run(root, "git", "rev-parse", "HEAD"):
raise ValueError("engine module tag does not point at the tagged commit")
run(root, "git", "merge-base", "--is-ancestor", "HEAD", "origin/main")


Expand Down
Loading