The test comes before the code
When a rule is implemented, its test is written first and the code that implements it second, written to pass that test. The test carries the rule's sid in its name, or, in a language whose names cannot hold one, in a mark on the test (§s-rwqzepmrt77rv35); the code carries the rule's tag (§s-kgbzk2ph9e6jfb4).
Every test carries the sid of the rule or the term it verifies. A test a commit adds or changes carries the sid of a checked one, and every rule whose code a commit adds or changes has at least one test.
A test names a rule's behaviour, which survives the refactoring that moves and renames the code underneath it, so the binding through tests is the stable one. And a test written first tests the rule, not whatever the code happened to do.
A term whose definition states behaviour is verified as a rule is, and its test carries the term's own sid rather than that of a rule written only to repeat it. A section and a domain's header require nothing (§s-ef93u6cnbs2sevr), and what a data record requires is carried out by the types and runtime checks generated from it (§s-e877bnfa559tvk9), which every commit holds to what the node produces, so a test of its own would verify the generator rather than the system's code.
A test without the sid of what it verifies tests something nobody can name, and a rule whose code has no test is carried out on trust; both are refused where the change is made, which is when a test costs least to write. Only a test a commit adds or changes must name a checked node, since a rule under revision is unchecked while the tests written against its earlier wording still stand.
The links it makes
The links made to it
The decisions taken on it
- Problem
Two tests added with a feature opened with no sid, and nothing checked that a test of the system's code names the rule it verifies.
- Ruling
The owner: tags and tests that cite the specification are the general rule for all code, checked at every commit.
- Problem
Tests of what a term of contracts defines opened with the term's sid, which the rule as worded refused.
- Ruling
The owner: a test opens with the sid of the checked rule or term it verifies.
- Problem
A test whose change only moved a citation onto a sid was held to open its name with the sid of a checked rule it verifies, which a test of a rule not yet checked cannot do, while a declaration changed only so owed no tag.
- Ruling
The owner agreed that a change to a test that only rewrites its citations or its comments owes it no such name, as §s-kgbzk2ph9e6jfb4 already holds for a declaration.
- Problem
A test bound to its rule by the opening of its name cannot be written in a language whose names cannot hold a hyphen.
- Ruling
The owner: a test declares the sid of what it verifies in the way its framework names a test (§s-rwqzepmrt77rv35).
- Problem
The rule let a test whose change only rewrote its citations or comments go without a sid, an exemption for tests written before tests carried sids, and it was worded for a reader who already knew the procedure.
- Ruling
The owner: a test always carries the sid of what it verifies; the rule is worded as the procedure it is — the test first, the code second, the test carrying the rule's sid and the code its tag.
- Problem
A test could carry the sid of a node of a kind a project's own guidelines bind to tests, while the schema every project reads admits only the kinds it defines and nothing lets a project declare another; and the check accepted a test carrying the sid of any node, a section's included.
- Ruling
The owner: the kinds of node are those the schema defines, the same in every project; a test carries the sid of a rule or a term.
- Problem
The reason called a rule with no test implemented, while a rule is implemented only with a passing test carrying its sid.
- Ruling
Following the owner's ruling on §s-6fw72j65jkqrfpf: a rule whose code has no test is carried out on trust.
The tests bound to it
- skills/tools/test/unit/binding.test.ts · s-rah8b37kytb682y refuses a rule whose code a commit adds or changes with no test carrying its sid
- skills/tools/test/unit/binding.test.ts · s-rah8b37kytb682y refuses a test carrying the sid of a node that is neither a rule nor a term