Skip to content

chore(release): 1.0.0 - #176

Merged
TN019 merged 13 commits into
mainfrom
chore/release-1.0.0
Dec 1, 2026
Merged

TN019 merged 13 commits into
mainfrom
chore/release-1.0.0

Conversation

@TN019

@TN019 TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Why

Cut 1.0.0: set the version, publish the changelog and security policy, and fix what still blocked the release in the build image, the hub's mail credentials and the lab checks.

What changed

  • project(gatepost VERSION 1.0.0), so the packages are built as 1.0.0.
  • New CHANGELOG.md and SECURITY.md with Chinese versions; both READMEs link the 1.0.0 features and the security policy.
  • The hub's SMTP CA and password now come through LoadCredential= (mail-ca.pem, smtp-password), and config/hub.conf.example points at /run/credentials/gate-hub.service/. The packages page says so and names lab/keys.sh for test keys.
  • Dockerfile.build: Debian snapshot 20261030, then a separate apt-get upgrade from that snapshot after the tool packages are installed.
  • lab/monitoring-check.sh waits up to 90 s until gate1, gate2, north1 and north2 have tickets.txt.etag; lab/two-gate-scan.sh removes lab/runtime before it starts.
  • Formatting only: the Syft and Trivy commands in the release workflow, the CPack control lines and both launcher scripts.
  • Captures: new lab/captures/north-entrance/session.txt (MTU 1400 on the north-facing interface; north1 rejects a newly published ticket with not_in_list at opening, then accepts GP-900000000003 after installing the list; result: north1 ok and every cleanup check ok). lab/captures/device-tls/ now shows tickets=20000 and status=200 bytes=3488890; the offline-report session lists a third ACCEPT line.

How to verify

Requires Docker. From the repository root:

./scripts/dev.sh build-image
./scripts/dev.sh test release
docker run --rm -v "$PWD:/src" -w /src gatepost-build:current sh -c \
  'cmake --install build/release --prefix /tmp/gatepost-stage &&
   cpack --config build/release/CPackConfig.cmake -G DEB -B build/packages'
sh lab/keys.sh
docker compose -f lab/compose.yaml up -d --build
GATEPOST_GRAFANA_ADMIN_PASSWORD=$(openssl rand -hex 24) sh lab/monitoring-check.sh
sh lab/north-entrance.sh
docker compose -f lab/compose.yaml down -v

Set GATEPOST_GRAFANA_ADMIN_PASSWORD as shown: in this version the ticket-list wait runs through lab/monitoring.yaml, which refuses to load without it. Run lab/north-entrance.sh alone; it changes the router MTU and restores it.


背景

发布 1.0.0:设定版本号,发布更新记录和安全策略,并修好构建镜像、hub 邮件凭据和实验检查里仍挡住发布的问题。

改动

  • project(gatepost VERSION 1.0.0),软件包按 1.0.0 构建。
  • 新增 CHANGELOG.md、SECURITY.md 及中文版;两个 README 都链接到 1.0.0 的主要功能和安全策略。
  • hub 的 SMTP CA 和密码改由 LoadCredential= 传入(mail-ca.pem、smtp-password),config/hub.conf.example 指向 /run/credentials/gate-hub.service/。软件包文档同步说明,并把测试密钥的来源改为 lab/keys.sh。
  • Dockerfile.build:Debian 快照改为 20261030;装完工具包后,另起一步从这个快照执行 apt-get upgrade。
  • lab/monitoring-check.sh 最多等 90 秒,直到 gate1、gate2、north1、north2 都有 tickets.txt.etag;lab/two-gate-scan.sh 启动前先删除 lab/runtime。
  • 仅调整格式:发布工作流里的 Syft 和 Trivy 命令、CPack 控制文件那两行,以及两个启动脚本。
  • 记录:新增 lab/captures/north-entrance/session.txt(北向接口 MTU 1400;开门时 north1 以 not_in_list 拒绝新发布的票,装好新票单后放行 GP-900000000003;result: north1 ok,各项清理检查均通过)。lab/captures/device-tls/ 现在是 tickets=20000 和 status=200 bytes=3488890;离线报告记录里多了一行 ACCEPT。

怎么验证

需要 Docker。在仓库根目录运行:

./scripts/dev.sh build-image
./scripts/dev.sh test release
docker run --rm -v "$PWD:/src" -w /src gatepost-build:current sh -c \
  'cmake --install build/release --prefix /tmp/gatepost-stage &&
   cpack --config build/release/CPackConfig.cmake -G DEB -B build/packages'
sh lab/keys.sh
docker compose -f lab/compose.yaml up -d --build
GATEPOST_GRAFANA_ADMIN_PASSWORD=$(openssl rand -hex 24) sh lab/monitoring-check.sh
sh lab/north-entrance.sh
docker compose -f lab/compose.yaml down -v

请照上面设置 GATEPOST_GRAFANA_ADMIN_PASSWORD:这一版等待票单时经过 lab/monitoring.yaml,没有这个变量它拒绝加载。lab/north-entrance.sh 要单独运行,它会修改并还原路由器的 MTU。

Noah Williams and others added 13 commits October 30, 2026 14:45
…ist-version test

If the gate fetches the new list after the hub installs it and before the test reads the metrics, the assertion that the gate became stale does not hold. Pausing the gate while the hub changes its list removes that window.
Port 8444 served one connection at a time, so one client that stopped reading held /status and ticket fetches for every gate for seconds. It now hands accepted connections to a bounded queue of 16 served by four workers, closes and counts a connection when the queue is full, and keeps the 2 s step and 10 s connection deadlines. Port 8081 stays one thread for staff. The TLS slow-reader check in the status deadline test described the one-thread behaviour: status waited until the slow reader was cut; it now requires an answer within 1 s.
The hub now mails when the data centre is unreachable or the uplink watcher stops.
This review covers the north entrance ticket list failure, the lab reproductions, recovery work, and remaining limitations.
Clarify when extra tickets are needed to reproduce the sender hold.
This decision preserves path-MTU feedback and makes each gate's installed list visible. It also aligns the hub's served and decision lists and bounds the TLS status listener.

Co-authored-by: Yuki Tanaka <yuki.tanaka@elsworne.example>
Add the north entrance session and update the device TLS outputs and the
offline-report session from the release code, so the committed outputs match
1.0.0.
@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Wang Hao · reviewer

The build image now runs apt-get upgrade. Does the result depend on the day it is built?


构建镜像现在会执行 apt-get upgrade,结果会随构建日期变化吗?

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Yuki Tanaka · author

No. sources.list points only at the Debian snapshot 20261030 for both main and security, so the upgrade installs the updates in that snapshot, on top of the digest-pinned base.


不会。sources.list 的 main 和 security 都只指向 20261030 的 Debian 快照,升级装的是这个快照里的更新,基础镜像本身也按 digest 固定。

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Ben Carter · reviewer

Where does the hub read the SMTP password from now?


hub 现在从哪里读 SMTP 密码?

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Yuki Tanaka · author

From /run/credentials/gate-hub.service/smtp-password, which systemd fills from /etc/gatepost/credentials/smtp-password through LoadCredential=. The mail CA works the same way, and the example hub.conf uses both paths.


从 /run/credentials/gate-hub.service/smtp-password 读,systemd 通过 LoadCredential= 从 /etc/gatepost/credentials/smtp-password 填进去。邮件 CA 也一样,示例 hub.conf 用的就是这两个路径。

@TN019
TN019 merged commit 82b306d into main Dec 1, 2026
5 checks passed
@TN019
TN019 deleted the chore/release-1.0.0 branch December 1, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant