Skip to content

fix(dev-deps): enforce [dev] install + align docs to CI#402

Merged
HumanBean17 merged 1 commit into
masterfrom
worktree-dev-deps-guard
Jul 7, 2026
Merged

fix(dev-deps): enforce [dev] install + align docs to CI#402
HumanBean17 merged 1 commit into
masterfrom
worktree-dev-deps-guard

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

Problem

Agents repeatedly reported green locally, red on CI. Root cause: a one-character mismatch between CI and the docs agents follow.

  • CI (.github/workflows/test.yml:69): pip install -e ".[dev]"
  • Agent docs (AGENTS.md:9, docs/JAVA-CODEBASE-RAG-CLI.md:10): pip install -e . — no [dev]

pytest-asyncio lives only under the [dev] extra (pyproject.toml:53). An agent following the doc got a venv with no pytest-asyncio. pytest.ini sets asyncio_mode = auto, which is a silent no-op without the plugin — so every async def test_* was collected and failed instantly (~0.01s, coroutine-never-awaited) instead of running.

That fast-failure signature broke reasoning twice:

  1. The real regression looked identical to the env-induced async failures.
  2. The "baseline on master" ran in the same broken venv → same fake failures → a false "pre-existing on master" conclusion. Two wrongs cancelled out and masked a real create_index regression.

A worktree would not have prevented this — the repo-root .venv is shared across worktrees. The fix has to be env-health verification.

Fix

  1. Align docs to CIAGENTS.md:9 and docs/JAVA-CODEBASE-RAG-CLI.md:10 now say -e ".[dev]" (matching CI and README.md:274).
  2. Fail loud, not silent (tests/conftest.py) — new _enforce_dev_deps(), wired into pytest_configure ahead of the existing _enforce_editable_install() guard and mirroring its style: missing pytest-asyncio now exits with returncode=4 and a one-line fix command, instead of N silent 0.01s failures. Also aligned the editable-install guard's message to .[dev] so both guards print one canonical command.

Verification

  • ruff check tests/conftest.py — clean (repo line-length 100).
  • Guard, isolated: pytest-asyncio present → returns silently; absent (sys.modules['pytest_asyncio']=None) → raises _pytest.outcomes.Exit, returncode 4, correct message.
  • In real pytest --collect-only: the [install] guard fired, not [dev-deps] → confirms the new guard runs first and does not false-positive.

Out of scope (intentionally left)

  • tests/test_jrag_*.py assertion hints (run: pip install -e .) — about the jrag entrypoint being installed, not dev deps.
  • plans/** — historical/completed records.

🤖 Generated with Claude Code

A local `pip install -e .` (as AGENTS.md instructed) omits the `[dev]`
extra, so pytest-asyncio was absent. With pytest.ini's `asyncio_mode =
auto`, every async test then fails instantly (~0.01s) instead of running
— indistinguishable from a real regression, which produced a false
"pre-existing failures on master" baseline and masked a real create_index
regression. CI installs `[dev]` (.github/workflows/test.yml:69); a worktree
wouldn't have caught it (the repo-root .venv is shared).

- AGENTS.md / docs/JAVA-CODEBASE-RAG-CLI.md: `-e .` -> `-e ".[dev]"`,
  matching CI and README.md.
- tests/conftest.py: add _enforce_dev_deps() (mirrors the existing
  _enforce_editable_install guard) — missing pytest-asyncio now fails
  collection loud (returncode 4 + fix command) instead of N silent fast
  failures. Wired into pytest_configure ahead of the editable-install
  check. Also align the editable-install guard's message to `.[dev]`.

Co-Authored-By: Claude <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit 8652658 into master Jul 7, 2026
3 checks passed
@HumanBean17 HumanBean17 deleted the worktree-dev-deps-guard branch July 7, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant