Page MenuHomePhabricator

Show constraint violations on SDC statements
Closed, ResolvedPublic

Description

We need to flag to users if there are constraint violations in SDC statements.

On Wikidata, users are shown

Additionally, an explanatory message can be specified to show with the warning icon, via constraint clarification (P6607)

It is important for such warnings to become visible, and soon, to flag up immediately to users that particular patterns of usage are inappropriate, or have not yet been agreed by the community.
This is particularly urgent now that we are on the brink of a vast number of more properties becoming available and going live into mass usage on Commons SDC.

Use-case example, presenting why we need this as soon as it can be done, in this comment below.

Note: this is more or less equivalent to T239163

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Bugreporter if you close a bug as duplicate, please copy any relevant information. This bug is currently completely empty

Bugreporter renamed this task from Checking constraints for MediaInfo entries to Checking constraints for MediaInfo entities.Oct 27 2019, 5:45 PM
Jheald renamed this task from Checking constraints for MediaInfo entities to Show constraint violations on SDC statements.Oct 27 2019, 7:23 PM

Use-case example to show why this is urgently needed: The property source of file (P7482) is intended to show the broad nature of the origin of a file.

In the property proposal discussion, it was agreed that this could be rolled out widely now for the simplest case, namely images we can reliably trust to be a user's own personal creation and own direct upload (eg a user's own photo of a monument they have taken and uploaded in the Wiki Loves Monuments campaign), but that for the moment uses in more complicated cases should be restricted until there has been more community discussion and sign-off, to make sure we know how we want to model such cases, before people start applying the property more widely.

This is reflected in the following constraint specification on P7482 (see revision as of 2019-10-27) :

It is urgent that warning flagging is put in place soon, before people start seeing P7482 "source of file" statements starting widely to appear images, and begin supplying their own new values, other than what is so-far the only community-approved value, Q66458942 "original creation by uploader".

If SDC is to develop in an orderly way, visible flagging of non-conformant (or not yet generally consented to) statements is really needed.

@Lucas_Werkmeister_WMDE How dependent is the wikibase constraint system on SPARQL ?
Maarten was just suggesting that a functioning SPARQL service is required for any of the constraint checking to operate (and so this ticket would be completely blocked until CDQS is reliably up and running)
Is that correct? Or are any of the simplest of the constraint checks (eg format constraints, one-of constraints, etc) available without SPARQL ?

@Lucas_Werkmeister_WMDE How dependent is the wikibase constraint system on SPARQL ?
Maarten was just suggesting that a functioning SPARQL service is required for any of the constraint checking to operate (and so this ticket would be completely blocked until CDQS is reliably up and running)

This is not correct at all. Two constraint types, “format” and “distinct values”, require a SPARQL service (and disable themselves if none is configured); two others, “type” and “value type”, can fall back to SPARQL for type checks (though they first follow the statements in PHP, since contacting the query service is expensive) but don’t require it. All other constraint types are unrelated to the query service.

Ramsey-WMF claimed this task.
Ramsey-WMF subscribed.

Constraints work now and the three main icons are properly displayed (without weird spacing issues) as of last week.