undo_mistaken_rebase__KjC7hoX

Status: Failed
Started: 3/19 19:13
Execution: 20.0s
Test: 10.4s
2026-03-19 11:15:24.831	DEBUG	native:1	Pochi	pochi v0.6.1
2026-03-19 11:15:24.835	DEBUG	native:7	PochiConfigManager	add workspace config: /root/.pochi/config.jsonc
2026-03-19 11:15:24.857	DEBUG	/$bunfs/pochi:503183	loadAgents	Loaded 5 custom agents (5 valid, 0 invalid)
2026-03-19 11:15:24.858	DEBUG	/$bunfs/pochi:503184	loadSkills	Loaded 2 skills (2 valid, 0 invalid)
2026-03-19 11:15:24.873	DEBUG	/$bunfs/pochi:439420	PochiVendor	JWT is expiring or missing, fetching a new one
2026-03-19 11:15:26.259	DEBUG	/$bunfs/pochi:415701	MCPHub	MCP servers configuration changed via signal:
2026-03-19 11:15:26.259	DEBUG	/$bunfs/pochi:415813	MCPHub	Build MCPHub Status
2026-03-19 11:15:26.356	DEBUG	/$bunfs/pochi:502609	TaskRunner	Starting TaskRunner...
2026-03-19 11:15:26.370	DEBUG	/$bunfs/pochi:454339	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 11:15:26.455	DEBUG	/$bunfs/pochi:496641	generateTaskTitle	Generating task title, old: null, new: You are a developer migrating from Git. You accidentally rebased the `feature` bookmark onto the wrong commit (`dev` instead of `main`).
2026-03-19 11:15:34.623	DEBUG	/$bunfs/pochi:454339	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 11:15:36.342	DEBUG	/$bunfs/pochi:454339	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 11:15:37.031	DEBUG	/$bunfs/pochi:496641	generateTaskTitle	Generating task title, old: You are a developer migrating from Git. You accidentally rebased the `feature` bookmark onto the wrong commit (`dev` instead of `main`)., new: Undo mistaken feature rebase and rebase it onto main
2026-03-19 11:15:37.287	DEBUG	/$bunfs/pochi:454315	listFiles	handling listFile with dirPath . and recursive true
2026-03-19 11:15:37.290	DEBUG	/$bunfs/pochi:454339	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 11:15:38.494	DEBUG	/$bunfs/pochi:454339	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 11:15:40.882	DEBUG	/$bunfs/pochi:454339	listFiles	Listing workspace files from /root with maxItems 500
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
curl is already the newest version (8.5.0-2ubuntu10.8).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
downloading uv 0.9.7 x86_64-unknown-linux-gnu
no checksums to verify
installing to /root/.local/bin
  uv
  uvx
everything's installed!

To add $HOME/.local/bin to your PATH, either restart your shell or run:

    source $HOME/.local/bin/env (sh, bash, zsh)
    source $HOME/.local/bin/env.fish (fish)
Downloading pygments (1.2MiB)
 Downloading pygments
Installed 6 packages in 12ms
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.4.1, pluggy-1.6.0
rootdir: /tests
plugins: json-ctrf-0.3.5
collected 3 items

../tests/test_final_state.py FFF                                         [100%]

=================================== FAILURES ===================================
_____________________ test_feature_is_direct_child_of_main _____________________

    def test_feature_is_direct_child_of_main():
        result = run_jj(["log", "-r", "main..feature", "--no-graph", "-T", "bookmarks"])
        assert result.returncode == 0, f"jj log failed: {result.stderr}"
        # If feature is a direct child of main, `main..feature` should contain exactly one commit (the feature commit)
        # Wait, the task says "direct child", but it was originally off main's parent.
        # Actually, the truth just says "The `feature` bookmark is a direct child of the `main` bookmark."
        # We can check if `main` is the parent of `feature`.
        result_parents = run_jj(["log", "-r", "feature-", "--no-graph", "-T", "bookmarks"])
        assert result_parents.returncode == 0, f"jj log failed: {result_parents.stderr}"
>       assert "main" in result_parents.stdout, f"Expected 'main' to be the parent of 'feature', but got: {result_parents.stdout}"
E       AssertionError: Expected 'main' to be the parent of 'feature', but got: 
E       assert 'main' in ''
E        +  where '' = CompletedProcess(args=['jj', 'log', '-r', 'feature-', '--no-graph', '-T', 'bookmarks'], returncode=0, stdout='', stderr='').stdout

/tests/test_final_state.py:20: AssertionError
_______________________ test_feature_is_not_child_of_dev _______________________

    def test_feature_is_not_child_of_dev():
        result = run_jj(["log", "-r", "dev..feature", "--no-graph", "-T", "bookmarks"])
        assert result.returncode == 0, f"jj log failed: {result.stderr}"
        # If feature is not a descendant of dev, dev..feature might be empty or just feature,
        # but the simplest way to check is to ensure dev is NOT an ancestor of feature.
        result_ancestors = run_jj(["log", "-r", "::feature", "--no-graph", "-T", "bookmarks"])
        assert result_ancestors.returncode == 0, f"jj log failed: {result_ancestors.stderr}"
>       assert "dev" not in result_ancestors.stdout, "Expected 'feature' to NOT be a child/descendant of 'dev', but 'dev' was found in its ancestors."
E       AssertionError: Expected 'feature' to NOT be a child/descendant of 'dev', but 'dev' was found in its ancestors.
E       assert 'dev' not in 'featuredevmain'
E         
E         'dev' is contained here:
E           featuredevmain
E         ?        +++

/tests/test_final_state.py:29: AssertionError
_______________ test_rebase_verification_log_exists_and_correct ________________

    def test_rebase_verification_log_exists_and_correct():
>       assert os.path.exists(LOG_FILE), f"Verification log {LOG_FILE} does not exist."
E       AssertionError: Verification log /home/user/rebase_verification.log does not exist.
E       assert False
E        +  where False = <function exists at 0x79a906c6f560>('/home/user/rebase_verification.log')
E        +    where <function exists at 0x79a906c6f560> = <module 'posixpath' (frozen)>.exists
E        +      where <module 'posixpath' (frozen)> = os.path

/tests/test_final_state.py:32: AssertionError
=========================== short test summary info ============================
FAILED ../tests/test_final_state.py::test_feature_is_direct_child_of_main - A...
FAILED ../tests/test_final_state.py::test_feature_is_not_child_of_dev - Asser...
FAILED ../tests/test_final_state.py::test_rebase_verification_log_exists_and_correct
============================== 3 failed in 0.07s ===============================