@consiliency/agent-board-schema 1.12.0 → 1.23.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/fixtures/already-applied.json +160 -0
- package/migrations/20260731000100_agent_board_agentsdir_column_scope.sql +88 -0
- package/migrations/20260801000100_agent_board_leaveidem_terminal_noop.sql +317 -0
- package/migrations/20260802000100_agent_board_rolereset_reentry_clamp.sql +237 -0
- package/migrations/20260803000100_agent_board_rowid_total_order.sql +1201 -0
- package/migrations/20260804000100_agent_board_hygiene_actor_binding_rls.sql +229 -0
- package/migrations/20260806000100_agent_board_consent_substrate.sql +339 -0
- package/migrations/20260807000100_agent_board_consent_emission.sql +619 -0
- package/migrations/20260808000100_agent_board_rejectsem.sql +145 -0
- package/migrations/20260809000100_agent_board_consent_gating.sql +492 -0
- package/migrations/20260810000100_agent_board_consent_locking.sql +485 -0
- package/migrations/20260811000100_agent_board_retention_metadata_revoke.sql +23 -0
- package/migrations/20260812000100_agent_board_pubexec_class_revoke.sql +54 -0
- package/migrations/20260813000100_agent_board_invitepolicy_block.sql +420 -0
- package/migrations/20260814000100_agent_board_obsgate_thread_post_policy.sql +239 -0
- package/migrations/20260815000100_agent_board_obsgate2_authoring_gates.sql +287 -0
- package/migrations/20260816000100_agent_board_obsgate3_task_lifecycle.sql +118 -0
- package/migrations/20260817000100_agent_board_obsgate4_claims_lifecycle.sql +250 -0
- package/migrations/20260818000100_agent_board_fleet_machines_rls_correlation.sql +43 -0
- package/migrations/20260819000100_agent_board_resolve_noop_retire.sql +166 -0
- package/migrations/20260820000100_agent_board_roomdeleg_lane_b.sql +206 -0
- package/migrations/20260821000100_agent_board_claimgate_claimkey.sql +372 -0
- package/migrations/20260822000100_agent_board_mint_harden.sql +710 -0
- package/migrations/20260822000200_agent_board_mint_harden_fingerprint_backfill.sql +207 -0
- package/migrations/20260823000100_agent_board_fleet_machine_hijack.sql +106 -0
- package/migrations/20260824000100_agent_board_claimgate_shadow.sql +443 -0
- package/migrations/20260825000100_agent_board_claimgate_enforce.sql +660 -0
- package/migrations/20260826000100_agent_board_fleet_machine_reactivation.sql +514 -0
- package/migrations/20260828000100_agent_board_delegation_cap_ceiling.sql +474 -0
- package/migrations/20260829000100_agent_board_fleet_machine_reclaim.sql +432 -0
- package/migrations/20260830000100_agent_board_delegation_sole_writer.sql +41 -0
- package/migrations/20260831000100_agent_board_fleet_domain_reclaim.sql +389 -0
- package/migrations/20260901000100_agent_board_atomic_fleet_onboarding.sql +1496 -0
- package/migrations/20260901000110_agent_board_fleet_onboarding_ceiling_lock.sql +604 -0
- package/migrations/20260901000120_agent_board_human_revocation_evidence_completeness.sql +78 -0
- package/migrations/20260901000130_agent_board_fedsession_human_revocation_gate.sql +74 -0
- package/migrations/20260901000140_agent_board_fedsession_board_owner_lock_order.sql +102 -0
- package/migrations/20260902000100_agent_board_outbox_wake_ordering.sql +184 -0
- package/migrations/20260903000100_agent_board_enroll_identity_board_owner_lock_order.sql +604 -0
- package/migrations/20260903000200_agent_board_fedsession_provider_absence_gate.sql +177 -0
- package/migrations/20260904000100_agent_board_wake_recovery_surface.sql +155 -0
- package/package.json +1 -1
- package/schema-manifest.json +363 -3
- package/src/tooling.test.mjs +113 -2
- package/tests/agent_board_actorspoof.test.sql +349 -0
- package/tests/agent_board_agentsdir.test.sql +154 -0
- package/tests/agent_board_atomic_fleet_onboarding.test.sql +623 -0
- package/tests/agent_board_atomic_fleet_onboarding_backfill.test.sql +142 -0
- package/tests/agent_board_atomic_fleet_onboarding_runtime.test.sql +1250 -0
- package/tests/agent_board_authbound_boundary.test.sql +9 -1
- package/tests/agent_board_claimgate_enforce.test.sql +464 -0
- package/tests/agent_board_claimgate_predicate.test.sql +360 -0
- package/tests/agent_board_claimkey.test.sql +229 -0
- package/tests/agent_board_consent_backfill.test.sql +48 -0
- package/tests/agent_board_consent_emission.test.sql +601 -0
- package/tests/agent_board_consent_gating.test.sql +489 -0
- package/tests/agent_board_consent_substrate.test.sql +720 -0
- package/tests/agent_board_delegation_cap_ceiling.test.sql +303 -0
- package/tests/agent_board_delegation_enforcement.test.sql +55 -6
- package/tests/agent_board_delegation_policies.test.sql +107 -1
- package/tests/agent_board_enroll_federated_identity.test.sql +3 -3
- package/tests/agent_board_enroll_pop_binding.test.sql +13 -3
- package/tests/agent_board_enrollment_audit_content.test.sql +11 -7
- package/tests/agent_board_federated_lock_order_class.test.sql +390 -0
- package/tests/agent_board_fedsession.test.sql +51 -5
- package/tests/agent_board_fedsession_provider_absence_gate.test.sql +170 -0
- package/tests/agent_board_fleet_domain_reclaim.test.sql +419 -0
- package/tests/agent_board_fleet_machine_hijack.test.sql +190 -0
- package/tests/agent_board_fleet_machine_reactivation.test.sql +426 -0
- package/tests/agent_board_fleet_machine_reclaim.test.sql +509 -0
- package/tests/agent_board_fleet_machines_rls.test.sql +79 -0
- package/tests/agent_board_fleet_policy.test.sql +2 -2
- package/tests/agent_board_grants_hygiene.test.sql +408 -0
- package/tests/agent_board_identity_providers.test.sql +9 -0
- package/tests/agent_board_inbox_reads.test.sql +45 -31
- package/tests/agent_board_inbox_rpcs.test.sql +44 -34
- package/tests/agent_board_invitepolicy.test.sql +205 -0
- package/tests/agent_board_leaveidem.test.sql +194 -0
- package/tests/agent_board_mint_fleet_agent_session.test.sql +10 -10
- package/tests/agent_board_mint_harden.test.sql +303 -0
- package/tests/agent_board_mint_harden_backfill.test.sql +95 -0
- package/tests/agent_board_obsgate.test.sql +178 -0
- package/tests/agent_board_obsgate2.test.sql +153 -0
- package/tests/agent_board_obsgate3.test.sql +170 -0
- package/tests/agent_board_obsgate4.test.sql +196 -0
- package/tests/agent_board_outbox_wake_ordering.test.sql +452 -0
- package/tests/agent_board_portal_offline_invariant.test.sql +14 -3
- package/tests/agent_board_pubexec_class.test.sql +53 -0
- package/tests/agent_board_rejectsem.test.sql +271 -0
- package/tests/agent_board_resigning_refresh.test.sql +1 -1
- package/tests/agent_board_resolve_noop_retire.test.sql +71 -0
- package/tests/agent_board_retention_metadata_acl.test.sql +53 -0
- package/tests/agent_board_revoke_agent_subtree.test.sql +3 -3
- package/tests/agent_board_rolereset.test.sql +351 -0
- package/tests/agent_board_roomdeleg.test.sql +5 -3
- package/tests/agent_board_roomdeleg_lane_b.test.sql +144 -0
- package/tests/agent_board_roomlink.test.sql +27 -11
- package/tests/agent_board_rowid.test.sql +1274 -0
- package/tests/agent_board_signature_rls_reads.test.sql +3 -3
- package/tests/agent_board_signed_write_gateway.test.sql +3 -3
- package/tests/agent_board_signing_challenge_pending_cap.test.sql +2 -2
- package/tests/agent_board_signing_challenge_reaper.test.sql +2 -2
- package/tests/agent_board_signing_proof_rpcs.test.sql +4 -4
- package/tests/agent_board_signing_store.test.sql +6 -6
- package/tests/agent_board_wake_recovery.test.sql +756 -0
- package/tests/fixtures/isolation-substrate.sql +93 -0
- package/tests/fixtures/test-prereqs.sql +33 -0
- package/tests/isolation/expected/atomic_fedsession_fleet_lock_order.out +79 -0
- package/tests/isolation/expected/atomic_fedsession_human_revoke.out +87 -0
- package/tests/isolation/expected/atomic_fleet_authority_races.out +469 -0
- package/tests/isolation/expected/atomic_fleet_binding_revoke.out +103 -0
- package/tests/isolation/expected/atomic_fleet_board_archive.out +117 -0
- package/tests/isolation/expected/atomic_fleet_human_fresh_revoke.out +136 -0
- package/tests/isolation/expected/atomic_fleet_identity_disposition.out +61 -0
- package/tests/isolation/expected/atomic_fleet_lifecycle_races.out +1479 -0
- package/tests/isolation/expected/atomic_fleet_onboarding.out +75 -0
- package/tests/isolation/expected/atomic_fleet_subtree_lock_order.out +60 -0
- package/tests/isolation/expected/ceiling_setter_lock_before_upsert.out +95 -0
- package/tests/isolation/expected/claimgate_ownerless_quota.out +36 -0
- package/tests/isolation/expected/claimkey_renew_race.out +38 -0
- package/tests/isolation/expected/consent_approval_lock.out +43 -0
- package/tests/isolation/expected/consent_emit_actual_state.out +37 -0
- package/tests/isolation/expected/domain_reclaim_revoke_race.out +40 -0
- package/tests/isolation/expected/enroll_identity_board_owner_lock_order.out +55 -0
- package/tests/isolation/expected/fedsession_provider_absent_owner_lock.out +37 -0
- package/tests/isolation/expected/onboarding_ceiling_lock_order.out +123 -0
- package/tests/isolation/expected/outbox_wake_ordering.out +86 -0
- package/tests/isolation/expected/reactivate_revoke_race.out +80 -0
- package/tests/isolation/expected/reclaim_revoke_race.out +40 -0
- package/tests/isolation/expected/wake_recovery_late_commit.out +89 -0
- package/tests/isolation/specs/atomic_fedsession_fleet_lock_order.spec +117 -0
- package/tests/isolation/specs/atomic_fedsession_human_revoke.spec +66 -0
- package/tests/isolation/specs/atomic_fleet_authority_races.spec +235 -0
- package/tests/isolation/specs/atomic_fleet_binding_revoke.spec +127 -0
- package/tests/isolation/specs/atomic_fleet_board_archive.spec +134 -0
- package/tests/isolation/specs/atomic_fleet_human_fresh_revoke.spec +142 -0
- package/tests/isolation/specs/atomic_fleet_identity_disposition.spec +118 -0
- package/tests/isolation/specs/atomic_fleet_lifecycle_races.spec +244 -0
- package/tests/isolation/specs/atomic_fleet_onboarding.spec +106 -0
- package/tests/isolation/specs/atomic_fleet_subtree_lock_order.spec +147 -0
- package/tests/isolation/specs/ceiling_setter_lock_before_upsert.spec +117 -0
- package/tests/isolation/specs/claimgate_ownerless_quota.spec +77 -0
- package/tests/isolation/specs/claimkey_renew_race.spec +67 -0
- package/tests/isolation/specs/consent_approval_lock.spec +98 -0
- package/tests/isolation/specs/consent_emit_actual_state.spec +79 -0
- package/tests/isolation/specs/domain_reclaim_revoke_race.spec +88 -0
- package/tests/isolation/specs/enroll_identity_board_owner_lock_order.spec +117 -0
- package/tests/isolation/specs/fedsession_provider_absent_owner_lock.spec +63 -0
- package/tests/isolation/specs/onboarding_ceiling_lock_order.spec +183 -0
- package/tests/isolation/specs/outbox_wake_ordering.spec +202 -0
- package/tests/isolation/specs/reactivate_revoke_race.spec +115 -0
- package/tests/isolation/specs/reclaim_revoke_race.spec +94 -0
- package/tests/isolation/specs/wake_recovery_late_commit.spec +207 -0
- package/tests/seeds/20260806000100_agent_board_consent_substrate.sql.pre.sql +19 -0
- package/tests/seeds/20260822000200_agent_board_mint_harden_fingerprint_backfill.sql.pre.sql +39 -0
- package/tests/seeds/20260901000100_agent_board_atomic_fleet_onboarding.sql.pre.sql +110 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
Parsed test spec with 4 sessions
|
|
2
|
+
|
|
3
|
+
starting permutation: retry_begin retry_onboard invalidator_begin remove_member retry_commit invalidator_commit check
|
|
4
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
5
|
+
step retry_onboard:
|
|
6
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
7
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
8
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
9
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
10
|
+
'atomic-authority-agent',
|
|
11
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
12
|
+
'raw_ed25519_base64url',
|
|
13
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
14
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
15
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
16
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
17
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
18
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
19
|
+
'atomic-authority-agent'
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
identity_disposition|membership_disposition|binding_disposition
|
|
23
|
+
--------------------+----------------------+-------------------
|
|
24
|
+
reused |reused |reused
|
|
25
|
+
(1 row)
|
|
26
|
+
|
|
27
|
+
step invalidator_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
28
|
+
step remove_member:
|
|
29
|
+
select membership_state from agent_board.update_board_membership(
|
|
30
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
31
|
+
(select id from agent_board.agents where handle='atomic-authority-agent'),
|
|
32
|
+
'removed', jsonb_build_object('reason','isolation member removal')
|
|
33
|
+
);
|
|
34
|
+
<waiting ...>
|
|
35
|
+
step retry_commit: COMMIT;
|
|
36
|
+
step remove_member: <... completed>
|
|
37
|
+
membership_state
|
|
38
|
+
----------------
|
|
39
|
+
removed
|
|
40
|
+
(1 row)
|
|
41
|
+
|
|
42
|
+
step invalidator_commit: COMMIT;
|
|
43
|
+
step check:
|
|
44
|
+
select
|
|
45
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
46
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
47
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
48
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
49
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
50
|
+
(select membership_state from agent_board.board_memberships
|
|
51
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
52
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
53
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
54
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
55
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
56
|
+
|
|
57
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
58
|
+
--------------+-----------------+------------+-------------
|
|
59
|
+
active |owner/joined |removed |
|
|
60
|
+
(1 row)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
starting permutation: retry_begin retry_onboard invalidator_begin revoke_creator retry_commit invalidator_commit check
|
|
64
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
65
|
+
step retry_onboard:
|
|
66
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
67
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
68
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
69
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
70
|
+
'atomic-authority-agent',
|
|
71
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
72
|
+
'raw_ed25519_base64url',
|
|
73
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
74
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
75
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
76
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
77
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
78
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
79
|
+
'atomic-authority-agent'
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
identity_disposition|membership_disposition|binding_disposition
|
|
83
|
+
--------------------+----------------------+-------------------
|
|
84
|
+
reused |reused |reused
|
|
85
|
+
(1 row)
|
|
86
|
+
|
|
87
|
+
step invalidator_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
88
|
+
step revoke_creator:
|
|
89
|
+
select status from agent_board.revoke_agent(
|
|
90
|
+
'16250000-0000-0000-0000-000000000001', 'isolation creator revoke'
|
|
91
|
+
);
|
|
92
|
+
<waiting ...>
|
|
93
|
+
step retry_commit: COMMIT;
|
|
94
|
+
step revoke_creator: <... completed>
|
|
95
|
+
status
|
|
96
|
+
---------
|
|
97
|
+
suspended
|
|
98
|
+
(1 row)
|
|
99
|
+
|
|
100
|
+
step invalidator_commit: COMMIT;
|
|
101
|
+
step check:
|
|
102
|
+
select
|
|
103
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
104
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
105
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
106
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
107
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
108
|
+
(select membership_state from agent_board.board_memberships
|
|
109
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
110
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
111
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
112
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
113
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
114
|
+
|
|
115
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
116
|
+
--------------+-----------------+------------+-------------
|
|
117
|
+
suspended |owner/joined |joined |
|
|
118
|
+
(1 row)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
starting permutation: retry_begin retry_onboard invalidator_begin demote_creator retry_commit invalidator_commit check
|
|
122
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
123
|
+
step retry_onboard:
|
|
124
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
125
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
126
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
127
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
128
|
+
'atomic-authority-agent',
|
|
129
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
130
|
+
'raw_ed25519_base64url',
|
|
131
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
132
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
133
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
134
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
135
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
136
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
137
|
+
'atomic-authority-agent'
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
identity_disposition|membership_disposition|binding_disposition
|
|
141
|
+
--------------------+----------------------+-------------------
|
|
142
|
+
reused |reused |reused
|
|
143
|
+
(1 row)
|
|
144
|
+
|
|
145
|
+
step invalidator_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
146
|
+
step demote_creator:
|
|
147
|
+
select role from agent_board.grant_board_role(
|
|
148
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
149
|
+
'16250000-0000-0000-0000-000000000001', 'observer',
|
|
150
|
+
'16250000-0000-0000-0000-000000000001'
|
|
151
|
+
);
|
|
152
|
+
<waiting ...>
|
|
153
|
+
step retry_commit: COMMIT;
|
|
154
|
+
step demote_creator: <... completed>
|
|
155
|
+
role
|
|
156
|
+
--------
|
|
157
|
+
observer
|
|
158
|
+
(1 row)
|
|
159
|
+
|
|
160
|
+
step invalidator_commit: COMMIT;
|
|
161
|
+
step check:
|
|
162
|
+
select
|
|
163
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
164
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
165
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
166
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
167
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
168
|
+
(select membership_state from agent_board.board_memberships
|
|
169
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
170
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
171
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
172
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
173
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
174
|
+
|
|
175
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
176
|
+
--------------+-----------------+------------+-------------
|
|
177
|
+
active |observer/joined |joined |
|
|
178
|
+
(1 row)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
starting permutation: invalidator_begin remove_member retry_begin retry_onboard invalidator_commit retry_commit check
|
|
182
|
+
step invalidator_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
183
|
+
step remove_member:
|
|
184
|
+
select membership_state from agent_board.update_board_membership(
|
|
185
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
186
|
+
(select id from agent_board.agents where handle='atomic-authority-agent'),
|
|
187
|
+
'removed', jsonb_build_object('reason','isolation member removal')
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
membership_state
|
|
191
|
+
----------------
|
|
192
|
+
removed
|
|
193
|
+
(1 row)
|
|
194
|
+
|
|
195
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
196
|
+
step retry_onboard:
|
|
197
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
198
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
199
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
200
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
201
|
+
'atomic-authority-agent',
|
|
202
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
203
|
+
'raw_ed25519_base64url',
|
|
204
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
205
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
206
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
207
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
208
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
209
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
210
|
+
'atomic-authority-agent'
|
|
211
|
+
);
|
|
212
|
+
<waiting ...>
|
|
213
|
+
step invalidator_commit: COMMIT;
|
|
214
|
+
step retry_onboard: <... completed>
|
|
215
|
+
ERROR: fleet onboarding invite is not usable
|
|
216
|
+
step retry_commit: COMMIT;
|
|
217
|
+
step check:
|
|
218
|
+
select
|
|
219
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
220
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
221
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
222
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
223
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
224
|
+
(select membership_state from agent_board.board_memberships
|
|
225
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
226
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
227
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
228
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
229
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
230
|
+
|
|
231
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
232
|
+
--------------+-----------------+------------+-------------
|
|
233
|
+
active |owner/joined |removed |
|
|
234
|
+
(1 row)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
starting permutation: invalidator_begin revoke_creator retry_begin retry_onboard invalidator_commit retry_commit check
|
|
238
|
+
step invalidator_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
239
|
+
step revoke_creator:
|
|
240
|
+
select status from agent_board.revoke_agent(
|
|
241
|
+
'16250000-0000-0000-0000-000000000001', 'isolation creator revoke'
|
|
242
|
+
);
|
|
243
|
+
|
|
244
|
+
status
|
|
245
|
+
---------
|
|
246
|
+
suspended
|
|
247
|
+
(1 row)
|
|
248
|
+
|
|
249
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
250
|
+
step retry_onboard:
|
|
251
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
252
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
253
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
254
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
255
|
+
'atomic-authority-agent',
|
|
256
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
257
|
+
'raw_ed25519_base64url',
|
|
258
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
259
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
260
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
261
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
262
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
263
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
264
|
+
'atomic-authority-agent'
|
|
265
|
+
);
|
|
266
|
+
<waiting ...>
|
|
267
|
+
step invalidator_commit: COMMIT;
|
|
268
|
+
step retry_onboard: <... completed>
|
|
269
|
+
ERROR: fleet onboarding invite is not usable
|
|
270
|
+
step retry_commit: COMMIT;
|
|
271
|
+
step check:
|
|
272
|
+
select
|
|
273
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
274
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
275
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
276
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
277
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
278
|
+
(select membership_state from agent_board.board_memberships
|
|
279
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
280
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
281
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
282
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
283
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
284
|
+
|
|
285
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
286
|
+
--------------+-----------------+------------+-------------
|
|
287
|
+
suspended |owner/joined |joined |
|
|
288
|
+
(1 row)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
starting permutation: invalidator_begin demote_creator retry_begin retry_onboard invalidator_commit retry_commit check
|
|
292
|
+
step invalidator_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
293
|
+
step demote_creator:
|
|
294
|
+
select role from agent_board.grant_board_role(
|
|
295
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
296
|
+
'16250000-0000-0000-0000-000000000001', 'observer',
|
|
297
|
+
'16250000-0000-0000-0000-000000000001'
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
role
|
|
301
|
+
--------
|
|
302
|
+
observer
|
|
303
|
+
(1 row)
|
|
304
|
+
|
|
305
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
306
|
+
step retry_onboard:
|
|
307
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
308
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
309
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
310
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
311
|
+
'atomic-authority-agent',
|
|
312
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
313
|
+
'raw_ed25519_base64url',
|
|
314
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
315
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
316
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
317
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
318
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
319
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
320
|
+
'atomic-authority-agent'
|
|
321
|
+
);
|
|
322
|
+
<waiting ...>
|
|
323
|
+
step invalidator_commit: COMMIT;
|
|
324
|
+
step retry_onboard: <... completed>
|
|
325
|
+
ERROR: fleet onboarding invite is not usable
|
|
326
|
+
step retry_commit: COMMIT;
|
|
327
|
+
step check:
|
|
328
|
+
select
|
|
329
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
330
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
331
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
332
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
333
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
334
|
+
(select membership_state from agent_board.board_memberships
|
|
335
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
336
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
337
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
338
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
339
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
340
|
+
|
|
341
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
342
|
+
--------------+-----------------+------------+-------------
|
|
343
|
+
active |observer/joined |joined |
|
|
344
|
+
(1 row)
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
starting permutation: retry_begin retry_onboard ceiling_begin set_ceiling retry_commit ceiling_commit check
|
|
348
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
349
|
+
step retry_onboard:
|
|
350
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
351
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
352
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
353
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
354
|
+
'atomic-authority-agent',
|
|
355
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
356
|
+
'raw_ed25519_base64url',
|
|
357
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
358
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
359
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
360
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
361
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
362
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
363
|
+
'atomic-authority-agent'
|
|
364
|
+
);
|
|
365
|
+
|
|
366
|
+
identity_disposition|membership_disposition|binding_disposition
|
|
367
|
+
--------------------+----------------------+-------------------
|
|
368
|
+
reused |reused |reused
|
|
369
|
+
(1 row)
|
|
370
|
+
|
|
371
|
+
step ceiling_begin:
|
|
372
|
+
BEGIN;
|
|
373
|
+
SET LOCAL ROLE authenticated;
|
|
374
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
375
|
+
SET LOCAL "request.jwt.claim.sub" = '16250000-0000-0000-0000-0000000000a1';
|
|
376
|
+
|
|
377
|
+
step set_ceiling:
|
|
378
|
+
select ceiling_max_grantable_role from agent_board.set_board_authority_ceiling(
|
|
379
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
380
|
+
'observer'
|
|
381
|
+
);
|
|
382
|
+
<waiting ...>
|
|
383
|
+
step retry_commit: COMMIT;
|
|
384
|
+
step set_ceiling: <... completed>
|
|
385
|
+
ceiling_max_grantable_role
|
|
386
|
+
--------------------------
|
|
387
|
+
observer
|
|
388
|
+
(1 row)
|
|
389
|
+
|
|
390
|
+
step ceiling_commit: COMMIT;
|
|
391
|
+
step check:
|
|
392
|
+
select
|
|
393
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
394
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
395
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
396
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
397
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
398
|
+
(select membership_state from agent_board.board_memberships
|
|
399
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
400
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
401
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
402
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
403
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
404
|
+
|
|
405
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
406
|
+
--------------+-----------------+------------+-------------
|
|
407
|
+
active |owner/joined |joined |observer
|
|
408
|
+
(1 row)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
starting permutation: ceiling_begin set_ceiling retry_begin retry_onboard ceiling_commit retry_commit check
|
|
412
|
+
step ceiling_begin:
|
|
413
|
+
BEGIN;
|
|
414
|
+
SET LOCAL ROLE authenticated;
|
|
415
|
+
SET LOCAL "request.jwt.claim.role" = 'authenticated';
|
|
416
|
+
SET LOCAL "request.jwt.claim.sub" = '16250000-0000-0000-0000-0000000000a1';
|
|
417
|
+
|
|
418
|
+
step set_ceiling:
|
|
419
|
+
select ceiling_max_grantable_role from agent_board.set_board_authority_ceiling(
|
|
420
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
421
|
+
'observer'
|
|
422
|
+
);
|
|
423
|
+
|
|
424
|
+
ceiling_max_grantable_role
|
|
425
|
+
--------------------------
|
|
426
|
+
observer
|
|
427
|
+
(1 row)
|
|
428
|
+
|
|
429
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
430
|
+
step retry_onboard:
|
|
431
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
432
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
433
|
+
'https://atomic-authority.test', 'message-board', 'human-authority',
|
|
434
|
+
jsonb_build_object('iss','https://atomic-authority.test','aud','message-board','sub','human-authority','iat',200),
|
|
435
|
+
'atomic-authority-agent',
|
|
436
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
437
|
+
'raw_ed25519_base64url',
|
|
438
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
439
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
440
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16250000-0000-0000-0000-000000000001'),
|
|
441
|
+
(select id from agent_board.boards where slug='atomic-authority-board'),
|
|
442
|
+
'16250000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
443
|
+
'message-board', 'sha256:atomic-authority-repo', 'worker', 'phase_worker',
|
|
444
|
+
'atomic-authority-agent'
|
|
445
|
+
);
|
|
446
|
+
<waiting ...>
|
|
447
|
+
step ceiling_commit: COMMIT;
|
|
448
|
+
step retry_onboard: <... completed>
|
|
449
|
+
ERROR: fleet onboarding invite is not usable
|
|
450
|
+
step retry_commit: COMMIT;
|
|
451
|
+
step check:
|
|
452
|
+
select
|
|
453
|
+
(select status from agent_board.agents where id='16250000-0000-0000-0000-000000000001') as creator_status,
|
|
454
|
+
(select role || '/' || membership_state from agent_board.board_memberships
|
|
455
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
456
|
+
and agent_id='16250000-0000-0000-0000-000000000001'
|
|
457
|
+
and membership_state in ('joined','subscribed')) as creator_authority,
|
|
458
|
+
(select membership_state from agent_board.board_memberships
|
|
459
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')
|
|
460
|
+
and agent_id=(select id from agent_board.agents where handle='atomic-authority-agent')
|
|
461
|
+
order by (membership_state in ('joined','subscribed')) desc, created_at desc, id desc limit 1) as member_state,
|
|
462
|
+
(select max_grantable_role from agent_board.board_authority_ceilings
|
|
463
|
+
where board_id=(select id from agent_board.boards where slug='atomic-authority-board')) as board_ceiling;
|
|
464
|
+
|
|
465
|
+
creator_status|creator_authority|member_state|board_ceiling
|
|
466
|
+
--------------+-----------------+------------+-------------
|
|
467
|
+
active |owner/joined |joined |observer
|
|
468
|
+
(1 row)
|
|
469
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Parsed test spec with 3 sessions
|
|
2
|
+
|
|
3
|
+
starting permutation: retry_begin retry_onboard revoke_begin revoke_binding retry_commit revoke_commit check_binding
|
|
4
|
+
count
|
|
5
|
+
-----
|
|
6
|
+
1
|
|
7
|
+
(1 row)
|
|
8
|
+
|
|
9
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
10
|
+
step retry_onboard:
|
|
11
|
+
select binding_disposition from agent_board.onboard_federated_fleet_agent(
|
|
12
|
+
'https://atomic-binding.test', 'message-board', 'human-binding',
|
|
13
|
+
jsonb_build_object('iss','https://atomic-binding.test','aud','message-board','sub','human-binding','iat',200),
|
|
14
|
+
'atomic-binding-agent','yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
15
|
+
'raw_ed25519_base64url','sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
16
|
+
true,null,'agent',ARRAY['board:send'],ARRAY[]::text[],
|
|
17
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16230000-0000-0000-0000-000000000001'),
|
|
18
|
+
(select id from agent_board.boards where slug='atomic-binding-board'),
|
|
19
|
+
'16230000-0000-0000-0000-000000000003','codex','phase-loop',
|
|
20
|
+
'message-board','sha256:atomic-binding-repo','worker','phase_worker','atomic-binding-agent'
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
binding_disposition
|
|
24
|
+
-------------------
|
|
25
|
+
reused
|
|
26
|
+
(1 row)
|
|
27
|
+
|
|
28
|
+
step revoke_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
29
|
+
step revoke_binding:
|
|
30
|
+
select lifecycle_state from agent_board.revoke_fleet_machine_agent_binding(
|
|
31
|
+
(select id from agent_board.fleet_machine_agents where machine_id='16230000-0000-0000-0000-000000000003'),
|
|
32
|
+
'16230000-0000-0000-0000-000000000001','isolation proof',jsonb_build_object()
|
|
33
|
+
);
|
|
34
|
+
<waiting ...>
|
|
35
|
+
step retry_commit: COMMIT;
|
|
36
|
+
step revoke_binding: <... completed>
|
|
37
|
+
lifecycle_state
|
|
38
|
+
---------------
|
|
39
|
+
revoked
|
|
40
|
+
(1 row)
|
|
41
|
+
|
|
42
|
+
step revoke_commit: COMMIT;
|
|
43
|
+
step check_binding:
|
|
44
|
+
select count(*) filter (where lifecycle_state='active') as active,
|
|
45
|
+
count(*) filter (where lifecycle_state='revoked') as revoked,
|
|
46
|
+
count(*) as total
|
|
47
|
+
from agent_board.fleet_machine_agents
|
|
48
|
+
where machine_id='16230000-0000-0000-0000-000000000003';
|
|
49
|
+
|
|
50
|
+
active|revoked|total
|
|
51
|
+
------+-------+-----
|
|
52
|
+
0| 1| 1
|
|
53
|
+
(1 row)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
starting permutation: revoke_begin revoke_binding retry_begin retry_onboard revoke_commit retry_commit check_binding
|
|
57
|
+
count
|
|
58
|
+
-----
|
|
59
|
+
1
|
|
60
|
+
(1 row)
|
|
61
|
+
|
|
62
|
+
step revoke_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
63
|
+
step revoke_binding:
|
|
64
|
+
select lifecycle_state from agent_board.revoke_fleet_machine_agent_binding(
|
|
65
|
+
(select id from agent_board.fleet_machine_agents where machine_id='16230000-0000-0000-0000-000000000003'),
|
|
66
|
+
'16230000-0000-0000-0000-000000000001','isolation proof',jsonb_build_object()
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
lifecycle_state
|
|
70
|
+
---------------
|
|
71
|
+
revoked
|
|
72
|
+
(1 row)
|
|
73
|
+
|
|
74
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
75
|
+
step retry_onboard:
|
|
76
|
+
select binding_disposition from agent_board.onboard_federated_fleet_agent(
|
|
77
|
+
'https://atomic-binding.test', 'message-board', 'human-binding',
|
|
78
|
+
jsonb_build_object('iss','https://atomic-binding.test','aud','message-board','sub','human-binding','iat',200),
|
|
79
|
+
'atomic-binding-agent','yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
80
|
+
'raw_ed25519_base64url','sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
81
|
+
true,null,'agent',ARRAY['board:send'],ARRAY[]::text[],
|
|
82
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16230000-0000-0000-0000-000000000001'),
|
|
83
|
+
(select id from agent_board.boards where slug='atomic-binding-board'),
|
|
84
|
+
'16230000-0000-0000-0000-000000000003','codex','phase-loop',
|
|
85
|
+
'message-board','sha256:atomic-binding-repo','worker','phase_worker','atomic-binding-agent'
|
|
86
|
+
);
|
|
87
|
+
<waiting ...>
|
|
88
|
+
step revoke_commit: COMMIT;
|
|
89
|
+
step retry_onboard: <... completed>
|
|
90
|
+
ERROR: fleet onboarding invite is not usable
|
|
91
|
+
step retry_commit: COMMIT;
|
|
92
|
+
step check_binding:
|
|
93
|
+
select count(*) filter (where lifecycle_state='active') as active,
|
|
94
|
+
count(*) filter (where lifecycle_state='revoked') as revoked,
|
|
95
|
+
count(*) as total
|
|
96
|
+
from agent_board.fleet_machine_agents
|
|
97
|
+
where machine_id='16230000-0000-0000-0000-000000000003';
|
|
98
|
+
|
|
99
|
+
active|revoked|total
|
|
100
|
+
------+-------+-----
|
|
101
|
+
0| 1| 1
|
|
102
|
+
(1 row)
|
|
103
|
+
|