@consiliency/agent-board-schema 1.60.0 → 1.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -0
- package/fixtures/already-applied.json +12 -0
- package/migrations/20261011000100_agent_board_session_identities.sql +1964 -0
- package/migrations/20261012000100_agent_board_sidowner.sql +209 -0
- package/migrations/20261014000100_agent_board_grant_target_role.sql +218 -0
- package/package.json +1 -1
- package/schema-manifest.json +30 -3
- package/src/tooling.test.mjs +6 -2
- package/tests/agent_board_atomic_fleet_onboarding.test.sql +13 -4
- package/tests/agent_board_consent_emission.test.sql +30 -11
- package/tests/agent_board_consent_gating.test.sql +16 -2
- package/tests/agent_board_delegate_role_class.test.sql +1 -1
- package/tests/agent_board_delegation_cap_ceiling.test.sql +26 -15
- package/tests/agent_board_delegation_enforcement.test.sql +1 -1
- package/tests/agent_board_enroll_resumption.test.sql +22 -4
- package/tests/agent_board_enroll_token_single_use.test.sql +18 -3
- package/tests/agent_board_federated_lock_order_class.test.sql +2 -2
- package/tests/agent_board_fk_lock_edges.test.sql +74 -14
- package/tests/agent_board_grant_target_role.test.sql +1118 -0
- package/tests/agent_board_invite_no_downgrade.test.sql +10 -8
- package/tests/agent_board_ledger_authority.test.sql +70 -12
- package/tests/agent_board_membership_current_row_class.test.sql +9 -1
- package/tests/agent_board_mint_fleet_agent_session.test.sql +2 -2
- package/tests/agent_board_mint_harden.test.sql +38 -27
- package/tests/agent_board_rolereset.test.sql +8 -2
- package/tests/agent_board_roomdeleg_lane_b.test.sql +6 -6
- package/tests/agent_board_rowid.test.sql +3 -1
- package/tests/agent_board_session_identity_approval_revocation.test.sql +334 -0
- package/tests/agent_board_session_identity_backfill.test.sql +82 -0
- package/tests/agent_board_session_identity_backfill_refusal.test.sql +14 -0
- package/tests/agent_board_session_identity_behavior_classes.test.sql +176 -0
- package/tests/agent_board_session_identity_class.test.sql +118 -0
- package/tests/agent_board_session_identity_fingerprint.test.sql +271 -0
- package/tests/agent_board_session_identity_labels_limits.test.sql +205 -0
- package/tests/agent_board_session_identity_lease.test.sql +235 -0
- package/tests/agent_board_session_identity_lifetime.test.sql +230 -0
- package/tests/agent_board_session_identity_limits.test.sql +208 -0
- package/tests/agent_board_session_identity_lineage.test.sql +64 -0
- package/tests/agent_board_session_identity_link.test.sql +201 -0
- package/tests/agent_board_session_identity_mint.test.sql +233 -0
- package/tests/agent_board_session_identity_panel_r1.test.sql +194 -0
- package/tests/agent_board_session_identity_panel_r2.test.sql +174 -0
- package/tests/agent_board_session_identity_protected_actions.test.sql +156 -0
- package/tests/agent_board_session_identity_revoke_closure.test.sql +131 -0
- package/tests/agent_board_sidowner_leases.test.sql +107 -0
- package/tests/agent_board_sidowner_owner_required.test.sql +97 -0
- package/tests/agent_board_sidowner_read_class.test.sql +171 -0
- package/tests/agent_board_sidowner_reads.test.sql +136 -0
- package/tests/agent_board_signer_lifecycle.test.sql +26 -4
- package/tests/agent_board_signing_challenge_pending_cap.test.sql +1 -1
- package/tests/agent_board_write_enforcement_class.test.sql +74 -15
- package/tests/catalog/function_execute_privileges.json +218 -2
- package/tests/catalog/p_metadata_parameters.json +98 -2
- package/tests/isolation/expected/grant_target_role_race.out +348 -0
- package/tests/isolation/expected/session_identity_limits.out +165 -0
- package/tests/isolation/expected/session_identity_links.out +235 -0
- package/tests/isolation/expected/session_identity_reclaim.out +253 -0
- package/tests/isolation/expected/session_identity_renew_revoke.out +115 -0
- package/tests/isolation/expected/session_identity_renew_revoke_key_gate.out +138 -0
- package/tests/isolation/expected/session_identity_tombstone_onboarding.out +247 -0
- package/tests/isolation/specs/grant_target_role_race.spec +207 -0
- package/tests/isolation/specs/session_identity_limits.spec +81 -0
- package/tests/isolation/specs/session_identity_links.spec +80 -0
- package/tests/isolation/specs/session_identity_reclaim.spec +125 -0
- package/tests/isolation/specs/session_identity_renew_revoke.spec +84 -0
- package/tests/isolation/specs/session_identity_renew_revoke_key_gate.spec +94 -0
- package/tests/isolation/specs/session_identity_tombstone_onboarding.spec +108 -0
- package/tests/seeds/20261011000100_agent_board_session_identities.sql.pre.sql +47 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
Parsed test spec with 7 sessions
|
|
2
|
+
|
|
3
|
+
starting permutation: m_begin m_redeem a_begin a_grant_m_observer m_commit a_rollback check
|
|
4
|
+
count
|
|
5
|
+
-----
|
|
6
|
+
1
|
|
7
|
+
(1 row)
|
|
8
|
+
|
|
9
|
+
step m_begin:
|
|
10
|
+
BEGIN;
|
|
11
|
+
select set_config('g674.code', (select code from agent_board.board_invite_tokens
|
|
12
|
+
where board_id = '67430000-0000-4000-8000-000000000001' and preset_role = 'admin'), true) is not null as have_code;
|
|
13
|
+
SET LOCAL ROLE authenticated;
|
|
14
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
15
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000003';
|
|
16
|
+
|
|
17
|
+
have_code
|
|
18
|
+
---------
|
|
19
|
+
t
|
|
20
|
+
(1 row)
|
|
21
|
+
|
|
22
|
+
step m_redeem: select role, membership_state from agent_board.redeem_invite_link(current_setting('g674.code'));
|
|
23
|
+
role |membership_state
|
|
24
|
+
-----+----------------
|
|
25
|
+
admin|joined
|
|
26
|
+
(1 row)
|
|
27
|
+
|
|
28
|
+
step a_begin:
|
|
29
|
+
BEGIN;
|
|
30
|
+
SET LOCAL ROLE authenticated;
|
|
31
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
32
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000002';
|
|
33
|
+
|
|
34
|
+
step a_grant_m_observer:
|
|
35
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
36
|
+
'67420000-0000-4000-8000-000000000003', 'observer');
|
|
37
|
+
<waiting ...>
|
|
38
|
+
step m_commit: COMMIT;
|
|
39
|
+
step a_grant_m_observer: <... completed>
|
|
40
|
+
ERROR: grant requires a higher board role than the target
|
|
41
|
+
step a_rollback: ROLLBACK;
|
|
42
|
+
step check:
|
|
43
|
+
select a.handle, bm.role, bm.membership_state
|
|
44
|
+
from agent_board.board_memberships bm join agent_board.agents a on a.id = bm.agent_id
|
|
45
|
+
where bm.board_id = '67430000-0000-4000-8000-000000000001'
|
|
46
|
+
order by a.handle, bm.membership_state;
|
|
47
|
+
|
|
48
|
+
handle |role |membership_state
|
|
49
|
+
-----------+--------+----------------
|
|
50
|
+
g674-iso-a1|admin |joined
|
|
51
|
+
g674-iso-g |member |joined
|
|
52
|
+
g674-iso-m |admin |joined
|
|
53
|
+
g674-iso-o |owner |joined
|
|
54
|
+
g674-iso-v |observer|joined
|
|
55
|
+
(5 rows)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
starting permutation: o_begin o_remove_m a_begin a_grant_m_observer o_commit a_rollback check
|
|
59
|
+
count
|
|
60
|
+
-----
|
|
61
|
+
1
|
|
62
|
+
(1 row)
|
|
63
|
+
|
|
64
|
+
step o_begin:
|
|
65
|
+
BEGIN;
|
|
66
|
+
SET LOCAL ROLE authenticated;
|
|
67
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
68
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000001';
|
|
69
|
+
|
|
70
|
+
step o_remove_m:
|
|
71
|
+
select membership_state from agent_board.update_board_membership('67430000-0000-4000-8000-000000000001',
|
|
72
|
+
'67420000-0000-4000-8000-000000000003', 'removed');
|
|
73
|
+
|
|
74
|
+
membership_state
|
|
75
|
+
----------------
|
|
76
|
+
removed
|
|
77
|
+
(1 row)
|
|
78
|
+
|
|
79
|
+
step a_begin:
|
|
80
|
+
BEGIN;
|
|
81
|
+
SET LOCAL ROLE authenticated;
|
|
82
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
83
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000002';
|
|
84
|
+
|
|
85
|
+
step a_grant_m_observer:
|
|
86
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
87
|
+
'67420000-0000-4000-8000-000000000003', 'observer');
|
|
88
|
+
<waiting ...>
|
|
89
|
+
step o_commit: COMMIT;
|
|
90
|
+
step a_grant_m_observer: <... completed>
|
|
91
|
+
ERROR: grantee has no membership on this board
|
|
92
|
+
step a_rollback: ROLLBACK;
|
|
93
|
+
step check:
|
|
94
|
+
select a.handle, bm.role, bm.membership_state
|
|
95
|
+
from agent_board.board_memberships bm join agent_board.agents a on a.id = bm.agent_id
|
|
96
|
+
where bm.board_id = '67430000-0000-4000-8000-000000000001'
|
|
97
|
+
order by a.handle, bm.membership_state;
|
|
98
|
+
|
|
99
|
+
handle |role |membership_state
|
|
100
|
+
-----------+--------+----------------
|
|
101
|
+
g674-iso-a1|admin |joined
|
|
102
|
+
g674-iso-g |member |joined
|
|
103
|
+
g674-iso-m |member |removed
|
|
104
|
+
g674-iso-o |owner |joined
|
|
105
|
+
g674-iso-v |observer|joined
|
|
106
|
+
(5 rows)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
starting permutation: o_begin o_demote_a a_begin a_grant_m_observer o_commit a_rollback check
|
|
110
|
+
count
|
|
111
|
+
-----
|
|
112
|
+
1
|
|
113
|
+
(1 row)
|
|
114
|
+
|
|
115
|
+
step o_begin:
|
|
116
|
+
BEGIN;
|
|
117
|
+
SET LOCAL ROLE authenticated;
|
|
118
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
119
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000001';
|
|
120
|
+
|
|
121
|
+
step o_demote_a:
|
|
122
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
123
|
+
'67420000-0000-4000-8000-000000000002', 'member');
|
|
124
|
+
|
|
125
|
+
role
|
|
126
|
+
------
|
|
127
|
+
member
|
|
128
|
+
(1 row)
|
|
129
|
+
|
|
130
|
+
step a_begin:
|
|
131
|
+
BEGIN;
|
|
132
|
+
SET LOCAL ROLE authenticated;
|
|
133
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
134
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000002';
|
|
135
|
+
|
|
136
|
+
step a_grant_m_observer:
|
|
137
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
138
|
+
'67420000-0000-4000-8000-000000000003', 'observer');
|
|
139
|
+
<waiting ...>
|
|
140
|
+
step o_commit: COMMIT;
|
|
141
|
+
step a_grant_m_observer: <... completed>
|
|
142
|
+
ERROR: grant on another member requires owner or admin role
|
|
143
|
+
step a_rollback: ROLLBACK;
|
|
144
|
+
step check:
|
|
145
|
+
select a.handle, bm.role, bm.membership_state
|
|
146
|
+
from agent_board.board_memberships bm join agent_board.agents a on a.id = bm.agent_id
|
|
147
|
+
where bm.board_id = '67430000-0000-4000-8000-000000000001'
|
|
148
|
+
order by a.handle, bm.membership_state;
|
|
149
|
+
|
|
150
|
+
handle |role |membership_state
|
|
151
|
+
-----------+--------+----------------
|
|
152
|
+
g674-iso-a1|member |joined
|
|
153
|
+
g674-iso-g |member |joined
|
|
154
|
+
g674-iso-m |member |joined
|
|
155
|
+
g674-iso-o |owner |joined
|
|
156
|
+
g674-iso-v |observer|joined
|
|
157
|
+
(5 rows)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
starting permutation: a_begin a_grant_m_observer o_begin o_demote_a a_commit o_commit check
|
|
161
|
+
count
|
|
162
|
+
-----
|
|
163
|
+
1
|
|
164
|
+
(1 row)
|
|
165
|
+
|
|
166
|
+
step a_begin:
|
|
167
|
+
BEGIN;
|
|
168
|
+
SET LOCAL ROLE authenticated;
|
|
169
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
170
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000002';
|
|
171
|
+
|
|
172
|
+
step a_grant_m_observer:
|
|
173
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
174
|
+
'67420000-0000-4000-8000-000000000003', 'observer');
|
|
175
|
+
|
|
176
|
+
role
|
|
177
|
+
--------
|
|
178
|
+
observer
|
|
179
|
+
(1 row)
|
|
180
|
+
|
|
181
|
+
step o_begin:
|
|
182
|
+
BEGIN;
|
|
183
|
+
SET LOCAL ROLE authenticated;
|
|
184
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
185
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000001';
|
|
186
|
+
|
|
187
|
+
step o_demote_a:
|
|
188
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
189
|
+
'67420000-0000-4000-8000-000000000002', 'member');
|
|
190
|
+
<waiting ...>
|
|
191
|
+
step a_commit: COMMIT;
|
|
192
|
+
step o_demote_a: <... completed>
|
|
193
|
+
role
|
|
194
|
+
------
|
|
195
|
+
member
|
|
196
|
+
(1 row)
|
|
197
|
+
|
|
198
|
+
step o_commit: COMMIT;
|
|
199
|
+
step check:
|
|
200
|
+
select a.handle, bm.role, bm.membership_state
|
|
201
|
+
from agent_board.board_memberships bm join agent_board.agents a on a.id = bm.agent_id
|
|
202
|
+
where bm.board_id = '67430000-0000-4000-8000-000000000001'
|
|
203
|
+
order by a.handle, bm.membership_state;
|
|
204
|
+
|
|
205
|
+
handle |role |membership_state
|
|
206
|
+
-----------+--------+----------------
|
|
207
|
+
g674-iso-a1|member |joined
|
|
208
|
+
g674-iso-g |member |joined
|
|
209
|
+
g674-iso-m |observer|joined
|
|
210
|
+
g674-iso-o |owner |joined
|
|
211
|
+
g674-iso-v |observer|joined
|
|
212
|
+
(5 rows)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
starting permutation: p_begin p_post p_holds_m_fk o_begin o_grant_m_observer p_commit o_commit check
|
|
216
|
+
count
|
|
217
|
+
-----
|
|
218
|
+
1
|
|
219
|
+
(1 row)
|
|
220
|
+
|
|
221
|
+
step p_begin:
|
|
222
|
+
BEGIN;
|
|
223
|
+
SET LOCAL ROLE authenticated;
|
|
224
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
225
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000001';
|
|
226
|
+
|
|
227
|
+
step p_post:
|
|
228
|
+
select count(*) > 0 as posted from agent_board.post_board_message('67440000-0000-4000-8000-000000000001',
|
|
229
|
+
'67420000-0000-4000-8000-000000000001', '67430000-0000-4000-8000-000000000001', 'g674 iso', 'fan-out to M');
|
|
230
|
+
|
|
231
|
+
posted
|
|
232
|
+
------
|
|
233
|
+
t
|
|
234
|
+
(1 row)
|
|
235
|
+
|
|
236
|
+
step p_holds_m_fk:
|
|
237
|
+
RESET ROLE;
|
|
238
|
+
select count(*) as m_delivery_rows from agent_board.delivery_recipients dr
|
|
239
|
+
join agent_board.board_memberships bm on bm.id = dr.board_membership_id
|
|
240
|
+
where bm.board_id = '67430000-0000-4000-8000-000000000001' and bm.agent_id = '67420000-0000-4000-8000-000000000003';
|
|
241
|
+
|
|
242
|
+
m_delivery_rows
|
|
243
|
+
---------------
|
|
244
|
+
1
|
|
245
|
+
(1 row)
|
|
246
|
+
|
|
247
|
+
step o_begin:
|
|
248
|
+
BEGIN;
|
|
249
|
+
SET LOCAL ROLE authenticated;
|
|
250
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
251
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000001';
|
|
252
|
+
|
|
253
|
+
step o_grant_m_observer:
|
|
254
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
255
|
+
'67420000-0000-4000-8000-000000000003', 'observer');
|
|
256
|
+
|
|
257
|
+
role
|
|
258
|
+
--------
|
|
259
|
+
observer
|
|
260
|
+
(1 row)
|
|
261
|
+
|
|
262
|
+
step p_commit: COMMIT;
|
|
263
|
+
step o_commit: COMMIT;
|
|
264
|
+
step check:
|
|
265
|
+
select a.handle, bm.role, bm.membership_state
|
|
266
|
+
from agent_board.board_memberships bm join agent_board.agents a on a.id = bm.agent_id
|
|
267
|
+
where bm.board_id = '67430000-0000-4000-8000-000000000001'
|
|
268
|
+
order by a.handle, bm.membership_state;
|
|
269
|
+
|
|
270
|
+
handle |role |membership_state
|
|
271
|
+
-----------+--------+----------------
|
|
272
|
+
g674-iso-a1|admin |joined
|
|
273
|
+
g674-iso-g |member |joined
|
|
274
|
+
g674-iso-m |observer|joined
|
|
275
|
+
g674-iso-o |owner |joined
|
|
276
|
+
g674-iso-v |observer|joined
|
|
277
|
+
(5 rows)
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
starting permutation: g_begin g_redeem g2_begin g2_grant_v_member g2_rollback g_commit g2_retry_begin g2_retry_grant_v_member g2_commit check
|
|
281
|
+
count
|
|
282
|
+
-----
|
|
283
|
+
1
|
|
284
|
+
(1 row)
|
|
285
|
+
|
|
286
|
+
step g_begin:
|
|
287
|
+
BEGIN;
|
|
288
|
+
select set_config('g674.code', (select code from agent_board.board_invite_tokens
|
|
289
|
+
where board_id = '67430000-0000-4000-8000-000000000001' and preset_role = 'admin'), true) is not null as have_code;
|
|
290
|
+
SET LOCAL ROLE authenticated;
|
|
291
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
292
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000005';
|
|
293
|
+
|
|
294
|
+
have_code
|
|
295
|
+
---------
|
|
296
|
+
t
|
|
297
|
+
(1 row)
|
|
298
|
+
|
|
299
|
+
step g_redeem: select role, membership_state from agent_board.redeem_invite_link(current_setting('g674.code'));
|
|
300
|
+
role |membership_state
|
|
301
|
+
-----+----------------
|
|
302
|
+
admin|joined
|
|
303
|
+
(1 row)
|
|
304
|
+
|
|
305
|
+
step g2_begin:
|
|
306
|
+
BEGIN;
|
|
307
|
+
SET LOCAL ROLE authenticated;
|
|
308
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
309
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000005';
|
|
310
|
+
|
|
311
|
+
step g2_grant_v_member:
|
|
312
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
313
|
+
'67420000-0000-4000-8000-000000000004', 'member');
|
|
314
|
+
|
|
315
|
+
ERROR: grant on another member requires owner or admin role
|
|
316
|
+
step g2_rollback: ROLLBACK;
|
|
317
|
+
step g_commit: COMMIT;
|
|
318
|
+
step g2_retry_begin:
|
|
319
|
+
BEGIN;
|
|
320
|
+
SET LOCAL ROLE authenticated;
|
|
321
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
322
|
+
SET LOCAL "request.jwt.claim.sub" = '67410000-0000-4000-8000-000000000005';
|
|
323
|
+
|
|
324
|
+
step g2_retry_grant_v_member:
|
|
325
|
+
select role from agent_board.grant_board_role('67430000-0000-4000-8000-000000000001',
|
|
326
|
+
'67420000-0000-4000-8000-000000000004', 'member');
|
|
327
|
+
|
|
328
|
+
role
|
|
329
|
+
------
|
|
330
|
+
member
|
|
331
|
+
(1 row)
|
|
332
|
+
|
|
333
|
+
step g2_commit: COMMIT;
|
|
334
|
+
step check:
|
|
335
|
+
select a.handle, bm.role, bm.membership_state
|
|
336
|
+
from agent_board.board_memberships bm join agent_board.agents a on a.id = bm.agent_id
|
|
337
|
+
where bm.board_id = '67430000-0000-4000-8000-000000000001'
|
|
338
|
+
order by a.handle, bm.membership_state;
|
|
339
|
+
|
|
340
|
+
handle |role |membership_state
|
|
341
|
+
-----------+------+----------------
|
|
342
|
+
g674-iso-a1|admin |joined
|
|
343
|
+
g674-iso-g |admin |joined
|
|
344
|
+
g674-iso-m |member|joined
|
|
345
|
+
g674-iso-o |owner |joined
|
|
346
|
+
g674-iso-v |member|joined
|
|
347
|
+
(5 rows)
|
|
348
|
+
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
Parsed test spec with 3 sessions
|
|
2
|
+
|
|
3
|
+
starting permutation: a_begin a_mint b_begin b_mint a_commit b_commit check
|
|
4
|
+
step a_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
5
|
+
step a_mint:
|
|
6
|
+
do $$ begin
|
|
7
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-a', '[]',
|
|
8
|
+
public.test_pubkey('sid-limit-a'), interval '1 hour', false, 'codex', 'limit-a');
|
|
9
|
+
end $$;
|
|
10
|
+
|
|
11
|
+
step b_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
12
|
+
step b_mint:
|
|
13
|
+
do $$ begin
|
|
14
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-b', '[]',
|
|
15
|
+
public.test_pubkey('sid-limit-b'), interval '1 hour', false, 'codex', 'limit-b');
|
|
16
|
+
end $$;
|
|
17
|
+
<waiting ...>
|
|
18
|
+
step a_commit: COMMIT;
|
|
19
|
+
step b_mint: <... completed>
|
|
20
|
+
ERROR: identity_limit_hourly_exceeded
|
|
21
|
+
step b_commit: COMMIT;
|
|
22
|
+
step check:
|
|
23
|
+
select count(*) as mixed_hourly, count(*) filter (where revoked_at is not null) as tombstoned_hourly
|
|
24
|
+
from agent_board.delegation_grants where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
25
|
+
select count(*) as new_principals from agent_board.agents where handle in ('sid-limit-a', 'sid-limit-b');
|
|
26
|
+
select count(*) as aliases from agent_board.session_id_aliases where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
27
|
+
|
|
28
|
+
mixed_hourly|tombstoned_hourly
|
|
29
|
+
------------+-----------------
|
|
30
|
+
60| 29
|
|
31
|
+
(1 row)
|
|
32
|
+
|
|
33
|
+
new_principals
|
|
34
|
+
--------------
|
|
35
|
+
1
|
|
36
|
+
(1 row)
|
|
37
|
+
|
|
38
|
+
aliases
|
|
39
|
+
-------
|
|
40
|
+
1
|
|
41
|
+
(1 row)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
starting permutation: b_begin b_mint a_begin a_mint b_commit a_commit check
|
|
45
|
+
step b_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
46
|
+
step b_mint:
|
|
47
|
+
do $$ begin
|
|
48
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-b', '[]',
|
|
49
|
+
public.test_pubkey('sid-limit-b'), interval '1 hour', false, 'codex', 'limit-b');
|
|
50
|
+
end $$;
|
|
51
|
+
|
|
52
|
+
step a_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
53
|
+
step a_mint:
|
|
54
|
+
do $$ begin
|
|
55
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-a', '[]',
|
|
56
|
+
public.test_pubkey('sid-limit-a'), interval '1 hour', false, 'codex', 'limit-a');
|
|
57
|
+
end $$;
|
|
58
|
+
<waiting ...>
|
|
59
|
+
step b_commit: COMMIT;
|
|
60
|
+
step a_mint: <... completed>
|
|
61
|
+
ERROR: identity_limit_hourly_exceeded
|
|
62
|
+
step a_commit: COMMIT;
|
|
63
|
+
step check:
|
|
64
|
+
select count(*) as mixed_hourly, count(*) filter (where revoked_at is not null) as tombstoned_hourly
|
|
65
|
+
from agent_board.delegation_grants where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
66
|
+
select count(*) as new_principals from agent_board.agents where handle in ('sid-limit-a', 'sid-limit-b');
|
|
67
|
+
select count(*) as aliases from agent_board.session_id_aliases where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
68
|
+
|
|
69
|
+
mixed_hourly|tombstoned_hourly
|
|
70
|
+
------------+-----------------
|
|
71
|
+
60| 29
|
|
72
|
+
(1 row)
|
|
73
|
+
|
|
74
|
+
new_principals
|
|
75
|
+
--------------
|
|
76
|
+
1
|
|
77
|
+
(1 row)
|
|
78
|
+
|
|
79
|
+
aliases
|
|
80
|
+
-------
|
|
81
|
+
1
|
|
82
|
+
(1 row)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
starting permutation: a_begin a_mint b_begin b_duplicate a_commit b_commit check
|
|
86
|
+
step a_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
87
|
+
step a_mint:
|
|
88
|
+
do $$ begin
|
|
89
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-a', '[]',
|
|
90
|
+
public.test_pubkey('sid-limit-a'), interval '1 hour', false, 'codex', 'limit-a');
|
|
91
|
+
end $$;
|
|
92
|
+
|
|
93
|
+
step b_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
94
|
+
step b_duplicate:
|
|
95
|
+
do $$ begin
|
|
96
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-b', '[]',
|
|
97
|
+
public.test_pubkey('sid-limit-b'), interval '1 hour', false, 'codex', 'limit-a');
|
|
98
|
+
end $$;
|
|
99
|
+
<waiting ...>
|
|
100
|
+
step a_commit: COMMIT;
|
|
101
|
+
step b_duplicate: <... completed>
|
|
102
|
+
ERROR: identity_lease_live
|
|
103
|
+
step b_commit: COMMIT;
|
|
104
|
+
step check:
|
|
105
|
+
select count(*) as mixed_hourly, count(*) filter (where revoked_at is not null) as tombstoned_hourly
|
|
106
|
+
from agent_board.delegation_grants where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
107
|
+
select count(*) as new_principals from agent_board.agents where handle in ('sid-limit-a', 'sid-limit-b');
|
|
108
|
+
select count(*) as aliases from agent_board.session_id_aliases where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
109
|
+
|
|
110
|
+
mixed_hourly|tombstoned_hourly
|
|
111
|
+
------------+-----------------
|
|
112
|
+
60| 29
|
|
113
|
+
(1 row)
|
|
114
|
+
|
|
115
|
+
new_principals
|
|
116
|
+
--------------
|
|
117
|
+
1
|
|
118
|
+
(1 row)
|
|
119
|
+
|
|
120
|
+
aliases
|
|
121
|
+
-------
|
|
122
|
+
1
|
|
123
|
+
(1 row)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
starting permutation: b_begin b_duplicate a_begin a_mint b_commit a_commit check
|
|
127
|
+
step b_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
128
|
+
step b_duplicate:
|
|
129
|
+
do $$ begin
|
|
130
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-b', '[]',
|
|
131
|
+
public.test_pubkey('sid-limit-b'), interval '1 hour', false, 'codex', 'limit-a');
|
|
132
|
+
end $$;
|
|
133
|
+
|
|
134
|
+
step a_begin: BEGIN; SET LOCAL ROLE service_role; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
135
|
+
step a_mint:
|
|
136
|
+
do $$ begin
|
|
137
|
+
perform * from agent_board.mint_delegated_child('78000000-0000-4000-8000-000000000001', 'sid-limit-a', '[]',
|
|
138
|
+
public.test_pubkey('sid-limit-a'), interval '1 hour', false, 'codex', 'limit-a');
|
|
139
|
+
end $$;
|
|
140
|
+
<waiting ...>
|
|
141
|
+
step b_commit: COMMIT;
|
|
142
|
+
step a_mint: <... completed>
|
|
143
|
+
ERROR: identity_lease_live
|
|
144
|
+
step a_commit: COMMIT;
|
|
145
|
+
step check:
|
|
146
|
+
select count(*) as mixed_hourly, count(*) filter (where revoked_at is not null) as tombstoned_hourly
|
|
147
|
+
from agent_board.delegation_grants where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
148
|
+
select count(*) as new_principals from agent_board.agents where handle in ('sid-limit-a', 'sid-limit-b');
|
|
149
|
+
select count(*) as aliases from agent_board.session_id_aliases where root_agent_id = '78000000-0000-4000-8000-000000000001';
|
|
150
|
+
|
|
151
|
+
mixed_hourly|tombstoned_hourly
|
|
152
|
+
------------+-----------------
|
|
153
|
+
60| 29
|
|
154
|
+
(1 row)
|
|
155
|
+
|
|
156
|
+
new_principals
|
|
157
|
+
--------------
|
|
158
|
+
1
|
|
159
|
+
(1 row)
|
|
160
|
+
|
|
161
|
+
aliases
|
|
162
|
+
-------
|
|
163
|
+
1
|
|
164
|
+
(1 row)
|
|
165
|
+
|