Feat: Warn when the target article already exists (T433369 phase 7)
Verification (phases 1-5) credits a run only when the caller CREATED the target page, but the UI never said so: a write-from-scratch user could confirm a title that already exists, or keep working after another editor created it mid-run, and a translate user could publish over an existing article — all runs the verifier can never credit, with no explanation anywhere. Phase 4 deliberately retired the wiki-global "article exists" status (it credited pre-existing articles to everyone), so no existence signal reached the client at all. This adds a caller-aware one and the honesty UX on top, covering the two remaining task acceptance criteria (exists → warn/re-pick for write-from-scratch; exists → caution for translate).
- server: GET /api/tasks/create-essential-article/target-status returns { resolvedTitle, exists, createdByCaller } for the caller's session wiki. It reuses the verifier's own resolution chain — resolveEssentialArticleTarget is extracted from verifyEssentialArticleRun and exported alongside sameUser (first-letter normalization) — so the UI's judgement cannot drift from what verification will decide. A RevDeleted creating author reads as not-the- caller (credit would be refused); a page whose revisions aren't readable falls back to articleExistsOnWiki (its first consumer). Null langlink resolution is "no signal" (exists:false), not an error. Scratch checks without a typed title are 400 rather than silently validating the English fallback; responses are Cache-Control: no-store.
- StepPick: the target-title input validates against the endpoint — a
debounced watch(targetTitle) gives advisory feedback (a watch, not @input:
the MinT prefill writes the ref programmatically and is the likeliest title
to exist), and onConfirm re-runs the check authoritatively so a click inside
the debounce window or ahead of a slow response can never confirm a taken
title. Blocked confirms emit a
confirm-blockedCTA. Warning copy branches on createdByCaller ("choose a different title" vs "you already created this one — pick another to repeat"). Fail-open on network errors: the verifier stays the real gate. Confirmed translate picks get a non-blocking caution when the langlink target exists — most translate users publish straight from step 1, so step 2 alone would miss them. - StepCreate: target-status is checked on mount and every tab-return. For
write-from-scratch with the target taken, the banner REPLACES the checklist
and actions — hiding only the checklist would leave
[].every()true and enable Mark done, and the editor button would open someone else's live article. "Change article" (T433042) is the escape hatch. A caller-created- but-not-credited target gets the same replacement with "already created" copy instead of a silent dead end. Translate gets the caution banner only — improving an existing article stays unblocked. - The published-CX-translation→done fix that makes the translate caution reachable (the completion screen was replacing step 2) lives in phase 4 (!151 (merged)), where the status branch is introduced.
- Route + resolver behaviour smoke-tested via a throwaway express app with stubbed wiki reads on a DB copy (10 cases: taken/mine/missing/RevDeleted/ unreadable-revisions/400s/401/no-store/null-langlink/normalization).
- i18n: en.json + qqq.json only (translated files are bot-synced); ANALYTICS_INSTRUMENTATION.md picks up confirm-blocked plus the previously undocumented keep-article/change-article CTAs.
Stacked on feat/T433369-phase5-dashboard (!152 (merged)). Separate deploy from the phases 1+4+5 window: UI-only, nothing in completion semantics depends on it.
Co-Authored-By: Claude Fable 5 Bug: T433369
Closes T433369