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:
softDeletePrompt → src/support/prompts-storage.js:1287 .update({ status: 'deleted', updated_by })
bulkSoftDeletePrompts → src/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 retrievable — status=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.
Severity: 🟠 inflates the "dismissed" count
Group C — Postgres prompts
Problem
The
promptstable has onestatus=deletedflag 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 readingstatus=deletedas "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:
softDeletePrompt→src/support/prompts-storage.js:1287.update({ status: 'deleted', updated_by })bulkSoftDeletePrompts→src/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 asuperseded_by/superseded_atpointer — param to those two functions, and have the regeneration caller passsupersededwhile the UI dismiss passesuser_dismiss. Precedent already in this repo:superseded_atis used on another entity (src/dto/audit-policy.js:76).Retrieval impact
The true dismiss count isn't retrievable —
status=deletedreturns 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.