Files
pocketpaw/ee/retrieval
Prakash Dalai f8642ce75e feat(ee-retrieval): retrieval log + graduation as journal projection (#954)
Carries the intent of the held PRs #936 (JSONL retrieval sink) and #937
(graduation policy over that JSONL) onto the org journal. Both were
held because the side-channel JSONL file is redundant now that the
journal is the source of truth; both come back as projections over
`retrieval.query` + `graduation.applied` events.

Mirrors the file layout from #953's Fabric projection:
  ee/retrieval/events.py      — action names + payload builders
  ee/retrieval/store.py       — log_retrieval / log_graduation
  ee/retrieval/projection.py  — rebuild + incremental apply + views
  ee/retrieval/policy.py      — #937's thresholds ported verbatim
  ee/retrieval/router.py      — GET /retrieval/recent, /retrieval/session/{cid},
                                /graduation/state, POST /graduation/scan

Graduation logic (threshold counts, tier progression rules, apply path)
is ported verbatim from #937. Only the input (projection rows, not
JSONL rows) and the output (graduation.applied events, not a JSONL
line) change.

Supersedes #936 and #937. Unblocks #941/#942 (widget graduation) and
#69/#74 (retrieval/graduation UIs in paw-enterprise).

Co-authored-by: Prakash-1 <prakash-1@Mac.lan>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 12:12:57 +05:30
..