mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 21:22:43 +00:00
feat(srs): switch ladder to +3/+7 and enforce rest‑day logic
This commit is contained in:
1 parent
7e46fceb1c
commit
38fbb18f32
12 files changed
+140
-161
No files matched your search
@@ -44,7 +44,7 @@ async function mirrorOutcome(env: Env, outcome: LogOutcome, source: string): Pro
|
||||
try {
|
||||
await gh.closeIssue(
|
||||
outcome.issue,
|
||||
`First attempt passed (${outcome.kind}, via ${source}) — entering the review ladder at +2. Logged by the SRS Worker.`,
|
||||
`First attempt passed (${outcome.kind}, via ${source}) — entering the review ladder at +3. Logged by the SRS Worker.`,
|
||||
);
|
||||
} catch (err) {
|
||||
console.warn(`close #${outcome.issue}: ${err}`);
|
||||
@@ -96,7 +96,7 @@ async function handleTap(request: Request, env: Env, ctx: ExecutionContext): Pro
|
||||
}
|
||||
ctx.waitUntil(mirrorOutcome(env, outcome, "email"));
|
||||
return page(
|
||||
result === "pass" ? "Logged ✅" : "Logged — back to +2",
|
||||
result === "pass" ? "Logged ✅" : "Logged — back to +3",
|
||||
outcomeLine(outcome),
|
||||
);
|
||||
}
|
||||
@@ -232,7 +232,7 @@ async function handleSolved(request: Request, env: Env, date: string): Promise<R
|
||||
const p = await getProblem(env.DB, lc);
|
||||
if (!p) skipped.push(`LC ${lc} is not in the curriculum`);
|
||||
else if (p.stage !== "new") skipped.push(`LC ${lc}: already at stage ${p.stage}`);
|
||||
else logged.push(`LC ${lc}: would enter the ladder at +2`);
|
||||
else logged.push(`LC ${lc}: would enter the ladder at +3`);
|
||||
continue;
|
||||
}
|
||||
const outcome = await logAttempt(env.DB, { lc, date, result: "pass", source: "commit" });
|
||||
|
||||
Reference in new issue
Block a user