fix(testing): make repository script imports deterministic under pytest - #1091
Conversation
|
Warning Review limit reached
Next review available in: 17 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Exact-head review request for PR #1091: pytest repository-path configuration fix. Local proof on d9db575: 25 affected shard/deadline tests, 22 statistical/deadline tests, Ruff, Interrogate 100%, and diff check pass without PYTHONPATH. Review only this head against protected main@04d0bc21a2a20693bcf16108cd76d394fe844d23; no runtime or numerical change. @opencode-agent review @cwl-noema-review review |
|
Please re-review this exact current head only: |
|
@opencode-agent Please perform a review-only formal review of exact current PR head |
|
Current-head review record for |
|
Re-validated the remote agent's current exact HEAD 767f7a2 after fast-forwarding the dedicated worktree. The packaging-floor guidance test now derives requires-python from pyproject.toml and both agent guides assert the same value; no production runtime dependency was added. Focused repository/bounded-script verification: 42 passed; Ruff, compileall, and git diff --check passed. Hosted checks are queued for this exact SHA; current evidence is clean. |
|
Root-cause review: current repository-script tests fail without an operator PYTHONPATH because [tool.pytest.ini_options] exposes only python; this PR correctly makes the committed config authoritative with pythonpath=[".", "python"], and adds a regression contract. It is the prerequisite for docs/figma-adr-boundary-1190 and similar script-import tests. Please re-review exact head 767f7a2 under the protected gate; no bypass or self-approval. |
|
Exact head 767f7a2 revalidated in a CodeGraph-indexed detached worktree: committed pytest pythonpath=[".", "python"] removes the operator-only import workaround; focused repository/script/Figma regression tests pass (21), and Ruff passes. This remains the prerequisite for script-heavy PRs such as #1130. Please publish fresh protected OpenCode/Noema review evidence when the queued jobs complete; auto-merge remains armed. |
|
Caution Review failedAn error occurred during the review process. Please try again later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #1090.
Root cause
The committed pytest configuration exposed only
python, while tests that materialize repository automation scripts throughimportlibneed the repository root to resolve thescriptsnamespace. The installedpytestentrypoint therefore failed during collection unless an operator suppliedPYTHONPATH=..A second consistency defect was found while refreshing canonical guidance:
pyproject.tomlandAGENTS.mdrequire Python>=3.12, butCLAUDE.mdstill advertised>=3.10and an incomplete CI support matrix. That stale setup guidance could direct future changes toward an unsupported interpreter floor.Fix
.andpythonthrough[tool.pytest.ini_options].pythonpath;requires-pythonvalue frompyproject.tomland requires bothAGENTS.mdandCLAUDE.mdto advertise that same value;CLAUDE.mdwith the>=3.12package floor and CPython 3.12/3.14 required CI matrix;No runtime, numerical, dependency, database, or release-version behavior changes.
Validation discipline
The original one-commit head passed the focused ignored-Rust/deadline suites, Ruff, Interrogate, and
git diff --check. Those results are predecessor-head evidence only after the guidance follow-up. Review and merge decisions must use fresh checks and reviews from the current exact head; do not transfer predecessor-head results.Merge only after the protected required contexts, unresolved-thread requirements, exact-head evidence, and any independent approval required by live governance are terminal and clean. No self-approval or bypass.