Files
stack/tests/llm/test_classify.py
kert 7baa789bc0 fix(llm,pfs): I5/M1/M2 — probe the model pool once per classifier, strip FR citations before lineage pattern matching, drop unused extract_text param
I5: `closed_vocab_classifier` called `pool.check(cfg.instruct_model)` on
every `classify()` call — a host-liveness probe, not per-request work.
A code with hundreds of element lines re-probed the pool hundreds of
times. Move the check to the closure's construction.

M1: `fr_events` matched event patterns (crosswalk, replaces, …) against
the raw FR paragraph text, so a citation like "91 FR 99490" inside a
"crosswalk ... 91 FR 99490" sentence read as a real crosswalk event for
99490 — the citation's page number is not a mention of the code. Strip
FR citations with the now-public `pfs.families.FR_CITE_RE` before both
the presence check and every event pattern.

M2: `extract_text`'s `classify` parameter was unused; no call site
passed it. Drop it.

Claude-Session: https://claude.ai/code/session_01Aum3pEMAM3yQVdFSdVe6Gc
2026-09-09 14:10:55 -04:00

3.0 KiB