[P1] C01: Deliver authorized conversation creation, history and recent-context reads #13

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

Backlog ID: C01 | Priority: P1 | Phase: M2 — Authorized conversations and Engine contracts

Outcome and scope

Implement create/list/read/resume use cases with PostgreSQL durable state, bounded recent-turn reads and current authorization of messages and source lineage.

Dependencies and gates

Engineering prerequisites: #8 (F03), #10 (F05), #11 (F06)

Retention/archive/delete/export actions follow D01; undefined actions are not exposed as ad hoc defaults.

Starting points

crates/conversations/; crates/storage-postgres/; crates/api/src/routes/conversations.rs; migrations/

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

  • API lists and returns only currently authorized conversations/messages; titles, labels and activity remain protected metadata.
  • Owner checks and current policy/source reauthorization both apply; revoked prior messages are withheld or handled only by an approved redaction rule.
  • Message ordering is atomic under concurrent turns and pagination is bounded with no unauthorized totals.
  • History remains in PostgreSQL; no Redis, browser-persistent transcript or process-global shared conversation buffer is added.

Verification

Real-PostgreSQL and API tests cover another user’s IDs, entitlement/source revocation, concurrent ordering, pagination and bounded history query plans.

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-RAG-001, 004; FR-UX-002, 007; FR-PRIV-001, 004; architecture §§3, 9.4

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:** C01 | **Priority:** P1 | **Phase:** M2 — Authorized conversations and Engine contracts ## Outcome and scope Implement create/list/read/resume use cases with PostgreSQL durable state, bounded recent-turn reads and current authorization of messages and source lineage. ## Dependencies and gates **Engineering prerequisites:** #8 (F03), #10 (F05), #11 (F06) Retention/archive/delete/export actions follow D01; undefined actions are not exposed as ad hoc defaults. ## Starting points crates/conversations/; crates/storage-postgres/; crates/api/src/routes/conversations.rs; migrations/ 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 - [ ] API lists and returns only currently authorized conversations/messages; titles, labels and activity remain protected metadata. - [ ] Owner checks and current policy/source reauthorization both apply; revoked prior messages are withheld or handled only by an approved redaction rule. - [ ] Message ordering is atomic under concurrent turns and pagination is bounded with no unauthorized totals. - [ ] History remains in PostgreSQL; no Redis, browser-persistent transcript or process-global shared conversation buffer is added. ## Verification Real-PostgreSQL and API tests cover another user’s IDs, entitlement/source revocation, concurrent ordering, pagination and bounded history query plans. 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-RAG-001, 004; FR-UX-002, 007; FR-PRIV-001, 004; architecture §§3, 9.4 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#13
No description provided.