Skip to content

Feature: Separate page for test mode #120

@zache-fi

Description

@zache-fi

Add a dedicated testing interface for PendingChangesBot to allow manual testing of autoreview checks against specific revisions.

Requirements

1. New Test Page

  • Create a separate page for running autoreview checks (similar to the statistics page)
  • Page should be accessible via a dedicated route (e.g., /testing)

2. Test Selection UI

  • Test Selection Interface: UI for selecting which autoreview checks to run
  • Execution Mode Toggle:
    • Option 1: Run all autoreview checks for every revision
    • Option 2: Run autoreview checks as a pipeline like in normal mode
  • Configuration settings for autoreview checks should be shared between normal mode and testing mode (no separate configuration needed for now. It could be needed later.)

3. Revision Sources

In wikipedia there are pages which contain links to problematic or example approvals. These pages are also places where wikipedia editors can report incorrect automatic approvals.

3.1 Wikipedia report pages

3.1.1 Supported link formats

The Wikipedia pages should be readed in html mode

Page Links:

  • Merkityt_versiot_-kokeilu/Testisivu_1 - Direct link to page (all revisions)
  • Merkityt_versiot_-kokeilu/Testisivu_2#20240101 - Match revisions after date (2024-01-01)
  • Merkityt_versiot_-kokeilu/Testisivu_3#20240101-20251027 - Match revisions between dates (2024-01-01 to 2025-10-27)

Revision Links:

  • https://fi.wikipedia.org/w/index.php?title=Lemmikkikani&diff=prev&oldid=17733195 - Specific revision ID
  • Toiminnot:Ohjaus/revision/20348538 - Match pattern https://fi.wikipedia.org/wiki//[^ ]*?:[^ ]*?/revision/$REV_ID

4. Manual Input Field

  • Add a text field in the UI where users can paste Wikipedia links
  • Links should be processed the same way as links from the Wikipedia configuration pages
  • Support all formats listed in section 3.1.1

5. URL Parameter Support

Allow launching the test interface directly via URL parameter. URL-parameter should upport all formats listed in section 3.1.1. (ie. it should work similarly than manual input field.

Examples:

  • https://127.0.0.1/testing/?q=Turku#20250101-20251010
  • https://127.0.0.1/testing/?q=https%3A%2F%2Ffi.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DLemmikkikani%26diff%3Dprev%26oldid%3D17733195

Implementation Notes

  • The q-parameter should support same values than Manual Input Field
  • Show autoreview check results after every revision instead of after processing whole page
  • Date formats should follow YYYY, YYYYMM or YYYYMMDD pattern
  • The test interface should handle both single revisions and revision ranges

Acceptance Criteria

  • New /testing page created with dedicated UI
  • Test selection interface implemented
  • Execution mode toggle (all tests vs. pipeline) working
  • Wikipedia configuration page parsing implemented
  • All link formats correctly parsed and processed
  • Manual input field functional
  • URL parameter support working with encoded values
  • Autoreview checks use the same configuration as normal mode
  • There is unit tests for the testing page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions