Skip to content

Upstream fragility: floating-upstream breakage detector #130

Description

@whisper67265

Problem

The plugin relies on undocumented Weblate internals (FormatsConf.FORMATS AST shape, WEBLATE_FORMATS, and weblate.urls.real_patterns list mutability). A scheduled pin bump to the latest PyPI Weblate could merge silently even when upstream has already broken those assumptions, leaving breakage to be discovered only at runtime.

Acceptance Criteria

  • A contract-latest job runs before the pin-bump job in weblate-pin-bump.yml, installing the newest modern calver Weblate from PyPI and running contract tests
  • scripts/check-weblate-internal-contract.sh supports --latest mode and exits non-zero with labeled contract failures when any assumption breaks
  • Contract tests are marked weblate_contract and excluded from default pytest runs so normal CI is not gated on floating upstream

Implementation Notes

  • Three focused contract tests mirror the plugin's real integration points: AST parsing of formats/models.py, weblate_formats_with_plugin_formats(), and append-to-real_patterns via _boost_endpoint_route()
  • Failure messages prefix the broken contract ([FormatsConf.FORMATS AST], [WEBLATE_FORMATS], [weblate.urls.real_patterns]) to speed triage when upstream changes
  • --latest resolves the newest modern calver release (year ≥ 2020) from PyPI JSON before installing and testing

References

  • .github/workflows/weblate-pin-bump.yml
  • .github/WORKFLOWS.md
  • scripts/check-weblate-internal-contract.sh
  • tests/test_weblate_internal_contract.py
  • pyproject.toml

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions