Skip to content

fix(lexical): auto-provision Kiwi model on first Korean use - #36

Merged
vkehfdl1 merged 2 commits into
mainfrom
fix/issue-35-kiwi-provision
Sep 20, 2026
Merged

vkehfdl1 merged 2 commits into
mainfrom
fix/issue-35-kiwi-provision

Conversation

@vkehfdl1

Copy link
Copy Markdown
Member

Closes #35

Summary

  • auto-download the official Kiwi v0.23.0 base model into the local cache on first Korean use when MAILCRAWL_KIWI_MODEL is unset
  • keep the env var as an override for air-gapped or pinned setups
  • split missing-model vs unresolvable-WASM errors so they name only the variable that is actually missing
  • resolve kiwi-nlp WASM from the package tree when the CLI is invoked through a relocated bin shim
  • report Korean analyzer readiness from mailcrawl doctor --json and provision with mailcrawl doctor --fix

Verification

  • npx tsc -p tsconfig.json --noEmit
  • npx tsc -p tsconfig.json
  • npx vitest run (23 files, 74 tests)
  • npm run validate:skill
  • RED then GREEN: tests/issue-35.test.ts
  • live CLI: search --mode bm25 --json '결제' without MAILCRAWL_KIWI_MODEL hits the Korean fixture; English renewal still hits
  • live CLI: empty cache doctor --json reports korean.status=missing-model; doctor --fix downloads cong.mdl and reports ready

Download the official Kiwi v0.23.0 base model into the local cache when
MAILCRAWL_KIWI_MODEL is unset, split missing-model vs WASM errors, resolve
kiwi-nlp WASM from the package tree when the bin is relocated, and report
Korean analyzer readiness from mailcrawl doctor --json (with --fix).

Closes #35
@vkehfdl1
vkehfdl1 merged commit cebdd42 into main Sep 20, 2026
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.

Korean search fails on a clean install: bundle or auto-provision the Kiwi model (and fix the misleading error)

1 participant