The constraint scope (P4680 on Wikidata) specifies whether a constraint should be checked on the main snak, on qualifiers, and/or on references of a statement. DelegatingConstraintChecker should inspect this parameter and decide whether or not to check the constraint; if it’s not checked, report a new status instead, which would replace the current “not main snak” status. (I’m not yet sure what it should be called – “not in scope”?)
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Lucas_Werkmeister_WMDE | T173695 Enable constraint checks by default for users | |||
Resolved | Lucas_Werkmeister_WMDE | T168532 Check constraints on qualifiers and references | |||
Resolved | Lucas_Werkmeister_WMDE | T178295 Don’t always check “type” constraint on qualifiers | |||
Resolved | Lucas_Werkmeister_WMDE | T183542 Support “constraint scope” parameter (days: 3) | |||
Resolved | Lucas_Werkmeister_WMDE | T184202 Parse constraint scope parameter |
Event Timeline
For constraints that very clearly only make sense in certain scopes (like “used as qualifier” or “mandatory qualifiers”), we should probably report any other scopes as errors.
What should we do for constraints that currently aren’t supported in all scopes, but which might be supported there in the future (like “conflicts with” – see subtasks of T168532: Check constraints on qualifiers and references for more)? STATUS_TODO sounds appropriate, I guess… if it’s acceptable that this is, for all users who don’t check the special page, a silent skipping of the constraint. But that might also turn out to be confusing :/
Change 402881 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Rename status not-main-snak to not-in-scope
Change 402882 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add ConstraintChecker::getSupportedContextTypes()
Change 402883 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add scope helpers to test traits
Change 402884 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add scope support to DelegatingConstraintChecker
Change 402885 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove unnecessary code from checkers
Change 402881 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Rename status not-main-snak to not-in-scope
Change 402882 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Declare ConstraintChecker’s supported and default context types
Change 402883 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add scope helpers to test traits
Change 402884 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add scope support to DelegatingConstraintChecker
Change 402885 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Remove unnecessary code from checkers