• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DarkiT / zcli
55%

Build:
DEFAULT BRANCH: master
Repo Added 24 Dec 2024 11:35AM UTC
Token 94xPsmzG6v0iHfFLmFaPQZFZeLZGIdSCE regen
Build 37 Last
Files 32
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • dependabot/go_modules/github.com/darkit/daemon-1.3.0
  • dependabot/go_modules/github.com/spf13/cobra-1.10.1
  • dependabot/go_modules/github.com/spf13/cobra-1.10.2
  • dependabot/go_modules/github.com/spf13/cobra-1.9.1
  • dependabot/go_modules/github.com/spf13/pflag-1.0.10
  • dependabot/go_modules/github.com/spf13/pflag-1.0.6
  • dependabot/go_modules/github.com/spf13/pflag-1.0.7
  • master

04 Sep 2026 10:16AM UTC coverage: 55.297% (+0.3%) from 54.986%
33862548068

push

github

cnb
fix(service): 保证强制退出定时器的排布先于运行收尾

Stop 原本在 stopMu 临界区之外排强制退出定时器,而 Run 的启动同样要持有
stopMu。两者没有顺序保证时,Run 可能在定时器排布之前就收尾:它的
cancelForceExit 空跑,随后排下的定时器再没有运行来取消,最终误触发强制
退出——把一个正常的进程杀掉。

「停止意图」修复(d58e0f7)之后这个问题被放大:Run 领受意图时会立即返回,
收尾大幅提早,竞争窗口随之变宽。实测 TestForceExit_CancelledBeforeTimeout
失败率 4/10(GitHub 线 2/10),此前 3 轮全绿只是运气。

修复方式是把 scheduleForceExit 移进 stopMu 临界区内,用锁序保证
「先排定时器、后收尾」,而不是用 running 之类的状态判断——后者会误伤
daemon 模式下「服务从未启动也要兜底强杀」的场景
(TestForceExit_DaemonOnly/daemon_schedules_force_exit 会失败)。

验证:
- go test -race -count=10 -run TestForceExit . → 0 失败(修复前 4/10)
- go test -race -count=3 ./... → 全绿,含 tests/e2e

6 of 6 new or added lines in 1 file covered. (100.0%)

226 existing lines in 5 files now uncovered.

2641 of 4776 relevant lines covered (55.3%)

50.67 hits per line

Relevant lines Covered
Build:
Build:
4776 RELEVANT LINES 2641 COVERED LINES
50.67 HITS PER LINE
Source Files on master
  • Tree
  • List 32
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
33862548068 master fix(service): 保证强制退出定时器的排布先于运行收尾 Stop 原本在 stopMu 临界区之外排强制退出定时器,而 Run 的启动同样要持有 stopMu。两者没有顺序保证时,Run 可能在定时器排布之前就收尾:它的 cancelForceExit 空跑,随后排下的定时器再没有运行来取消,最终误触发强制 退出——把一个正常的进程杀掉。 「停止意图」修复(d58e0f7)之后这个问题被放大:Run 领受意图时会立即返回, 收尾大幅提早,竞争窗口随之变宽。实测 TestFor... push 04 Sep 2026 10:18AM UTC cnb github
55.3
32235032360 master docs: README 补 v0.5.0 发布内容与新增依赖 API - 依赖类型部分补充 v0.5.0 新增导出:依赖构造函数 After/Before/Require/Want、 平台选项常量(OptionRestart 等)与 Ready()。 - 版本历史 v0.5.0 段补充本次发布内容:install/reinstall 带参透传、对抗审查 修复(CombineErrors 单错误原样返回 / AddCommand(nil) 防御 / ErrorAggregator... push 19 Aug 2026 08:56AM UTC cnb github
54.99
32234253943 master fix: 对抗审查修复三处边界问题并固化契约测试 全模块对抗测试审查发现并修复: 1. CombineErrors 单错误不再原样返回——errors.Join 对单个错误会额外包装 一层 joinError,破坏与原始错误的同一性(==/指针比较失效,v0.5.0 引入)。 现在:无错误返回 nil、单非 nil 错误原样返回、多个用 errors.Join 聚合。 2. (*Cli).AddCommand(nil) 直接 panic——cobra AddCommand... push 19 Aug 2026 08:47AM UTC cnb github
54.99
32233517630 master feat(service): install/reinstall 支持透传服务自启参数 背景:此前 ./app install client --a=111 --b=22 无法把自定义子命令+参数注册为 服务自启方式——pflag 对未知 flag 报错,白名单模式又静默吞掉 --a=111 这类 = 形式(pflag parseLongArg 对 split>=2 直接丢弃)。 实现:install/reinstall 关闭 flag 与 positional 的交错解析 (pfla... push 19 Aug 2026 08:38AM UTC cnb github
54.53
32232525590 master feat(service): install/reinstall 支持透传服务自启参数 背景:此前 ./app install client --a=111 --b=22 无法把自定义子命令+参数注册为 服务自启方式——pflag 对未知 flag 报错,白名单模式又静默吞掉 `--a=111` 这类 `=` 形式(pflag parseLongArg 对 split>=2 直接丢弃)。 改动: - install/reinstall 启用 DisableFlagParsing,命令后... push 19 Aug 2026 08:26AM UTC cnb github
54.51
32231127665 master docs: 修正版本历史标头至 v0.5.0 并补破坏性变更说明 原标头停留在 v0.2.1(当前),与已发布的 v0.4.0 及本次 v0.5.0 脱节; 将当前段修正为 v0.5.0 并列出相对 v0.4.x 的破坏性变更,便于升级方评估。 push 19 Aug 2026 08:09AM UTC cnb github
54.33
27956429724 master Merge pull request #8 from DarkiT/dependabot/go_modules/github.com/darkit/daemon-1.3.0 chore(deps): bump github.com/darkit/daemon from 1.2.5 to 1.3.0 push 22 Jun 2026 01:31PM UTC web-flow github
48.73
27932940496 dependabot/go_modules/github.com/darkit/daemon-1.3.0 chore(deps): bump github.com/darkit/daemon from 1.2.5 to 1.3.0 Bumps [github.com/darkit/daemon](https://github.com/darkit/daemon) from 1.2.5 to 1.3.0. - [Changelog](https://github.com/DarkiT/daemon/blob/master/CHANGELOG.md) - [Commits](https://gi... Pull #8 22 Jun 2026 06:05AM UTC web-flow github
48.73
27601638581 master ci: 升级 Go 版本至 1.25 push 16 Jun 2026 07:32AM UTC DarkiT github
48.8
20758478433 master feat: 按运行模式控制强制退出 push 06 Jan 2026 06:47PM UTC DarkiT github
40.79
See All Builds (37)

Badge your Repo: zcli

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc