fix: align degraded runtime route policy

This commit is contained in:
Eve
2026-05-08 11:45:26 +08:00
parent f0559eb50c
commit c2b8c4be3d
2 changed files with 78 additions and 4 deletions

View File

@@ -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
: [];