[P1] H03: Store protected answer feedback and authorized offline evaluation workflow #28

Open
opened 2026-10-21 20:29:30 +02:00 by amiryahaya · 0 comments
Owner

Backlog ID: H03 | Priority: P1 | Phase: M5 — Local inference and complete chat

Outcome and scope

Add helpful/not-helpful ratings and bounded optional reasons tied to the answer, conversation, source snapshots, model/retrieval profiles and policy version.

Dependencies and gates

Engineering prerequisites: #27 (H02), #11 (F06), #22 (I05)

Training/reinforcement learning stays disabled pending a separately approved workflow; review/export/deletion retention follows D01.

Starting points

crates/conversations/src/feedback/; crates/api/src/routes/feedback.rs; migrations/; evals/feedback/

These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion.

Acceptance criteria

  • Feedback inherits complete answer markings/scope and reauthorizes create/read/review/export/delete against current access.
  • Rating update/duplicate rules are explicit; feedback cannot change weights, policy, access grants or markings.
  • Review/export produces authorized restricted evaluation datasets with source lineage and invalidation on revocation.
  • Audit every feedback lifecycle action without putting answer/comment text in ordinary logs.

Verification

API/database tests cover duplicate vote/update, overlong reason, cross-user access, revoked source export and audit events; assert no automatic training/policy action.

Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence.

Requirements and design

FR-UX-005–006, 008; FR-AUD-004; architecture §9.5

Sources: SRS, system design. Local planning context: docs/implementation-plan.md and docs/development-backlog.md (not published by this task).

Security impact: Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue.

Parent roadmap: #1

**Backlog ID:** H03 | **Priority:** P1 | **Phase:** M5 — Local inference and complete chat ## Outcome and scope Add helpful/not-helpful ratings and bounded optional reasons tied to the answer, conversation, source snapshots, model/retrieval profiles and policy version. ## Dependencies and gates **Engineering prerequisites:** #27 (H02), #11 (F06), #22 (I05) Training/reinforcement learning stays disabled pending a separately approved workflow; review/export/deletion retention follows D01. ## Starting points crates/conversations/src/feedback/; crates/api/src/routes/feedback.rs; migrations/; evals/feedback/ These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion. ## Acceptance criteria - [ ] Feedback inherits complete answer markings/scope and reauthorizes create/read/review/export/delete against current access. - [ ] Rating update/duplicate rules are explicit; feedback cannot change weights, policy, access grants or markings. - [ ] Review/export produces authorized restricted evaluation datasets with source lineage and invalidation on revocation. - [ ] Audit every feedback lifecycle action without putting answer/comment text in ordinary logs. ## Verification API/database tests cover duplicate vote/update, overlong reason, cross-user access, revoked source export and audit events; assert no automatic training/policy action. Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence. ## Requirements and design FR-UX-005–006, 008; FR-AUD-004; architecture §9.5 Sources: [SRS](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/SRS.md), [system design](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/architecture.md). Local planning context: `docs/implementation-plan.md` and `docs/development-backlog.md` (not published by this task). **Security impact:** Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue. **Parent roadmap:** #1
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
primatekuntech/rag-rust#28
No description provided.