op_restore_from_history__42vv7Fe

Status: Failed
Started: 3/19 10:48
Execution: 18.2s
Test: 10.9s
2026-03-19 02:48:35.779	DEBUG	native:1	Pochi	pochi v0.6.0
2026-03-19 02:48:35.783	DEBUG	native:7	PochiConfigManager	add workspace config: /root/.pochi/config.jsonc
2026-03-19 02:48:35.931	DEBUG	/$bunfs/pochi:503027	loadAgents	Loaded 4 custom agents (4 valid, 0 invalid)
2026-03-19 02:48:35.932	DEBUG	/$bunfs/pochi:503028	loadSkills	Loaded 2 skills (2 valid, 0 invalid)
2026-03-19 02:48:36.042	DEBUG	/$bunfs/pochi:439288	PochiVendor	JWT is expiring or missing, fetching a new one
2026-03-19 02:48:37.846	DEBUG	/$bunfs/pochi:415701	MCPHub	MCP servers configuration changed via signal:
2026-03-19 02:48:37.846	DEBUG	/$bunfs/pochi:415813	MCPHub	Build MCPHub Status
2026-03-19 02:48:37.971	DEBUG	/$bunfs/pochi:502453	TaskRunner	Starting TaskRunner...
2026-03-19 02:48:38.046	DEBUG	/$bunfs/pochi:454195	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 02:48:38.162	DEBUG	/$bunfs/pochi:496495	generateTaskTitle	Generating task title, old: null, new: # Recover Repo State Using `jj op restore`
2026-03-19 02:48:46.881	DEBUG	/$bunfs/pochi:454195	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 02:48:48.853	DEBUG	/$bunfs/pochi:454195	listFiles	Listing workspace files from /root with maxItems 500
2026-03-19 02:48:50.058	WARN		GitStatus	readGitStatus timed out after 12000ms, returning undefined
2026-03-19 02:48:51.924	DEBUG	/$bunfs/pochi:503113	TaskRunner	Failed:

 TypeError  undefined is not an object (evaluating 'getErrorTrace(error40).map'), 417706, 47, 417706, 47, /$bunfs/root/pochi
error stack:
  • pochi	prettyFormatErrorObj
	/$bunfs/pochi:417706
  • pochi	<anonymous>
	/$bunfs/pochi:417701
  • native	reduce
	native:1
  • pochi	log
	/$bunfs/pochi:417840
  • pochi	onError
	/$bunfs/pochi:500661
  • pochi	makeRequest
	/$bunfs/pochi:432009
  • pochi	async <anonymous>
	/$bunfs/pochi:431766
  • pochi	async step
	/$bunfs/pochi:502582
  • pochi	async run
	/$bunfs/pochi:502459
  • pochi	async <anonymous>
	/$bunfs/pochi:503113
  • native	processTicksAndRejections
	native:7
undefined is not an object (evaluating 'getErrorTrace(error40).map')
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
curl is already the newest version (7.81.0-1ubuntu1.23).
0 upgraded, 0 newly installed, 0 to remove and 18 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 9 packages in 17ms
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-8.4.1, pluggy-1.6.0
rootdir: /tests
plugins: json-ctrf-0.3.5
collected 10 items

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

=================================== FAILURES ===================================
__________________ test_refactor_squash_target_commit_visible __________________

    def test_refactor_squash_target_commit_visible():
        result = subprocess.run(
            ["jj", "log", "--no-graph", "-T", "description ++ '\\n'", "-r", "::@"],
            capture_output=True,
            text=True,
            cwd=REPO_DIR,
        )
        assert result.returncode == 0, f"jj log failed: {result.stderr}"
>       assert "refactor: squash target" in result.stdout, (
            f"'refactor: squash target' commit should be visible as a separate commit after recovery: "
            f"{result.stdout}"
        )
E       AssertionError: 'refactor: squash target' commit should be visible as a separate commit after recovery: \nadd base module
E         \n\n
E       assert 'refactor: squash target' in '\\nadd base module\n\\n\\n'
E        +  where '\\nadd base module\n\\n\\n' = CompletedProcess(args=['jj', 'log', '--no-graph', '-T', "description ++ '\\n'", '-r', '::@'], returncode=0, stdout='\\nadd base module\n\\n\\n', stderr='').stdout

/tests/test_final_state.py:62: AssertionError
________________________ test_both_commits_are_separate ________________________

    def test_both_commits_are_separate():
        # Verify that "add base module" and "refactor: squash target" are separate commits
        # by checking their descriptions appear in separate revisions
        result = subprocess.run(
            [
                "jj", "log", "--no-graph", "-T", "description ++ '\\n'",
                "-r", "::@ ~ root()",
            ],
            capture_output=True,
            text=True,
            cwd=REPO_DIR,
        )
        assert result.returncode == 0, f"jj log failed: {result.stderr}"
        # Count commits with the known descriptions
        lines = result.stdout.splitlines()
        descriptions = [ln.strip() for ln in lines if ln.strip()]
        has_base = any("add base module" in d and "refactor" not in d for d in descriptions)
        has_refactor = any("refactor: squash target" in d for d in descriptions)
