Repository navigation
chore(release): v0.7.0 - #475
ffumero2003 wants to merge 12 commits into
Conversation
Bump the package to 0.6.1 and assemble the pending Changie fragments (20 Fixed, 1 Changed) into the 0.6.1 changelog section.
…es and sync with main
goanpeca
left a comment
There was a problem hiding this comment.
Findings
| Severity | Location | Finding and requested change |
|---|---|---|
| Important | package.json:3, .changes/v0.6.1.md |
Breaking change shipped as a patch. Since #428, high-level large-file finish 5xx failures reject with FinishLargeFileResponseBodyError, which does not extend B2Error; existing instanceof B2Error handlers stop matching, as MIGRATION.md acknowledges. #406 also stops replaying native create-key, create-bucket, copy-file and hide-file calls on connection failures and 408/5xx. RELEASE.md:90-98 puts breaking pre-1.0 changes in a minor bump under ### Changed; as 0.6.1, every ^0.6.0 consumer gets it automatically. Either keep the old error contract, or release 0.7.0 with these entries under ### Changed and marked BREAKING:. |
| Important | MIGRATION.md:13-16, .changes/v0.6.1.md |
The migration note overstates the scope. client.raw.finishLargeFile() still rejects a 5xx with B2Error (for example ServiceUnavailableError); it raises FinishLargeFileResponseBodyError only when the response body can't be read (src/raw/index.ts:1072-1078). The 5xx wrapping happens in the high-level finalizer (src/upload/finish.ts:57-67). Name the affected high-level operations and state the raw-client behavior separately. |
| Important | branch; PR checklist | Branch predates the new release gate; live integration is red. #467 on main moved PR integration runs to the b2-simulator, and made release.yml require a recent green Integration (real B2) run on main that includes the release commit. The checklist still describes the old flow. Merge main (clean), then dispatch Integration (real B2) on main after merge and before tagging. The Node 24 failure (live-contracts.test.ts:186-190: a wrong-SHA-1 part rejected with an unexpected classification) is likely transient: the PR changes no source, Node 22 passed in the same run, and the same tree passed real B2 on main before and after. The log doesn't show the actual error, so get a green re-run before release. |
| Nit | .changes/v0.6.1.md:1 |
Stale release date (2026-11-27, not yet tagged; v0.6.0 was dated its tag day). Regenerated when the version is re-run. |
| Nit | PR body | Outdated description. It says 21 fragments and a security hold; the diff consumes 23 fragments, the generated notes include a Security section, and release:security now passes (0 open alerts). The packed-tarball smoke has now been run (passes). |
| Nit | .changes/v0.6.1.md ### Changed |
The only Changed entry is maintainer tooling (#401 release process), which SDK users can't act on. Consider dropping it from the user changelog. |
| Pre-existing | scripts/smoke-published-package.test.mjs:271 |
Smoke-helper tests fail unguarded. 3/8 fail on main and here: the fake-package fixture lacks enum exports that package-export-probes.mjs:26 checks (DownloadHeaderName). No workflow or verify step runs this file. |
| Pre-existing | scripts/build-release-artifact.mjs:15, scripts/verify-release-channel.test.mjs:11 |
Release scripts break under the pinned pnpm 11 standalone binary. They run node $npm_execpath, which points at a native executable, so build:release and test:release-channel fail locally. CI passes with the JS distribution. |
What holds up
pnpm changelog:checkpasses; every source-changing PR since v0.6.0 has a fragment (only doc-comment PRs #458-#460 and #465 have none).- Only version, changelog and consumed fragments change; no source, dependency or lockfile changes.
- Release security passes with 0 open Dependabot alerts; milestone has only this PR and #474 open (expected).
Verification
| Check | Result |
|---|---|
Frozen install; merge with current main |
Pass; clean merge |
Full pnpm verify (merged tree) |
Pass: 2,961 tests, 9 skipped |
test:slow, test:coverage, audit:deps, changelog:check |
Pass |
build:release, verify:release-channel --published |
Pass, b2-sdk-typescript/0.6.1 |
| Packed 0.6.1 tarball smoke | Pass: ESM/CJS, 48 export files, 12 subpath probes |
release:security, release:milestone |
Pass; 2 expected open items |
Raw 503 on finishLargeFile |
Rejects with B2Error (ServiceUnavailableError) |
| Browser, Bun, cross-platform CI | Pass (published results) |
Not run: credentialed live tests locally, signed-tag and OIDC publish steps.
5xx responses from b2_finish_large_file stay ambiguous (no automatic cancellation) but are rethrown as the original B2Error, as in 0.6.0. Ambiguity is tracked out of band so the error type does not change in a patch release. Drops the MIGRATION.md section that described the type change.
|
Thanks for the thorough review, @goanpeca. Addressed at
Re-requesting your review. |
goanpeca
left a comment
There was a problem hiding this comment.
Findings
| Severity | Location | Finding and requested change |
|---|---|---|
| Important | PR body; issue #474; milestone v0.7.0 | Release metadata contradicts the PR. #474's body (context, gate commands, acceptance criteria, signed-tag step) still says 0.6.1, and the milestone description still calls it the v0.6.1 release; following that checklist runs the wrong gates and tags the wrong version. The PR body says "no SDK source" changes, yet the head changes src/errors/index.ts, src/upload/cancel.ts and src/upload/finish.ts plus regression suites; a chore(release) squash would hide that behavior fix. Update #474 and the milestone to 0.7.0, and either split the source fix into a fix: PR merged first or make the body (scope, risk, rollback) and squash subject state it. |
| Important | src/upload/cancel.ts:22, :237 |
The exported cleanup-event docs describe the wrong error identity. AmbiguousFinishCleanupFailureEvent.error is documented as the "error thrown to the caller". On the 5xx path the caller gets the original B2Error, while the event carries a separate FinishLargeFileResponseBodyError from the WeakMap whose cause is that B2Error. Consumers comparing event.error with the caught error will be misled. Describe event.error as reconciliation metadata (for 5xx, cause is the thrown B2Error; other ambiguous paths throw the wrapper itself), and add an identity assertion to the 5xx regression test. The marker logic itself is sound: upload, copy and stream all route through it, and the stream's markErrored keeps the error's identity. |
| Nit | branch history; AGENTS.md:161 |
Commit policy. 155f0bd (90), c00996c (79) and 099a603 (78) subjects exceed 72 characters; af271fc and 45534ec have bodies. Squash-merge with a compliant single-line subject. |
| Nit | .changes/v0.7.0.md ### Changed (finish entry) |
"Check the result before retrying" gives callers no handle. The thrown B2Error has no fileId; the ambiguous ID is only on the onCleanupFailure event (reason: 'finish-ambiguous', error.fileId). Name that event, or say to list file versions or unfinished large files by name. |
| Nit | src/upload/cancel.ts:304 |
The non-object branch of the marker lookup is uncovered. Trivial; coverage gates pass. |
| Pre-existing | scripts/build-release-artifact.mjs:15, scripts/verify-release-channel.test.mjs:11 |
test:release-channel fails under the pnpm 11 standalone binary (npm_execpath points at a native executable), so pnpm verify stops there locally. CI is unaffected. |
| Pre-existing | biome.json:2, src/upload/part-url-pool.ts:13 |
Lint noise on main: Biome schema 2.5.8 vs CLI 2.5.12 (info; #438 bumps it) and a non-fatal jsdoc/sort-tags warning. |
Verification
| Check | Result |
|---|---|
pnpm verify |
All steps pass except the pre-existing test:release-channel; vitest 124 files, 2,963 pass, 9 skipped |
Remaining verify steps run individually (build, verify:release-channel, docs, verify:*, verify:exports) |
Pass |
test:coverage, test:slow, changelog:check |
Pass; finish.ts and cancel.ts 100% lines |
| Focused finish suites on the pinned remote simulator | 7/7 pass |
Mutation: rethrow B2Error without the marker |
5 tests fail (caught); the definite-400 control passes |
| Mutation: always wrap (old #428 behavior) | 6 tests fail (caught) |
| 0.6.0 baseline | 5xx was not ambiguous, so 0.6.0 cancelled after a finish 5xx; the BREAKING: wording is accurate |
| Release policy, workflow verifier, docs-consistency suites | Pass |
| Published CI | Node, Bun, browsers, coverage, build, simulator integration, security: pass |
Merge blockers: draft status, the two Important findings, and review-risk (dismiss or supersede the CHANGES_REQUESTED on bc7a3a3, then 2 authorized approvals for the high tier). After merge and before tagging, confirm Integration (real B2) is green on the merge commit.
Not run: live B2, signed-tag and OIDC publish steps. Nothing was posted to GitHub.
Quality Keeper — Advisory ReviewSource:
Quality Keeper assessed the repository, executed checks, and collected results, covering 22 quality expectations. Evidence adequacy
Detected Capabilities
Five repository-quality areasHard expectations keep their exact Evidence State. Advisory applicability questions are separate. Implementation or suite presence is not proof of a trusted run.
Observability — 0 hard, 0 advisoryCan operators understand and diagnose repository-owned runtime behavior? Hard expectations None selected. Applicability Review Gaps (advisory) None. Product Analytics — 0 hard, 0 advisoryDoes repository-owned product analytics instrumentation behave safely and as declared? Hard expectations None selected. Applicability Review Gaps (advisory) None. User Feedback — 0 hard, 0 advisoryDo repository-owned feedback and support-intake flows behave safely and accessibly? Hard expectations None selected. Applicability Review Gaps (advisory) None. Reliability — 3 hard, 0 advisoryDoes repository-owned software fail, recover, time out, and report health predictably? Hard expectations
Applicability Review Gaps (advisory) None. Security — 5 hard, 1 advisoryDo static controls and repository-owned security behaviors protect the intended boundaries? Hard expectations
Applicability Review Gaps (advisory)
Other registered quality — 14 hard, 1 advisoryRegistered Testing Types not assigned to one of the five focused areas. Hard expectations
Applicability Review Gaps (advisory)
Result
CoveredQuality Keeper found acceptable evidence for one or more expectations in these Testing Types.
Needs attentionQuality Keeper does not yet have acceptable evidence for these Testing Types. Some have partial checks that need to run, be fixed, or be connected. Others need new proof or seeded tests. In both cases, Quality Keeper cannot count them as covered yet.
Quality Keeper changes no Evidence State. Pending, missing, executed-but-not-exercised, and review items are not passing, and seeded scaffolds are next actions, not evidence, until applied and re-evaluated. Full breakdown (22 expectations)
ProofSee New to these terms? Start with the Quality Keeper Standards Wiki to learn what each testing type means, why it applies, and what counts as evidence. |
|
@goanpeca addressed in b715fcf:
|
|
@goanpeca follow-up on the bundled finish-handling change: I took the second option you offered. The PR body now states the SDK source and behavior change ( |
|
@goanpeca update (head |
Context
Prepares the next release of
@backblaze-labs/b2-sdk. Originally cut as0.6.1; re-cut as0.7.0because the range contains caller-visible behavior changes that a patch must not ship (perRELEASE.md, breaking pre-1.0 changes take a minor bump under### Changed).This PR updates version and release notes and also changes SDK finish-error handling in
src/upload/finish.ts,src/upload/cancel.ts, andsrc/errors/index.ts. The proposed split of this behavior fix into a separate PR remains pending.Breaking changes (now under
### Changed, markedBREAKING:)create-key,create-bucket,copy-fileandhide-filenow surface connection failures and HTTP 408/5xx without automatic retry (reauthorization, 429 backoff and read/download retries still apply). Replaying these risked duplicate resources. Callers must check the operation's result before manually retrying a mutation.b2_finish_large_fileis treated as ambiguous, so a possibly-committed large file may remain; check the result before retrying. The rejected error type is unchanged — stillB2Error, soinstanceof B2Error && status >= 500handlers continue to match. (This reverts the earlierFinishLargeFileResponseBodyErrorwrapping that would have broken those handlers.)Changes
0.7.0;.changes/v0.7.0.md+ regeneratedCHANGELOG.md(viachangie).### Fixedto### ChangedwithBREAKING:markers.### Changedentry (not user-actionable).B2Error).Risk
The finish changes alter error propagation and cleanup for ambiguous 5xx responses. A regression could change caller error handling or cancel a file whose finish may have committed; upload, stream, and copy regressions cover these paths.
How to revert
Revert the release merge commit if the release needs to be rolled back. If the finish change is split out, revert its fix commit separately and reassess ambiguous-finish cleanup behavior.
Verification
pnpm run changelog:check: generated history current, fragments valid.pnpm biome check src,pnpm typecheck,pnpm build: clean.pnpm vitest run src/upload src/copy src/errors: 23 files, 600 tests passed. The stream and large-copy paths now each pin the 5xx-finish contract (B2Error, zerob2_cancel_large_file, onefinish-ambiguousevent), mutation-checked.Before tagging: merge
mainis already in; dispatchIntegration (real B2)onmainonce and confirm green (the new release gate), then tag.Closes #474