opws / opws-schemata

OPWS schema files and documentation
MIT License
0 stars 0 forks source link

Formalizing freeform notes #1

Open stuartpb opened 6 years ago

stuartpb commented 6 years ago

See opws/opws-dataset#137 and opws/opws-validate#2: right now, many profiles have notes fields in arbitrary locations, which are specially ignored by validation.

The sustainable solution here is to understand ways in which notes are used, and put them in predictable locations, with codified semantics around how they would be presented in given use cases.

stuartpb commented 6 years ago

OK, I'm going through the list of all "notes" fields that are in profiles now, and I'm breaking them down into a few general categories:

Errata

Sort of like errata, but harmless, and pretty much an irrelevant detail

Citations of data that is (mostly?) represented in the schema

Directions beyond what's in the schema

Directions so bad they're practically errata

Nuanced contradictions of what the codified data suggests per schema

Circumstantial UI

Further requirements and restrictions

Entirely unusual requirement

Alternatives

Trivia and details outside of what's expected

Sort of an important detail


So, from this, here's what I'm thinking:

stuartpb commented 6 years ago

The way I see it, there are two options for dealing with the long tail of notes encapsulated by the last two kinds of note:

Of the two, I'm leaning more toward the latter, since the whole discussion around these notes was that they're bad catch-alls for things that should probably be described structurally (for example, the nuance of CAPTCHAs only appearing after a few failed requests should probably be represented by a dedicated "transient" field or something like that), and having a long-form place for them introduces awkward situations where consumers are trained to read for something that will eventually potentially disappear.

Basically, as a better lifecycle infrastructure emerges, we can start putting these details in pull requests / commit comments and referring out to them in schemata issues (and vice versa), so there's less harm in just leaving these aspects of the site completely undefined until the appropriate structure to accommodate them within the schema exists, where endpoint consumers can make decisions based on their information.

That's really the fundamental guiding principle to how each of these will be codified: does their presence send a clear signal to the program about how to proceed with its use case? If not, it's not worth codifying until it can be structured in such a way that does.

stuartpb commented 6 years ago

Perhaps a circumstances field for describing forms where certain things may not appear? The use case there is that they should be displayed as an info list if rendering "You'll need this"... maybe that means they need to be attached to specific inputs, then.

stuartpb commented 6 years ago

Also, I figure stuff like Google's username weirdness merits a "clarification" field for the explanation, and other sites may have similar need for clarification (like when "username" is used to refer to "customer number"). But, then, I don't know how to handle that registration caveat.

stuartpb commented 6 years ago

I think a few of these unusual registration flows could be described by having a circumstances field on the form level itself.

stuartpb commented 6 years ago

I'm just going to propose circumstances for fields themselves for now: putting circumstances on every form would be a pretty major change, and I'm not convinced is even the right model for describing a radically-different path.

stuartpb commented 6 years ago

Okay, now I'm going to propose further.requirements for forms and further.restrictions for passwords/usernames. I've got some thoughts on whether or not it should be merged, but I'll leave that debate for the pull request.

EDIT: Actually, I'm going to keep it to just further.requirements: any "further restrictions" on passwords described in the current notes should be conveyable through a combination of {value,contents}.{must,mustnot} and errata.

stuartpb commented 6 years ago

I'm proposing further.requirements as well (#7): it feels wrong to me to describe some things that are required to do a task but not others, just because they don't fit the schema. further.requirements is broad and it has the whole problem of "describing in prose things that should be considered for inclusion in the schema structure", but its presence still at least conveys something decision-worthy (whether or not someone with the values listed in the profile can just be handed off to registration without further prompting), so I figure it's worth including like this, at least for v0.2.

stuartpb commented 6 years ago

Based on the list above (with some recategorizations and reconsiderations), my plan for migrating issues to the new structure:

errata

directions

documentation

circumstances

further.requirements

pre-existing fields

removed, pending future accommodation

stuartpb commented 6 years ago

Actually, I'm gonna take the fairly radical step of classifying the two instances where a site has an opaque "password strength" requirement as errata rather than rules, because it fails the main litmus test of a rule, in that there is no way the user can tell whether a password would satisfy the rule or not. (There are a couple other profiles that have rules of "must satisfy the following formula", but, as bad as that is, it's not the complete failure that having opaque strength limits is, because that's at least small enough to read and understand.)

All password rules are problematic, but within the scope of the rules defined in this spec, they're at least problems that can be evaluated. Anything that makes it impossible to definitively evaluate what password may have been derived for that site's use qualifies as "errata".

stuartpb commented 6 years ago

OK, all the lingering notes have been removed (opws/opws-dataset#309), time to finish this:

If done in this order, this should all cooperate well enough with CI.

stuartpb commented 6 years ago

Actually, I'm going to cut the note about the terms checkbox for steampowered.com since, after consulting the Steam Subscriber Agreement, being at least 13 years of age is a requirement for agreeing anyway (they just highlight it, presumably to deter all the 12-year-olds that sign up for Steam anyway).

stuartpb commented 6 years ago

OK... now I need to update the builder so it knows how to handle schema versions later than v0.1.