Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/committee-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
{"login": "shaal", "name": "Ofer Shaal", "role": "member"},
{"login": "inde5media", "name": "Mat Mathews", "role": "member"},
{"login": "rcraw", "name": "Robert Ranson", "role": "member"}
],
"contributors": [
{"login": "CraftsMan-Labs", "name": "Rishub C R (Craftsman)", "role": "contributor"}
]
}
1 change: 1 addition & 0 deletions scripts/build-dashboard.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const dashboard = {
name: config.committee_name,
quorum_rule: config.quorum_rule,
members: config.members,
contributors: config.contributors || [],
},
submissions,
approved,
Expand Down
26 changes: 26 additions & 0 deletions test/committee-config.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';

const cfg = JSON.parse(readFileSync(new URL('../data/committee-config.json', import.meta.url)));

test('committee-config: members drive quorum, contributors do not', () => {
// Quorum is Math.floor(members.length / 2) + 1 in the vote workflows.
// Contributors MUST NOT be in members[], or they would change the quorum denominator.
assert.equal(cfg.members.length, 6, 'voting roster size (quorum denominator) unchanged');
const quorum = Math.floor(cfg.members.length / 2) + 1;
assert.equal(quorum, 4, 'simple-majority quorum is 4');
});
Comment on lines +7 to +13

test('committee-config: Craftsman is a non-voting contributor', () => {
const contribLogins = (cfg.contributors || []).map((c) => c.login);
assert.ok(contribLogins.includes('CraftsMan-Labs'), 'Craftsman listed as contributor');
const memberLogins = cfg.members.map((m) => m.login);
// Non-voting invariant: no login appears in both arrays.
for (const l of contribLogins) {
assert.ok(!memberLogins.includes(l), `${l} must not also be a voting member`);
}
for (const c of cfg.contributors || []) {
assert.equal(c.role, 'contributor', `${c.login} role is contributor`);
}
});