pinSourceFromOntology MUST give a source of pins that, for a pin and a platform the ontology states, gives the version, the address, the SHA-256, the format and the folder of its download as a Download.
Enforced (check): .github: cd commons/toolchain && bun run verify — suite/ontology.test.ts: a download for a pinned program on a platform
Tests: passed: suite/ontology.test.ts a pinned program on a platform gives its version, address, SHA-256, format and folder; passed: suite/ontology.test.ts a tool that is pinned in the ontology resolves at the version of its pin
Where the ontology gives no download, the source MUST give the reason in the ontology's own words and naming the pin and the platform: a pin or a platform it does not state, a pin it does not pin on the platform, a platform that is unpinned with its reason, and a checksum that is not 64 lower-case hexadecimal digits.
Enforced (check): .github: cd commons/toolchain && bun run verify — suite/ontology.test.ts: the ontology's reason for an unknown, unpinned or not pinned download
Every download the source gives MUST pass defineDownload (an https address with no credentials, a SHA-256, a format and a folder inside the unpacked folder), and one that does not MUST be given as a reason and never as a download.
Enforced (check): .github: cd commons/toolchain && bun run verify — suite/ontology.test.ts: every download given is valid under defineDownload
Given the pin bun and the platform linux-x64, When the source is asked, Then it gives a download with an https address, a SHA-256, a format and a folder, per FR-001.
Given a pin the ontology does not state, When the source is asked, Then it gives a reason that names the pin, per FR-002.
Given a pin that is unpinned on a platform, When the source is asked, Then it gives a reason that names the pin and the platform and says why, per FR-002.
Given the tool bun with a pin binding and the dialect of downloads, When it is resolved with this source, Then it is resolved at the version of the ontology's pin, per FR-001.
The ontology's own check (its generator) holds a pin well formed; this adapter checks the form again, because it is the last place before a download is made.