fix template, remove okr, use casan.*
This commit is contained in:
@@ -69,6 +69,39 @@ test('approval inbox submit -> approve applies governed setting and writes overs
|
||||
});
|
||||
});
|
||||
|
||||
test('operations owner request remains visible and actionable for an independent reviewer', async () => {
|
||||
await withTempGovernance(async () => {
|
||||
const svc = new ApprovalsService();
|
||||
const submitted = svc.submit({
|
||||
action: 'goal.workspace.execute',
|
||||
target: 'customer-portal',
|
||||
risk: 'high',
|
||||
sensitive: true,
|
||||
reason: 'apply the reviewed workspace patch',
|
||||
payload: { goal_id: 'goal-123', project_id: 'customer-portal' },
|
||||
}, projectAdmin) as { proposal: { id: string; status: string; proposer: string } };
|
||||
|
||||
const reviewerInbox = svc.list(approver, 'pending') as {
|
||||
count: number;
|
||||
proposals: Array<{ id: string; proposer: string; status: string }>;
|
||||
};
|
||||
const visible = reviewerInbox.proposals.find((proposal) => proposal.id === submitted.proposal.id);
|
||||
|
||||
assert.equal(reviewerInbox.count, 1);
|
||||
assert.equal(visible?.proposer, projectAdmin.actor);
|
||||
assert.equal(visible?.status, 'pending');
|
||||
|
||||
const decided = await svc.decide({
|
||||
id: submitted.proposal.id,
|
||||
decision: 'approve',
|
||||
reason: 'independent reviewer verified scope and controls',
|
||||
}, approver) as { proposal: { status: string; approver: string } };
|
||||
|
||||
assert.equal(decided.proposal.status, 'approved');
|
||||
assert.equal(decided.proposal.approver, approver.actor);
|
||||
});
|
||||
});
|
||||
|
||||
test('approval inbox denies forged JWT in strict mode without deciding proposal', async () => {
|
||||
await withTempGovernance(async ({ inbox }) => {
|
||||
const svc = new ApprovalsService();
|
||||
|
||||
Reference in New Issue
Block a user