Commit e1f5807
feat(v0.10.3): search & pack quality fixes from user feedback
Five bugs surfaced after a month of real Task Journal use:
1. CRITICAL — task_search "OPS-306" crashed with
"no such column: 306" because FTS5 read `-` as column-prefix
syntax. Affects every hyphenated ID, path, colon-prefixed token,
and glob. New tj_core::fts::sanitize_query phrase-quotes any
query containing `-` `:` `*` `(` `)` `"` `/`; multi-word queries
pass through untouched so default AND-tokens semantics survive.
Applied at both MCP task_search and CLI Search call sites
(incl. --all-projects).
2. HIGH — search missed terms living only in event body when the
unicode61 tokenizer split source text differently from the query.
When sanitized FTS5 returns 0 hits, fall back to LIKE %query%
against search_fts.text. Same fallback in MCP + CLI.
3. HIGH — pack truncation dropped the NEWEST decision (most-important
summary) instead of the oldest. render_active_decisions /
render_evidence / render_rejected now ORDER BY ... DESC so end-of-pack
truncation hits older rows. Also bumped FULL_BUDGET 10K → 24K —
real tasks accumulate 50–100 events with detailed text and 10K
was clipping the summary even after the DESC reshuffle.
4. MEDIUM — added --type / event_type filter on search.
`task-journal search "switching" --type decision` and the
matching MCP param restrict matches to one EventType. SQL adds
`AND type = ?2`. Composes with the LIKE fallback.
5. LOW — two PreCompact firings within 60 s used to double-write
the "Conversation compacted at T" boundary marker (multi-plugin
race, retried hook). Dedup check inspects the most recent
decision event for the active task and skips the append if the
text already starts with the marker prefix AND the prior write
was within DEDUP_WINDOW_SECS = 60.
Added: tj_core::fts module (sanitize_query, like_pattern) +
6 integration tests covering each bug. No schema changes — pack
cache invalidates on next event so the new ordering surfaces
organically without a forced rebuild.
bd: claude-memory-3wg (epic), claude-memory-jrd, claude-memory-2pi,
claude-memory-bo1, claude-memory-5e0, claude-memory-jaq.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent f50d211 commit e1f5807
13 files changed
Lines changed: 715 additions & 39 deletions
File tree
- crates
- tj-cli
- src
- tests
- tj-core/src
- tj-mcp
- src
- plugin
- .claude-plugin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
10 | 76 | | |
11 | 77 | | |
12 | 78 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
703 | 707 | | |
704 | 708 | | |
705 | 709 | | |
| |||
1738 | 1742 | | |
1739 | 1743 | | |
1740 | 1744 | | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
1741 | 1784 | | |
1742 | 1785 | | |
1743 | 1786 | | |
| |||
2266 | 2309 | | |
2267 | 2310 | | |
2268 | 2311 | | |
| 2312 | + | |
2269 | 2313 | | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
2270 | 2318 | | |
2271 | 2319 | | |
2272 | 2320 | | |
| |||
2276 | 2324 | | |
2277 | 2325 | | |
2278 | 2326 | | |
2279 | | - | |
2280 | | - | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
2281 | 2333 | | |
2282 | | - | |
| 2334 | + | |
2283 | 2335 | | |
2284 | 2336 | | |
2285 | | - | |
2286 | | - | |
2287 | | - | |
2288 | | - | |
2289 | | - | |
2290 | | - | |
2291 | | - | |
| 2337 | + | |
2292 | 2338 | | |
2293 | 2339 | | |
2294 | 2340 | | |
| |||
2304 | 2350 | | |
2305 | 2351 | | |
2306 | 2352 | | |
2307 | | - | |
2308 | | - | |
2309 | | - | |
2310 | | - | |
2311 | | - | |
2312 | | - | |
2313 | | - | |
2314 | | - | |
| 2353 | + | |
2315 | 2354 | | |
2316 | 2355 | | |
2317 | 2356 | | |
| |||
2634 | 2673 | | |
2635 | 2674 | | |
2636 | 2675 | | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
2637 | 2747 | | |
2638 | 2748 | | |
2639 | 2749 | | |
| |||
0 commit comments