feat(reporting-governance): add profile artifact binding slice
This commit is contained in:
@@ -43,7 +43,30 @@ test('runCompatibilityPreflight passes strict profile against reference descript
|
||||
assert.equal(result.errors.length, 0);
|
||||
});
|
||||
|
||||
test('runCompatibilityPreflight fails closed on schema/version mismatch', () => {
|
||||
test('runCompatibilityPreflight keeps legacy compatibility mode open when caller provides no compatibility envelope', () => {
|
||||
const brokenDescriptor = {
|
||||
...capabilityDescriptor,
|
||||
compatibility: {
|
||||
...capabilityDescriptor.compatibility,
|
||||
plugin_spec_versions: ['9.9.9'],
|
||||
decision_schema: 'schemas/reporting-governance/not-the-canonical-decision.schema.json'
|
||||
}
|
||||
};
|
||||
|
||||
const result = runCompatibilityPreflight({
|
||||
capabilityDescriptor: brokenDescriptor
|
||||
});
|
||||
|
||||
assert.equal(result.status, 'pass');
|
||||
assert.equal(result.requested_profile, null);
|
||||
assert.equal(result.requested_plugin_version, null);
|
||||
assert.equal(result.compatibility.version_ok, true);
|
||||
assert.equal(result.errors.length, 0);
|
||||
assert.ok(result.compatibility.schema_checks.some((entry) => entry.key === 'decision_schema' && entry.ok === false));
|
||||
assert.ok(result.notes.some((note) => note.includes('skipped plugin version pin')));
|
||||
});
|
||||
|
||||
test('runCompatibilityPreflight fails closed on schema/version mismatch once compatibility envelope is present', () => {
|
||||
const brokenDescriptor = {
|
||||
...capabilityDescriptor,
|
||||
compatibility: {
|
||||
|
||||
Reference in New Issue
Block a user