lastlight-core 0.25.8 → 0.26.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/config/default.yaml +31 -6
- package/dist/admin/chat-session-reader.d.ts +3 -3
- package/dist/admin/chat-session-reader.js +8 -8
- package/dist/admin/chat-session-reader.js.map +1 -1
- package/dist/admin/routes.js +119 -124
- package/dist/admin/routes.js.map +1 -1
- package/dist/admin/sessions.d.ts +7 -7
- package/dist/admin/sessions.js +6 -4
- package/dist/admin/sessions.js.map +1 -1
- package/dist/config/config.d.ts +21 -2
- package/dist/config/config.js +33 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/repo-config.js +6 -7
- package/dist/config/repo-config.js.map +1 -1
- package/dist/connectors/messaging/base.js +2 -2
- package/dist/connectors/messaging/base.js.map +1 -1
- package/dist/connectors/messaging/session-manager.d.ts +29 -31
- package/dist/connectors/messaging/session-manager.js +156 -189
- package/dist/connectors/messaging/session-manager.js.map +1 -1
- package/dist/connectors/messaging/thread-transcript.d.ts +2 -2
- package/dist/connectors/messaging/thread-transcript.js +14 -8
- package/dist/connectors/messaging/thread-transcript.js.map +1 -1
- package/dist/connectors/slack/connector.js +5 -5
- package/dist/connectors/slack/connector.js.map +1 -1
- package/dist/connectors/slack/mrkdwn.d.ts +4 -0
- package/dist/connectors/slack/mrkdwn.js +2 -2
- package/dist/connectors/slack/mrkdwn.js.map +1 -1
- package/dist/cron/feedback-poll.js +6 -6
- package/dist/cron/feedback-poll.js.map +1 -1
- package/dist/cron/handlers.d.ts +16 -8
- package/dist/cron/handlers.js +49 -31
- package/dist/cron/handlers.js.map +1 -1
- package/dist/cron/jobs.d.ts +1 -1
- package/dist/cron/jobs.js +5 -2
- package/dist/cron/jobs.js.map +1 -1
- package/dist/cron/repo-digest.d.ts +54 -7
- package/dist/cron/repo-digest.js +236 -23
- package/dist/cron/repo-digest.js.map +1 -1
- package/dist/cron/runner.d.ts +59 -0
- package/dist/cron/runner.js +224 -0
- package/dist/cron/runner.js.map +1 -0
- package/dist/cron/scheduler.js +19 -9
- package/dist/cron/scheduler.js.map +1 -1
- package/dist/engine/chat/chat-prompt.d.ts +11 -4
- package/dist/engine/chat/chat-prompt.js.map +1 -1
- package/dist/engine/chat/chat-runner.d.ts +3 -2
- package/dist/engine/chat/chat-runner.js +9 -7
- package/dist/engine/chat/chat-runner.js.map +1 -1
- package/dist/engine/dispatcher.js +29 -25
- package/dist/engine/dispatcher.js.map +1 -1
- package/dist/engine/executors/orchestrator.d.ts +28 -0
- package/dist/engine/executors/orchestrator.js +70 -1
- package/dist/engine/executors/orchestrator.js.map +1 -1
- package/dist/engine/feedback/ingest.d.ts +4 -4
- package/dist/engine/feedback/ingest.js +13 -13
- package/dist/engine/feedback/ingest.js.map +1 -1
- package/dist/engine/feedback/slack.d.ts +2 -2
- package/dist/engine/feedback/slack.js +6 -6
- package/dist/engine/feedback/slack.js.map +1 -1
- package/dist/engine/fix-harvest.d.ts +1 -1
- package/dist/engine/fix-harvest.js +3 -3
- package/dist/engine/fix-harvest.js.map +1 -1
- package/dist/engine/github/github.d.ts +79 -0
- package/dist/engine/github/github.js +111 -0
- package/dist/engine/github/github.js.map +1 -1
- package/dist/engine/github/team-visibility.js +7 -7
- package/dist/engine/github/team-visibility.js.map +1 -1
- package/dist/engine/pr-escalation.js +7 -7
- package/dist/engine/pr-escalation.js.map +1 -1
- package/dist/engine/pr-state.d.ts +1 -1
- package/dist/engine/pr-state.js +12 -10
- package/dist/engine/pr-state.js.map +1 -1
- package/dist/engine/review-check.d.ts +1 -1
- package/dist/engine/review-check.js +5 -5
- package/dist/engine/review-check.js.map +1 -1
- package/dist/engine/router.js +3 -3
- package/dist/engine/router.js.map +1 -1
- package/dist/index.js +115 -152
- package/dist/index.js.map +1 -1
- package/dist/notify/digest-blocks.d.ts +61 -0
- package/dist/notify/digest-blocks.js +150 -22
- package/dist/notify/digest-blocks.js.map +1 -1
- package/dist/sandbox/docker.d.ts +33 -1
- package/dist/sandbox/docker.js +95 -1
- package/dist/sandbox/docker.js.map +1 -1
- package/dist/sandbox/k8s/kubernetes-sandbox.d.ts +3 -0
- package/dist/sandbox/k8s/kubernetes-sandbox.js +9 -0
- package/dist/sandbox/k8s/kubernetes-sandbox.js.map +1 -1
- package/dist/sandbox/k8s/pod.d.ts +11 -0
- package/dist/sandbox/k8s/pod.js +11 -6
- package/dist/sandbox/k8s/pod.js.map +1 -1
- package/dist/sandbox/k8s/service-containers.d.ts +43 -0
- package/dist/sandbox/k8s/service-containers.js +87 -0
- package/dist/sandbox/k8s/service-containers.js.map +1 -0
- package/dist/sandbox/reap.d.ts +9 -0
- package/dist/sandbox/reap.js +36 -0
- package/dist/sandbox/reap.js.map +1 -1
- package/dist/sandbox/sandbox.d.ts +14 -0
- package/dist/sandbox/sandbox.js +9 -0
- package/dist/sandbox/sandbox.js.map +1 -1
- package/dist/sandbox/service-containers-docker.d.ts +45 -0
- package/dist/sandbox/service-containers-docker.js +78 -0
- package/dist/sandbox/service-containers-docker.js.map +1 -0
- package/dist/state/approval-store.d.ts +23 -14
- package/dist/state/approval-store.js +137 -86
- package/dist/state/approval-store.js.map +1 -1
- package/dist/state/client.d.ts +105 -0
- package/dist/state/client.js +68 -0
- package/dist/state/client.js.map +1 -0
- package/dist/state/cron-run-store.d.ts +108 -0
- package/dist/state/cron-run-store.js +173 -0
- package/dist/state/cron-run-store.js.map +1 -0
- package/dist/state/db.d.ts +70 -23
- package/dist/state/db.js +179 -104
- package/dist/state/db.js.map +1 -1
- package/dist/state/dialect.d.ts +77 -0
- package/dist/state/dialect.js +129 -0
- package/dist/state/dialect.js.map +1 -0
- package/dist/state/execution-store.d.ts +124 -103
- package/dist/state/execution-store.js +569 -374
- package/dist/state/execution-store.js.map +1 -1
- package/dist/state/feedback-store.d.ts +20 -20
- package/dist/state/feedback-store.js +241 -187
- package/dist/state/feedback-store.js.map +1 -1
- package/dist/state/legacy-sqlite.d.ts +15 -0
- package/dist/state/legacy-sqlite.js +131 -0
- package/dist/state/legacy-sqlite.js.map +1 -0
- package/dist/state/repo-ref.d.ts +9 -4
- package/dist/state/repo-ref.js +12 -6
- package/dist/state/repo-ref.js.map +1 -1
- package/dist/state/schema/pg.d.ts +2788 -0
- package/dist/state/schema/pg.js +301 -0
- package/dist/state/schema/pg.js.map +1 -0
- package/dist/state/schema/sqlite.d.ts +3063 -0
- package/dist/state/schema/sqlite.js +391 -0
- package/dist/state/schema/sqlite.js.map +1 -0
- package/dist/state/team-store.d.ts +26 -13
- package/dist/state/team-store.js +140 -93
- package/dist/state/team-store.js.map +1 -1
- package/dist/state/user-store.d.ts +31 -13
- package/dist/state/user-store.js +180 -80
- package/dist/state/user-store.js.map +1 -1
- package/dist/state/workflow-run-store.d.ts +95 -56
- package/dist/state/workflow-run-store.js +419 -314
- package/dist/state/workflow-run-store.js.map +1 -1
- package/dist/telemetry/index.d.ts +8 -0
- package/dist/telemetry/index.js +11 -0
- package/dist/telemetry/index.js.map +1 -1
- package/dist/workflows/admission.d.ts +4 -3
- package/dist/workflows/admission.js +34 -10
- package/dist/workflows/admission.js.map +1 -1
- package/dist/workflows/handlers/post-review.js +3 -3
- package/dist/workflows/handlers/post-review.js.map +1 -1
- package/dist/workflows/resume.js +22 -15
- package/dist/workflows/resume.js.map +1 -1
- package/dist/workflows/runner.js +27 -12
- package/dist/workflows/runner.js.map +1 -1
- package/dist/workflows/simple.d.ts +23 -0
- package/dist/workflows/simple.js +40 -16
- package/dist/workflows/simple.js.map +1 -1
- package/drizzle/pg/0000_init.sql +235 -0
- package/drizzle/pg/meta/0000_snapshot.json +1751 -0
- package/drizzle/pg/meta/_journal.json +13 -0
- package/drizzle/sqlite/0000_baseline.sql +257 -0
- package/drizzle/sqlite/0001_backfill_repo_refs.sql +74 -0
- package/drizzle/sqlite/meta/0000_snapshot.json +1593 -0
- package/drizzle/sqlite/meta/0001_snapshot.json +1593 -0
- package/drizzle/sqlite/meta/_journal.json +20 -0
- package/package.json +15 -9
- package/dist/state/migrate.d.ts +0 -15
- package/dist/state/migrate.js +0 -493
- package/dist/state/migrate.js.map +0 -1
package/dist/state/team-store.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { and, asc, eq, max, sql } from "drizzle-orm";
|
|
2
|
+
import { nullsToUndefined, tablesOf, } from "./client.js";
|
|
1
3
|
/**
|
|
2
4
|
* Owns the four `github_team*` / `github_visibility_sync` tables — the cache
|
|
3
5
|
* behind per-repo dashboard visibility (issue #169).
|
|
@@ -11,13 +13,26 @@
|
|
|
11
13
|
* fails open rather than hiding repos.
|
|
12
14
|
*
|
|
13
15
|
* Mirrors the other per-table stores ({@link ExecutionStore} /
|
|
14
|
-
* {@link UserStore}): constructed from the single shared
|
|
15
|
-
* multi-row write wrapped in one transaction.
|
|
16
|
+
* {@link UserStore}): constructed from the single shared Drizzle client, every
|
|
17
|
+
* multi-row write wrapped in one transaction. Those four transactions run
|
|
18
|
+
* through the **connection-scoped** `serialize` mutex, the same instance
|
|
19
|
+
* {@link WorkflowRunStore} uses — a store-scoped chain would leave a team
|
|
20
|
+
* resolution free to overlap a run transaction on this one libsql client, which
|
|
21
|
+
* is exactly the interleaving libsql handles badly.
|
|
16
22
|
*/
|
|
17
23
|
export class TeamStore {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
client;
|
|
25
|
+
serialize;
|
|
26
|
+
/**
|
|
27
|
+
* Table objects for THIS client's dialect. Every method destructures what it
|
|
28
|
+
* needs off this instead of importing from `schema/sqlite.js` — see
|
|
29
|
+
* `client.ts` → {@link tablesOf} for why the cast alone cannot do it.
|
|
30
|
+
*/
|
|
31
|
+
t;
|
|
32
|
+
constructor(client, deps) {
|
|
33
|
+
this.client = client;
|
|
34
|
+
this.serialize = deps.serialize;
|
|
35
|
+
this.t = tablesOf(client);
|
|
21
36
|
}
|
|
22
37
|
/**
|
|
23
38
|
* Replace everything known about ONE login in a single transaction: the teams
|
|
@@ -28,52 +43,73 @@ export class TeamStore {
|
|
|
28
43
|
* Only touches membership rows for `login` — other logins' rows in the same
|
|
29
44
|
* teams are left alone, since this pass learned nothing about them.
|
|
30
45
|
*/
|
|
31
|
-
recordResolution(input) {
|
|
46
|
+
async recordResolution(input) {
|
|
47
|
+
const { githubTeamMembers, githubTeamRepos, githubTeams, githubVisibilitySync } = this.t;
|
|
32
48
|
const now = input.at ?? new Date().toISOString();
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
await this.serialize(() => this.client.transaction(async (tx) => {
|
|
50
|
+
await tx.delete(githubTeamMembers).where(eq(githubTeamMembers.login, input.login));
|
|
35
51
|
for (const team of input.teams) {
|
|
36
|
-
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
.
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
|
|
52
|
+
await tx
|
|
53
|
+
.insert(githubTeams)
|
|
54
|
+
.values({
|
|
55
|
+
org: team.org,
|
|
56
|
+
slug: team.slug,
|
|
57
|
+
name: team.name ?? null,
|
|
58
|
+
reposSyncedAt: now,
|
|
59
|
+
truncated: team.truncated,
|
|
60
|
+
})
|
|
61
|
+
.onConflictDoUpdate({
|
|
62
|
+
target: [githubTeams.org, githubTeams.slug],
|
|
63
|
+
set: { name: team.name ?? null, reposSyncedAt: now, truncated: team.truncated },
|
|
64
|
+
});
|
|
65
|
+
await tx
|
|
66
|
+
.delete(githubTeamRepos)
|
|
67
|
+
.where(and(eq(githubTeamRepos.org, team.org), eq(githubTeamRepos.teamSlug, team.slug)));
|
|
68
|
+
// `repo` here is the QUALIFIED owner/repo full name — unlike every
|
|
69
|
+
// other repo column in the schema — so it is stored exactly as the
|
|
70
|
+
// resolver produced it, with no bare-repo normalization.
|
|
71
|
+
for (const repo of team.repos) {
|
|
72
|
+
await tx
|
|
73
|
+
.insert(githubTeamRepos)
|
|
74
|
+
.values({ org: team.org, teamSlug: team.slug, repo })
|
|
75
|
+
.onConflictDoNothing();
|
|
76
|
+
}
|
|
77
|
+
await tx
|
|
78
|
+
.insert(githubTeamMembers)
|
|
79
|
+
.values({ org: team.org, teamSlug: team.slug, login: input.login })
|
|
80
|
+
.onConflictDoNothing();
|
|
53
81
|
}
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
82
|
+
await tx
|
|
83
|
+
.insert(githubVisibilitySync)
|
|
84
|
+
.values({
|
|
85
|
+
login: input.login,
|
|
86
|
+
syncedAt: now,
|
|
87
|
+
status: input.status,
|
|
88
|
+
detail: input.detail ?? null,
|
|
89
|
+
})
|
|
90
|
+
.onConflictDoUpdate({
|
|
91
|
+
target: githubVisibilitySync.login,
|
|
92
|
+
set: { syncedAt: now, status: input.status, detail: input.detail ?? null },
|
|
93
|
+
});
|
|
94
|
+
}));
|
|
64
95
|
}
|
|
65
96
|
/** The freshness/outcome row for a login, or null if never resolved. */
|
|
66
|
-
getSync(login) {
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
.
|
|
97
|
+
async getSync(login) {
|
|
98
|
+
const { githubVisibilitySync } = this.t;
|
|
99
|
+
const [row] = await this.client
|
|
100
|
+
.select()
|
|
101
|
+
.from(githubVisibilitySync)
|
|
102
|
+
.where(eq(githubVisibilitySync.login, login))
|
|
103
|
+
.limit(1);
|
|
70
104
|
if (!row)
|
|
71
105
|
return null;
|
|
106
|
+
const r = nullsToUndefined(row);
|
|
72
107
|
return {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
108
|
+
...r,
|
|
109
|
+
status: r.status,
|
|
110
|
+
// `nullsToUndefined` strips it at runtime; the cast keeps the declared
|
|
111
|
+
// optional honest, since its signature can't narrow `string | null`.
|
|
112
|
+
detail: r.detail ?? undefined,
|
|
77
113
|
};
|
|
78
114
|
}
|
|
79
115
|
/**
|
|
@@ -81,8 +117,8 @@ export class TeamStore {
|
|
|
81
117
|
* never fresh; a `synced_at` we can't parse is treated as stale rather than
|
|
82
118
|
* trusted forever.
|
|
83
119
|
*/
|
|
84
|
-
isFresh(login, ttlMs, now = Date.now()) {
|
|
85
|
-
const sync = this.getSync(login);
|
|
120
|
+
async isFresh(login, ttlMs, now = Date.now()) {
|
|
121
|
+
const sync = await this.getSync(login);
|
|
86
122
|
if (!sync)
|
|
87
123
|
return false;
|
|
88
124
|
const at = Date.parse(sync.syncedAt);
|
|
@@ -96,35 +132,41 @@ export class TeamStore {
|
|
|
96
132
|
* stored, which was already intersected at write time (a repo unmanaged since
|
|
97
133
|
* then must not reappear just because a team still grants it).
|
|
98
134
|
*/
|
|
99
|
-
reposForLogin(login) {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
135
|
+
async reposForLogin(login) {
|
|
136
|
+
const { githubTeamMembers, githubTeamRepos, githubTeams } = this.t;
|
|
137
|
+
const rows = await this.client
|
|
138
|
+
.selectDistinct({ repo: githubTeamRepos.repo })
|
|
139
|
+
.from(githubTeamMembers)
|
|
140
|
+
.innerJoin(githubTeamRepos, and(eq(githubTeamRepos.org, githubTeamMembers.org), eq(githubTeamRepos.teamSlug, githubTeamMembers.teamSlug)))
|
|
141
|
+
.where(eq(githubTeamMembers.login, login))
|
|
142
|
+
.orderBy(asc(githubTeamRepos.repo));
|
|
143
|
+
const teams = await this.client
|
|
144
|
+
.select({
|
|
145
|
+
org: githubTeamMembers.org,
|
|
146
|
+
slug: githubTeamMembers.teamSlug,
|
|
147
|
+
// The COALESCE is load-bearing, not defensive: `truncated` is NOT NULL,
|
|
148
|
+
// so the only NULL here comes from the LEFT JOIN missing its team row —
|
|
149
|
+
// a membership we learned about before (or without) the team itself.
|
|
150
|
+
// Bound `false`, never a literal 0: Postgres rejects `boolean = integer`.
|
|
151
|
+
truncated: sql `coalesce(${githubTeams.truncated}, ${false})`.mapWith(Boolean),
|
|
152
|
+
})
|
|
153
|
+
.from(githubTeamMembers)
|
|
154
|
+
.leftJoin(githubTeams, and(eq(githubTeams.org, githubTeamMembers.org), eq(githubTeams.slug, githubTeamMembers.teamSlug)))
|
|
155
|
+
.where(eq(githubTeamMembers.login, login))
|
|
156
|
+
.orderBy(asc(githubTeamMembers.org), asc(githubTeamMembers.teamSlug));
|
|
115
157
|
return {
|
|
116
158
|
repos: rows.map((r) => r.repo),
|
|
117
|
-
truncated: teams.some((t) => t.truncated ===
|
|
159
|
+
truncated: teams.some((t) => t.truncated === true),
|
|
118
160
|
teams: teams.map((t) => ({ org: t.org, slug: t.slug })),
|
|
119
161
|
};
|
|
120
162
|
}
|
|
121
163
|
/** Forget one login's answer — it will be re-resolved on the next request. */
|
|
122
|
-
invalidateLogin(login) {
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
164
|
+
async invalidateLogin(login) {
|
|
165
|
+
const { githubTeamMembers, githubVisibilitySync } = this.t;
|
|
166
|
+
await this.serialize(() => this.client.transaction(async (tx) => {
|
|
167
|
+
await tx.delete(githubTeamMembers).where(eq(githubTeamMembers.login, login));
|
|
168
|
+
await tx.delete(githubVisibilitySync).where(eq(githubVisibilitySync.login, login));
|
|
169
|
+
}));
|
|
128
170
|
}
|
|
129
171
|
/**
|
|
130
172
|
* Forget one team — its grant AND every member's cached answer, because their
|
|
@@ -134,44 +176,49 @@ export class TeamStore {
|
|
|
134
176
|
* Returns the logins whose answers were dropped, so the caller can log the
|
|
135
177
|
* blast radius of an org-side change.
|
|
136
178
|
*/
|
|
137
|
-
invalidateTeam(org, slug) {
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
179
|
+
async invalidateTeam(org, slug) {
|
|
180
|
+
const { githubTeamMembers, githubTeamRepos, githubTeams, githubVisibilitySync } = this.t;
|
|
181
|
+
// Deliberately OUTSIDE the transaction, as it always has been.
|
|
182
|
+
const members = await this.client
|
|
183
|
+
.select({ login: githubTeamMembers.login })
|
|
184
|
+
.from(githubTeamMembers)
|
|
185
|
+
.where(and(eq(githubTeamMembers.org, org), eq(githubTeamMembers.teamSlug, slug)));
|
|
141
186
|
const logins = members.map((m) => m.login);
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
187
|
+
await this.serialize(() => this.client.transaction(async (tx) => {
|
|
188
|
+
await tx
|
|
189
|
+
.delete(githubTeamRepos)
|
|
190
|
+
.where(and(eq(githubTeamRepos.org, org), eq(githubTeamRepos.teamSlug, slug)));
|
|
191
|
+
await tx
|
|
192
|
+
.delete(githubTeams)
|
|
193
|
+
.where(and(eq(githubTeams.org, org), eq(githubTeams.slug, slug)));
|
|
145
194
|
// Drop each affected member ENTIRELY, not just their row in this team.
|
|
146
195
|
// Leaving their other memberships behind would keep a partial repo set in
|
|
147
196
|
// the cache — and a partial set is the one answer this feature must never
|
|
148
197
|
// produce. They re-resolve on their next request regardless, since their
|
|
149
198
|
// freshness row goes with them, so this costs nothing extra.
|
|
150
|
-
const forgetMembership = this.db.prepare(`DELETE FROM github_team_members WHERE login = ?`);
|
|
151
|
-
const forgetSync = this.db.prepare(`DELETE FROM github_visibility_sync WHERE login = ?`);
|
|
152
199
|
for (const login of logins) {
|
|
153
|
-
|
|
154
|
-
|
|
200
|
+
await tx.delete(githubTeamMembers).where(eq(githubTeamMembers.login, login));
|
|
201
|
+
await tx.delete(githubVisibilitySync).where(eq(githubVisibilitySync.login, login));
|
|
155
202
|
}
|
|
156
|
-
});
|
|
157
|
-
apply();
|
|
203
|
+
}));
|
|
158
204
|
return logins;
|
|
159
205
|
}
|
|
160
206
|
/** Drop the whole cache (admin re-sync, or an `organization` event we can't scope). */
|
|
161
|
-
invalidateAll() {
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
207
|
+
async invalidateAll() {
|
|
208
|
+
const { githubTeamMembers, githubTeamRepos, githubTeams, githubVisibilitySync } = this.t;
|
|
209
|
+
await this.serialize(() => this.client.transaction(async (tx) => {
|
|
210
|
+
await tx.delete(githubTeamRepos);
|
|
211
|
+
await tx.delete(githubTeamMembers);
|
|
212
|
+
await tx.delete(githubTeams);
|
|
213
|
+
await tx.delete(githubVisibilitySync);
|
|
214
|
+
}));
|
|
169
215
|
}
|
|
170
216
|
/** Most recent successful resolution across all logins — powers the coarse `synced` flag. */
|
|
171
|
-
lastSyncedAt() {
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
.
|
|
217
|
+
async lastSyncedAt() {
|
|
218
|
+
const { githubVisibilitySync } = this.t;
|
|
219
|
+
const [row] = await this.client
|
|
220
|
+
.select({ at: max(githubVisibilitySync.syncedAt) })
|
|
221
|
+
.from(githubVisibilitySync);
|
|
175
222
|
return row?.at ?? null;
|
|
176
223
|
}
|
|
177
224
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-store.js","sourceRoot":"","sources":["../../src/state/team-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"team-store.js","sourceRoot":"","sources":["../../src/state/team-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,gBAAgB,EAChB,QAAQ,GAIT,MAAM,aAAa,CAAC;AA4CrB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,SAAS;IAWV;IAVF,SAAS,CAAe;IAEhC;;;;OAIG;IACc,CAAC,CAAc;IAEhC,YACU,MAAmB,EAC3B,IAAiC;QADzB,WAAM,GAAN,MAAM,C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,CAAC;IAChB,CAAC;IAED,uFAAuF;IACvF,KAAK,CAAC,aAAa;QACjB,MAAM,EAAE,iBAAiB,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QACzF,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACxB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;YACnC,MAAM,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YACjC,MAAM,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;YACnC,MAAM,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YAC7B,MAAM,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;QACxC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAED,6FAA6F;IAC7F,KAAK,CAAC,YAAY;QAChB,MAAM,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,CAAC,MAAM;aAC5B,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;aAClD,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC9B,OAAO,GAAG,EAAE,EAAE,IAAI,IAAI,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type StateClient } from "./client.js";
|
|
2
2
|
/**
|
|
3
3
|
* Who acted on / triggered a workflow, coarsely. Persisted in the
|
|
4
4
|
* `trigger_actor_type` column on both `executions` and `workflow_runs`
|
|
@@ -45,15 +45,24 @@ export interface User {
|
|
|
45
45
|
/**
|
|
46
46
|
* Owns every read/write against the `users` table. Mirrors the other per-table
|
|
47
47
|
* stores ({@link ExecutionStore} / {@link ApprovalStore}): constructed from the
|
|
48
|
-
* single shared
|
|
48
|
+
* single shared client, all reads flow through one `deserialize` helper.
|
|
49
49
|
*
|
|
50
50
|
* Upserts key on the stable ids (`github_id` for GitHub logins, `slack_user_id`
|
|
51
51
|
* for Slack) — never on `email`, which is non-unique. The GitHub `login` stays
|
|
52
52
|
* the soft join key used everywhere else in the schema.
|
|
53
|
+
*
|
|
54
|
+
* Pure single-table CRUD: it opens no transaction and takes no `dbc`, so every
|
|
55
|
+
* method runs against the root client.
|
|
53
56
|
*/
|
|
54
57
|
export declare class UserStore {
|
|
55
|
-
private
|
|
56
|
-
|
|
58
|
+
private client;
|
|
59
|
+
/**
|
|
60
|
+
* Table objects for THIS client's dialect. Every method destructures what it
|
|
61
|
+
* needs off this instead of importing from `schema/sqlite.js` — see
|
|
62
|
+
* `client.ts` → {@link tablesOf} for why the cast alone cannot do it.
|
|
63
|
+
*/
|
|
64
|
+
private readonly t;
|
|
65
|
+
constructor(client: StateClient);
|
|
57
66
|
/**
|
|
58
67
|
* Upsert a GitHub-authenticated user on their stable numeric id. On conflict,
|
|
59
68
|
* refreshes the mutable identity fields (login/name/email/avatar) and bumps
|
|
@@ -62,6 +71,12 @@ export declare class UserStore {
|
|
|
62
71
|
*
|
|
63
72
|
* `email` is captured here as the future outbound-email hook (issue #205);
|
|
64
73
|
* no sender exists yet.
|
|
74
|
+
*
|
|
75
|
+
* Lookup-then-insert is no longer atomic-by-physics, so a losing racer's
|
|
76
|
+
* insert trips the `github_id` UNIQUE: catch it, re-read, and hand back the
|
|
77
|
+
* winner. Only a same-`github_id` winner counts — a violation on `login`
|
|
78
|
+
* (some other identity already owns that handle) is a genuine conflict and
|
|
79
|
+
* still throws, exactly as it did before.
|
|
65
80
|
*/
|
|
66
81
|
getOrCreateUserByGithub(input: {
|
|
67
82
|
githubId: number;
|
|
@@ -69,31 +84,34 @@ export declare class UserStore {
|
|
|
69
84
|
name?: string | null;
|
|
70
85
|
email?: string | null;
|
|
71
86
|
avatarUrl?: string | null;
|
|
72
|
-
}): User
|
|
87
|
+
}): Promise<User>;
|
|
73
88
|
/**
|
|
74
89
|
* Upsert a Slack-authenticated user. Matches by email to an existing row
|
|
75
90
|
* (typically a GitHub login who signed in with the same corporate address)
|
|
76
91
|
* and links `slack_user_id` onto it; otherwise creates a Slack-only row
|
|
77
92
|
* (no `login`, no `github_id`). Returns the stored row so the caller can
|
|
78
93
|
* carry its `login` (if any) into the session token.
|
|
94
|
+
*
|
|
95
|
+
* As in {@link getOrCreateUserByGithub}, the final insert is guarded: a
|
|
96
|
+
* concurrent Slack login trips the `slack_user_id` UNIQUE and we return the
|
|
97
|
+
* row that won instead.
|
|
79
98
|
*/
|
|
80
99
|
upsertSlackUser(input: {
|
|
81
100
|
slackUserId: string;
|
|
82
101
|
name?: string | null;
|
|
83
102
|
email?: string | null;
|
|
84
|
-
}): User
|
|
103
|
+
}): Promise<User>;
|
|
85
104
|
/** Link a Slack user id onto an existing row (e.g. a GitHub login matched by email). */
|
|
86
|
-
linkSlackUser(userId: string, slackUserId: string): void
|
|
87
|
-
getById(id: string): User | null
|
|
88
|
-
findByGithubId(githubId: number): User | null
|
|
105
|
+
linkSlackUser(userId: string, slackUserId: string): Promise<void>;
|
|
106
|
+
getById(id: string): Promise<User | null>;
|
|
107
|
+
findByGithubId(githubId: number): Promise<User | null>;
|
|
89
108
|
/** Look up by the GitHub login — the soft join key used across the schema. */
|
|
90
|
-
findByLogin(login: string): User | null
|
|
109
|
+
findByLogin(login: string): Promise<User | null>;
|
|
91
110
|
/**
|
|
92
111
|
* First row matching `email`. `email` is non-unique (shared mailboxes), so
|
|
93
112
|
* this returns the earliest-created match deterministically. Used to link a
|
|
94
113
|
* Slack login to an existing GitHub identity by email.
|
|
95
114
|
*/
|
|
96
|
-
findByEmail(email: string): User | null
|
|
97
|
-
findBySlackUserId(slackUserId: string): User | null
|
|
98
|
-
private deserialize;
|
|
115
|
+
findByEmail(email: string): Promise<User | null>;
|
|
116
|
+
findBySlackUserId(slackUserId: string): Promise<User | null>;
|
|
99
117
|
}
|