contract-search-stale-assignee-manual-review

Installation
SKILL.md

Contract search: stale assignee after manual review reassignment

What this skill debugs

Symptom: After a user reassigns a contract review (manual / LEGAL_REVIEW-style task), the task still shows up for the original assignee in the task list or search-driven views, while activity log and Metabase already show the reassignment to the new user.

Pattern: PostgreSQL is authoritative (latest ManualTaskData has the new assignee_org_user_id), but the contracts Elasticsearch index still has the old assignee under assigned_to_list for LEGAL_REVIEW (or equivalent). User-facing lists that query ES therefore disagree with DB truth.

Distinct from: Approval visibility bugs (use approvals-specific skills), pure FE caching (refresh + ES check rules this out), and transient ES lag that self-heals seconds later — this pattern is specifically a resync that ran and committed old state because the new ManualTaskData row did not exist yet at resync time (ordering/race).


When to use / not use

Use this skill Do not use
Task list / search shows old assignee; DB shows new assignee DB still shows old assignee → data or workflow bug, not ES staleness
Contract doc id TEMPLATE_{contract_id} has wrong assigned_to_list Issue is only approvals v5 UI with no search involvement
Cluster + contract_id + workspace_id known Pure process / training issue with no technical inconsistency
Installs
1
First Seen
Apr 9, 2026