Skip to content

Commit 865744b

Browse files
claude[bot]claude
andauthored
test(approvals): pin tenant-admin can_override and resumed on pending recall (#14845)
The tenant-admin reverse check exercised the #3424 override recall but asserted neither of the two postures its platform-admin sibling pins: the `viewer.can_override` flag the gate is spelled against, and `resumed` down the reject branch. Mirror the platform-admin idiom in the same block: read the request as the tenant admin before the recall and assert the flag, then assert `out.resumed` after it. Test-only. No production code changes. Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7251bad commit 865744b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/plugins/plugin-approvals/src/approval-revise.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,13 @@ describe('Send back for revision (ADR-0044)', () => {
482482
it('reverse check (tenant admin): admitted on `pending` too — the narrowing is about status, not posture', async () => {
483483
const { req, editAttempt } = await pendingRequest();
484484
await expect(editAttempt()).rejects.toThrow(/RECORD_LOCKED/); // pending → locked
485+
// The viewer flag the gate agrees with, read by the tenant admin itself.
486+
const seen = await service.getRequest(req.id, TENANT_ADMIN);
487+
expect(seen!.viewer!.can_override).toBe(true);
488+
485489
const out = await service.recall(req.id, { actorId: 'org_owner' }, TENANT_ADMIN);
486490
expect(out.request.status).toBe('recalled');
491+
expect(out.resumed).toBe(true); // resumed down the reject branch
487492
expect(await actionsOf(req.id)).toContain('recall');
488493
await expect(editAttempt()).resolves.toBeUndefined(); // the #3424 release still happens
489494
});

0 commit comments

Comments
 (0)