feat(invitations): accept invitations with C4 consent and contact grants; share the E0 quota across holdings

This commit is contained in:
shira committed 2026-10-09 18:03:35 +03:00
1 parent a5990d3fc6
commit 676b3c6e24
59 files changed
+4926 -194

No files matched your search

@@ -807,6 +807,18 @@ func TestSkillEvidenceOverHTTP(t *testing.T) {
if _, err := harness.pool.Exec(ctx, `UPDATE skill_evidence_facts SET visibility = 'hidden' WHERE event_id = $1`, targetRun.id); err != nil {
t.Fatalf("hide the fact: %v", err)
}
// The rollback of the holdings migration refuses a holding that groups several
// organizations. The second organization moves to a holding of its own first;
// the evidence rollback under test does not depend on the grouping.
split := client.employer(t, "evidence-holding-split@example.test")
if _, err := harness.pool.Exec(ctx, `
INSERT INTO holdings (id, founder_account_id, created_at) VALUES (gen_random_uuid(), $1, now())`, split.id); err != nil {
t.Fatalf("create the holding of the split organization: %v", err)
}
if _, err := harness.pool.Exec(ctx, `
UPDATE organizations SET holding_id = (SELECT id FROM holdings WHERE founder_account_id = $1) WHERE id = $2`, split.id, organizationB.ID()); err != nil {
t.Fatalf("move the second organization to its own holding: %v", err)
}
// Later migrations may exist; the rollback under test is the evidence one.
rollBackAboveMigration(ctx, t, migrator, skillEvidenceMigrationVersion)
_, err = migrator.DownOne(ctx)