Skip to content

The agent that grows with you

fix(ci): make the -I shadow guard load-bearing; widen clone timeout to 600s

teknium1eb9cb6c8e1bb
diff --git a/.github/workflows/plugin-catalog-ci.yml b/.github/workflows/plugin-catalog-ci.yml
index 75e697b3a72..df5ba2fcb3d 100644
--- a/.github/workflows/plugin-catalog-ci.yml
+++ b/.github/workflows/plugin-catalog-ci.yml
@@ -167,7 +167,9 @@ jobs:
CLONE_DIR=$(realpath "$(mktemp -d -p "$WORKROOT")")
# Full clone (no --depth 1): the pinned sha may not be the branch tip.
- if ! timeout 120 git clone "$REPO" "$CLONE_DIR" </dev/null; then
+ # 600s: listed repos reach >1 GB (hermes-jackal-verified 1.43 GB,
+ # hindsight 741 MB); 120s would false-fail a re-pin on a slow runner.
+ if ! timeout 600 git clone "$REPO" "$CLONE_DIR" </dev/null; then
echo "::error file=$entry::clone failed for $REPO"
FAILED=1; echo "::endgroup::"; continue
fi
diff --git a/tests/ci/test_plugin_catalog_ci_confinement.py b/tests/ci/test_plugin_catalog_ci_confinement.py
index 54285917e3c..c35327b62af 100644
--- a/tests/ci/test_plugin_catalog_ci_confinement.py
+++ b/tests/ci/test_plugin_catalog_ci_confinement.py
@@ -422,11 +422,18 @@ def test_parser_crash_fails_that_entry_not_the_loop(tmp_path, fixture):
@pytest.mark.platforms("linux")
def test_parser_imports_cannot_be_shadowed_by_checkout_files(tmp_path, fixture):
"""The parser runs with cwd = the PR checkout; without interpreter isolation a
- PR-authored re.py (or shlex.py) shadows the stdlib import and neuters every
- field check."""
+ PR-authored shlex.py shadows the stdlib import and can swallow the verdict.
+
+ shlex, not re: `re` is already imported during interpreter startup, so a cwd
+ re.py never shadows it and the guard would pass even without `-I`. shlex is
+ first imported by the parser itself, so it is the load-bearing vector."""
origin, sha, tmpdir = fixture
- (tmp_path / "re.py").write_text(
- "def fullmatch(*a, **k):\n return True\n", encoding="utf-8")
+ (tmp_path / "shlex.py").write_text(
+ "def quote(s):\n"
+ " if s.startswith('repo must'):\n"
+ " s = '' # swallow the rejection so BAD evals empty\n"
+ " return \"'\" + s.replace(\"'\", \"'\\\\''\") + \"'\"\n",
+ encoding="utf-8")
entry = _write_entry(tmp_path, "evil.yaml",
repo=origin.as_uri(), sha=sha, subdir="plugin")
res = _run_gate(_env(tmp_path, origin, entry, tmpdir), tmp_path)