@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.
@@ -2545,7 +2545,7 @@ __export(srs_exports, {
2545
2545
  default: () => SRSNavigator
2546
2546
  });
2547
2547
  import moment3 from "moment";
2548
- var DEFAULT_HEALTHY_BACKLOG, MAX_BACKLOG_MULTIPLIER, SRSNavigator;
2548
+ var DEFAULT_HEALTHY_BACKLOG, BACKLOG_GROWTH_RATE, SRSNavigator;
2549
2549
  var init_srs = __esm({
2550
2550
  "src/core/navigators/generators/srs.ts"() {
2551
2551
  "use strict";
@@ -2553,7 +2553,7 @@ var init_srs = __esm({
2553
2553
  init_SrsDebugger();
2554
2554
  init_logger();
2555
2555
  DEFAULT_HEALTHY_BACKLOG = 20;
2556
- MAX_BACKLOG_MULTIPLIER = 2;
2556
+ BACKLOG_GROWTH_RATE = 2;
2557
2557
  SRSNavigator = class extends ContentNavigator {
2558
2558
  /** Human-readable name for CardGenerator interface */
2559
2559
  name;
@@ -2675,7 +2675,7 @@ var init_srs = __esm({
2675
2675
  dueNow: dueReviews.length,
2676
2676
  healthyBacklog: this.healthyBacklog,
2677
2677
  backlogMultiplier,
2678
- maxBacklogMultiplier: MAX_BACKLOG_MULTIPLIER,
2678
+ backlogGrowthRate: BACKLOG_GROWTH_RATE,
2679
2679
  topReviewScore: sorted.length > 0 ? sorted[0].score : null,
2680
2680
  nextDueIn,
2681
2681
  timestamp: Date.now()
@@ -2685,25 +2685,30 @@ var init_srs = __esm({
2685
2685
  /**
2686
2686
  * Compute the multiplicative backlog pressure based on number of due reviews.
2687
2687
  *
2688
- * ×1.0 at or below the healthy threshold (no boost), increasing linearly above
2689
- * it and maxing out at MAX_BACKLOG_MULTIPLIER at the healthy backlog.
2688
+ * ×1.0 at or below the healthy threshold (no boost); above it, grows as
2689
+ * BACKLOG_GROWTH_RATE raised to the excess expressed in multiples of the
2690
+ * healthy threshold. Uncapped — self-regulating instead: reviews winning
2691
+ * slots depletes dueCount, which drops the ratio and relaxes the multiplier
2692
+ * next run.
2690
2693
  *
2691
- * Examples (with default healthyBacklog=20, MAX_BACKLOG_MULTIPLIER=2.0):
2692
- * - 10 due reviews → ×1.00 (healthy)
2693
- * - 20 due reviews → ×1.00 (at threshold)
2694
- * - 40 due reviews → ×1.50 (2x threshold)
2695
- * - 60 due reviews → ×2.00 (3x threshold, maxed)
2694
+ * Examples (with default healthyBacklog=20, BACKLOG_GROWTH_RATE=1.5):
2695
+ * - 10 due reviews → ×1.00 (healthy)
2696
+ * - 20 due reviews → ×1.00 (at threshold, ratio 0)
2697
+ * - 40 due reviews → ×1.50 (ratio 1, 2x threshold)
2698
+ * - 60 due reviews → ×2.25 (ratio 2, 3x threshold — old hard cap was ×2.00 here)
2699
+ * - 100 due reviews → ×5.06 (ratio 4, 5x threshold)
2700
+ * - 160 due reviews → ×17.09 (ratio 7, 8x threshold)
2696
2701
  *
2697
2702
  * @param dueCount - Number of reviews currently due
2698
- * @returns Multiplier applied to review urgency (1.0 to MAX_BACKLOG_MULTIPLIER)
2703
+ * @returns Multiplier applied to review urgency (>= 1.0, unbounded)
2699
2704
  */
2700
2705
  computeBacklogMultiplier(dueCount) {
2701
2706
  if (dueCount <= this.healthyBacklog) {
2702
2707
  return 1;
2703
2708
  }
2704
2709
  const excess = dueCount - this.healthyBacklog;
2705
- const multiplier = 1 + excess / this.healthyBacklog * ((MAX_BACKLOG_MULTIPLIER - 1) / 2);
2706
- return Math.min(MAX_BACKLOG_MULTIPLIER, multiplier);
2710
+ const ratio = excess / this.healthyBacklog;
2711
+ return Math.pow(BACKLOG_GROWTH_RATE, ratio);
2707
2712
  }
2708
2713
  /**
2709
2714
  * Compute urgency score for a review card.
@@ -2719,17 +2724,17 @@ var init_srs = __esm({
2719
2724
  * - 180 days → ~0.30
2720
2725
  *
2721
2726
  * 3. Backlog pressure = global *multiplier* when review backlog exceeds the
2722
- * healthy threshold (×1.0 healthy → up to MAX_BACKLOG_MULTIPLIER at ).
2727
+ * healthy threshold (×1.0 healthy → exponential growth, uncapped, above it).
2723
2728
  *
2724
2729
  * Combined: (base 0.5 + urgency factors * 0.45) × backlog multiplier.
2725
2730
  * Per-card range before pressure: ~0.57–0.95. NOT clamped to 1.0 — under a
2726
2731
  * heavy backlog reviews scale onto the open scale to compete with (and exceed)
2727
- * new cards; what keeps them from running away is the bounded multiplier, not
2728
- * a hard ceiling.
2732
+ * new cards; there's no ceiling at all now, so a bad enough backlog always
2733
+ * wins eventually — self-regulating because winning slots depletes dueCount.
2729
2734
  *
2730
2735
  * @param review - The scheduled card to score
2731
2736
  * @param now - Current time
2732
- * @param backlogMultiplier - Pre-computed backlog multiplier (1.0 to MAX_BACKLOG_MULTIPLIER)
2737
+ * @param backlogMultiplier - Pre-computed backlog multiplier (>= 1.0, unbounded)
2733
2738
  */
2734
2739
  computeUrgencyScore(review, now, backlogMultiplier) {
2735
2740
  const scheduledAt = moment3.utc(review.scheduledAt);