>       assert has_base and has_refactor, (
            f"Both 'add base module' and 'refactor: squash target' should be separate commits. "
            f"Got descriptions: {descriptions}"
        )
E       AssertionError: Both 'add base module' and 'refactor: squash target' should be separate commits. Got descriptions: ['\\nadd base module', '\\n']
E       assert (True and False)

/tests/test_final_state.py:86: AssertionError
______________________ test_op_log_has_restore_operation _______________________

    def test_op_log_has_restore_operation():
        result = subprocess.run(
            ["jj", "op", "log", "--no-graph", "-T", "description ++ '\\n'"],
            capture_output=True,
            text=True,
            cwd=REPO_DIR,
        )
        assert result.returncode == 0, f"jj op log failed: {result.stderr}"
>       assert "restore" in result.stdout.lower(), (
            f"Expected a 'restore' operation in op log, got: {result.stdout}"
        )
E       AssertionError: Expected a 'restore' operation in op log, got: squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\nprev: a1382bd75821 -> editing c73546e6f459\nnew empty commit\ndescribe commit 84102ce2f9d1f5cb25a98280bc6bee251c7857bd\nsnapshot working copy\nnew empty commit\ndescribe commit e221262b2b0320b75d24fcb804f344a4d8a89cdc\nsnapshot working copy\nadd workspace 'default'\n\n
E       assert 'restore' in "squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\nprev: a1382bd75821 -> editing c73546e6f459\\nnew empty...mit\\ndescribe commit e221262b2b0320b75d24fcb804f344a4d8a89cdc\\nsnapshot working copy\\nadd workspace 'default'\\n\\n"
E        +  where "squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\nprev: a1382bd75821 -> editing c73546e6f459\\nnew empty...mit\\ndescribe commit e221262b2b0320b75d24fcb804f344a4d8a89cdc\\nsnapshot working copy\\nadd workspace 'default'\\n\\n" = <built-in method lower of str object at 0x70ea905250b0>()
E        +    where <built-in method lower of str object at 0x70ea905250b0> = "squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\nprev: a1382bd75821 -> editing c73546e6f459\\nnew empty...mit\\ndescribe commit e221262b2b0320b75d24fcb804f344a4d8a89cdc\\nsnapshot working copy\\nadd workspace 'default'\\n\\n".lower
E        +      where "squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\nprev: a1382bd75821 -> editing c73546e6f459\\nnew empty...mit\\ndescribe commit e221262b2b0320b75d24fcb804f344a4d8a89cdc\\nsnapshot working copy\\nadd workspace 'default'\\n\\n" = CompletedProcess(args=['jj', 'op', 'log', '--no-graph', '-T', "description ++ '\\n'"], returncode=0, stdout="squash co...be commit e221262b2b0320b75d24fcb804f344a4d8a89cdc\\nsnapshot working copy\\nadd workspace 'default'\\n\\n", stderr='').stdout

/tests/test_final_state.py:100: AssertionError
______________________ test_op_log_most_recent_is_restore ______________________

    def test_op_log_most_recent_is_restore():
        result = subprocess.run(
            ["jj", "op", "log", "--no-graph", "-T", "description ++ '\\n'", "-n", "1"],
            capture_output=True,
            text=True,
            cwd=REPO_DIR,
        )
        assert result.returncode == 0, f"jj op log failed: {result.stderr}"
>       assert "restore" in result.stdout.lower(), (
            f"Most recent operation should be a 'restore', got: {result.stdout}"
        )
E       AssertionError: Most recent operation should be a 'restore', got: squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\n
E       assert 'restore' in 'squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\n'
E        +  where 'squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\n' = <built-in method lower of str object at 0x70ea90115ed0>()
E        +    where <built-in method lower of str object at 0x70ea90115ed0> = 'squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\n'.lower
E        +      where 'squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\n' = CompletedProcess(args=['jj', 'op', 'log', '--no-graph', '-T', "description ++ '\\n'", '-n', '1'], returncode=0, stdout='squash commits into afa4788e86a38c4d03f7bd0d81f27bfdc6ac244b\\n', stderr='').stdout

/tests/test_final_state.py:113: AssertionError
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_final_state.py::test_refactor_py_exists
PASSED ../tests/test_final_state.py::test_refactor_py_content
PASSED ../tests/test_final_state.py::test_base_py_exists
PASSED ../tests/test_final_state.py::test_base_py_content
PASSED ../tests/test_final_state.py::test_add_base_module_commit_visible
PASSED ../tests/test_final_state.py::test_jj_status_succeeds
FAILED ../tests/test_final_state.py::test_refactor_squash_target_commit_visible
FAILED ../tests/test_final_state.py::test_both_commits_are_separate - Asserti...
FAILED ../tests/test_final_state.py::test_op_log_has_restore_operation - Asse...
FAILED ../tests/test_final_state.py::test_op_log_most_recent_is_restore - Ass...
========================= 4 failed, 6 passed in 0.13s ==========================