Skip to content

Distinguish a real user-dismiss from a pipeline regeneration (status=deleted conflates them) #3224

Description

@mikkeline-elleby

Severity: 🟠 inflates the "dismissed" count
Group C — Postgres prompts

Problem

The prompts table has one status=deleted flag that mixes (a) a customer really rejecting a prompt with (b) the pipeline regenerating and superseding an old prompt with a near-duplicate. Any acceptance dashboard reading status=deleted as "dismissed" over-counts rejections.

Evidence

Both the user-dismiss and the pipeline-regeneration go through the same two functions, with no reason recorded — which is exactly why they're indistinguishable:

  • softDeletePromptsrc/support/prompts-storage.js:1287 .update({ status: 'deleted', updated_by })
  • bulkSoftDeletePromptssrc/support/prompts-storage.js:1331 (same update)

Independent detection (from analysis): superseded deletions sit at cosine ≈1.00 to a still-kept prompt; for some brands the deleted rows are dominated by regeneration.

Implementation

Add a deleted_reason (user_dismiss | superseded) — or a superseded_by / superseded_at pointer — param to those two functions, and have the regeneration caller pass superseded while the UI dismiss passes user_dismiss. Precedent already in this repo: superseded_at is used on another entity (src/dto/audit-policy.js:76).

Retrieval impact

The true dismiss count isn't retrievablestatus=deleted returns real rejects + pipeline regenerations mixed together, inflating "dismissed".

Definition of done

A dismissed-because-rejected prompt is distinguishable from a regenerated one; acceptance metrics count only real dismisses.


Related epic: adobe/project-elmo-ui#3108.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtech debtTechnical Debt

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions