Repository navigation
[PR] Update UX: exact-version install + time-bound pin; auto-upgrade follows the tag channel (#6804) | 更新界面:可装任意已发布版本 + 按时长固定版本,自动升级只跟 tag 通道(#6804) - #6805
Conversation
…rade (#6804) - bili update [version]: install an exact published version (releases and master temp builds / pr.N tags); an explicit install clears a local pin. - bili pin [duration] / bili unpin: hold the installed version (1h/12h/1d/7d/30d/forever); auto-upgrade keeps checking and reporting newer versions but never installs while the pin is active. State is machine-level (~/.cache/billion-context/.pin.json), fail-open reads, self-sweeping on expiry/staleness — no config key, distinct from the remote policy's 'pinned' ceiling (#3619). - An installed prerelease/temp build is check-only for AUTO-upgrade: auto-upgrade follows the tag channel and only moves temp builds along it, never sweeping one to a release (stateless guard; a prerelease channel such as updateTag=dev still progresses temp→temp). An explicit 'bili update' or an advisory repair (forceInstallVersion) always breaks through and clears the pin. - Web panel Updates tab: free-text version input + install button, pin control with duration select, pin/temp-build state line; new /__bili/update/pin and /__bili/update/pin/clear endpoints; the update state snapshot gains pin {active, version, until, tempBuild}. - docs: architecture ledger row + update module page (en/zh/ja) + README command lists (en/zh/ja). - tests/update-pin.test.ts: 14 tests — pin module units plus the checkForUpdate guard lanes (pin hold / expired / stale / temp-build hold / dev channel / force break-through / advisory clear) on the issue2082 hermetic fixture.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10620-pr.6805.c973cd2This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6805.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Two test gaps from review: the new parse fields (updateVersion / pinDuration / pinClear, --clear misuse exit 2) had no parse-level test, and the two new /__bili/update/pin endpoints had no HTTP-layer test (400 ladder, loopback gate, pin file write/clear in the isolated cache dir).
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 是 #6804 的首个实现(08:41 开);但发现后到的平行 PR #6806(09:05 开,同功能同设计,现与 master 冲突 dirty)。按先来后到保留本 PR,建议 owner 关闭 #6806(agent 无关闭权)。 标签: pr, scope/ui, p3(功能 PR 非缺陷;主界面是面板 Updates 页 + CLI) 审核结论(八问)
审核动作(小问题直接修)发现两处测试缺口,已补 commit
定向运行绿:cli-parseargs 16/16、web-updates 10/10、typecheck clean。 需 owner 关注
判定:审核通过,CI 绿后可合;发版前先完成 NO-OP 验证发版;#6806 建议关闭。 |
PinRecord / PIN_FILE_NAME / PinState are consumed only inside src/update-pin.ts — INTERNAL_ONLY per the lane's own instruction.
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI 跟进:新 head 的 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 收尾状态(live 查):新 head 待 owner:① CI 全绿后合并;② 发版前先做 NO-OP 验证发版( |
…o 7d (#6804) User feedback on the panel: the notices list pushes the rest of the tab down, and a 'forever' default silently means 'never auto-update'. - Notices card becomes a collapsible <details> (collapsed by default; the expand state survives refreshes because only #up-notices is re-rendered). - Pin duration select: durations ascending with 'forever' last and 7d as the default selection on first render; the user's later choice is preserved across panel refreshes.
…pses it (#6804) User asked for the opposite default: the list should be visible without an extra click, but still collapsible. The 'open' attribute on <details> gives exactly that; the user's later toggle still survives refreshes.
Pin the installed version in the container, publish a fake-newer build, and run a live bili start with a fast check interval: the auto-updater must report the newer version but hold; an explicit bili update breaks through and clears the pin; after bili unpin the auto-updater resumes on its own. Refactors the existing lane-X repack/publish into shared helpers (republishAs/publishTo).
…pervises the pin server The server's [update] lines go to ~/.local/state/billion-context/bili.log, not its stdout — the hold assertion was checking the wrong sink and could only fail. Health is now polled (30s, 2s cadence) with one supervised restart if the process dies during start, and the session log is copied to the evidence dir as lane-x-pin-session.log.
…llisions) The gate container runs on the host network, so its port space is shared with everything else on the box — a concurrent gate's plugin lanes roam the 18xxx range and had 18787 held during the #6804 runs, leaving the pin server alive but unreachable on its health endpoint. Probe 18787-18796 and pick the first free one.
…iding the answer) The session log proved the server bound and answered within 35ms in the gate container, yet the lane saw 'no-response' — curl -sf swallowed the non-200 answer. Probe /__bili/status without -f, keep code+body, dump lane-x-pin-status-<phase>.txt on failure, and stop counting un-reaped zombies as alive.
ecf69ab to
903d374
Compare
|
解决ci失败问题 |
The probe was calibrated at kernel 0.0.172 with nudgeGrowthTokens=2000, which put the ephemeral nudge on request 6 (the pre-fold round). The kernel has since drifted (0.0.172 -> 0.0.198, incl. #6928 removing the #4521 status line), which moved the nudge schedule: at 2000 the nudge now lands on [3,5,12] (status-line-free kernel) / [3,5,12,14] (with status line), missing the pre-fold request and failing the scenario materialization assertion. 3000 restores the anchor on both kernel states: [4,6,12] / [4,6,12,14]. Test-only recalibration; the fold / proxy-tool-round mechanics under test are unchanged. This is a master-level born-red (the test fails on master tip too); the fix lands on master via this PR.
…ine) to clear the architecture-docs born-red
config-surface-guard requires every long CLI flag to be mentioned in README.md or docs/configuration.md. The PR added `bili pin --clear` (== `bili unpin`) but the flag was only in the CLI usage text, not the README table. Note it on the unpin row in en/zh/ja for parity.
The scenario check pinned the ephemeral nudge to inputs[6] (PROXY_TOOL_AT). The nudge's landing index drifts with kernel token-counting / nudge-gate changes and can differ across runner environments, so a pinned index is environmental luck (AGENTS.md: tests must be deterministic). The nudge is an ephemeral carrier and its index does not affect the byte-prefix invariant (the real #2929 check). Relax the precondition to: the nudge is armed in SOME pre-fold request (index < FOLD_AT). nudgeGrowthTokens=3000 keeps the nudge comfortably armed in the pre-fold window (local schedule [4,6,12]).
[bot] 🏷 CI 已全部转绿(52/52 通过)。失败根因与修复: 1. issue2929 测试(3 个 shard 挂,主因)
2. config-surface-guard(--clear 未文档化)
3. architecture-docs(responses-system-sections 缺失)
三个根因都已修复并推送。当前 head |
One conflicted file: tests/issue2929-codex-fold-double-miss.test.ts. Both sides fixed the same root cause (the #2929 probe pinned the nudge to a hardcoded upstream request index that drifts with the kernel schedule): this branch relaxed the scenario assertion (nudgeGrowthTokens 2000->3000, nudge-in-some-pre-fold-request check); master (v0.1.216, PR #6938 review) reworked the fake upstream to arm schedule-independently (first nudge-carrying request with >=11 refs) and pins compress.messageTimestamps:false for a hermetic wire shape. Resolution: take master's version wholesale - it is a strict superset of this branch's intent (its arming logic is what the relaxed assertion was compensating for) and is CI-verified in v0.1.216. The PR-side fix commits 65e403d/298524c486 are superseded. reference/architecture.md auto-merged: both lines kept (this branch's update-pin.ts module line + master's handoff-response.ts #6947 line). Local verification on the merged tree: issue2929 probe green (nudge landed at inputs[7] locally - the index-pinned arming would have missed), update-pin + cli-parseargs + web-updates 40/40 green, typecheck clean.
(ai: vllm-qwen/qwen3.8-27b) CI 工程师冲突处理完成:已把 origin/master(v0.1.216, 七问
|
Closes #6804
What this is / 这是什么
Four things from the issue, all in the update path:
bili update [version]installs an EXACT published version (releases and master temp builds like0.1.215-pr.N, whatever the registry has). The web panel Updates tab gets the same: a free-text version box + install button.updateTag=dev) it still moves temp→temp, it just never sweeps a temp build to a release.bili pin [duration](vocabulary:1h/12h/1d/7d/30d/forever; no arg = show status) or the panel's pin control with a duration dropdown.bili unpin).Design notes / 设计要点
~/.cache/billion-context/.pin.json— the same shared-state dir the update throttle and cross-process lock use (install-lane contract). Reads are fail-open; expired/stale records self-sweep on the next resolve. This is distinct from the remote policy file'spinnedceiling (Automatic staggered rollout: default random upgrade interval of 15 min – 48 h + GitHub remote policy file (emergency kil | 自动升级撒点:默认 15 分钟~48 小时随机升级 + GitHub 远程策略文件(紧急刹车/按版本调速),给事故留响应窗 #3619): that one steers the whole fleet, this one is a hold on this machine.bili update [version]and advisory repairs (forceInstallVersion) break through a pin and clear it on success — owner-directed repair is never blocked by a local hold.update.tsis the load-bearing updater (human-review tier): per AGENTS.md §5 a NO-OP validation release is required before this takes effect in the wild — flagging for the release step.Tests / 测试
tests/update-pin.test.ts(14 tests): pin module units (duration parsing, file shape, fail-open, expiry/staleness sweep) + thecheckForUpdateguard lanes on the issue2082 hermetic fixture — pin hold, expired pin releases, stale pin sweeps, temp-build hold (stateless), dev-channel temp→temp proceeds,forcebreaks through and clears the pin,forceInstallVersion(advisory/panel lane) clears the pin.update-pin14 ·issue2082-self-update-boot-smoke5 ·web-updates10 ·update-tarball7 ·cli-parseargs14 ·web-i18n11 (catalog parity + no-dead-key included).typecheckclean;tools/check-architecture-docs.mjsgreen.update-channel.test.tsshows 2 failures on this box before the change as well (the box's live relay config changes the registry base) — pre-existing, verified via stash on clean HEAD; not a regression. Full-suite verdict = the CI test lanes on this head.No config-surface changes —
website/config-reference/untouched.