Repository navigation
[PR] feat: install any published version, pin for a duration, tag-following auto-upgrade - #6806
ranxianglei wants to merge 7 commits into
Conversation
…g auto-upgrade (#6804) - bili update <version> installs any published version (release or prerelease) - bili pin [duration] pins the installed version (1h/12h/1d/7d/forever) - bili unpin lifts the pin early - Auto-upgrade follows the tag channel only: a prerelease/temp build on the release channel (tag "latest") is never auto-swept forward to a release - Any pinned version is check-only: the updater reports new versions but never auto-installs; explicit bili update breaks through the pin - Web panel Updates tab gains a free-text version field and pin controls (duration picker + pin/unpin buttons) - Pin state is machine-level runtime state at ~/.cache/billion-context/.pin.json (no new config key — Configuration Surface Discipline) - The #1481 advisory force-install lane still overrides a local pin Closes #6804
# Conflicts: # src/cli.ts
…th per call Review fixes for #6806 (additive, labeled): - writePin now returns whether the state file was actually written; setPin returns undefined on failure so callers (CLI pin, web pinAction) stop reporting a pin that was never persisted (honest output, §7.3). - PIN_FILE resolved per call via pinFile() (paths.ts reads env live; hermetic suites swap XDG_CACHE_HOME per scenario — same pattern as update-policy.ts's stagger/policy files). - unpinAction returns hadPin (the old code had two identical branches that discarded the distinction its doc comment promised). - tests/update-pin.test.ts: isolate XDG_CACHE_HOME/XDG_CONFIG_HOME in a scratch dir BEFORE importing update-pin.js (the old file wrote the REAL ~/.cache/billion-context/.pin.json); assert the new return shapes (setPin truthiness, unpinAction.hadPin).
Review fixes for #6806 (additive, labeled): - upPin() read the RUNNING version from the DOM (up-running), but the gate compares isVersionPinned(diskVersion ?? runningVersion): in the pending-restart state (disk > running, can last days on dsh/opencode hosts) the pin silently never fired. The client now caches the last /update/state snapshot and pins disk ?? running, matching the gate. - Indefinite pin status rendered via a dedicated up.pin_indefinite key (en 'indefinite' / zh '永久 indefinite') instead of t('up.pin_none').replace('No pin','indefinite') — the zh source string is '未固定 no pin' (lowercase), so the case-sensitive replace missed and the panel showed '已固定 X no pin'. - unpin toast distinguishes 'pin lifted' from 'no pin was active' using the new hadPin field.
…ly gates The two new checkForUpdate gates (src/update.ts, human-review tier) shipped with no regression coverage. Section I in the hermetic update-policy harness (real install into a temp dir, mocked registry): - I1: prerelease on the release channel (tag=latest) is never auto-swept to a release — no tarball download; check-only still reports update-available with the prerelease note. - I2: control — a release on the release channel still auto-upgrades (the gate must not over-suppress; #3617 negative direction). - I3: a prerelease on a prerelease channel (updateTag=dev) still moves between temp builds (mockRegistry gains a devVersion dist-tag doc). - I4: a pinned version is check-only — auto stays put, check-only reports update-available with the pinned note. - I5: an explicit force breaks through BOTH gates. - I6: an expired pin lifts itself — auto-upgrade resumes.
…pages Review fixes for #6806 (additive, labeled): - reference/architecture.md: the new src/update-pin.ts was missing from the file map — the architecture-docs CI lane (check #1: every tracked src/ file listed) would have gone red. - docs/architecture/update.{md,zh-CN.md,ja.md}: add src/update-pin.ts to the key-entries line and a short 'Version gates (#6804)' paragraph describing the tag-channel rule and the check-only pin.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10175-pr.6806.9f167ffThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6806.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重: #6805 与 #6806 重复(同一 #6804,两个在途 PR)。 两个 PR 都 open、都 base master、都 Review + fixes (pushed to the PR branch, The direction of all 4 features checks out: gate placement is correct (after
Note (no code change): the version-arg form Verification (local, targeted — full suite is CI's job): 八问
收工判定:代码侧已收敛——合并冲突已解、必红项已修、功能缺陷与测试缺口已补,CI 在新 head 上运行中。两件事等你:① #6805/#6806 二选一(建议留 #6805,若留 #6806 则本分支已就绪);② 本 PR 改 |
(ai: vllm-qwen/qwen3.8-27b) Conflict lane run 1/6 — done. Merged 七问
Status: conflict resolved, PR mergeable; awaiting owner decision + CI green on |
Summary
Implements the 4 features requested in #6804:
bili update <version>installs any published version (release or prerelease/temp build like0.1.215-pr.202.1); the web panel Updates tab gains a free-text version field (the existing dropdown stays).tag="latest") is never auto-swept forward to a release — the check runs, the new version is reported, nothing is installed. A prerelease channel target (e.g.updateTag=dev) still moves between temp builds.bili pin [duration]pins the installed version for a duration (1h/12h/1d/7d/forever; default = indefinite); the pin lifts itself at expiry and auto-upgrade resumes;bili unpinlifts it early. The web panel gets the same pin control (duration picker).bili updateoutput) but never auto-installs. An explicitbili updatestill breaks through the pin (explicit action = user intent).Implementation notes
~/.cache/billion-context/.pin.json({v:1, version, setAt, until?}) — no new config key (Configuration Surface Discipline: a pin is a state choice, not a setting; it also survives config edits).pinned(a fleet-wide upgrade ceiling) — this is per-machine user intent.forceInstallVersiondirectly, bypassingcheckForUpdate.bili updatekeeps bypassinghold/stagger as today, still respects remoteblocked/pinned.NO-OP validation release note
src/update.tsis human-review tier. This PR changes the auto-update decision path (two new gates inserted before the #3619 policy gate). A NO-OP validation release is recommended before merging to prove the existing upgrade path is healthy end-to-end.Closes #6804