Goal
Represent independent user preference state, apply it exactly once, and reverse it safely.
Current implementation
PR #23 now:
- stores separate interaction rows for like, save, and dislike;
- makes repeated persistent events idempotent in the normal path;
- scopes unlike, unsave, and undislike to the matching interaction type;
- filters consumed and explicitly disliked repositories from recommendation results; and
- adds transition and ranking tests.
Remaining problems
The shared database migration has the wrong primary key
ML expects (user_id, repo_id, interaction_type), but the application migration still creates (user_id, repo_id). ML currently attempts to replace the constraint at runtime, which requires DDL permission and leaves the two repositories with different schema definitions.
Relevant code:
Persistence and vector application are not failure-safe
The handler commits the feedback state before updating Qdrant. If Qdrant fails, the consumer ignores the returned False, marks the event processed, and acknowledges it. A retry would not repair the vector because the database state is already idempotently applied.
Negative alpha is not an exact undo
The vector is normalized after every shift. Applying the opposite alpha to the normalized result does not restore the original vector. The current test checks the requested alpha values but does not check the resulting vector.
The unrelated corpus target change remains
PR #23 still changes the acquisition target from 3500 to 1000.
Acceptance criteria
Related work
Goal
Represent independent user preference state, apply it exactly once, and reverse it safely.
Current implementation
PR #23 now:
Remaining problems
The shared database migration has the wrong primary key
ML expects
(user_id, repo_id, interaction_type), but the application migration still creates(user_id, repo_id). ML currently attempts to replace the constraint at runtime, which requires DDL permission and leaves the two repositories with different schema definitions.Relevant code:
Persistence and vector application are not failure-safe
The handler commits the feedback state before updating Qdrant. If Qdrant fails, the consumer ignores the returned
False, marks the event processed, and acknowledges it. A retry would not repair the vector because the database state is already idempotently applied.Negative alpha is not an exact undo
The vector is normalized after every shift. Applying the opposite alpha to the normalized result does not restore the original vector. The current test checks the requested alpha values but does not check the resulting vector.
The unrelated corpus target change remains
PR #23 still changes the acquisition target from 3500 to 1000.
Acceptance criteria
Related work