undo_accidental_abandon__CAU5xWx

Status: Failed
Started: 3/19 15:20
Execution: 16.2s
Test: 10.4s
2026-03-19 07:23:23.426	DEBUG	native:1	Pochi	pochi v0.6.0
2026-03-19 07:23:23.616	DEBUG	/$bunfs/root/pochi:503027	loadAgents	Loaded 4 custom agents (4 valid, 0 invalid)
2026-03-19 07:23:23.617	DEBUG	/$bunfs/root/pochi:503028	loadSkills	Loaded 2 skills (2 valid, 0 invalid)
2026-03-19 07:23:23.646	DEBUG	/$bunfs/root/pochi:439288	PochiVendor	JWT is expiring or missing, fetching a new one
2026-03-19 07:23:24.990	DEBUG	/$bunfs/root/pochi:415701	MCPHub	MCP servers configuration changed via signal:
2026-03-19 07:23:24.991	DEBUG	/$bunfs/root/pochi:415813	MCPHub	Build MCPHub Status
2026-03-19 07:23:25.095	DEBUG	/$bunfs/root/pochi:502453	TaskRunner	Starting TaskRunner...
2026-03-19 07:23:25.108	DEBUG	/$bunfs/root/pochi:454195	listFiles	Listing workspace files from /home/user/project with maxItems 500
2026-03-19 07:23:25.194	DEBUG	/$bunfs/root/pochi:496495	generateTaskTitle	Generating task title, old: null, new: ## Scenario
2026-03-19 07:23:34.622	DEBUG	/$bunfs/root/pochi:454195	listFiles	Listing workspace files from /home/user/project with maxItems 500
2026-03-19 07:23:37.115	WARN		GitStatus	readGitStatus timed out after 12000ms, returning undefined
2026-03-19 07:23:37.379	DEBUG	/$bunfs/root/pochi:496495	generateTaskTitle	Generating task title, old: ## Scenario, new: Recover accidentally abandoned jj commit using operation log undo
2026-03-19 07:23:37.840	DEBUG	/$bunfs/root/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/root/pochi:417706
  • pochi	<anonymous>
	/$bunfs/root/pochi:417701
  • native	reduce
	native:1
  • pochi	log
	/$bunfs/root/pochi:417840
  • pochi	onError
	/$bunfs/root/pochi:500661
  • pochi	makeRequest
	/$bunfs/root/pochi:432009
  • pochi	async <anonymous>
	/$bunfs/root/pochi:431766
  • pochi	async step
	/$bunfs/root/pochi:502582
  • pochi	async run
	/$bunfs/root/pochi:502459
  • pochi	async <anonymous>
	/$bunfs/root/pochi:503113
  • native	processTicksAndRejections
	native:7
undefined is not an object (evaluating 'getErrorTrace(error40).map')
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security 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 20 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 21ms
============================= 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 7 items

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

=================================== FAILURES ===================================
_______________________ test_auth_module_commit_visible ________________________

    def test_auth_module_commit_visible():
        # The "add user authentication module" commit must exist and be visible (not abandoned)
        result = subprocess.run(
            ["jj", "log", "--no-graph", "-T", "description",
             "-r", 'description(substring:"add user authentication module")'],
            cwd=REPO_DIR,
            capture_output=True,
            text=True,
        )
        assert result.returncode == 0, (
            f"jj log failed when querying for 'add user authentication module': {result.stderr}"
        )
>       assert "add user authentication module" in result.stdout, (
            "The 'add user authentication module' commit is not visible in the revision log. "
            "It may still be abandoned. Use 'jj op log' and 'jj undo' or 'jj op restore' to recover it."
        )
E       AssertionError: The 'add user authentication module' commit is not visible in the revision log. It may still be abandoned. Use 'jj op log' and 'jj undo' or 'jj op restore' to recover it.
E       assert 'add user authentication module' in ''
E        +  where '' = CompletedProcess(args=['jj', 'log', '--no-graph', '-T', 'description', '-r', 'description(substring:"add user authentication module")'], returncode=0, stdout='', stderr='').stdout

/tests/test_final_state.py:20: AssertionError
___________________ test_src_auth_py_content_in_auth_commit ____________________

    def test_src_auth_py_content_in_auth_commit():
        # src/auth.py must exist with correct content in the auth module commit
        result = subprocess.run(
            ["jj", "file", "show",
             "-r", 'description(substring:"add user authentication module")',
             "src/auth.py"],
            cwd=REPO_DIR,
            capture_output=True,
            text=True,
        )
>       assert result.returncode == 0, (
            f"src/auth.py not found in 'add user authentication module' commit: {result.stderr}"
        )
