I was encoding the sixteen principal figures of Fa, the divination system of the Fon of Benin. Sixteen rows, four marks each. Trivial data entry.
I nearly shipped two of them swapped, and the way I caught it is worth writing down, because the obvious check passed.
The disagreement
A search summary handed me a table giving the figure 2212 for Sa and 2111 for Trukpen, where 1 is a single stroke and 2 is a double, read top to bottom.
Another source gave the opposite: Sa is 2111, Trukpen is 2212.
Two published tables, contradicting each other on exactly two of the sixteen. Everything else agreed.
The check that did not help
The sixteen figures have structure you can test. Reverse a figure top to bottom and you get another valid figure. Under that operation the set partitions into figures that read the same both ways, and pairs that map to each other.
So: count them. If one arrangement produced a broken partition, that would settle it.
Both arrangements give four palindromes and six reverse pairs. Four plus twelve equals sixteen, cleanly, either way.
That is the shape of this kind of error. The obvious invariant is a property of the figures, and swapping two names does not change the figures. It only changes which name sits beside which pattern, and the counting test cannot see names at all.
The check that did
Reversal also says which figure each one reverses into, which is a claim about pairs of names and not about the set.
Under the second arrangement:
- Guda reversed is Sa
- Ka reversed is Trukpen
Under the first arrangement, both of those break at once. Guda would reverse into Trukpen and Ka into Sa, which contradicts every table's ordering of those names.
So the swapped version is inconsistent with itself, and you can demonstrate that without appealing to any authority about which source is more trustworthy.
Then I went and read the primary source properly. Wikipedia's article on Ifá prints two tables, one Yoruba and one for the West African Afa-du set, and they agree with each other and with the second arrangement. Ọ̀sá is 2111. Òtúúrúpọ̀n is 2212.
There is now a test named after it:
test('Sa and Trukpen are not swapped', () => {
assert.equal(du('Sa').marks.join(''), '2111');
assert.equal(du('Trukpen').marks.join(''), '2212');
assert.equal(du('Guda').reverse().fon, 'Sa');
assert.equal(du('Ka').reverse().fon, 'Trukpen');
});
The last two lines are the ones that matter. The first two would pass if I had transcribed the same mistake into both the table and the test.
What I took from it
A consistency check that passes on both candidates is not a check. Counting palindromes felt like verification and verified nothing about the question I had. Ask of any invariant you rely on which wrong answers it would still accept.
Relations between elements are stronger evidence than properties of the set. The cardinality was identical under both arrangements and the pairing was not. Checks that name specific elements catch attribution errors that aggregate checks cannot.
Search summaries are not sources. The wrong table came from a confident-sounding summary, and fetching the actual article took about a minute. That is the second time in a month reading the primary source caught something a summary had backwards.
Say where the uncertainty remains. The ordering of the sixteen genuinely varies by region, and I could not resolve that the same way, because unlike the figures there is no internal structure that makes one ordering self-consistent and another not. So the library documents that rank is an index and not a claim about seniority, and the seniority ordering of the 256 is not encoded at all.
The library is fadu: the sixteen dù, the 256 signs, both casting mechanics, and no interpretation at all. 69 tests, zero dependencies, and every source cited.
Top comments (0)