limn-review 0.1.185 → 0.1.186
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.
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- MY TURN "Merged after your Limn approved" counts only merges from the moment the card type
|
|
2
|
+
-- reached this install — an upgrade must not drop every recent approved-then-merged PR on My Turn.
|
|
3
|
+
-- NULL (an account created later) reads as that account's own `created_at`.
|
|
4
|
+
ALTER TABLE `accounts` ADD `approved_merged_since` integer;
|
|
5
|
+
--> statement-breakpoint
|
|
6
|
+
UPDATE `accounts` SET `approved_merged_since` = unixepoch();
|
|
@@ -1184,6 +1184,13 @@
|
|
|
1184
1184
|
"when": 1792224079016,
|
|
1185
1185
|
"tag": "0168_ai_review_seen_per_run",
|
|
1186
1186
|
"breakpoints": true
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"idx": 169,
|
|
1190
|
+
"version": "6",
|
|
1191
|
+
"when": 1792310479016,
|
|
1192
|
+
"tag": "0169_approved_merged_since",
|
|
1193
|
+
"breakpoints": true
|
|
1187
1194
|
}
|
|
1188
1195
|
]
|
|
1189
1196
|
}
|
package/dist/db/queries.js
CHANGED
|
@@ -8354,7 +8354,8 @@ repoIds) {
|
|
|
8354
8354
|
/**
|
|
8355
8355
|
* MERGED AFTER YOUR LIMN APPROVED IT — the My Turn `ai_approved_merged` section's seeds (docs/BACKEND.md
|
|
8356
8356
|
* § My Turn). One item per merged PR in scope, merged within `APPROVED_MERGED_DAYS` of `now` and at or
|
|
8357
|
-
* after the repo's onboarding floor (`passesFloor`)
|
|
8357
|
+
* after the repo's onboarding floor (`passesFloor`) AND the account's `approvedMergedSince` (going forward
|
|
8358
|
+
* only — never retrospective), where:
|
|
8358
8359
|
* • an OWN run's auto-post LANDED a review SENT as APPROVE (`auto_post.githubReviewId` set,
|
|
8359
8360
|
* `verdict.submitted = 'APPROVE'`) before the merge — a pair's one review is recorded on both
|
|
8360
8361
|
* halves, so the earliest record wins;
|
|
@@ -8364,7 +8365,15 @@ repoIds) {
|
|
|
8364
8365
|
* DB only, account-scoped. The dismissal filter is applied by `getMyTurn`.
|
|
8365
8366
|
*/
|
|
8366
8367
|
export async function getApprovedThenMerged(accountId, repoIds, now, passesFloor) {
|
|
8367
|
-
|
|
8368
|
+
// ⚠ GOING FORWARD ONLY: no merge before the card type reached this account counts
|
|
8369
|
+
// (`accounts.approvedMergedSince`, NULL = the account's own `createdAt`).
|
|
8370
|
+
const [acct] = await db
|
|
8371
|
+
.select({ since: schema.accounts.approvedMergedSince, createdAt: schema.accounts.createdAt })
|
|
8372
|
+
.from(schema.accounts)
|
|
8373
|
+
.where(eq(schema.accounts.id, accountId))
|
|
8374
|
+
.execute();
|
|
8375
|
+
const sinceMs = (acct?.since ?? acct?.createdAt)?.getTime() ?? now;
|
|
8376
|
+
const from = new Date(Math.max(now - APPROVED_MERGED_DAYS * 86_400_000, sinceMs));
|
|
8368
8377
|
const rows = await db
|
|
8369
8378
|
.select({
|
|
8370
8379
|
reviewId: claudeReviews.id,
|
package/dist/db/schema.sqlite.js
CHANGED
|
@@ -63,6 +63,10 @@ export const accounts = sqliteTable('accounts', {
|
|
|
63
63
|
// a positive integer the user typed (the route rejects anything else), so a reader that sees
|
|
64
64
|
// null knows the user never expressed an opinion, rather than guessing at a sentinel.
|
|
65
65
|
largePrCodeLocThreshold: integer('large_pr_code_loc_threshold'),
|
|
66
|
+
// MY TURN "Merged after your Limn approved" starts HERE, never retrospectively: only merges at or
|
|
67
|
+
// after this moment make a card. Migration 0169 stamps existing accounts with the upgrade time;
|
|
68
|
+
// NULL (an account created later) reads as the account's own `createdAt`.
|
|
69
|
+
approvedMergedSince: integer('approved_merged_since', { mode: 'timestamp' }),
|
|
66
70
|
// BLAST RADIUS reading settings: `{sensitivity, surfacesOff[], overrides?}` — the dial, the
|
|
67
71
|
// per-account surface opt-out, and (stored, honoured, no UI in v1) numeric overrides. Same
|
|
68
72
|
// ACCOUNT grain and same two-state rule as the threshold above: NULL means the user has never
|
package/package.json
CHANGED