feat(reporting-governance): wire profile artifacts into contract and orchestrator
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { evaluatePolicies } from './policy-evaluator.mjs';
|
||||
import { runCompatibilityPreflight } from './compatibility-preflight.mjs';
|
||||
import { planDecisionExecution } from './decision-runner.mjs';
|
||||
import { createDeploymentBindingContract } from '../storage/profile-artifact.mjs';
|
||||
|
||||
function createBlockedReceipt({ evaluation, preflight }) {
|
||||
return {
|
||||
@@ -57,6 +58,7 @@ export function executeGovernanceContract({
|
||||
context = {},
|
||||
profile = {},
|
||||
packageVersion,
|
||||
repoRootOverride,
|
||||
} = {}) {
|
||||
const evaluation = evaluatePolicies({
|
||||
event,
|
||||
@@ -81,10 +83,15 @@ export function executeGovernanceContract({
|
||||
capabilityDescriptor,
|
||||
});
|
||||
|
||||
const deploymentBinding = profile?.spec?.bindings
|
||||
? createDeploymentBindingContract({ artifact: profile, repoRootOverride })
|
||||
: null;
|
||||
|
||||
return {
|
||||
evaluation,
|
||||
preflight,
|
||||
planning,
|
||||
deploymentBinding,
|
||||
contract: {
|
||||
runtime: capabilityDescriptor?.metadata?.id ?? capabilityDescriptor?.runtime?.name ?? 'unknown-runtime',
|
||||
policy_id: evaluation.decision.policy_id,
|
||||
|
||||
Reference in New Issue
Block a user