The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(e2e): shallow/partial-clone update cells assert the fixed behaviour
teknium101a5549fafab
diff --git a/tests/e2e/core/upgrade/git/test_partial_clone.py b/tests/e2e/core/upgrade/git/test_partial_clone.pyindex 7be46173a4c..445e138a6d1 100644--- a/tests/e2e/core/upgrade/git/test_partial_clone.py+++ b/tests/e2e/core/upgrade/git/test_partial_clone.py@@ -15,7 +15,6 @@ from __future__ import annotationsimport pytest-from tests.e2e.core._pending_fixes import known_failurefrom tests.e2e.core.upgrade import _install_helpers as Ifrom tests.e2e.core.upgrade.git import _git_world as G@@ -60,12 +59,9 @@ def test_updates_land_and_the_clone_keeps_its_shape(runs, shape):f"seeded the wrong clone shape for {shape}: {run['shape0']}"assert cp1.returncode == 0 and run["head1"] == I.head_sha(), f"N-1 -> HEAD update failed:\n{w.diag(cp1)}"assert G.TRACEBACK not in G.output(cp1), f"N-1 -> HEAD update printed a traceback:\n{w.diag(cp1)}"- with known_failure(r"full clone was converted to a partial clone",- "gated on #122353: the post-update tag fetch passes --filter=tree:0 and turns a full clone "- "into a promisor clone (HEAD's post-swap code, so a fix flips this directly)"):- assert run["shape1"] == run["shape0"], (- f"{'the full clone was converted to a partial clone' if shape == 'full' else 'the clone changed shape'} "- f"by the N-1 -> HEAD update: {run['shape0']} -> {run['shape1']}\n{w.diag(cp1)}")+ assert run["shape1"] == run["shape0"], (+ f"{'the full clone was converted to a partial clone' if shape == 'full' else 'the clone changed shape'} "+ f"by the N-1 -> HEAD update: {run['shape0']} -> {run['shape1']}\n{w.diag(cp1)}")assert cp2.returncode == 0 and run["head2"] == run["target2"], f"HEAD -> next update failed:\n{w.diag(cp2)}"assert run["shape2"] == run["shape0"], f"the clone changed shape: {run['shape0']} -> {run['shape2']}\n{w.diag(cp2)}"version = run["version"]diff --git a/tests/e2e/core/upgrade/git/test_shallow_install.py b/tests/e2e/core/upgrade/git/test_shallow_install.pyindex 734a1645b83..1a0c932379f 100644--- a/tests/e2e/core/upgrade/git/test_shallow_install.py+++ b/tests/e2e/core/upgrade/git/test_shallow_install.py@@ -100,9 +100,9 @@ def test_stale_depth1_install_updates_without_fetching_the_whole_history(runs):main_fetch = run["fetches1"][0].body_bytes if run["fetches1"] else 0bound = 2 * w.install_byteswith known_failure(r"downloaded .* the depth-1 install itself",- "gated on #123254: on a depth-1 install the updater's plain `git fetch origin main` "- "negotiates away the shallow boundary and downloads ~the whole history (N-1's pre-swap "- "fetch: flips once a fixed release is N-1)"):+ "#123254: on a depth-1 install N-1's plain `git fetch origin main` downloads ~the whole "+ "history. HEAD unshallows (commits only) before that fetch; the fetch runs pre-swap, so "+ "this flips once a release carrying the fix is N-1"):assert main_fetch <= bound, (f"moving one release, the update's main fetch downloaded {main_fetch} bytes, more than twice the "f"{w.install_bytes} bytes of the depth-1 install itself:\n{w.diag(cp1, run['mark1'])}")@@ -113,12 +113,9 @@ def test_second_update_after_the_unshallowing_update_succeeds(runs):w: G.World = run["w"]cp1, cp2 = run["cp1"], run["cp2"]assert cp1.returncode == 0 and run["head1"] == I.head_sha(), f"N-1 -> HEAD update failed:\n{w.diag(cp1, run['mark1'])}"- with known_failure(r"should_include_obj|pack-objects died",- "gated on #124272: the first update's unshallow fetch applies --filter=tree:0 to a "- "non-promisor clone; the next fetch crashes in pack-objects (HEAD's post-swap step)"):- assert cp2.returncode == 0 and run["head2"] == run["target2"], (- f"the update after the unshallowing update failed (rc={cp2.returncode}):\n"- f"{G.output(cp2)[-1500:]}\n{w.diag(cp2, run['mark2'])}")+ assert cp2.returncode == 0 and run["head2"] == run["target2"], (+ f"the update after the unshallowing update failed (rc={cp2.returncode}):\n"+ f"{G.output(cp2)[-1500:]}\n{w.diag(cp2, run['mark2'])}")version = run["version"]assert version.returncode == 0 and G.TRACEBACK not in G.output(version), w.diag(version)@@ -131,9 +128,10 @@ def test_passive_checks_do_not_push_the_next_update_into_orphan_divergence(runs)assert cp.returncode == 0 and G.TRACEBACK not in G.output(cp), f"`hermes update --check` failed:\n{w.diag(cp)}"assert cp1.returncode == 0 and run["head1"] == I.head_sha(), f"N-1 -> HEAD update failed:\n{w.diag(cp1)}"with known_failure(r"claims orphan divergence",- "gated on #124645: each depth-1 `--check` still appends a graft the reflog pins "- "(the #105951 prune restores them), and the next update resets as orphan divergence "- "(N-1's own check and pull code: flips once a fixed release is N-1)"):+ "#124645: each depth-1 `--check` appends a graft the fetch reflog pins, and N-1's "+ "update resets as orphan divergence. HEAD's prune expires those reflogs and HEAD "+ "unshallows before the pull; it is N-1's own check and pull code, so this flips once "+ "a release carrying the fix is N-1"):assert ORPHAN not in G.output(cp1) and not w.refs("refs/hermes-update-backups/orphan-*"), (f"after {len(run['checks'])} passive checks ({run['grafts']} grafts in .git/shallow) the update "f"claims orphan divergence on a history it shares with upstream:\n{w.diag(cp1)}")@@ -147,9 +145,6 @@ def test_depth1_prefetch_never_turns_shared_history_into_orphan_divergence(runs)assert cp1.returncode == 0 and run["head1"] == run["target"], f"update failed:\n{w.diag(cp1)}"keepers = w.refs_containing(run["local"])assert keepers, f"local commit {run['local'][:12]} is reachable only from the reflog:\n{w.diag(cp1)}"- with known_failure(r"claims orphan divergence",- "gated on #123346: after a --depth pre-fetch the grafted tip has no ancestry, and the "- "update resets as orphan divergence instead of deepening and re-testing"):- assert ORPHAN not in G.output(cp1) and not w.refs("refs/hermes-update-backups/orphan-*"), (- f"after a --depth 1 pre-fetch the update claims orphan divergence and force-resets main "- f"(local commit {run['local'][:12]} shares history with upstream):\n{w.diag(cp1)}")+ assert ORPHAN not in G.output(cp1) and not w.refs("refs/hermes-update-backups/orphan-*"), (+ f"after a --depth 1 pre-fetch the update claims orphan divergence and force-resets main "+ f"(local commit {run['local'][:12]} shares history with upstream):\n{w.diag(cp1)}")