v0.35.1

arkohut/pensievev0.35.1May 14, 2026by arkohut

AI Summary

Fixes Windows login window flash and prevents multiple `record`/`watch` services from running simultaneously.

Key Highlights

  • VBS wrapper eliminates Windows login command-line window flash
  • New service lock prevents multiple record/watch instances from running
  • Restores dual PyPI publish path for memos and pensiev

Breaking Changes

  • Existing v0.35.0 users need to re-run `pen enable` to replace the shortcut

New Features

  • VBS-based hidden launcher for Windows startup
  • Atomic PID-file service lock using O_EXCL
  • Automated cleanup of stale PID files
  • CI/CD restoration of dual package publishing

Full Release Notes

## Bug Fixes

- Eliminate the command-line window flash that appeared at Windows login by @arkohut
  - The startup-folder shortcut now targets `wscript.exe` running a small `launch.vbs` wrapper, which calls `WshShell.Run launch.bat, 0, False` to launch the .bat in a fully hidden window
  - Even with `WindowStyle=Minimized`, the previous direct-to-.bat shortcut caused Explorer to spawn `cmd.exe` and paint a console for one frame; the VBS wrapper removes that frame entirely
  - Existing v0.35.0 users need to re-run `pen enable` once to replace the old shortcut with the new VBS-based one
- Prevent more than one `record` / `watch` service from running at the same time by @arkohut
  - Added `acquire_service_lock` in `service_manager`, an atomic PID-file claim that combines the existing PID-file infrastructure with `O_EXCL` to close the check-then-write race
  - `record` (in persistent mode, not `--once`) and `watch` now refuse to start when a live instance is already holding the lock, printing the conflicting PID
  - Stale PID files (process gone or running something else) are still cleaned up automatically; the parent-pre-writes-child-PID path used by `pen start` is also handled

## CI

- Restore the dual memos / pensiev publish path in the release workflow by @arkohut
  - `uv build` now produces both the `memos` and `pensiev` distributions on every tag, and both PyPI publish jobs (`pypi-memos`, `pypi-pensiev`) run after the draft release is created

**Full Changelog**: https://github.com/arkohut/pensieve/compare/v0.35.0...v0.35.1

---

## Bug 修复

- 修复 Windows 登录时启动脚本一闪而过的命令行窗口 by @arkohut
  - 开机自启的快捷方式改为指向 `wscript.exe` 运行 `launch.vbs`,再由 vbs 通过 `WshShell.Run launch.bat, 0, False` 在完全隐藏的窗口中启动 .bat
  - 即便快捷方式设了 `WindowStyle=Minimized`,原先直接挂 .bat 的方式仍会让 Explorer 拉起 `cmd.exe` 并把控制台画出一帧;VBS 包装层彻底消除这一帧
  - 已经升到 v0.35.0 的用户需要重跑一次 `pen enable`,把旧的快捷方式替换成新的 VBS 启动链
- 防止同时运行多个 `record` / `watch` 服务进程 by @arkohut
  - 在 `service_manager` 中新增 `acquire_service_lock`:在已有 PID 文件机制基础上叠加 `O_EXCL` 原子创建,关掉检查到写入之间的 race window
  - `record`(持续模式,非 `--once`)和 `watch` 启动时若发现有存活的同名服务在锁里,会打印冲突 PID 并退出
  - Stale PID 文件(对应进程已不存在或换了其它进程)仍会被自动清理;`pen start` 父进程预写子进程 PID 的场景也正确处理

## CI

- 恢复 release 流水线中 memos / pensiev 双包发布路径 by @arkohut
  - 每次推 tag 时 `uv build` 会同时产出 `memos` 与 `pensiev` 两个分发包,两个 PyPI 发布 job(`pypi-memos`、`pypi-pensiev`)都会在 release draft 创建之后并行运行

**完整更新日志**: https://github.com/arkohut/pensieve/compare/v0.35.0...v0.35.1