Skip to content

feat(buckets): add fork rebase and merge commands - #119

Merged
designcode merged 1 commit into
mainfrom
feat/bucket-fork-merge-rebase
Jul 2, 2026
Merged

feat(buckets): add fork rebase and merge commands#119
designcode merged 1 commit into
mainfrom
feat/bucket-fork-merge-rebase

Conversation

@designcode

@designcodedesigncode commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

Adds two fork operations to the buckets command group, on top of the new rebaseFork/mergeFork APIs in @tigrisdata/storage 3.17.0 (dependency bumped ^3.16.0^3.17.0):

  • tigris buckets rebase <fork> — advance a fork onto the latest state of its source bucket.
  • tigris buckets merge <fork> [--into <source>] [--from-snapshot <snap>] — merge a fork's changes back into its source. The source is auto-resolved from the fork's parent (getBucketInfoforkInfo.parents[0]) unless --into is passed.

Both confirm before mutating (skip with -y/--yes, guarded in non-TTY), print the resulting snapshotVersion, and support --json.

Also makes the already-supported stdin path of objects put discoverable — the description and examples now show that object data can be piped in (echo 'hi' | tigris objects put t3://bucket/key). Docs/spec only, no behavior change.

Testing

Integration tests added to test/cli.test.ts, passing against the live backend:

  • rebase a fork onto its source
  • merge a fork with auto-resolved parent
  • objects put from piped stdin (round-tripped via objects get)

tsc, ESLint, and Prettier all clean; the default unit suite is unaffected.

🤖 Generated with Claude Code


Note

Medium Risk
Merge and rebase mutate bucket state on the live backend; mistakes could affect source buckets, though confirmations and explicit --yes in scripts mitigate operator error.

Overview
Adds tigris buckets rebase and tigris buckets merge wired to @tigrisdata/storage3.17.0 (rebaseFork / mergeFork). Rebase updates a fork from its source; merge writes fork changes into the source, with optional --into, --from-snapshot, interactive confirm (skippable with --yes), and --format json. Merge defaults the target to the fork’s parent via getBucketInfo when --into is omitted.

src/specs.yaml documents both commands and updates objects put to describe stdin piping (examples only; no upload behavior change in this diff).

Integration tests cover rebase, merge with auto-resolved parent, and objects put from piped stdin via a new runCliWithStdin helper.

Reviewed by Cursor Bugbot for commit 04efeef. Bugbot is set up for automated code reviews on this repo. Configure here.

Add `buckets rebase <fork>` and `buckets merge <fork>` on top of the
new rebaseFork/mergeFork APIs in @tigrisdata/storage 3.17.0:
- rebase advances a fork onto the latest state of its source bucket.
- merge writes a fork's changes back into its source; the source is
auto-resolved from the fork's parent (getBucketInfo) unless --into
is passed, with --from-snapshot to scope the merge to a fork
snapshot. Both confirm before mutating (skip with -y) and support
--json.
Also make the existing stdin support of `objects put` discoverable:
reword the description and add piped-input examples so `--help` shows
that object data can be piped in.
Adds integration coverage for rebase, merge (auto-resolved parent),
and piped-stdin uploads.
Assisted-by: Claude Opus 4.8 via Claude Code
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@designcode
designcode merged commit f28be44 into mainJul 2, 2026
3 checks passed
@designcode
designcode deleted the feat/bucket-fork-merge-rebase branch July 2, 2026 07:45
designcode added a commit that referenced this pull request Jul 2, 2026
Seed the first Changesets release: a minor for the `buckets rebase` /
`buckets merge` commands (#119) and a patch for the `buckets create
--enable-snapshots` fix (#120) — both merged to main but unreleased
since v3.3.0. Together they cut 3.4.0 once this lands.
Assisted-by: Claude Opus 4.8 via Claude Code
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
designcode added a commit that referenced this pull request Jul 2, 2026
)
* chore: migrate release tooling from semantic-release to changesets
Replace semantic-release with Changesets for versioning and publishing:
- Add @changesets/cli + @changesets/changelog-github and .changeset
config (public access, github changelog, baseBranch main). Set the
package version to the real base 3.3.0.
- Rework release.yaml: stable releases run on push to main via the
changesets action (Version Packages PR -> publish -> v<version> tag,
GitHub release, binaries, Homebrew). Beta prereleases publish an npm
snapshot to the `beta` dist-tag on manual workflow_dispatch only.
- Drop the release-branch flow: delete sync-release-to-main.yaml.
- npm publishing stays on OIDC / provenance (auth unchanged); keeping
the release.yaml filename preserves the trusted-publisher config.
Also drop commitlint (no longer needed now that commits don't drive
versioning) and sweep unused dev dependencies:
- Remove @commitlint/cli, @commitlint/config-conventional, the
commitlint config block, and the .husky/commit-msg hook.
- Remove conventional-changelog-conventionalcommits, orphaned by the
semantic-release removal.
Assisted-by: Claude Opus 4.8 via Claude Code
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: add changesets for pending fork commands and enable-snapshots fix
Seed the first Changesets release: a minor for the `buckets rebase` /
`buckets merge` commands (#119) and a patch for the `buckets create
--enable-snapshots` fix (#120) — both merged to main but unreleased
since v3.3.0. Together they cut 3.4.0 once this lands.
Assisted-by: Claude Opus 4.8 via Claude Code
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: gate npm publish on integration tests in the release job
The stable release job dropped `npm run test:integration`, so a Version
Packages merge could publish to npm without integration passing (ci.yaml
runs it only in parallel). Re-add it in the release job, gated to pushes
with no pending changesets — i.e. exactly the publish push — so it gates
the publish without running on every feature merge.
Assisted-by: Claude Opus 4.8 via Claude Code
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@designcode@MantasMiksys