From b97d6cd60b0bddc0899a77a5b45d2d86054a5b00 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 15 Oct 2026 02:33:08 +0000 Subject: [PATCH] Establish system identity before the multi-instance account bootstrap Why: bootstrap-admin now refuses a database that has no agent_system_identity row, and serve does not insert one. Evidence: Dev CI run 3266 job 5008 failed with system identity missing on 7eef723. Impact: test setup only. Refs: Agent-System-Dev pulls/558 Co-authored-by: Cursor --- tests/integration/multi-instance/multi_instance_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/multi-instance/multi_instance_test.go b/tests/integration/multi-instance/multi_instance_test.go index 40c0c90d..15393666 100644 --- a/tests/integration/multi-instance/multi_instance_test.go +++ b/tests/integration/multi-instance/multi_instance_test.go @@ -438,6 +438,8 @@ func (e *env) killNine(t *testing.T, inst *instance) { // alice 发放激活凭据。凭据兑换后设置 alicePass,然后才能发 API Key。 func (e *env) loginAlice(t *testing.T) *userClient { t.Helper() + // 账户事务会锁库内服务身份;serve 不补写这行,须先显式建立。 + e.cli(t, "identity", "ensure", "--dsn", e.dbDSN, "--instance-id", "mi-acceptance", "--dbref", "pg") e.cli(t, "user", "bootstrap-admin", "--dsn", e.dbDSN, "--owner", "mi_setup", "--name", "Setup", "--out-file", filepath.Join(t.TempDir(), "setup-grant")) grantFile := filepath.Join(t.TempDir(), "alice-grant")