[Bug] The persist step-order tests leave a stub `FullTextSearch` on `repowise.core.persistence`
Maintainers usually reply within 1 day
@DEMONCODEX is already working on this.
Since Nov 26, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Read tests/unit/_persist_step_recorders.py around lines 156–158 and the lazy export in persistence/__init__.py around lines 181–190. Run the two-file pytest command in the issue to reproduce the failures, then check that it passes after fixing the patch order. The issue’s done criteria also require a comment naming the lazy export; keep the step-order assertions unchanged.
Written by the indexing model from the issue text.
Description
Summary
Run the incremental step-order tests and then the update reliability tests in one process, and two tests fail with '_FTS' object has no attribute 'index'. Each file passes alone, and CI sharding hides it.
tests/unit/_persist_step_recorders.py:156-158
fts = rec.fts_class()
rec.monkeypatch.setattr(search, "FullTextSearch", fts)
rec.monkeypatch.setattr(persistence, "FullTextSearch", fts)
Mechanism
repowise.core.persistenceexportsFullTextSearchlazily. Its__getattr__imports.search, reads the name and caches it in the package globals (persistence/__init__.py:181-190).searchis patched first. Whenmonkeypatch.setattr(persistence, ...)then reads the old value,__getattr__fetches the already patched stub fromsearchand caches it. Monkeypatch records the stub as the original and "restores" it at teardown.- A later
from repowise.core.persistence import FullTextSearchgets the stub.
Repro
pytest tests/unit/pipeline/test_incremental_persist_step_order.py tests/unit/cli/test_update_persist_reliability.py
E AttributeError: '_FTS' object has no attribute 'index'
FAILED ...::test_update_sweeps_pages_retired_since_the_index_was_built
FAILED ...::test_full_update_leaves_no_rows_for_a_deleted_file
2 failed, 24 passed
test_update_persist_reliability.py alone: 19 passed.
Done looks like
- Patch
persistencebeforesearch, or readpersistence.FullTextSearchonce before patching, so the recorded original is the real class. Add a comment naming the lazy export. - Must not change: what the step-order tests assert.
- First issue: test helper only.
Tests
The two-file command above passes. Optionally, a check in the helper that persistence.FullTextSearch is the real class after teardown.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from repowise-dev/repowise
-
[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable filesPossibly taken @ZYZ666-RGB claimed this 1 day ago. Openbug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#6296 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not rootsPossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#4477 ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day