Build the agent-native compute CRM platform
CI / verify (push) Successful in 3m6s

This commit is contained in:
2026-08-13 01:39:01 -07:00
parent bfd2f8d95a
commit 853bde2265
160 changed files with 61812 additions and 483 deletions
+33 -1
View File
@@ -9,6 +9,10 @@
* be represented exactly in binary, and a cent compounds across millions of
* GPU-hours.
*
* **Node totals.** Prime reports on-demand price and GPU memory for the whole
* node. PIG compares per-GPU values, so a larger node must not look more
* expensive merely because it contains more GPUs.
*
* **Interconnect.** The field that decides whether capacity can train or
* only serve. Guessing wrong in either direction loses a deal or sells a
* customer a cluster that cannot do the job.
@@ -99,11 +103,39 @@ describe('mapListing — general', () => {
});
it('converts prices to integer cents', () => {
const m = mapListing(listing({ prices: { onDemand: 2.43, communityPrice: 0.94 } }))!;
const m = mapListing(
listing({ gpuCount: 1, prices: { onDemand: 2.43, communityPrice: 0.94 } }),
)!;
assert.equal(m.onDemandPriceCents, 243);
assert.equal(m.communityPriceCents, 94);
});
it('normalises verified DataCrunch A100 node totals to the same per-GPU values', () => {
const oneGpuRaw = {
provider: 'datacrunch',
gpuType: 'A100_80GB',
gpuCount: 1,
gpuMemory: 80,
prices: { onDemand: 1.79 },
};
const twoGpuRaw = {
provider: 'datacrunch',
gpuType: 'A100_80GB',
gpuCount: 2,
gpuMemory: 160,
prices: { onDemand: 3.58 },
};
const oneGpu = mapListing({ ...oneGpuRaw, raw: oneGpuRaw })!;
const twoGpu = mapListing({ ...twoGpuRaw, raw: twoGpuRaw })!;
assert.equal(oneGpu.onDemandPriceCents, 179);
assert.equal(twoGpu.onDemandPriceCents, 179);
assert.equal(oneGpu.gpuMemoryGb, 80);
assert.equal(twoGpu.gpuMemoryGb, 80);
assert.deepEqual(twoGpu.raw, twoGpuRaw);
});
it('defaults to the secure tier unless community is stated', () => {
// Mislabelling community capacity as secure would let it be sold against a
// requirement it cannot meet.