Skip to content

chore(dev): 增加 Makefile 与安全的 gateway run/stop - #13

Merged
tbrandenburg merged 1 commit into
mainfrom
chore/makefile
Oct 25, 2026
Merged

tbrandenburg merged 1 commit into
mainfrom
chore/makefile

Conversation

@tbrandenburg

Copy link
Copy Markdown
Owner

Summary

为本 fork 增加 Makefile basic targets,并提供 gateway-only make run、make stop、make status。Run 在后台启动已有 CLI,继承 environment/.env,私有 logs/process metadata 保存在 run/gateway。不启动/停止 upstream,不隐式启用 exclusive,不改变 V2 API default 或部署边界。

Stop 使用 lifetime lock、boot/start-time/descriptor identity 与 native Linux pidfd 验证,只停止本 helper 管理的 gateway;不按进程名/端口 kill。make clean 只删除 build/test caches,保留 runtime state 和 databases。

Related issue

Closes #12。

候选 head:f287bc548e438117e46140491a31ef75c4e8be91。用户已授权验证后 normal merge 并清理该 feature branch;不删除 upstream contribution branches,不修改 release/tag。

Validation

  • make check:1031 passed / 0 failed;typing/lint/format/secret scan、coverage policy、build/wheel smoke 通过。
  • make conformance:8 passed / 0 failed。
  • 实际 make install、make lint、make build 通过。
  • 五个新 real-process tests 覆盖 run/duplicate/status/stop、missing auth、occupied port、unrelated live PID refusal、clean preserves runtime/database。
  • README 和 scripts index 已更新;测试使用临时 project、synthetic environment 和 ephemeral ports,没有操作已有 OpenCode/gateway。
  • 新增 helper/tests 的 ruff lint/format 通过;测试后未发现该 helper 遗留进程。

Compatibility and risk

run/stop/status 需要 Linux、支持 pidfd 的 kernel/libc;basic validation/build targets 使用既有 uv/scripts。是本地便利命令,不是 production supervisor。既有应用 src/ 无修改,原 private-exclusive profile/operator preconditions 不变。

Wrap existing validation/build commands and manage only the configured gateway with private logs, inherited lifetime locking and PID-descriptor identity checks. Preserve upstream processes, explicit V2 execution acknowledgement, runtime state and databases.

Refs #12
@tbrandenburg
tbrandenburg merged commit 7c67017 into main Oct 25, 2026
5 checks passed
@tbrandenburg
tbrandenburg deleted the chore/makefile branch October 25, 2026 21:08
@tbrandenburg

Copy link
Copy Markdown
Owner Author

已合并并清理 feature branch

#13 已 normal merge 到 fork main:7c67017cd863347995884064d87c61848d79c1be,merge tree 与测试候选 f287bc5 相同。

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.

增加 Makefile 与安全的 gateway run/stop 便利命令

1 participant