@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,117 @@
|
|
|
1
|
+
Parsed test spec with 4 sessions
|
|
2
|
+
|
|
3
|
+
starting permutation: archive_begin archive_board retry_begin retry_onboard archive_commit retry_commit check
|
|
4
|
+
count
|
|
5
|
+
-----
|
|
6
|
+
1
|
|
7
|
+
(1 row)
|
|
8
|
+
|
|
9
|
+
step archive_begin: BEGIN;
|
|
10
|
+
step archive_board:
|
|
11
|
+
update agent_board.boards set status='archived'
|
|
12
|
+
where slug='atomic-archive-board' returning status;
|
|
13
|
+
|
|
14
|
+
status
|
|
15
|
+
--------
|
|
16
|
+
archived
|
|
17
|
+
(1 row)
|
|
18
|
+
|
|
19
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
20
|
+
step retry_onboard:
|
|
21
|
+
select identity_disposition, binding_disposition
|
|
22
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
23
|
+
'https://atomic-archive.test', 'message-board', 'human-archive',
|
|
24
|
+
jsonb_build_object('iss','https://atomic-archive.test','aud','message-board','sub','human-archive','iat',200),
|
|
25
|
+
'atomic-archive-agent',
|
|
26
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
27
|
+
'raw_ed25519_base64url',
|
|
28
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
29
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
30
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16290000-0000-0000-0000-000000000001'),
|
|
31
|
+
(select id from agent_board.boards where slug='atomic-archive-board'),
|
|
32
|
+
'16290000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
33
|
+
'message-board', 'sha256:atomic-archive-repo', 'worker', 'phase_worker',
|
|
34
|
+
'atomic-archive-agent'
|
|
35
|
+
);
|
|
36
|
+
<waiting ...>
|
|
37
|
+
step archive_commit: COMMIT;
|
|
38
|
+
step retry_onboard: <... completed>
|
|
39
|
+
ERROR: fleet onboarding board is not usable
|
|
40
|
+
step retry_commit: COMMIT;
|
|
41
|
+
step check:
|
|
42
|
+
select
|
|
43
|
+
(select status from agent_board.boards where slug='atomic-archive-board') as board_status,
|
|
44
|
+
(select uses_count from agent_board.board_invite_tokens where created_by_agent_id='16290000-0000-0000-0000-000000000001') as uses_count,
|
|
45
|
+
(select count(*) from agent_board.fleet_machine_agents where machine_id='16290000-0000-0000-0000-000000000003') as bindings;
|
|
46
|
+
|
|
47
|
+
board_status|uses_count|bindings
|
|
48
|
+
------------+----------+--------
|
|
49
|
+
archived | 1| 1
|
|
50
|
+
(1 row)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
starting permutation: blocker_begin block_machine retry_begin retry_onboard archive_begin archive_board blocker_commit retry_commit archive_commit check
|
|
54
|
+
count
|
|
55
|
+
-----
|
|
56
|
+
1
|
|
57
|
+
(1 row)
|
|
58
|
+
|
|
59
|
+
step blocker_begin: BEGIN;
|
|
60
|
+
step block_machine:
|
|
61
|
+
select id from agent_board.fleet_machines
|
|
62
|
+
where id='16290000-0000-0000-0000-000000000003' for update;
|
|
63
|
+
|
|
64
|
+
id
|
|
65
|
+
------------------------------------
|
|
66
|
+
16290000-0000-0000-0000-000000000003
|
|
67
|
+
(1 row)
|
|
68
|
+
|
|
69
|
+
step retry_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
70
|
+
step retry_onboard:
|
|
71
|
+
select identity_disposition, binding_disposition
|
|
72
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
73
|
+
'https://atomic-archive.test', 'message-board', 'human-archive',
|
|
74
|
+
jsonb_build_object('iss','https://atomic-archive.test','aud','message-board','sub','human-archive','iat',200),
|
|
75
|
+
'atomic-archive-agent',
|
|
76
|
+
'yd_DIFGWGusVg3SbktDJQ1bE5UWvtR33xln4b05JIhk',
|
|
77
|
+
'raw_ed25519_base64url',
|
|
78
|
+
'sha256:NeVC2vx1MbTY56jUwJcLLr6YwB4IKCERsXWbUwhf5pA',
|
|
79
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
80
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16290000-0000-0000-0000-000000000001'),
|
|
81
|
+
(select id from agent_board.boards where slug='atomic-archive-board'),
|
|
82
|
+
'16290000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
83
|
+
'message-board', 'sha256:atomic-archive-repo', 'worker', 'phase_worker',
|
|
84
|
+
'atomic-archive-agent'
|
|
85
|
+
);
|
|
86
|
+
<waiting ...>
|
|
87
|
+
step archive_begin: BEGIN;
|
|
88
|
+
step archive_board:
|
|
89
|
+
update agent_board.boards set status='archived'
|
|
90
|
+
where slug='atomic-archive-board' returning status;
|
|
91
|
+
<waiting ...>
|
|
92
|
+
step blocker_commit: COMMIT;
|
|
93
|
+
step retry_onboard: <... completed>
|
|
94
|
+
identity_disposition|binding_disposition
|
|
95
|
+
--------------------+-------------------
|
|
96
|
+
reused |reused
|
|
97
|
+
(1 row)
|
|
98
|
+
|
|
99
|
+
step retry_commit: COMMIT;
|
|
100
|
+
step archive_board: <... completed>
|
|
101
|
+
status
|
|
102
|
+
--------
|
|
103
|
+
archived
|
|
104
|
+
(1 row)
|
|
105
|
+
|
|
106
|
+
step archive_commit: COMMIT;
|
|
107
|
+
step check:
|
|
108
|
+
select
|
|
109
|
+
(select status from agent_board.boards where slug='atomic-archive-board') as board_status,
|
|
110
|
+
(select uses_count from agent_board.board_invite_tokens where created_by_agent_id='16290000-0000-0000-0000-000000000001') as uses_count,
|
|
111
|
+
(select count(*) from agent_board.fleet_machine_agents where machine_id='16290000-0000-0000-0000-000000000003') as bindings;
|
|
112
|
+
|
|
113
|
+
board_status|uses_count|bindings
|
|
114
|
+
------------+----------+--------
|
|
115
|
+
archived | 1| 1
|
|
116
|
+
(1 row)
|
|
117
|
+
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Parsed test spec with 4 sessions
|
|
2
|
+
|
|
3
|
+
starting permutation: blocker_begin block_creator onboard_begin onboard_fresh revoke_begin revoke_human blocker_commit onboard_commit revoke_commit check
|
|
4
|
+
count
|
|
5
|
+
-----
|
|
6
|
+
1
|
|
7
|
+
(1 row)
|
|
8
|
+
|
|
9
|
+
step blocker_begin: BEGIN;
|
|
10
|
+
step block_creator:
|
|
11
|
+
select id from agent_board.agents
|
|
12
|
+
where id='16280000-0000-0000-0000-000000000001' for update;
|
|
13
|
+
|
|
14
|
+
id
|
|
15
|
+
------------------------------------
|
|
16
|
+
16280000-0000-0000-0000-000000000001
|
|
17
|
+
(1 row)
|
|
18
|
+
|
|
19
|
+
step onboard_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
20
|
+
step onboard_fresh:
|
|
21
|
+
select identity_disposition, binding_disposition
|
|
22
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
23
|
+
'https://atomic-human.test', 'message-board', 'human-fresh-race',
|
|
24
|
+
jsonb_build_object('iss','https://atomic-human.test','aud','message-board','sub','human-fresh-race','iat',200),
|
|
25
|
+
'atomic-human-fresh',
|
|
26
|
+
'TDyof3w0SMg4SDYuj-qenolHC_n05cZbrLSckKVGtMo',
|
|
27
|
+
'raw_ed25519_base64url',
|
|
28
|
+
'sha256:lSBZnHvmPvQONy8aoygp-fmTg26iZenrZC-L5LN9m7M',
|
|
29
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
30
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16280000-0000-0000-0000-000000000001'),
|
|
31
|
+
(select id from agent_board.boards where slug='atomic-human-board'),
|
|
32
|
+
'16280000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
33
|
+
'message-board', 'sha256:atomic-human-repo', 'worker', 'phase_worker',
|
|
34
|
+
'atomic-human-fresh'
|
|
35
|
+
);
|
|
36
|
+
<waiting ...>
|
|
37
|
+
step revoke_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
38
|
+
step revoke_human:
|
|
39
|
+
select revoked_agent_count
|
|
40
|
+
from agent_board.revoke_human_subtree(
|
|
41
|
+
(select owner_user_id from agent_board.agents where handle='atomic-human-existing'),
|
|
42
|
+
'16280000-0000-0000-0000-000000000001', 'fresh race revoke'
|
|
43
|
+
);
|
|
44
|
+
<waiting ...>
|
|
45
|
+
step blocker_commit: COMMIT;
|
|
46
|
+
step onboard_fresh: <... completed>
|
|
47
|
+
identity_disposition|binding_disposition
|
|
48
|
+
--------------------+-------------------
|
|
49
|
+
created |created
|
|
50
|
+
(1 row)
|
|
51
|
+
|
|
52
|
+
step onboard_commit: COMMIT;
|
|
53
|
+
step revoke_human: <... completed>
|
|
54
|
+
revoked_agent_count
|
|
55
|
+
-------------------
|
|
56
|
+
2
|
|
57
|
+
(1 row)
|
|
58
|
+
|
|
59
|
+
step revoke_commit: COMMIT;
|
|
60
|
+
step check:
|
|
61
|
+
select
|
|
62
|
+
(select count(*) from agent_board.fleet_human_revocations) as human_revocations,
|
|
63
|
+
(select count(*) from agent_board.agents where handle='atomic-human-fresh') as fresh_agents,
|
|
64
|
+
(select coalesce(max(status),'absent') from agent_board.agents where handle='atomic-human-fresh') as fresh_status,
|
|
65
|
+
(select count(*) from agent_board.agent_signing_keys where fingerprint='sha256:lSBZnHvmPvQONy8aoygp-fmTg26iZenrZC-L5LN9m7M') as fresh_keys;
|
|
66
|
+
|
|
67
|
+
human_revocations|fresh_agents|fresh_status|fresh_keys
|
|
68
|
+
-----------------+------------+------------+----------
|
|
69
|
+
1| 1|revoked | 1
|
|
70
|
+
(1 row)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
starting permutation: blocker_begin block_existing revoke_begin revoke_human onboard_begin onboard_fresh blocker_commit revoke_commit onboard_commit check
|
|
74
|
+
count
|
|
75
|
+
-----
|
|
76
|
+
1
|
|
77
|
+
(1 row)
|
|
78
|
+
|
|
79
|
+
step blocker_begin: BEGIN;
|
|
80
|
+
step block_existing:
|
|
81
|
+
select handle from agent_board.agents where handle='atomic-human-existing' for update;
|
|
82
|
+
|
|
83
|
+
handle
|
|
84
|
+
---------------------
|
|
85
|
+
atomic-human-existing
|
|
86
|
+
(1 row)
|
|
87
|
+
|
|
88
|
+
step revoke_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
89
|
+
step revoke_human:
|
|
90
|
+
select revoked_agent_count
|
|
91
|
+
from agent_board.revoke_human_subtree(
|
|
92
|
+
(select owner_user_id from agent_board.agents where handle='atomic-human-existing'),
|
|
93
|
+
'16280000-0000-0000-0000-000000000001', 'fresh race revoke'
|
|
94
|
+
);
|
|
95
|
+
<waiting ...>
|
|
96
|
+
step onboard_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
97
|
+
step onboard_fresh:
|
|
98
|
+
select identity_disposition, binding_disposition
|
|
99
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
100
|
+
'https://atomic-human.test', 'message-board', 'human-fresh-race',
|
|
101
|
+
jsonb_build_object('iss','https://atomic-human.test','aud','message-board','sub','human-fresh-race','iat',200),
|
|
102
|
+
'atomic-human-fresh',
|
|
103
|
+
'TDyof3w0SMg4SDYuj-qenolHC_n05cZbrLSckKVGtMo',
|
|
104
|
+
'raw_ed25519_base64url',
|
|
105
|
+
'sha256:lSBZnHvmPvQONy8aoygp-fmTg26iZenrZC-L5LN9m7M',
|
|
106
|
+
true, null, 'agent', ARRAY['board:send'], ARRAY[]::text[],
|
|
107
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16280000-0000-0000-0000-000000000001'),
|
|
108
|
+
(select id from agent_board.boards where slug='atomic-human-board'),
|
|
109
|
+
'16280000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
110
|
+
'message-board', 'sha256:atomic-human-repo', 'worker', 'phase_worker',
|
|
111
|
+
'atomic-human-fresh'
|
|
112
|
+
);
|
|
113
|
+
<waiting ...>
|
|
114
|
+
step blocker_commit: COMMIT;
|
|
115
|
+
step revoke_human: <... completed>
|
|
116
|
+
revoked_agent_count
|
|
117
|
+
-------------------
|
|
118
|
+
1
|
|
119
|
+
(1 row)
|
|
120
|
+
|
|
121
|
+
step revoke_commit: COMMIT;
|
|
122
|
+
step onboard_fresh: <... completed>
|
|
123
|
+
ERROR: human owner has been revoked
|
|
124
|
+
step onboard_commit: COMMIT;
|
|
125
|
+
step check:
|
|
126
|
+
select
|
|
127
|
+
(select count(*) from agent_board.fleet_human_revocations) as human_revocations,
|
|
128
|
+
(select count(*) from agent_board.agents where handle='atomic-human-fresh') as fresh_agents,
|
|
129
|
+
(select coalesce(max(status),'absent') from agent_board.agents where handle='atomic-human-fresh') as fresh_status,
|
|
130
|
+
(select count(*) from agent_board.agent_signing_keys where fingerprint='sha256:lSBZnHvmPvQONy8aoygp-fmTg26iZenrZC-L5LN9m7M') as fresh_keys;
|
|
131
|
+
|
|
132
|
+
human_revocations|fresh_agents|fresh_status|fresh_keys
|
|
133
|
+
-----------------+------------+------------+----------
|
|
134
|
+
1| 0|absent | 0
|
|
135
|
+
(1 row)
|
|
136
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Parsed test spec with 3 sessions
|
|
2
|
+
|
|
3
|
+
starting permutation: legacy_begin legacy_enroll fleet_begin fleet_onboard legacy_commit fleet_commit check
|
|
4
|
+
count
|
|
5
|
+
-----
|
|
6
|
+
1
|
|
7
|
+
(1 row)
|
|
8
|
+
|
|
9
|
+
step legacy_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
10
|
+
step legacy_enroll:
|
|
11
|
+
select agent_handle
|
|
12
|
+
from agent_board.enroll_federated_identity(
|
|
13
|
+
'https://atomic-disposition.test', 'message-board', 'human-disposition',
|
|
14
|
+
jsonb_build_object('iss','https://atomic-disposition.test','aud','message-board','sub','human-disposition','iat',100),
|
|
15
|
+
'atomic-disposition-agent',
|
|
16
|
+
'5TG73fnNhqeYkoSvPf9QwmWkvKWe0yA7B8YinAWQ8m4', 'raw_ed25519_base64url',
|
|
17
|
+
'sha256:qhjEQe9R_x26TBZyBsd-LrpR1fh7Mvnz86rbsCKtjz8', true, null, 'agent',
|
|
18
|
+
ARRAY['board:send'], ARRAY[]::text[], null
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
agent_handle
|
|
22
|
+
------------------------
|
|
23
|
+
atomic-disposition-agent
|
|
24
|
+
(1 row)
|
|
25
|
+
|
|
26
|
+
step fleet_begin: BEGIN; SET LOCAL "request.jwt.claim.role" = 'service_role';
|
|
27
|
+
step fleet_onboard:
|
|
28
|
+
select identity_disposition, membership_disposition, binding_disposition
|
|
29
|
+
from agent_board.onboard_federated_fleet_agent(
|
|
30
|
+
'https://atomic-disposition.test', 'message-board', 'human-disposition',
|
|
31
|
+
jsonb_build_object('iss','https://atomic-disposition.test','aud','message-board','sub','human-disposition','iat',101),
|
|
32
|
+
'atomic-disposition-agent',
|
|
33
|
+
'5TG73fnNhqeYkoSvPf9QwmWkvKWe0yA7B8YinAWQ8m4', 'raw_ed25519_base64url',
|
|
34
|
+
'sha256:qhjEQe9R_x26TBZyBsd-LrpR1fh7Mvnz86rbsCKtjz8', true, null, 'agent',
|
|
35
|
+
ARRAY['board:send'], ARRAY[]::text[],
|
|
36
|
+
(select code from agent_board.board_invite_tokens where created_by_agent_id='16260000-0000-0000-0000-000000000001'),
|
|
37
|
+
(select id from agent_board.boards where slug='atomic-disposition-board'),
|
|
38
|
+
'16260000-0000-0000-0000-000000000003', 'codex', 'phase-loop',
|
|
39
|
+
'message-board', 'sha256:atomic-disposition-repo', 'worker', 'phase_worker',
|
|
40
|
+
'atomic-disposition-agent'
|
|
41
|
+
);
|
|
42
|
+
<waiting ...>
|
|
43
|
+
step legacy_commit: COMMIT;
|
|
44
|
+
step fleet_onboard: <... completed>
|
|
45
|
+
identity_disposition|membership_disposition|binding_disposition
|
|
46
|
+
--------------------+----------------------+-------------------
|
|
47
|
+
reused |created |recovered
|
|
48
|
+
(1 row)
|
|
49
|
+
|
|
50
|
+
step fleet_commit: COMMIT;
|
|
51
|
+
step check:
|
|
52
|
+
select
|
|
53
|
+
(select count(*) from agent_board.agents where handle='atomic-disposition-agent') as agents,
|
|
54
|
+
(select count(*) from agent_board.agent_signing_keys where fingerprint='sha256:qhjEQe9R_x26TBZyBsd-LrpR1fh7Mvnz86rbsCKtjz8') as keys,
|
|
55
|
+
(select count(*) from agent_board.fleet_machine_agents where machine_id='16260000-0000-0000-0000-000000000003') as bindings;
|
|
56
|
+
|
|
57
|
+
agents|keys|bindings
|
|
58
|
+
------+----+--------
|
|
59
|
+
1| 1| 1
|
|
60
|
+
(1 row)
|
|
61
|
+
|