T433819: Source the main-pages impact tile from on-wiki attestation
Tile 8 counted wizard.publish success events, and the entire event era contains only staff test-wiki publishes — analytics shipped 2026-05-27 and every real main-page customization predates it, so production showed 0 against three verifiable kit-materialized main pages. Same blind-window failure the infobox tile had, same cure: read the wiki.
The tile now counts essential_work_items rows (tile 'main-pages', one per wiki), produced two ways:
- In-flow (routes/api.js): the publish route inserts the item the moment the server performs the edit — strongest attestation, lands even for ad-blocked clients, skipped on nochange, never allowed to fail the publish response.
- scanMainPages (essential-work scan, same cadence/kill switch): recovers history and event-less publishes per kit-known wiki (contributors UNION settings), trying the three patterns found in the wild, cheapest first: A. publish — a kit revision in the main page's own history (kaj, 2026-05-15); B. moved publish — the original flow hardcoded the English 'Main Page' title; followed via redirects (a presence-flag param in the MW API — the earlier sweep set redirects=0 and got following anyway, which is how kcg was found), then confirmed RENDERED: the real main page must transclude the moved target or the publish is orphaned (kcg: published 2026-05-03, moved into Ta̱mpi̱let:A̱tsak wat wu 3); C. assembled — the main page renders kit-initialised 'Starter kit/*' templates; dated by the revision that introduced the transclusion via resolveTransclusionOrigin (tile 7's machinery, reused verbatim), attributed to the kit user who initialised the template (ff: initialised 2026-05-13, assembled 2026-05-15). Detection matches the publish/init summary tokens OR the kit's OAuth CID change tags (17481 original consumer, 18127 current) — the tags survive summary revdels. A main page that merely links kit pages can never match.
One item per wiki, hasItem-retired, insert-only: a wiki that later replaces its main page stays counted, like every reach tile. The drill-down now links the wiki's real localized main page instead of the site root. wizard.publish events are demoted, not removed: they keep feeding session summaries and the mobile device signal — the contributions-on-mobile main-page half stays event-based (a device-mobile publish also writes its item in-flow, so the subset property holds; scanner-recovered pre-analytics materializations have no device signal and read desktop, the accepted T433766 trade).
Verified live against the three motivating wikis (scratch DB seeded with them + two control wikis): one pass found exactly the three, each via its own pattern, dated to the materializing revision — kcg 2026-05-03 19:49:52 (the kit publish), ff 2026-05-15 09:30:27 (the revision where the main page began rendering kit content), kaj 2026-05-15 17:25:35 — controls skipped, second pass checks only unmaterialized wikis and adds nothing. Semantics smokes: an event alone no longer moves the tile; the in-flow item moves tile and contributions together; a device-mobile publish raises both sides once; mobile <= contributions holds; production mode excludes admin and test-wiki items with headline == drill-down intact and no usernames in the payload.
Deploy note: no backfill script — the scanner self-backfills on its first pass (~45s after boot), so the three wikis appear within one pass of the deploy.
Bug: T433819 Co-Authored-By: Claude Fable 5
Closes T433819