Skip to content

[Bug] pytest red on master after the plugin Pages to Views rename (#10307) #10318

Closed

Description

@he-yufeng

The plugin Pages to Views rename in #10307 landed without updating the tests that assert the old names, and the public OpenAPI document was not regenerated. The pytest matrix has been red on master since, and every new PR inherits the failures.

Reproduced on master @ 9d4f523 (also failing in CI on macOS, ubuntu and windows, e.g. on #10303 and #10297):

  • tests/test_plugin_manager.py::test_load_plugin_metadata_includes_i18n and ::test_load_plugin_metadata_includes_pages fail with AttributeError: 'StarMetadata' object has no attribute 'pages' since the field is now views.
  • tests/test_dashboard.py::test_plugin_page_content_issues_scoped_asset_token asserts window.AstrBotPluginPage?.__setInitialContext in the injected bridge snippet, which now emits AstrBotPluginView.
  • tests/test_fastapi_v1_dashboard.py::test_v1_openapi_is_served_by_fastapi compares the runtime spec against docs/public/openapi.json, which is stale: the six /plugins/view(s) alias routes from feat(dashboard): regroup sidebar into labeled sections and rename plugin Pages to Views #10307 are missing. Running docs/scripts/update_openapi_json.py fixes it and also re-sorts the two openapi-scopes tables.

Reproduction steps: run pytest tests/test_plugin_manager.py tests/test_dashboard.py tests/test_fastapi_v1_dashboard.py on current master.

AstrBot version: master @ 9d4f523
OS: reproduced on macOS locally; CI shows the same on ubuntu and windows

Activity

  1. added a commit that references this issue on Oct 2, 2026
    63aa363
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions