@vue-skuilder/db 0.2.11 → 0.2.12

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.
@@ -21,10 +21,10 @@ interface SrsBacklogDebug {
21
21
  dueNow: number;
22
22
  /** Healthy backlog threshold; multiplier is ×1.0 at or below this. */
23
23
  healthyBacklog: number;
24
- /** Global multiplier applied to every due review's urgency this run (1.0 → max). */
24
+ /** Global multiplier applied to every due review's urgency this run (>= 1.0, unbounded). */
25
25
  backlogMultiplier: number;
26
- /** Max achievable backlog multiplier (the cap), for headroom context. */
27
- maxBacklogMultiplier: number;
26
+ /** Exponential growth-rate base the multiplier climbs by per multiple of healthyBacklog excess. */
27
+ backlogGrowthRate: number;
28
28
  /** Highest review score produced this run (post-multiplier; can exceed 1.0); null if none due. */
29
29
  topReviewScore: number | null;
30
30
  /** Human-readable time until the next review comes due, or null if some are due now. */
@@ -21,10 +21,10 @@ interface SrsBacklogDebug {
21
21
  dueNow: number;
22
22
  /** Healthy backlog threshold; multiplier is ×1.0 at or below this. */
23
23
  healthyBacklog: number;
24
- /** Global multiplier applied to every due review's urgency this run (1.0 → max). */
24
+ /** Global multiplier applied to every due review's urgency this run (>= 1.0, unbounded). */
25
25
  backlogMultiplier: number;
26
- /** Max achievable backlog multiplier (the cap), for headroom context. */
27
- maxBacklogMultiplier: number;
26
+ /** Exponential growth-rate base the multiplier climbs by per multiple of healthyBacklog excess. */
27
+ backlogGrowthRate: number;
28
28
  /** Highest review score produced this run (post-multiplier; can exceed 1.0); null if none due. */
29
29
  topReviewScore: number | null;
30
30
  /** Human-readable time until the next review comes due, or null if some are due now. */
@@ -2765,7 +2765,7 @@ var srs_exports = {};
2765
2765
  __export(srs_exports, {
2766
2766
  default: () => SRSNavigator
2767
2767
  });
2768
- var import_moment3, DEFAULT_HEALTHY_BACKLOG, MAX_BACKLOG_MULTIPLIER, SRSNavigator;
2768
+ var import_moment3, DEFAULT_HEALTHY_BACKLOG, BACKLOG_GROWTH_RATE, SRSNavigator;
2769
2769
  var init_srs = __esm({
2770
2770
  "src/core/navigators/generators/srs.ts"() {
2771
2771
  "use strict";
@@ -2774,7 +2774,7 @@ var init_srs = __esm({
2774
2774
  init_SrsDebugger();
2775
2775
  init_logger();
2776
2776
  DEFAULT_HEALTHY_BACKLOG = 20;
2777
- MAX_BACKLOG_MULTIPLIER = 2;
2777
+ BACKLOG_GROWTH_RATE = 2;
2778
2778
  SRSNavigator = class extends ContentNavigator {
2779
2779
  /** Human-readable name for CardGenerator interface */
2780
2780
  name;
@@ -2896,7 +2896,7 @@ var init_srs = __esm({
2896
2896
  dueNow: dueReviews.length,
2897
2897
  healthyBacklog: this.healthyBacklog,
2898
2898
  backlogMultiplier,
2899
- maxBacklogMultiplier: MAX_BACKLOG_MULTIPLIER,
2899
+ backlogGrowthRate: BACKLOG_GROWTH_RATE,
2900
2900
  topReviewScore: sorted.length > 0 ? sorted[0].score : null,
2901
2901
  nextDueIn,
2902
2902
  timestamp: Date.now()
@@ -2906,25 +2906,30 @@ var init_srs = __esm({
2906
2906
  /**
2907
2907
  * Compute the multiplicative backlog pressure based on number of due reviews.
2908
2908
  *
2909
- * ×1.0 at or below the healthy threshold (no boost), increasing linearly above
2910
- * it and maxing out at MAX_BACKLOG_MULTIPLIER at the healthy backlog.
2909
+ * ×1.0 at or below the healthy threshold (no boost); above it, grows as
2910
+ * BACKLOG_GROWTH_RATE raised to the excess expressed in multiples of the
2911
+ * healthy threshold. Uncapped — self-regulating instead: reviews winning
2912
+ * slots depletes dueCount, which drops the ratio and relaxes the multiplier
2913
+ * next run.
2911
2914
  *
2912
- * Examples (with default healthyBacklog=20, MAX_BACKLOG_MULTIPLIER=2.0):
2913
- * - 10 due reviews → ×1.00 (healthy)
2914
- * - 20 due reviews → ×1.00 (at threshold)
2915
- * - 40 due reviews → ×1.50 (2x threshold)
2916
- * - 60 due reviews → ×2.00 (3x threshold, maxed)
2915
+ * Examples (with default healthyBacklog=20, BACKLOG_GROWTH_RATE=1.5):
2916
+ * - 10 due reviews → ×1.00 (healthy)
2917
+ * - 20 due reviews → ×1.00 (at threshold, ratio 0)
2918
+ * - 40 due reviews → ×1.50 (ratio 1, 2x threshold)
2919
+ * - 60 due reviews → ×2.25 (ratio 2, 3x threshold — old hard cap was ×2.00 here)
2920
+ * - 100 due reviews → ×5.06 (ratio 4, 5x threshold)
2921
+ * - 160 due reviews → ×17.09 (ratio 7, 8x threshold)
2917
2922
  *
2918
2923
  * @param dueCount - Number of reviews currently due
2919
- * @returns Multiplier applied to review urgency (1.0 to MAX_BACKLOG_MULTIPLIER)
2924
+ * @returns Multiplier applied to review urgency (>= 1.0, unbounded)
2920
2925
  */
2921
2926
  computeBacklogMultiplier(dueCount) {
2922
2927
  if (dueCount <= this.healthyBacklog) {
2923
2928
  return 1;
2924
2929
  }
2925
2930
  const excess = dueCount - this.healthyBacklog;
2926
- const multiplier = 1 + excess / this.healthyBacklog * ((MAX_BACKLOG_MULTIPLIER - 1) / 2);
2927
- return Math.min(MAX_BACKLOG_MULTIPLIER, multiplier);
2931
+ const ratio = excess / this.healthyBacklog;
2932
+ return Math.pow(BACKLOG_GROWTH_RATE, ratio);
2928
2933
  }
2929
2934
  /**
2930
2935
  * Compute urgency score for a review card.
@@ -2940,17 +2945,17 @@ var init_srs = __esm({
2940
2945
  * - 180 days → ~0.30
2941
2946
  *
2942
2947
  * 3. Backlog pressure = global *multiplier* when review backlog exceeds the
2943
- * healthy threshold (×1.0 healthy → up to MAX_BACKLOG_MULTIPLIER at ).
2948
+ * healthy threshold (×1.0 healthy → exponential growth, uncapped, above it).
2944
2949
  *
2945
2950
  * Combined: (base 0.5 + urgency factors * 0.45) × backlog multiplier.
2946
2951
  * Per-card range before pressure: ~0.57–0.95. NOT clamped to 1.0 — under a
2947
2952
  * heavy backlog reviews scale onto the open scale to compete with (and exceed)
2948
- * new cards; what keeps them from running away is the bounded multiplier, not
2949
- * a hard ceiling.
2953
+ * new cards; there's no ceiling at all now, so a bad enough backlog always
2954
+ * wins eventually — self-regulating because winning slots depletes dueCount.
2950
2955
  *
2951
2956
  * @param review - The scheduled card to score
2952
2957
  * @param now - Current time
2953
- * @param backlogMultiplier - Pre-computed backlog multiplier (1.0 to MAX_BACKLOG_MULTIPLIER)
2958
+ * @param backlogMultiplier - Pre-computed backlog multiplier (>= 1.0, unbounded)
2954
2959
  */
2955
2960
  computeUrgencyScore(review, now, backlogMultiplier) {
2956
2961
  const scheduledAt = import_moment3.default.utc(review.scheduledAt);