Skip to content

Python Digest and Analytics Functions

Akshay B edited this page Mar 16, 2026 · 2 revisions

Python Digest and Analytics Functions (Azure Functions)

This document details digest and analytics routes in PluckIt.Processor.

Documentation metadata

  • Audience: external contributors
  • Last reviewed: 2026-03-16
  • Scope: digest and analytics contract only

Endpoint inventory

DigestFunctions

  • POST /api/digest/run
    • Triggers digest generation workflow for the current user context.
    • Expected to schedule or run digest production according to runtime config.
  • GET /api/digest/latest
    • Returns the most recent digest artifact.
    • Useful for UI rendering and cached digest status checks.
  • GET /api/digest/feedback
    • Reads stored digest feedback signals.
    • Supports digest quality and user-reaction reads.
  • POST /api/digest/feedback
    • Writes digest feedback signals.
    • Used to refine future digest outcomes and analytics.
  • GET /api/insights/vault
    • Fetches vault analytics/insight output.
    • Returns aggregated insight signals produced by background processing.

Behavior notes

  • These endpoints form the service-side read/write contract for digest and insight surfaces.

Issue update log

  • 2026-03-16: Resolved issue #57 in PluckIt.Processor/agents/digest_agent.py by switching weekly profile reads from read_all_items() to paginated query_items(query="SELECT c.id FROM c", max_item_count=500) and stream-processing users one-by-one in run_weekly_digest.
  • 2026-03-16: PR opened: https://github.com/AB-Law/Pluck-It/pull/90.
  • 2026-03-16: Validation: python -m pytest tests/unit/test_digest_agent.py -v --tb=short -m unit and python -m pytest tests/unit/ -v --tb=short -m unit both passed in Pluck-It-issue-57-digest-agent-load-all-profiles-pagination.
  • 2026-03-16: Implemented issue #51 in PluckIt.Processor/agents/vault_insights.py by increasing vault insights cache TTL to 1800s and adding explicit pagination clauses (OFFSET 0 LIMIT 1000 for wardrobe queries, LIMIT 5000 for wear events) while keeping Cosmos query parameters unchanged.

Clone this wiki locally