Skip to content
Astera Technology

Compare named, active and concurrent seat units

Apply each quoted seat definition to the same supplied account trace.

Download complete case notes and answer keys ↓

Set the decision and its input

Fictional quotations use three different units. The supplied account inventory contains twelve named accounts, eight marked active for the stated month, and a complete toy concurrency trace whose largest snapshot contains three distinct accounts. A named-seat quote therefore uses twelve, not the observed concurrent count of three.

Filled local test worksheet
CaseInput JSON
Base test{"basis":"named","traceComplete":true,"accounts":[{"id":1,"active":true},{"id":2,"active":true},{"id":3,"active":true},{"id":4,"active":true},{"id":5,"active":true},{"id":6,"active":true},{"id":7,"active":true},{"id":8,"active":true},{"id":9,"active":false},{"id":10,"active":false},{"id":11,"active":false},{"id":12,"active":false}],"samples":[{"accounts":[1,2]},{"accounts":[1,2,3]}]}
Download editable CSV ↓

Run the supplied comparison

Record the unit beside the count. These observations are inputs for this fictional comparison, not customer usage findings. A supplier demo must establish the contracted unit and trace completeness before a real peak is inferred.

Faulty and required outputs
PathOutput JSON
Faulty path{"basis":"named","count":3}
Required path{"basis":"named","count":12}
Download editable CSV ↓
Complete local Node24.14.1 programme
import assert from 'node:assert/strict';

const run=function run(i,corrected=true){
    if(!['named','active','concurrent'].includes(i.basis))return {held:true,reason:'unit-basis-missing'};
    if(corrected&&i.basis==='concurrent'&&i.traceComplete!==true)return {held:true,reason:'concurrency-trace-incomplete'};
    const named=i.accounts.length,active=i.accounts.filter(a=>a.active).length;
    const concurrent=Math.max(0,...i.samples.map(s=>new Set(s.accounts).size));
    return {basis:i.basis,count:corrected?({named,active,concurrent})[i.basis]:concurrent};
  };
const cases=[{"input":{"basis":"named","traceComplete":true,"accounts":[{"id":1,"active":true},{"id":2,"active":true},{"id":3,"active":true},{"id":4,"active":true},{"id":5,"active":true},{"id":6,"active":true},{"id":7,"active":true},{"id":8,"active":true},{"id":9,"active":false},{"id":10,"active":false},{"id":11,"active":false},{"id":12,"active":false}],"samples":[{"accounts":[1,2]},{"accounts":[1,2,3]}]},"corrected":false,"expected":{"basis":"named","count":3}},{"input":{"basis":"named","traceComplete":true,"accounts":[{"id":1,"active":true},{"id":2,"active":true},{"id":3,"active":true},{"id":4,"active":true},{"id":5,"active":true},{"id":6,"active":true},{"id":7,"active":true},{"id":8,"active":true},{"id":9,"active":false},{"id":10,"active":false},{"id":11,"active":false},{"id":12,"active":false}],"samples":[{"accounts":[1,2]},{"accounts":[1,2,3]}]},"corrected":true,"expected":{"basis":"named","count":12}},{"input":{"basis":"active","accounts":[{"id":1,"active":true},{"id":2,"active":false}],"samples":[{"accounts":[1]}]},"corrected":true,"expected":{"basis":"active","count":1}},{"input":{"basis":null,"accounts":[],"samples":[]},"corrected":true,"expected":{"held":true,"reason":"unit-basis-missing"}},{"input":{"basis":"concurrent","traceComplete":false,"accounts":[{"id":1,"active":true},{"id":2,"active":true}],"samples":[{"accounts":[1,2]}]},"corrected":true,"expected":{"held":true,"reason":"concurrency-trace-incomplete"}},{"input":{"basis":"concurrent","traceComplete":true,"accounts":[{"id":1,"active":true},{"id":2,"active":true}],"samples":[{"accounts":[1,1,2]},{"accounts":[1]}]},"corrected":true,"expected":{"basis":"concurrent","count":2}}];
for(const test of cases){const actual=await run(test.input,test.corrected);assert.deepEqual(actual,test.expected);console.log(actual);}
Download runnable example ↓

Choose from the boundary evidence

Active mode counts the one supplied active account in its boundary. An absent unit definition is held; selecting the smallest count does not fill that gap.

  1. Read the quotation unit
  2. Select its matching observation
  3. Write the basis with the count

Hold an unstated unit or an incomplete trace before claiming peak fit.

Editable boundary inputs and outputs
ConditionInput JSONExpected output JSON
active account basis{"basis":"active","accounts":[{"id":1,"active":true},{"id":2,"active":false}],"samples":[{"accounts":[1]}]}{"basis":"active","count":1}
basis not supplied{"basis":null,"accounts":[],"samples":[]}{"held":true,"reason":"unit-basis-missing"}
incomplete concurrent trace{"basis":"concurrent","traceComplete":false,"accounts":[{"id":1,"active":true},{"id":2,"active":true}],"samples":[{"accounts":[1,2]}]}{"held":true,"reason":"concurrency-trace-incomplete"}
complete concurrent trace counts distinct accounts{"basis":"concurrent","traceComplete":true,"accounts":[{"id":1,"active":true},{"id":2,"active":true}],"samples":[{"accounts":[1,1,2]},{"accounts":[1]}]}{"basis":"concurrent","count":2}
Download editable CSV ↓

How many units belong to the base named-seat quotation?

Show the worked answer

Twelve. Eight describes monthly activity and three describes the supplied concurrent peak; neither changes the named-account unit.

Related resources