Repository navigation
ci: release canary — automated no-op self-update verification (#1811) - #1814
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1797-pr.1814.13a6b21This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1814.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Review 完成(review-only,未重做 — 维护者自实现)。分支与 master 同步无 stale-base;三个文件逐行审完并与源码对照验证。 验证记录
结构化七问
非阻塞发现(4 项,不拦合并)
**判定:可合。**方向正确、断言有牙、hermetic 且确定、零回归,本地 + CI 证据齐备。上述 4 条走后续处理(第 1 条建议尽快,它决定这条 lane 在最需要诊断的时刻有没有料可看)。 |
…1/2/4) - keep failure artifacts: the finally block now dumps proxy output into <work>/diagnostics.txt and keeps the whole tmp/e2e-canary-* dir on failure (rmrf only on success), so the workflow's if:failure() upload actually has material — previously t.after deleted the dir before the artifact step ran. - stable-only guard: prerelease/dev tags or patch < 2 now skip loudly (need N-1 and N-2) instead of throwing a red canary. - tests/e2e/README.md: document the canary suite (Running/CI semantics, the bootstrap note that the lane takes effect from the first release AFTER the workflow lands).
|
Review 后续已落(bac66b8):
复验:本地 canary 1/1 绿(成功路径清理验证 + 失败路径 artifacts 保留验证),CI 重新排队中。 |
Runs only when a release is published (or via workflow_dispatch). Packs the released tree twice with identical content at N-1/N into a local verdaccio, boots a live proxy on N-1, and drives the full receive path: - pre-update dsh profile convergence (#1803/#1804 path, fake dsh bin) - in-place flip to N: 'installed N-1 → N. Restart to finish.' - case-3 refresh + post-flip convergence of a profile seeded stale after the flip, then silence (no redundant dsh plugin spawns) - live proxy keeps serving during the swap window - restart at N: ACP smoke — model turn, plugin compress fold, post-fold - 'plugin install opencode' entry survives the update registry-fixture: pass NPM_ALLOW_DANGEROUS through to npm so guarded dev machines can publish to the loopback fixture (CI is unaffected).
…1/2/4) - keep failure artifacts: the finally block now dumps proxy output into <work>/diagnostics.txt and keeps the whole tmp/e2e-canary-* dir on failure (rmrf only on success), so the workflow's if:failure() upload actually has material — previously t.after deleted the dir before the artifact step ran. - stable-only guard: prerelease/dev tags or patch < 2 now skip loudly (need N-1 and N-2) instead of throwing a red canary. - tests/e2e/README.md: document the canary suite (Running/CI semantics, the bootstrap note that the lane takes effect from the first release AFTER the workflow lands).
bac66b8 to
40afa0e
Compare
[bot] 🏷 复验完成(bac66b8)。三个发现按约定关闭,一个延后项确认归属。 复验记录
结构化七问
微小残留(不拦):try 块之前的 setup 阶段失败(如 **判定:可合。**三项发现带证据关闭(含我对失败路径的独立复现),延后项归属明确,CI 全绿。 |
…anxianglei#1811) The release canary computed OLD_VERSION/STALE_VERSION via patchMinus() at module load, BEFORE the stableVersion guard. patchMinus() throws on any non x.y.z input, so a prerelease/dev tag (0.1.x-dev.N, 0.1.x-beta.N) — or a patch part < 2 — made the whole test file fail to import instead of skipping gracefully. The workflow triggers on release.published, which release.yml also emits for dev releases, so every dev release would red-light the delivery-pipe check with a false alarm rather than a clean skip. Compute stableVersion first and guard both patchMinus() calls on it; when the version is out of range the consts fall back to NEW_VERSION (unused, since the test then skips via skipReason). Behavior for a stable x.y.z with patch >= 2 is byte-for-byte unchanged. Verified locally: typecheck green; prerelease 0.1.179-dev.1 now skips with a clear reason (fail 0); full stable-path run at 0.1.178 green end-to-end (~26s). Supplements the merged canary in ranxianglei#1814; review finding raised in ranxianglei#1811.
Implements #1811 (维护者自实现,ework 勿接手).
What
A CI lane that runs only when a release is published (plus
workflow_dispatchfor manual runs against any tag/branch). It verifies the receive path of the updater — the pipe every user's fleet rides at publish time — using a loopback verdaccio, zero secrets, fully offline.How
Files
.github/workflows/ci-release-canary.yml— triggerrelease: published+ manual dispatch (ref input defaults to latest release tag); failure artifacts undertmp/e2e-canary-*.tests/e2e/e2e-release-canary.test.ts— the whole scenario, gatedACP_TEST_CANARY=1.tests/e2e/registry-fixture.ts— passNPM_ALLOW_DANGEROUSthrough to the fixture's npm child so guarded dev machines can publish to the loopback registry (CI runners have no guard; no behavior change there).Verification
ACP_TEST_REGISTRY=1e2e-registry suite: 4/4 pass with the fixture change.npm run typecheckclean.Why this shape (lessons from 0.1.176/0.1.177)
The updater is self-referential: its only delivery path is the code being fixed, so a broken updater wedges the fleet with no rollback. Manual canary on one real machine (today's 4-point run) proved the concept; this automates it on every release. Linux-first per #1811; multi-host lanes can extend the matrix later.