Repository navigation
fix: make the fts5 install hints skip the excluded pysqlite3 wheel - #34052
Conversation
The doctor's FTS5 Fix line and FTS5_UNAVAILABLE_HINT told the user to install pysqlite3-binary with no version. setup.cfg excludes 0.5.4.post2, whose bundled SQLite can deadlock a WAL close against an open, and it is the newest release, so a bare install picked it. Both hints now render _sqlite_compat.PYSQLITE3_REQUIREMENT, the setup.cfg spec without its marker, and a test pins the constant to setup.cfg so the next exclusion cannot drift. Closes #32574
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The change only edits the version range in CLI install-hint text ( [UX-REVIEWED] 1c4408c Description read[DESCRIPTION-READ] aa3bf06420cff1c5e29d8e3101af4f5f062771ffd39f0ebda9f67356162eb885 That sha256 names everything this verdict read: the PR description, plus the 22 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS The fix is proportionate: one constant matches [DESIGN-REVIEWED] 1c4408c Description read[DESCRIPTION-READ] 790f742476079ae3ef59fd98b4953feeae5ecb961d3d1d9fe51c97bb7b635abd That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Both hints now install the range What this change shipsInventory (5 items) — 4 justifiedIntent: someone following Kiro Crew's FTS5 install advice should never install the excluded
[FIRST-PRINCIPLES-REVIEWED] 1c4408c Description read[DESCRIPTION-READ] c33efb825013170996c0f1e7a7fe14bcd8d842203f151829eb61243e6d6d67c8 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
buluoray
left a comment
There was a problem hiding this comment.
Approved at 1c4408c. The doctor Fix line and both FTS5_UNAVAILABLE_HINT commands now install setup.cfg's quoted spec pysqlite3-binary>=0.5.4,!=0.5.4.post2 instead of the bare name, which resolves to the excluded 0.5.4.post2 wheel (src/kiro_crew/_sqlite_compat.py:235, :238; src/kiro_crew/doctor_checks/install.py:694). test/test_sqlite_compat.py:32 pins the constant to setup.cfg, and every mutation turns a test red. GPT, Opus, UX and Security Scope pass; Analyze (python) is a rate limit.
Pull request was closed
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
This review checked head 1c4408c and found nothing blocking. PYSQLITE3_REQUIREMENT matches the install_requires spec in setup.cfg, and all three printed install commands use it: both lines of FTS5_UNAVAILABLE_HINT (quoted with shlex.quote) and the doctor Fix: line (quoted per platform by pip_install_command_for). No other place in src, website, docs or scripts prints a bare pysqlite3 install command. The review ran the tests at head with mutations: reverting either production hunk, or dropping !=0.5.4.post2 from the constant, turns at least one test red. The edited source-scan test still requires exactly one gated render.
Done well: one constant now holds the spec, and a test pins it to setup.cfg, so the next exclusion fails a test and the hints cannot drift out of date again.
Optional:
FTS5_UNAVAILABLE_HINTnow spells the brand two ways. Line 242 still says "KiroCrew memory and knowledge search require it", and the edited line 243 says "Kiro Crew depends on it here". You could change line 242 to "Kiro Crew" too, or leave it.- #14007 rewrites the same hint lines in a different direction, so whichever PR merges second will need a rebase.
Problem / Motivation
Goal: Every command Kiro Crew prints for installing
pysqlite3-binaryinstalls only a versionsetup.cfgallows, so following the advice never installs the wheel whose SQLite can freeze the process.When this Python's SQLite lacks FTS5,
kirocrew doctorprints aFix:command and memory init raisesFTS5_UNAVAILABLE_HINT. All three commands they show installpysqlite3-binarywith no version. #32424 madesetup.cfgexclude0.5.4.post2, whose bundled SQLite 3.51.1 can deadlock a thread closing a WAL database against a thread opening it, but0.5.4.post2is the newest release on PyPI, so a bare install picks exactly that wheel.Why it matters
These hints appear exactly when the user's interpreter has no usable pysqlite3, so they are the main manual route into the package. A Linux x86_64 user who follows one gets the build #32424 excludes and is open to the same whole-process freeze.
Not a goal
pysqlite3-binaryversionssetup.cfgaccepts.What changed (motivation → approach → change)
kirocrew doctor,sqlite fts5row,Fix:<python> -m pip install pysqlite3-binary<python> -m pip install 'pysqlite3-binary>=0.5.4,!=0.5.4.post2'FTS5_UNAVAILABLE_HINT, both commandspip install pysqlite3-binarypip install 'pysqlite3-binary>=0.5.4,!=0.5.4.post2'The advice spelled the package by name while the exclusion lives only in
setup.cfg, so it went stale the day #32424 landed.PYSQLITE3_REQUIREMENTinsrc/kiro_crew/_sqlite_compat.pynow holds thesetup.cfgspec without its platform marker, and both hints render it, quoted so a shell does not read>as a redirect. A test pins the constant tosetup.cfg, the same transcribe-and-pin patternextras.REQUIREMENTSuses, so the next exclusion fails a test instead of drifting. The doctor spec indocs/system-specs/modules/cli.mdnames the constant.Backwards compatibility
Compatible: only printed advice changes, and the spec it installs is the range
setup.cfgalready requires.Removes nothing: no code path, key or record goes away; two strings gain a version range.
Tests
test/test_sqlite_compat.py::test_the_pysqlite3_spec_is_the_one_setup_cfg_declares: the constant equalssetup.cfg'spysqlite3-binaryrequirement, marker removed.test/test_sqlite_compat.py::test_every_fts5_hint_command_installs_the_declared_spec: bothFTS5_UNAVAILABLE_HINTcommands install the quoted spec.test/test_cli_doctor_install.py::TestDoctorPrintsNoBareInstallCommand::test_the_fts5_fix_installs_the_spec_setup_cfg_declares: the doctor'sFix:line installs the quoted spec.test_the_fts5_fix_names_this_interpreter_and_is_gatedkeeps checking the gate around the doctor command, anchored on the call's new argument.Determinism: the four tests above passed 20 of 20 runs at
-n0and 10 of 10 at-n 4 --dist loadgroup --max-worker-restart=2besidetest/test_sqlite_compat_resolver.pyandtest/test_doctor_tz_data.py; all 74 tests of the two changed files passed in a shuffled order (seed 16321).Proof: PROVEN test/test_cli_doctor_install.py::TestDoctorPrintsNoBareInstallCommand::test_the_fts5_fix_names_this_interpreter_and_is_gated (head 1c4408c)
Manual verification
Rendered both surfaces on this head with FTS5 forced missing: the doctor row prints
Fix: <python> -m pip install 'pysqlite3-binary>=0.5.4,!=0.5.4.post2', and the hint prints the same quoted spec in both commands.pip install --dry-runresolves the barepysqlite3-binaryto0.5.4.post2and the new spec to0.5.4.Screenshots / video
N/A — the diff touches no frontend path; the changed text prints in a terminal and in an exception message.
Related Issues
Closes #32574
Sibling sweep
Swept: git grep -n "pysqlite3" -- src scripts website docs setup.cfg ':!*.lock'
Swept: git grep -n "pip_install_command_for(" -- src
Sibling: src/kiro_crew/doctor_checks/install.py:757 -- not affected -- the tzdata Fix line names a package whose setup.cfg spec is only a floor, which the newest release always meets
Sibling: src/kiro_crew/doctor_checks/features.py:162 -- not affected -- faiss-cpu is not declared in setup.cfg at all
Pattern harvest
Rule candidate: review-prompt
Pattern: a printed install command names a package that setup.cfg declares with an exclusion or upper bound, but not the declared spec
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)