E       AssertionError: src/auth.py not found in 'add user authentication module' commit: Error: Revset `description(substring:"add user authentication module")` didn't resolve to any revisions
E         
E       assert 1 == 0
E        +  where 1 = CompletedProcess(args=['jj', 'file', 'show', '-r', 'description(substring:"add user authentication module")', 'src/aut...', stderr='Error: Revset `description(substring:"add user authentication module")` didn\'t resolve to any revisions\n').returncode

/tests/test_final_state.py:36: AssertionError
___________________ test_update_readme_parent_is_auth_module ___________________

    def test_update_readme_parent_is_auth_module():
        # The "update README with usage instructions" commit must have
        # "add user authentication module" as its parent
        result = subprocess.run(
            ["jj", "log", "--no-graph", "-T", "description",
             "-r", 'parents(description(substring:"update README with usage instructions"))'],
            cwd=REPO_DIR,
            capture_output=True,
            text=True,
        )
        assert result.returncode == 0, (
            f"Failed to query parents of 'update README with usage instructions': {result.stderr}"
        )
>       assert "add user authentication module" in result.stdout, (
            "The parent of 'update README with usage instructions' is not 'add user authentication module'. "
            f"Got parents: {result.stdout!r}. The ancestry chain was not fully restored."
        )
E       AssertionError: The parent of 'update README with usage instructions' is not 'add user authentication module'. Got parents: 'initial project scaffold\n'. The ancestry chain was not fully restored.
E       assert 'add user authentication module' in 'initial project scaffold\n'
E        +  where 'initial project scaffold\n' = CompletedProcess(args=['jj', 'log', '--no-graph', '-T', 'description', '-r', 'parents(description(substring:"update README with usage instructions"))'], returncode=0, stdout='initial project scaffold\n', stderr='').stdout

/tests/test_final_state.py:58: AssertionError
_________________ test_auth_module_parent_is_initial_scaffold __________________

    def test_auth_module_parent_is_initial_scaffold():
        # The "add user authentication module" commit must have
        # "initial project scaffold" as its parent
        result = subprocess.run(
            ["jj", "log", "--no-graph", "-T", "description",
             "-r", 'parents(description(substring:"add user authentication module"))'],
            cwd=REPO_DIR,
            capture_output=True,
            text=True,
        )
        assert result.returncode == 0, (
            f"Failed to query parents of 'add user authentication module': {result.stderr}"
        )
>       assert "initial project scaffold" in result.stdout, (
            "The parent of 'add user authentication module' is not 'initial project scaffold'. "
            f"Got parents: {result.stdout!r}. The ancestry chain was not fully restored."
        )
E       AssertionError: The parent of 'add user authentication module' is not 'initial project scaffold'. Got parents: ''. The ancestry chain was not fully restored.
E       assert 'initial project scaffold' in ''
E        +  where '' = CompletedProcess(args=['jj', 'log', '--no-graph', '-T', 'description', '-r', 'parents(description(substring:"add user authentication module"))'], returncode=0, stdout='', stderr='').stdout

/tests/test_final_state.py:77: AssertionError
____________________ test_operation_log_has_undo_or_restore ____________________

    def test_operation_log_has_undo_or_restore():
        # The operation log must contain an undo/restore/revert operation,
        # confirming the recovery was performed via the operation log.
        result = subprocess.run(
            ["jj", "op", "log", "--no-graph", "-T", "description"],
            cwd=REPO_DIR,
            capture_output=True,
            text=True,
        )
        assert result.returncode == 0, f"jj op log failed: {result.stderr}"
        op_log = result.stdout.lower()
        has_undo = "undo" in op_log
        has_restore = "restore" in op_log
        has_revert = "revert" in op_log
>       assert has_undo or has_restore or has_revert, (
            "No undo, restore, or revert operation found in the operation log. "
            "The recovery must be performed via the jj operation log (jj undo or jj op restore), "
            f"not by manually recreating the commit. Op log: {result.stdout!r}"
        )
E       AssertionError: No undo, restore, or revert operation found in the operation log. The recovery must be performed via the jj operation log (jj undo or jj op restore), not by manually recreating the commit. Op log: "abandon commit c4701dda848ed73548fd86da0c0210124a1c49a7new empty commitcreate bookmark main pointing to commit ba21d549591b64b297431613b6884e2ff354b20ddescribe commit 9a2da1cf32d4206ee7f4dbbf0b4c1a84fc5c9d87snapshot working copynew empty commitdescribe commit 2161d64875e7e8ffa2a16a9eb0e0a129c9ef4082snapshot working copynew empty commitdescribe commit 4f8d15a9656c4802ad703d184de657a89a21d07csnapshot working copyadd workspace 'default'"
E       assert (False or False or False)

/tests/test_final_state.py:147: AssertionError
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../../../tests/test_final_state.py::test_main_bookmark_points_to_update_readme
PASSED ../../../tests/test_final_state.py::test_working_copy_is_empty_on_top_of_main
FAILED ../../../tests/test_final_state.py::test_auth_module_commit_visible - ...
FAILED ../../../tests/test_final_state.py::test_src_auth_py_content_in_auth_commit
FAILED ../../../tests/test_final_state.py::test_update_readme_parent_is_auth_module
FAILED ../../../tests/test_final_state.py::test_auth_module_parent_is_initial_scaffold
FAILED ../../../tests/test_final_state.py::test_operation_log_has_undo_or_restore
========================= 5 failed, 2 passed in 0.18s ==========================