(decision)
| 114 | } |
| 115 | |
| 116 | function boundaryForDecision(decision) { |
| 117 | const finalAction = decision.final?.nextAction || decision.initial?.nextAction || {}; |
| 118 | const repair = localRepairFor(finalAction); |
| 119 | if (decision.approvalCapsule) { |
| 120 | return { |
| 121 | kind: decision.approvalCapsule.boundary, |
| 122 | risk: decision.approvalCapsule.risk, |
| 123 | request: decision.approvalCapsule.request, |
| 124 | verification: decision.approvalCapsule.verification || [], |
| 125 | }; |
| 126 | } |
| 127 | if (repair) { |
| 128 | return { |
| 129 | kind: 'local-repair', |
| 130 | risk: 'low', |
| 131 | request: `Run deterministic repair: ${repair.command}`, |
| 132 | verification: [ |
| 133 | 'Re-run `node scripts/operator-console.js` and confirm status becomes idle or a human boundary is explicit.', |
| 134 | 'Run the selected verification profile if source files changed.', |
| 135 | ], |
| 136 | }; |
| 137 | } |
| 138 | return { |
| 139 | kind: 'none', |
| 140 | risk: 'low', |
| 141 | request: 'No approval required.', |
| 142 | verification: [ |
| 143 | 'Run `node scripts/dashboard.js --json` if the idle state looks surprising.', |
| 144 | ], |
| 145 | }; |
| 146 | } |
| 147 | |
| 148 | function boundaryForStack(stack) { |
| 149 | if (stack.status === 'blocked') { |
no test coverage detected