Skip to content
Open
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
11 changes: 10 additions & 1 deletion desktop-tauri/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ default-members = [".", "server"]

[lib]
name = "workbuddy_proxy_desktop_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
# 只保留 rlib:仓库内没有任何动态库或静态库的消费者(桌面壳以 rlib 静态链接,
# Tauri 桌面打包只需要 bin),而 windows-gnu 下 cdylib 会把全部符号导出,
# 触发「export ordinal too large」链接失败,官方 CI 的 MSVC 工具链不受影响但产物同样无人使用
crate-type = ["rlib"]

[[bin]]
# 与 tauri.conf.json 的 mainBinaryName 一致:本地 cargo 构建产物名与
# Tauri CLI 打包改名后的名字相同,两种构建路径产出同一个 agent2api.exe
name = "agent2api"
path = "src/main.rs"

[build-dependencies]
tauri-build = { version = "2", features = [] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,12 @@ mod local_gates {
fn a_gate_expires_rather_than_waiting_for_a_release() {
let _slot = lock_for_tests();
clear_for_tests();
assert!(hold("zcode", "令牌池为空"));
// hold 的登记时刻由测试固定,不能在 hold 之后读取真实时钟作为基准,
// 否则调度延迟会缩短剩余寿命并让边界断言偶发失败
let base = logging::now_ms();
assert!(hold_at("zcode", "令牌池为空", base));
// 全程用注入时钟做 TTL 判定:真实时钟下这条只能靠睡眠验证,而睡眠要么
// 睡满两分钟、要么睡不到 TTL(后者等于什么都没测)。
let base = logging::now_ms();
assert!(
gated_at("zcode", base + GATE_TTL_MS - 1),
"寿命内仍然挡着 —— 比令牌 TTL 还短就放行是白挡"
Expand Down
Loading