Skip to content

Commit 2dc556b

Browse files
committed
test(cli): read the unknown-name control before the shipped name in each pin
Claude-Session: https://claude.ai/code/session_01Q9PZ5Pzqcus4woVvTZwWNU Co-authored-by: Claude <noreply@anthropic.com>
1 parent ae53da3 commit 2dc556b

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

‎packages/cli/src/utils/organization-ownership-apply.test.ts‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,14 +2046,14 @@ describe('ADR-0131 D10 --apply — a name only the uncomposed security plugin de
20462046

20472047
const rewrite = step(report, 'rewrite');
20482048
expect(rewrite.status).toBe('blocked');
2049+
const unknown = blockerOf(rewrite, 'the permission set zz_unknown_set,');
2050+
expect(unknown).not.toContain(COMPOSITION);
2051+
expect(unknown).toMatch(/or remove the grants/);
20492052
for (const name of ['admin_full_access', 'organization_admin_no_bypass']) {
20502053
const blocker = blockerOf(rewrite, `the permission set ${name},`);
20512054
expect(blocker).toContain(COMPOSITION);
20522055
expect(blocker).not.toMatch(/\bremove\b/);
20532056
}
2054-
const unknown = blockerOf(rewrite, 'the permission set zz_unknown_set,');
2055-
expect(unknown).not.toContain(COMPOSITION);
2056-
expect(unknown).toMatch(/or remove the grants/);
20572057
// Still refused: the gate holds and nothing is deleted.
20582058
expect(step(report, 'mirror-deletion').status).toBe('not-reached');
20592059
expect(deletes()).toEqual([]);
@@ -2072,13 +2072,13 @@ describe('ADR-0131 D10 --apply — a name only the uncomposed security plugin de
20722072

20732073
const rewrite = step(report, 'rewrite');
20742074
expect(rewrite.status).toBe('blocked');
2075+
const unknown = blockerOf(rewrite, 'grant_gone_legacy');
2076+
expect(unknown).not.toContain(COMPOSITION);
2077+
expect(unknown).toMatch(/name or remove each/);
20752078
const shipped = blockerOf(rewrite, 'grant_admin_legacy');
20762079
expect(shipped).toContain('admin_full_access');
20772080
expect(shipped).toContain(COMPOSITION);
20782081
expect(shipped).not.toMatch(/\bremove\b/);
2079-
const unknown = blockerOf(rewrite, 'grant_gone_legacy');
2080-
expect(unknown).not.toContain(COMPOSITION);
2081-
expect(unknown).toMatch(/name or remove each/);
20822082
expect(step(report, 'mirror-deletion').status).toBe('not-reached');
20832083
expect(deletes()).toEqual([]);
20842084
});
@@ -2089,12 +2089,12 @@ describe('ADR-0131 D10 --apply — a name only the uncomposed security plugin de
20892089

20902090
const conversion = step(report, 'authored-conversion');
20912091
expect(conversion.status).toBe('blocked');
2092-
const everyone = blockerOf(conversion, 'position everyone ');
2093-
expect(everyone).toContain(COMPOSITION);
2094-
expect(everyone).not.toMatch(/\bremove\b/);
20952092
const undeclared = blockerOf(conversion, 'position zz_undeclared ');
20962093
expect(undeclared).not.toContain(COMPOSITION);
20972094
expect(undeclared).toMatch(/or remove the bindings/);
2095+
const everyone = blockerOf(conversion, 'position everyone ');
2096+
expect(everyone).toContain(COMPOSITION);
2097+
expect(everyone).not.toMatch(/\bremove\b/);
20982098
expect(step(report, 'rewrite').status).toBe('not-reached');
20992099
expect(deletes()).toEqual([]);
21002100
});
@@ -2106,12 +2106,12 @@ describe('ADR-0131 D10 --apply — a name only the uncomposed security plugin de
21062106
expect(step(report, 'authored-conversion').status).toBe('done');
21072107
const rewrite = step(report, 'rewrite');
21082108
expect(rewrite.status).toBe('blocked');
2109-
const everyone = blockerOf(rewrite, 'position everyone ');
2110-
expect(everyone).toContain(COMPOSITION);
2111-
expect(everyone).not.toMatch(/\bremove\b/);
21122109
const undeclared = blockerOf(rewrite, 'position zz_undeclared ');
21132110
expect(undeclared).not.toContain(COMPOSITION);
21142111
expect(undeclared).toMatch(/resolve its blocker/);
2112+
const everyone = blockerOf(rewrite, 'position everyone ');
2113+
expect(everyone).toContain(COMPOSITION);
2114+
expect(everyone).not.toMatch(/\bremove\b/);
21152115
expect(deletes()).toEqual([]);
21162116
});
21172117

0 commit comments

Comments
 (0)