Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

berth wire has no wait option, and --update clobbers hand-edited wrapper flags

已关闭
#231 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
go
领域
backend, cli

调研方向

Start by reading internal/wire/wire.go and tracing the berth wire flags and how wrapperLine handles existing wrapped lines. Check the discussion and implementation context in #172 for the intended --wait behavior. Done means wire writes the wait setting on each line and preserves it on --update, or clearly warns before dropping unsupported hand-edited flags.

由索引模型根据 Issue 内容生成。

描述

Problem

  1. No per-model wait. A model wrapped by berth wire waits only as long as the request names — with no per-model wait anywhere, that means berthd's DefaultWait (120 s default, broker). There is no wait in berth.toml engine entries and no wait flag on berth wire (current flags: --config --api --bin --group --priority --update --write --check). For a batch job that parks behind a resident foreground lease, 120 s is not enough: the job exits before the berth frees.

  2. --update clobbers hand edits. The only workaround is editing the wrapper line by hand, and that edit is silently lost by the next wire --write --update: wrapperLine (internal/wire/wire.go) rewrites each wrapped line with exactly the flags wire writes (run --as NAME [--group] [--priority] --drain-post … --), and any flag wire didn't write — e.g. --needs-mib 14000 -wait 700s — is stripped with no warning.

Live example (llama-swap config, hand-edited line that wire --update would strip):

F:\AI\berth\berth.exe run --as qwen-3.8-27b --group llama-swap --priority foreground --needs-mib 14000 -wait 700s --drain-post http://127.0.0.1:1233/api/models/unload/qwen-3.8-27b --

Example solution

berth wire --wait 800s writes the flag on every line and keeps it on --update — the shape discussed in #172, which fixes both points at once.

A warning (or refusal) when an existing wrapped line carries flags wire would drop would make the clobber visible even before the knob exists.

Environment

  • Windows 11, RTX 5070 Ti (16 GiB)
  • berth v0.4.0-rc.3 binary; code verified at main @ 0ebd1c5
主要语言
Go
星标
226
派生
20
平均合并
51 分钟
30 天内合并 PR
225

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

T-Crypt/berth 的其他 Issue

查看 T-Crypt/berth 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。