Initial curated chimera source from a8ae5b1db07fb49926c94585e2718e5130330974
This commit is contained in:
commit
c737a37f71
531 files changed
+119270
No files matched your search
@@ -0,0 +1,41 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
|
||||
async function queueLib() {
|
||||
return import('../../scripts/autonomous/lib.mjs');
|
||||
}
|
||||
|
||||
test('evidenced external blockers satisfy the legacy dependency policy', async () => {
|
||||
const { dependenciesSatisfied } = await queueLib();
|
||||
const dependency = {
|
||||
id: 'CH-0001',
|
||||
status: 'blocked_external',
|
||||
notes: 'Concrete external evidence keeps host-complete follow-up work available.',
|
||||
};
|
||||
|
||||
assert.equal(dependenciesSatisfied({ dependencies: [dependency.id] }, new Map([[dependency.id, dependency]])), true);
|
||||
});
|
||||
|
||||
test('done_only dependency policy stops P15 follow-up after a blocked qualification gate', async () => {
|
||||
const { dependenciesSatisfied, selectNextTask } = await queueLib();
|
||||
const qualification = {
|
||||
id: 'CH-1401',
|
||||
status: 'blocked_external',
|
||||
notes: 'The owned-hardware reference controls did not reach an exact title process.',
|
||||
dependencies: [],
|
||||
};
|
||||
const adapter = {
|
||||
id: 'CH-1402',
|
||||
status: 'pending',
|
||||
dependencies: [qualification.id],
|
||||
dependency_policy: 'done_only',
|
||||
};
|
||||
const byId = new Map([[qualification.id, qualification], [adapter.id, adapter]]);
|
||||
|
||||
assert.equal(dependenciesSatisfied(adapter, byId), false);
|
||||
assert.equal(selectNextTask({ tasks: [qualification, adapter] }), null);
|
||||
|
||||
qualification.status = 'done';
|
||||
assert.equal(dependenciesSatisfied(adapter, byId), true);
|
||||
assert.equal(selectNextTask({ tasks: [qualification, adapter] }), adapter);
|
||||
});
|
||||
Reference in new issue
Block a user