Senses grow from confirmations instead of a word list, so a later local pipeline can decide homonyms on a short passage. Default stays semantic. Local detect waits longer, and the reverse-proxy timeout is documented so Dev does not 504 first. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
959 B
SQL
24 lines
959 B
SQL
-- Transitional learning detect: user-confirmed label senses, pending mask review.
|
|
-- Detect output still does not auto-activate identities.
|
|
|
|
CREATE TABLE IF NOT EXISTS label_senses (
|
|
profile_id TEXT NOT NULL REFERENCES profiles(id) ON DELETE CASCADE,
|
|
normalized_label TEXT NOT NULL,
|
|
identity_hits INTEGER NOT NULL DEFAULT 0,
|
|
non_identity_hits INTEGER NOT NULL DEFAULT 0,
|
|
updated TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP::text,
|
|
PRIMARY KEY (profile_id, normalized_label)
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS pending_mask_reviews (
|
|
id TEXT PRIMARY KEY,
|
|
profile_id TEXT NOT NULL REFERENCES profiles(id) ON DELETE CASCADE,
|
|
conversation_id TEXT NOT NULL REFERENCES conversations(id) ON DELETE CASCADE,
|
|
user_message_id TEXT NOT NULL,
|
|
payload_json TEXT NOT NULL DEFAULT '{}',
|
|
created TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP::text
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_pending_mask_reviews_conv
|
|
ON pending_mask_reviews (profile_id, conversation_id);
|