Skip to content

Commit 36a8adb

Browse files
os-salesclaude
andauthored
test(plugin-approvals): pin the lock release in the tenant-admin reverse check (#14750)
The `#12775` override-narrowing block's tenant-admin reverse check ("the narrowing is about status, not posture") proved a strict subset of the platform-admin case it mirrors: `recalled` status plus the action row, but nothing about the record lock. The platform-admin case pins `locked → released` around the recall; this makes the pair symmetric with the same two lines, in the same idiom. Both lines, not just the release: asserting only the release would pass vacuously if the lock never engaged for this posture, which is the same "proves a subset of what it mirrors" weakness one level down. Test-only. No product change; the ruled behaviour from #12775 is untouched. Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9632604 commit 36a8adb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,12 @@ describe('Send back for revision (ADR-0044)', () => {
480480
});
481481

482482
it('reverse check (tenant admin): admitted on `pending` too — the narrowing is about status, not posture', async () => {
483-
const { req } = await pendingRequest();
483+
const { req, editAttempt } = await pendingRequest();
484+
await expect(editAttempt()).rejects.toThrow(/RECORD_LOCKED/); // pending → locked
484485
const out = await service.recall(req.id, { actorId: 'org_owner' }, TENANT_ADMIN);
485486
expect(out.request.status).toBe('recalled');
486487
expect(await actionsOf(req.id)).toContain('recall');
488+
await expect(editAttempt()).resolves.toBeUndefined(); // the #3424 release still happens
487489
});
488490

489491
it("the submitter's own revise-window recall is untouched (ADR-0044)", async () => {

0 commit comments

Comments
 (0)