fix: align degraded runtime route policy
This commit is contained in:
@@ -28,14 +28,28 @@ function resolveRuntimeRoute({ governance, runtime, repoRootOverride }) {
|
||||
return createNotAttemptedResult('runtime execution not attempted');
|
||||
}
|
||||
|
||||
if (governance.preflight?.status !== 'pass') {
|
||||
return createNotAttemptedResult('runtime execution not attempted: compatibility preflight did not pass');
|
||||
if (governance.preflight?.status === 'fail_closed') {
|
||||
return createNotAttemptedResult('runtime execution not attempted: compatibility preflight failed closed');
|
||||
}
|
||||
|
||||
if (!governance.deploymentBinding) {
|
||||
return createNotAttemptedResult('runtime execution not attempted: deployment binding is missing');
|
||||
}
|
||||
|
||||
if (!['pass', 'degraded'].includes(governance.preflight?.status)) {
|
||||
return createNotAttemptedResult('runtime execution not attempted: compatibility preflight did not produce a runnable status');
|
||||
}
|
||||
|
||||
if (governance.preflight?.status === 'degraded') {
|
||||
const adapterActions = Array.isArray(governance.contract?.adapter_actions)
|
||||
? governance.contract.adapter_actions
|
||||
: [];
|
||||
|
||||
if (adapterActions.length === 0) {
|
||||
return createNotAttemptedResult('runtime execution not attempted: degraded compatibility preflight produced no adapter_action route');
|
||||
}
|
||||
}
|
||||
|
||||
const adapterActions = Array.isArray(governance.contract?.adapter_actions)
|
||||
? governance.contract.adapter_actions
|
||||
: [];
|
||||
|
||||
Reference in New Issue
Block a user