Repository navigation
fix: canary prerelease-skip + dispatch ref default (#1811) - #1832
Merged
Merged
Conversation
…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 #1814; review finding raised in #1811.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1813-pr.1832.f554da5This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1832.tgz
npm install -g packageInstall instructions are refreshed on each push. |
5 tasks
Owner
Author
[bot] 🏷 [PR] #1832 核验结论(review / verify,非重做) 这是带 核查证据(本地独立跑,非复述作者描述)
结构化七问
行为变更披露(旧值→新值 + 原因)
判定:可合。 这是我先前贡献的客观复核,无需返工;合并请人工执行(Agent 依规不合并):#1832 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up fixes for the release-canary pipeline added in #1814. Two independent, clearly-labeled commits; both keep the green = "delivery pipe works" signal honest.
1. Skip prerelease/dev tags instead of failing at import
The merged #1814 added a
stableVersionguard, but it was computed after the module-loadpatchMinus()calls intests/e2e/e2e-release-canary.test.ts.patchMinus()throws on any non-x.y.z, so those consts crashed at import time (the whole test file failed to load) before the guard could ever run. Since the trigger isrelease.publishedandrelease.ymlcreates a GitHub Release even for dev versions, every prerelease/dev release would have false-red'd the canary.Fix: compute
stableVersionbefore the two guarded calls and make both conditional (falling back toNEW_VERSION, which is unused once the test skips). Stablex.y.zwith patch ≥ 2 behaves byte-for-byte identically.Verified locally:
typecheckgreen;0.1.179-dev.1→ graceful skip (fail 0); full stable0.1.178end-to-end green (~26s).2. Manual-dispatch default → default branch, not "latest release"
The
Resolve refstep's fallback auto-resolvedgh api releases/latest. That is a trap during bootstrap: a released tag only contains the canary code after a release is cut from a tree that already has it, so right now "latest release" = v0.1.178, which predates the canary merge by ~87 min → any no-ref manual dispatch false-reds withCould not find tests/e2e/e2e-release-canary.test.tsuntil v0.1.179 ships.Fix: no-ref manual dispatch now checks out the default branch (current canary code); the
release.publishedevent still pins its own released tag (validates exact shipped bytes, works from v0.1.179 onward); explicitinputs.refstill targets any historical tag for regression runs. This also drops the now-unusedgh apilookup and itsGH_TOKENfrom the resolve step.Verified: YAML parses; branch-selection simulated across all four trigger cases (release / dispatch+ref / dispatch-no-ref × default-branch names).
Config surface
None. No new env/config/CLI fields; only workflow ref-resolution semantics and a test-file guard order change.
Refs #1814, #1811.