Skip to content

test(lanes): add e2e tests for bit reset after lane merge main#10266

Merged
davidfirst merged 11 commits into
masterfrom
test/reset-after-merge-main-e2e
Apr 2, 2026
Merged

test(lanes): add e2e tests for bit reset after lane merge main#10266
davidfirst merged 11 commits into
masterfrom
test/reset-after-merge-main-e2e

Conversation

@davidfirst
Copy link
Copy Markdown
Member

@davidfirst davidfirst commented Apr 1, 2026

Add e2e tests documenting the behavior of bit reset after bit lane merge main for three scenarios:

  1. Diverged (auto-snap) — merge creates a snap with two parents. Reset removes it, reverts lane head. Files stay merged and show as modified.
  2. True fast-forward — component born on lane, merged to main, main advanced. Merge advances lane head (single parent). Reset reverts lane head. Files stay and show as modified.
  3. --no-snap — no snap created, no head change. Files get merged content but lane object untouched. Reset throws "nothing to reset".

bit reset is consistent: it only removes local snaps/tags and reverts lane heads — never touches files. For full merge undo (including files), use bit lane merge-abort.

Cover three scenarios:
1. Diverged with auto-snap - reset removes merge snap, reverts lane head
2. Fast-forward (main ahead) - reset reverts lane head to pre-merge
3. --no-auto-snap - reset throws "nothing to reset"
Copilot AI review requested due to automatic review settings April 1, 2026 14:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Harmony e2e test suite documenting how bit reset behaves after bit lane merge main, focusing on how lane heads/snaps are affected vs. workspace files.

Changes:

  • Introduces e2e coverage for bit reset after merging main into a lane in three scenarios (diverged auto-snap, “fast-forward”, and --no-auto-snap).
  • Asserts lane-head behavior and verifies that merged file content remains on disk and appears as “modified” after reset.

Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts
Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts Outdated
- Fix --no-snap → --no-auto-snap in case 3 JSDoc comment
- Clarify case 2 description: unmodified snap still creates diverge
Covers the case where --no-snap prevents both snap creation AND lane
head updates. bit reset has nothing to reset in this scenario.
Copilot AI review requested due to automatic review settings April 1, 2026 16:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts Outdated
Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts Outdated
Copilot AI review requested due to automatic review settings April 1, 2026 18:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts Outdated
Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts Outdated
Copilot AI review requested due to automatic review settings April 2, 2026 15:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts Outdated
Replace 5 redundant cases with 3 distinct scenarios:
1. Diverged (auto-snap) - reset removes merge snap, reverts head
2. True fast-forward (component born on lane) - reset reverts head
3. --no-snap - nothing to reset
Copilot AI review requested due to automatic review settings April 2, 2026 19:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread e2e/harmony/lanes/bit-reset-after-merge-main.e2e.ts
@davidfirst davidfirst enabled auto-merge (squash) April 2, 2026 19:55
@davidfirst davidfirst merged commit d85bf2a into master Apr 2, 2026
16 checks passed
@davidfirst davidfirst deleted the test/reset-after-merge-main-e2e branch April 2, 2026 20:01
Sign up for free to 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.

3 participants