mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 05:48:12 +01:00
* fix(cat): forget_memories now matches inflected forms and real similarity scores Prod incident 2026-08-02: the user asked Cat to forget photography / handmade ceramics / French / weekends-only; the model passed exactly those phrases, the action completed — and every targeted memory survived. Two dead layers: - Lexical: exact-substring token matching can't see inflections (photography≠photographer, ceramics≠ceramic, speaking≠speaks) and the hard >=2-hit rule killed the rest. Now: light suffix-stripping stemmer + majority-of-significant-stems rule, stems compared by equality only. - Semantic: floor 0.75 sat above what true targets score with text-embedding-3-small (measured against prod: 0.39-0.61, noise <=0.29). Now 0.45. Also list exactly WHAT was removed in the displayMessage (not just counts) so an over-match is visible and re-addable at a glance. Regression suite pins the incident corpus + phrases. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(cat): pre-flight skip for platform Groq when the prompt can't fit its TPM limit Every Cat message in prod was paying a guaranteed-failing Groq round-trip: the assembled prompt (memories + history + page excerpt) exceeds Groq's on-demand 12k TPM limit, so the primary 413'd on every single message and the reply always came from the OpenRouter fallback anyway (confirmed via journalctl + a measured 413 against the platform key). The chain now skips a PLATFORM Groq link up front when the prompt clearly won't fit — only when another link can serve, never for BYOK Groq keys (possibly a higher tier), and a pre-flight skip never marks the link down globally (other users' smaller prompts still fit it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(cat): query_my_data read verb — Cat can now answer questions about the user's own live data Listings, earnings, bookings, wallets, notifications, tasks (+ overview), wired as a platform tool with trigger keywords, routing-prompt entry, chip labels, and honest per-section degradation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(cat): memory CRUD + suppression — remember_fact, edit_memory, and forgotten facts stay forgotten - cat_forgotten_facts table (+ match RPC, RLS) records what forget_memories deleted; passive extraction now skips suppressed candidates so a disowned fact can't be silently re-learned from old context - remember_fact: explicit store, lifts matching suppressions, dedupes - edit_memory: corrects exactly one memory or refuses with candidates - prompt catalog + honesty rule updated for the three memory verbs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(cat): every action visible + executable — generated prompt catalog, create_circle, drift guard - system prompt now appends a machine-generated one-liner catalog for every enabled action without a prose section (13 verbs were invisible to the model) - create_circle action + handler (last creatable type without a create path) - action-registry-drift test: action↔handler↔prompt can never drift again Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(cat): proactive layer — memory notes with undo, daily brief, watches, next-step chips - MemoryNoteCard: every new memory surfaces in chat as an undoable 'Cat noted' card (no more silent memory writes) - /api/cron/cat-brief: data-only morning brief (sales, bookings, overdue, unread) for active Cat users, idempotent per day, skipped when empty - /api/cron/cat-watches + cat_watches table + create_watch/cancel_watch verbs: 'tell me when funding hits X / someone books me / next sale', checked every 15 min via systemd timers (units + deploy wiring included) - prompt: proactive next-move quick replies after completed actions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(cat): demand-side verbs — follow, react, comment, bookings, inbox follow_user/unfollow_user (@username resolution + courtesy notification), like_post/comment_on_post, mark_notifications_read, book_service (provider confirms), accept_booking/decline_booking. All registered, handled, and auto-visible via the generated prompt catalog; email stack lazy-imported. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(cat): autonomy ladder — per-action Off / Ask first / Automatic cat_permissions already stored trust as two booleans; users think in three levels. New cat-autonomy SSOT maps between them, the permissions API returns each action's EFFECTIVE level (row → category → default, same resolution the executor uses), and the settings screen replaces the binary switch with a segmented control. High-risk actions never offer Automatic — enforced in the API, not just hidden in the UI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(cat): split entity handlers into create/manage modules entities.ts hit 515 lines (500-line service limit) after create_circle. Split along the natural seam — creating new things vs changing existing ones — with entities.ts kept as the barrel so the handler map is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(cat): forgetting a two-word fact could delete an unrelated memory The majority rule (ceil(n/2)) meant a two-word fact needed only ONE stem hit, so 'photography skills' also deleted 'Has strong cooking skills' — they share nothing but the stem 'skill'. Reproduced against the shipped code; this is live data loss. Multi-word facts now require TWO stem hits (requiredStemHits), single words still match on one plus containment. Looser paraphrases ('speaking French' → 'Knows French') are handled by the semantic layer, which scores them 0.45+ while unrelated pairs stay <=0.29. Forget, suppression, and edit_memory now share ONE matcher (stemOverlapMatches) so they cannot diverge. Also fixes the capped quota chip: two nowrap links overflowed the toolbar on phones and collided with the panel toggle. Capped state is now a single shrinkable chip, and its copy moved into the CAT_UPSELL SSOT. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(cat): interest discovery + real introductions 'I'm interested in longevity' now works end to end. Three things silently blocked it: 1. The phrase matched NO trigger keyword, so the tool pass never ran and the whole discovery path was unreachable. Added interest/intro keywords. 2. research + ai_assistant + event were absent from the semantic corpus — a topic search could not surface the research literally about that topic. They index now (their public gate is is_public AND status, not status alone). 3. Index freshness had NO safety net: per-row DB triggers POST to a hardcoded public URL via pg_net and fail silently. Added /api/cron/reindex-embeddings + timer — the sweep the reindexer's own docs promised but never had. explore_topic: semantic match across every indexed type, each hit re-read through its public gate (index can lag), test rows excluded, owner resolved, and — the key move — PEOPLE aggregated from entity ownership. Only 5 of 115 profiles have a bio, so people are discoverable through what they published, not their profile text; each person carries the work that makes them relevant. Degraded index reports honestly instead of implying the platform is empty. request_introduction: opens a real conversation with an entity's owner and sends the user's intro. High risk / always confirms — messaging has no block list, so the confirmation is the consent gate. Splits to stay under the service size limit: reindexService → +reindex-sources +reindex-scoring; tool-executor → +tool-handlers-lookup. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>