names/tagger: drop the flag-keyed cache, re-pin tests to production flags
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start in rust/src/names/tagger.rs and inspect the production call from analyze.rs, especially the TAGGER_FLAGS constant and the existing tagger tests. Replace the flag-keyed cache with the two production statics, then re-pin test automatons to TAGGER_FLAGS and adjust expectations where needed. Done means the cache and obsolete flag combination are gone and the tagger tests cover the production configuration.
Written by the indexing model from the issue text.
Description
Two related leftovers in rust/src/names/tagger.rs:
-
The tagger cache is a
RwLock<HashMap<(TaggerKind, Normalize), Arc<Tagger>>>, justified in a comment as "same shape as the org_types Replacer cache". The analogy doesn't hold: the Replacer receives arbitrary flags over FFI from Python, while the tagger has no Python surface at all — its only production caller isanalyze.rswith the constantTAGGER_FLAGS(CASEFOLD | NAME). TwoLazyLock<Tagger>statics (org / person) would replace the lock, the map, and the key hashing. -
The unit tests build automatons with
CASEFOLD | SQUASH_SPACES— a combination pinned to a Python wrapper default that no longer exists (the wrapper module was removed; onlyanalyze_namesdrives the tagger now). All tagger tests therefore exercise a configuration production never runs. Re-pin them toTAGGER_FLAGSand adjust expectations where needed.
Doing (1) makes (2) mostly automatic, since the statics would be built with the production flags.
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 67
- Forks
- 18
- Avg merge
- 13h 7m
- Merged PRs (30d)
- 15
Contributor guide
No contributing guide indexed for this repository
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 opensanctions/rigour
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
opensanctions/rigour#288 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
opensanctions/rigour#240 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
opensanctions/rigour#238 ·
-
Process-lifetime symbol interner grows without bound on data-driven NUMERIC ids (yente query path) Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
opensanctions/rigour#229 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
opensanctions/rigour#222 · 1 comment ·
All issues in opensanctions/rigour
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100