Wikipedia:Bots/Requests for approval/ThilioBot: Difference between revisions
Reply |
→Discussion: Reply |
||
| Line 39: | Line 39: | ||
*:::What if I remove the bullet point <code>*</code>, leave only the <code>:</code> and clean up the spacing too? [[User:Thilio|<span style="color:#0F08D1; font-weight:bold;"> CONFUSED SPIRIT</span>]]<span style="font-size:60%; color:#0000FF; position:relative; top:0px; margin-left:4px;">[[User talk:Thilio|(Thilio).Talk]]</span> 15:55, 23 June 2026 (UTC) |
*:::What if I remove the bullet point <code>*</code>, leave only the <code>:</code> and clean up the spacing too? [[User:Thilio|<span style="color:#0F08D1; font-weight:bold;"> CONFUSED SPIRIT</span>]]<span style="font-size:60%; color:#0000FF; position:relative; top:0px; margin-left:4px;">[[User talk:Thilio|(Thilio).Talk]]</span> 15:55, 23 June 2026 (UTC) |
||
*::::That would violate [[MOS:INDENTMIX]], specifically the 4th example. [[User: Tenshi Hinanawi|Tenshi!]] ([[User talk: Tenshi Hinanawi|Talk page]]) 16:06, 23 June 2026 (UTC) |
*::::That would violate [[MOS:INDENTMIX]], specifically the 4th example. [[User: Tenshi Hinanawi|Tenshi!]] ([[User talk: Tenshi Hinanawi|Talk page]]) 16:06, 23 June 2026 (UTC) |
||
*:::::[[Special:Diff/1360788742]] space removed, did backward traversal algorithm. [[User:Thilio|<span style="color:#0F08D1; font-weight:bold;"> CONFUSED SPIRIT</span>]]<span style="font-size:60%; color:#0000FF; position:relative; top:0px; margin-left:4px;">[[User talk:Thilio|(Thilio).Talk]]</span> 16:31, 23 June 2026 (UTC) |
|||
Latest revision as of 16:31, 23 June 2026
Operator: Thilio (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 14:00, Thursday, May 28, 2026 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Python, Pywikibot
Source code available: https://gitlab.wikimedia.org/toolforge-repos/thilliobot
Function overview: Detects previously (old) requested RM/TR discus/ons that reappear later as fresh TRs and active Requested moves discus/ons then posts auto comment with a diff link.
Links to relevant discussions (where appropriate): https://en.wikipedia.org/wiki/Wikipedia_talk:Requested_moves#Bot/bot,_Feedback_Needed_RM/TR_maintenance_bot
Edit period(s): Continuous (runs every 10 minutes through Toolforge jobs framework)
Estimated number of pages affected: 1. Mainly Wikipedia:Requested moves/Technical requests. Depending on request activity.
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): No
Function details: Bot monitors RM/TR and detects if the same move request was previously submitted and later removed. It also detects currently active RM discussions that have the same source and target titles and posts an automated comment that contains a diff (permalink) to the active or prior discussion. It also notifies the requester using ping when possible, including temporary accounts.
Discussion
[edit]find_previous_request()is called once per request, but it's always scanning the same RM/TR revision history. It may be worth loading and indexing those revisions once up front instead of re-fetching them for every entry. – DreamRimmer ■ 05:11, 2 June 2026 (UTC)- @DreamRimmer I did some few changes modified
find_previous_request()where she now uses the pre loaded data instead of reloading revisions for every request. commits added new function tooload_revisions_data(page)she can fetch and stores her(revid, page_text)for each revision once she starts of thy run. I hope that what you're suggesting from the DRY RUN test I can feel the API calls and speed up process is magnificence. CONFUSED SPIRIT(Thilio).Talk 08:51, 2 June 2026 (UTC)- my first logic of the revision limit of 150 I have changed it even though I did add the pre load logic still she cant detects old requests, for eg. she cannot detect if a request is in the range of 151 or 200 etc. @Tenshi gave me an idea through WCGTD Discord of using storing files so i implemented it using sql databases. now she can run once and load the data in the database for later use, scan revisions of the page, where for each revision she checks if the timestamp is older than 90 days if not it stops. also each revision within the last 90 days she fetches the full-page text and inserts a row into her database. When it is done, it returns list of all cached.
- for example she runs on June 1, she inserts 5000 rows that makes revisions from March 1 to June 1 loaded 5000 revisions from the sql cache from last 90 days. later can be expend to 180 days or something. The update logic works like this, update cache she queries the database to find the newest timestamp already stored in last timestamp and then the loop logic comes in through revisions again but it stops ASAP when it reaches a revision with a timestamp less than or equal to last timestamp which is already cached. she only fetches and inserts new revisions that are newer than last cached revision; she can also delete any rows older than 90 days (for example if a revision from 91 days is now outside the window) second run example the newest cached revision is from June 1 she fetches only the revisions that happened on June 2 (let’s say maybe 15 or 30 new revisions), then it inserts those 15 or 30 new rows to make the cache contain revisions from March 2 to June 2, rows 5000 still but only 15 or 30 new ones were fetched same to the third run etc. commit CONFUSED SPIRIT(Thilio).Talk 12:11, 3 June 2026 (UTC)
- @DreamRimmer I did some few changes modified
Approved for trial (30 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. You could just parse the page and get the request headings instead of storing the entire page text, but whatever works best for you. – DreamRimmer ■ 09:22, 4 June 2026 (UTC)- Can the comments by the bot be placed at the end of a request rather than immediately afterwards which may come before prior comments by others? Tenshi! (Talk page) 00:42, 23 June 2026 (UTC)
Done test diff CONFUSED SPIRIT(Thilio).Talk 08:24, 23 June 2026 (UTC)
- Special:Diff/1360780898 had a space in between the request, causing two bullet points to be rendered, this should be above the space. Tenshi! (Talk page) 15:23, 23 June 2026 (UTC)
- What if I remove the bullet point
*, leave only the:and clean up the spacing too? CONFUSED SPIRIT(Thilio).Talk 15:55, 23 June 2026 (UTC)- That would violate MOS:INDENTMIX, specifically the 4th example. Tenshi! (Talk page) 16:06, 23 June 2026 (UTC)
- Special:Diff/1360788742 space removed, did backward traversal algorithm. CONFUSED SPIRIT(Thilio).Talk 16:31, 23 June 2026 (UTC)
- That would violate MOS:INDENTMIX, specifically the 4th example. Tenshi! (Talk page) 16:06, 23 June 2026 (UTC)
- What if I remove the bullet point
- Special:Diff/1360780898 had a space in between the request, causing two bullet points to be rendered, this should be above the space. Tenshi! (Talk page) 15:23, 23 June 2026 (UTC)