ANTRequest's PlanetSpec Specification (Version 0.0.4)

Feature Testing is the practice of discovering which features a Planet supports. This specification intentionally keeps feature discovery simple.

Table Of Contents

Table Of Contents

Status of this document

this document written on is Semantic version 0.0.4. this document is self-published independently.

This Specification uses external references

Definitions

Planet
A Server Implementing is called a Planet.
Edge
A Client Implementing is called an Edge. an edge is a client that interacts with the planet. could be a browser extension, the bowser, or an app.
The Protocol
The Protocol as set forth in This Specification
The Specification
The Specification is this htmlpage.
/Favicond_/
The Base Path of the protocol interactions. the underscore is a MUST. this path is directly after the domain. (https://{your-domain}/Favicond_/)
REQUIRE
RFC2119's REQUIRED
Edge-Defined
Planet-Defined
A feature whose specific behavior is determined by the host environment rather than this specification. While this document may provide constraints, the Planet or Edge is free to define the exact behavior within those bounds.
Edge-Approximated
Planet-Approximated
A feature whose specific behavior is determined by the host environment rather than this specification. While this document may provide constraints, the Planet or Edge is free to define the exact behavior within those bounds, but preferably reacts like the recommending an ideal behavior.

planet.json

planet.json is a file in your /Favicond_/ folder (the /Favicond_/ folder MUST be after the domain, so it MUST be at https://{your-domain}/Favicond_/planet.json). which states some information of the planet. A valid planet.json file follows all these requirements

A Feature-Slug is a string set forth by a Specification Linked to by the url which is the parent object's key.

Examples of PlanetSpec

{
    "compat": {
        "https://antrequest.nl/standard/PlanetSpec/0.0.4/": {
            "main": true
        },
        "https://antrequest.nl/standard/FaviDiD/0.3.1/": {
            "keygen": true,
            "auth": true,
            "newProto": false
        },
        "https://antrequest.nl/standard/FaviDiD/0.1.1/": {
            "extends": "https://antrequest.nl/standard/FaviDiD/0.3.1/",
            "newProto": true
        }
    }
}

Error Handling

Edges SHOULD attempt to do the following when parsing:

An URL is HTTP, not HTTPS.
the Edge SHOULD ignore that url and its feature slugs.
An extends URL is HTTP, not HTTPS.
the Edge SHOULD ignore that url and its feature slugs. it SHOULD also ignore any children of the extended url.
A REQUIRED feature is listed as unsupported as set forth by the Specification Linked
the Edge SHOULD do as set forth in that Linked Specification, otherwise the Edge MAY ignore the entire Specification and its Feature-Slugs.
An OPTIONAL feature is listed as unsupported as set forth by the Specification Linked
the Edge SHOULD do as set forth in that Linked Specification. otherwise the Edge SHOULD ignore the section of that Specification and not too much else and its Feature-Slugs.
a Feature-Slug is absent.
the extends Feature-Slug (key) is a boolean.
the extends Feature-Slug (key) points not to a standard listed in the compat object.
a Feature-Slug (which is not extends) is not a boolean.
ignore it, and treat it as if it was false.
the planet.json isnt valid json or it wasnt served with 200
Resolve {"compat":{}} instead, basically nothing is supported
a planet.json lists https://antrequest.nl/standard/PlanetSpec/0.0.4/ as false.
this is Edge-Approximated. the ideal behavior is as follows: Edges MAY cancel the whole operation. Edges SHOULD do as the Fork (if any) set forth unless that is impossible or otherwise unachievable (for example violates applicable law).

Extendable Features

if a standard is forked (like i encourage mine to be) you might inherit features from them. which is where the extends comes in. if a feature doesnt exist in this feature object the Edge MUST go to the extends object and look there.

Edges MUST detect cycles in the extends chain (e.g., A -> B -> C -> A) and return false for the feature if a cycle is detected.

Resolve_Supported (compat, url, slug, seen)

to determine whether a feature is supported follow these steps given a compat object (compat), a Specification URL (url), a Feature-Slug (slug), and an array (seen) SHOULD be Empty if it isnt a Recursive Call.

Caching

Edges SHOULD respect caching headers. caching headers Planets set is Planet-Defined.

Author's Notes

please tell me how i did. it was my first time writing something like this. this is self-published independently.