From 134f7864fa3f13e49adb9cc7a0dc8b14e51ba391 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 24 Sep 2026 00:48:20 +0000 Subject: [PATCH 1/2] fix(docnotify): unique E1A fixture project names under global uniqueness 00057 added uq_projects_name_global; seedUserProject kept a fixed name \"e1a\" so the second PG case collided. Include the suffix in name too. --- .doc/ops/CURRENT.md | 1 + internal/app/docnotify/e1a_pg_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.doc/ops/CURRENT.md b/.doc/ops/CURRENT.md index 9cbbd704..4f6c73c1 100644 --- a/.doc/ops/CURRENT.md +++ b/.doc/ops/CURRENT.md @@ -18,6 +18,7 @@ | owner | task | branch | worktree | mutex | status | |---|---|---|---|---|---| +| Cursor | gate-e1a-unique-project-name-2026-09-24 | fix/gate-e1a-unique-project-name-2026-09-24 | .worktrees/gate-e1a-unique-project-name-2026-09-24 | docnotify | in_progress | | Cursor | gate-unhook-docquery-2026-09-24 | fix/gate-unhook-docquery-2026-09-24 | .worktrees/gate-unhook-docquery-2026-09-24 | server+docquery | in_progress | | Cursor | integrate-jev-assist-land-2026-09-24 | feature/integrate-jev-assist-land-2026-09-24 | .worktrees/integrate-jev-assist-land-2026-09-24 | git:dev | done | | Cursor | integrate-codegraph-fixup2-2026-09-24 | feature/integrate-codegraph-fixup2-2026-09-24 | (removed) | git:dev | done | diff --git a/internal/app/docnotify/e1a_pg_test.go b/internal/app/docnotify/e1a_pg_test.go index 7a0d4536..7ef2db48 100644 --- a/internal/app/docnotify/e1a_pg_test.go +++ b/internal/app/docnotify/e1a_pg_test.go @@ -302,7 +302,7 @@ func seedUserProject(t *testing.T, ctx context.Context, pool *pgxpool.Pool, suff if err := pool.QueryRow(ctx, `INSERT INTO users (account_id, name, role) VALUES ($1,'A','engineer') RETURNING id`, "e1a-"+suffix).Scan(&userID); err != nil { t.Fatal(err) } - if err := pool.QueryRow(ctx, `INSERT INTO projects (code, name, status) VALUES ($1,$2,'active') RETURNING id`, "e1a-"+suffix, "e1a").Scan(&projectID); err != nil { + if err := pool.QueryRow(ctx, `INSERT INTO projects (code, name, status) VALUES ($1,$2,'active') RETURNING id`, "e1a-"+suffix, "e1a-"+suffix).Scan(&projectID); err != nil { t.Fatal(err) } return userID, projectID From c51fb5e22fbcc9c52f75f584d2448871e57d94b1 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 24 Sep 2026 00:49:40 +0000 Subject: [PATCH 2/2] fix(docnotify): align E1A fixture aggregate versions with claim gap rule Per-doc aggregates must use version 1 (not i+1 / 99) or ClaimLeases skips them under event_consumer_checkpoints head+1 gating. --- internal/app/docnotify/e1a_pg_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/app/docnotify/e1a_pg_test.go b/internal/app/docnotify/e1a_pg_test.go index 7ef2db48..1d85fab4 100644 --- a/internal/app/docnotify/e1a_pg_test.go +++ b/internal/app/docnotify/e1a_pg_test.go @@ -142,7 +142,10 @@ func TestE1A_NotifyFixtureThirtyAuthzAndRollbackTx_PG(t *testing.T) { for i := 0; i < nFix; i++ { docID := fmt.Sprintf("e1a30_%s_%d", suffix, i) seedDoc(t, ctx, pool, docID, projectID, userID) - env := approvedEnv(fmt.Sprintf("%s-%d", suffix, i), docID, projectID, int64(i+1)) + // Each doc is its own aggregate; version must start at 1 (or 0) so the + // consumer checkpoint gap rule does not block siblings (version i+1 + // would only be claimable after head reaches i on the SAME aggregate). + env := approvedEnv(fmt.Sprintf("%s-%d", suffix, i), docID, projectID, 1) appendEnv(t, ctx, pool, env, []string{events.ConsumerNotify}) ids = append(ids, env.EventID) } @@ -222,7 +225,7 @@ func TestE1A_NotifyFixtureThirtyAuthzAndRollbackTx_PG(t *testing.T) { } // same-tx rollback: handle+ack then rollback leaves no extra row - missingDoc := approvedEnv("missing-"+suffix, "no-such-doc-"+suffix, projectID, 99) + missingDoc := approvedEnv("missing-"+suffix, "no-such-doc-"+suffix, projectID, 1) appendEnv(t, ctx, pool, missingDoc, []string{events.ConsumerNotify}) if _, err := d.RunOnce(ctx, events.ConsumerNotify); err != nil { t.Fatal(err)