@vue-skuilder/db 0.2.10 → 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.
@@ -2668,7 +2668,7 @@ __export(srs_exports, {
2668
2668
  default: () => SRSNavigator
2669
2669
  });
2670
2670
  import moment from "moment";
2671
- var DEFAULT_HEALTHY_BACKLOG, MAX_BACKLOG_MULTIPLIER, SRSNavigator;
2671
+ var DEFAULT_HEALTHY_BACKLOG, BACKLOG_GROWTH_RATE, SRSNavigator;
2672
2672
  var init_srs = __esm({
2673
2673
  "src/core/navigators/generators/srs.ts"() {
2674
2674
  "use strict";
@@ -2676,7 +2676,7 @@ var init_srs = __esm({
2676
2676
  init_SrsDebugger();
2677
2677
  init_logger();
2678
2678
  DEFAULT_HEALTHY_BACKLOG = 20;
2679
- MAX_BACKLOG_MULTIPLIER = 2;
2679
+ BACKLOG_GROWTH_RATE = 2;
2680
2680
  SRSNavigator = class extends ContentNavigator {
2681
2681
  /** Human-readable name for CardGenerator interface */
2682
2682
  name;
@@ -2798,7 +2798,7 @@ var init_srs = __esm({
2798
2798
  dueNow: dueReviews.length,
2799
2799
  healthyBacklog: this.healthyBacklog,
2800
2800
  backlogMultiplier,
2801
- maxBacklogMultiplier: MAX_BACKLOG_MULTIPLIER,
2801
+ backlogGrowthRate: BACKLOG_GROWTH_RATE,
2802
2802
  topReviewScore: sorted.length > 0 ? sorted[0].score : null,
2803
2803
  nextDueIn,
2804
2804
  timestamp: Date.now()
@@ -2808,25 +2808,30 @@ var init_srs = __esm({
2808
2808
  /**
2809
2809
  * Compute the multiplicative backlog pressure based on number of due reviews.
2810
2810
  *
2811
- * ×1.0 at or below the healthy threshold (no boost), increasing linearly above
2812
- * it and maxing out at MAX_BACKLOG_MULTIPLIER at the healthy backlog.
2811
+ * ×1.0 at or below the healthy threshold (no boost); above it, grows as
2812
+ * BACKLOG_GROWTH_RATE raised to the excess expressed in multiples of the
2813
+ * healthy threshold. Uncapped — self-regulating instead: reviews winning
2814
+ * slots depletes dueCount, which drops the ratio and relaxes the multiplier
2815
+ * next run.
2813
2816
  *
2814
- * Examples (with default healthyBacklog=20, MAX_BACKLOG_MULTIPLIER=2.0):
2815
- * - 10 due reviews → ×1.00 (healthy)
2816
- * - 20 due reviews → ×1.00 (at threshold)
2817
- * - 40 due reviews → ×1.50 (2x threshold)
2818
- * - 60 due reviews → ×2.00 (3x threshold, maxed)
2817
+ * Examples (with default healthyBacklog=20, BACKLOG_GROWTH_RATE=1.5):
2818
+ * - 10 due reviews → ×1.00 (healthy)
2819
+ * - 20 due reviews → ×1.00 (at threshold, ratio 0)
2820
+ * - 40 due reviews → ×1.50 (ratio 1, 2x threshold)
2821
+ * - 60 due reviews → ×2.25 (ratio 2, 3x threshold — old hard cap was ×2.00 here)
2822
+ * - 100 due reviews → ×5.06 (ratio 4, 5x threshold)
2823
+ * - 160 due reviews → ×17.09 (ratio 7, 8x threshold)
2819
2824
  *
2820
2825
  * @param dueCount - Number of reviews currently due
2821
- * @returns Multiplier applied to review urgency (1.0 to MAX_BACKLOG_MULTIPLIER)
2826
+ * @returns Multiplier applied to review urgency (>= 1.0, unbounded)
2822
2827
  */
2823
2828
  computeBacklogMultiplier(dueCount) {
2824
2829
  if (dueCount <= this.healthyBacklog) {
2825
2830
  return 1;
2826
2831
  }
2827
2832
  const excess = dueCount - this.healthyBacklog;
2828
- const multiplier = 1 + excess / this.healthyBacklog * ((MAX_BACKLOG_MULTIPLIER - 1) / 2);
2829
- return Math.min(MAX_BACKLOG_MULTIPLIER, multiplier);
2833
+ const ratio = excess / this.healthyBacklog;
2834
+ return Math.pow(BACKLOG_GROWTH_RATE, ratio);
2830
2835
  }
2831
2836
  /**
2832
2837
  * Compute urgency score for a review card.
@@ -2842,17 +2847,17 @@ var init_srs = __esm({
2842
2847
  * - 180 days → ~0.30
2843
2848
  *
2844
2849
  * 3. Backlog pressure = global *multiplier* when review backlog exceeds the
2845
- * healthy threshold (×1.0 healthy → up to MAX_BACKLOG_MULTIPLIER at ).
2850
+ * healthy threshold (×1.0 healthy → exponential growth, uncapped, above it).
2846
2851
  *
2847
2852
  * Combined: (base 0.5 + urgency factors * 0.45) × backlog multiplier.
2848
2853
  * Per-card range before pressure: ~0.57–0.95. NOT clamped to 1.0 — under a
2849
2854
  * heavy backlog reviews scale onto the open scale to compete with (and exceed)
2850
- * new cards; what keeps them from running away is the bounded multiplier, not
2851
- * a hard ceiling.
2855
+ * new cards; there's no ceiling at all now, so a bad enough backlog always
2856
+ * wins eventually — self-regulating because winning slots depletes dueCount.
2852
2857
  *
2853
2858
  * @param review - The scheduled card to score
2854
2859
  * @param now - Current time
2855
- * @param backlogMultiplier - Pre-computed backlog multiplier (1.0 to MAX_BACKLOG_MULTIPLIER)
2860
+ * @param backlogMultiplier - Pre-computed backlog multiplier (>= 1.0, unbounded)
2856
2861
  */
2857
2862
  computeUrgencyScore(review, now, backlogMultiplier) {
2858
2863
  const scheduledAt = moment.utc(review.scheduledAt);