@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.
@@ -2689,7 +2689,7 @@ var srs_exports = {};
2689
2689
  __export(srs_exports, {
2690
2690
  default: () => SRSNavigator
2691
2691
  });
2692
- var import_moment, DEFAULT_HEALTHY_BACKLOG, MAX_BACKLOG_MULTIPLIER, SRSNavigator;
2692
+ var import_moment, DEFAULT_HEALTHY_BACKLOG, BACKLOG_GROWTH_RATE, SRSNavigator;
2693
2693
  var init_srs = __esm({
2694
2694
  "src/core/navigators/generators/srs.ts"() {
2695
2695
  "use strict";
@@ -2698,7 +2698,7 @@ var init_srs = __esm({
2698
2698
  init_SrsDebugger();
2699
2699
  init_logger();
2700
2700
  DEFAULT_HEALTHY_BACKLOG = 20;
2701
- MAX_BACKLOG_MULTIPLIER = 2;
2701
+ BACKLOG_GROWTH_RATE = 2;
2702
2702
  SRSNavigator = class extends ContentNavigator {
2703
2703
  /** Human-readable name for CardGenerator interface */
2704
2704
  name;
@@ -2820,7 +2820,7 @@ var init_srs = __esm({
2820
2820
  dueNow: dueReviews.length,
2821
2821
  healthyBacklog: this.healthyBacklog,
2822
2822
  backlogMultiplier,
2823
- maxBacklogMultiplier: MAX_BACKLOG_MULTIPLIER,
2823
+ backlogGrowthRate: BACKLOG_GROWTH_RATE,
2824
2824
  topReviewScore: sorted.length > 0 ? sorted[0].score : null,
2825
2825
  nextDueIn,
2826
2826
  timestamp: Date.now()
@@ -2830,25 +2830,30 @@ var init_srs = __esm({
2830
2830
  /**
2831
2831
  * Compute the multiplicative backlog pressure based on number of due reviews.
2832
2832
  *
2833
- * ×1.0 at or below the healthy threshold (no boost), increasing linearly above
2834
- * it and maxing out at MAX_BACKLOG_MULTIPLIER at the healthy backlog.
2833
+ * ×1.0 at or below the healthy threshold (no boost); above it, grows as
2834
+ * BACKLOG_GROWTH_RATE raised to the excess expressed in multiples of the
2835
+ * healthy threshold. Uncapped — self-regulating instead: reviews winning
2836
+ * slots depletes dueCount, which drops the ratio and relaxes the multiplier
2837
+ * next run.
2835
2838
  *
2836
- * Examples (with default healthyBacklog=20, MAX_BACKLOG_MULTIPLIER=2.0):
2837
- * - 10 due reviews → ×1.00 (healthy)
2838
- * - 20 due reviews → ×1.00 (at threshold)
2839
- * - 40 due reviews → ×1.50 (2x threshold)
2840
- * - 60 due reviews → ×2.00 (3x threshold, maxed)
2839
+ * Examples (with default healthyBacklog=20, BACKLOG_GROWTH_RATE=1.5):
2840
+ * - 10 due reviews → ×1.00 (healthy)
2841
+ * - 20 due reviews → ×1.00 (at threshold, ratio 0)
2842
+ * - 40 due reviews → ×1.50 (ratio 1, 2x threshold)
2843
+ * - 60 due reviews → ×2.25 (ratio 2, 3x threshold — old hard cap was ×2.00 here)
2844
+ * - 100 due reviews → ×5.06 (ratio 4, 5x threshold)
2845
+ * - 160 due reviews → ×17.09 (ratio 7, 8x threshold)
2841
2846
  *
2842
2847
  * @param dueCount - Number of reviews currently due
2843
- * @returns Multiplier applied to review urgency (1.0 to MAX_BACKLOG_MULTIPLIER)
2848
+ * @returns Multiplier applied to review urgency (>= 1.0, unbounded)
2844
2849
  */
2845
2850
  computeBacklogMultiplier(dueCount) {
2846
2851
  if (dueCount <= this.healthyBacklog) {
2847
2852
  return 1;
2848
2853
  }
2849
2854
  const excess = dueCount - this.healthyBacklog;
2850
- const multiplier = 1 + excess / this.healthyBacklog * ((MAX_BACKLOG_MULTIPLIER - 1) / 2);
2851
- return Math.min(MAX_BACKLOG_MULTIPLIER, multiplier);
2855
+ const ratio = excess / this.healthyBacklog;
2856
+ return Math.pow(BACKLOG_GROWTH_RATE, ratio);
2852
2857
  }
2853
2858
  /**
2854
2859
  * Compute urgency score for a review card.
@@ -2864,17 +2869,17 @@ var init_srs = __esm({
2864
2869
  * - 180 days → ~0.30
2865
2870
  *
2866
2871
  * 3. Backlog pressure = global *multiplier* when review backlog exceeds the
2867
- * healthy threshold (×1.0 healthy → up to MAX_BACKLOG_MULTIPLIER at ).
2872
+ * healthy threshold (×1.0 healthy → exponential growth, uncapped, above it).
2868
2873
  *
2869
2874
  * Combined: (base 0.5 + urgency factors * 0.45) × backlog multiplier.
2870
2875
  * Per-card range before pressure: ~0.57–0.95. NOT clamped to 1.0 — under a
2871
2876
  * heavy backlog reviews scale onto the open scale to compete with (and exceed)
2872
- * new cards; what keeps them from running away is the bounded multiplier, not
2873
- * a hard ceiling.
2877
+ * new cards; there's no ceiling at all now, so a bad enough backlog always
2878
+ * wins eventually — self-regulating because winning slots depletes dueCount.
2874
2879
  *
2875
2880
  * @param review - The scheduled card to score
2876
2881
  * @param now - Current time
2877
- * @param backlogMultiplier - Pre-computed backlog multiplier (1.0 to MAX_BACKLOG_MULTIPLIER)
2882
+ * @param backlogMultiplier - Pre-computed backlog multiplier (>= 1.0, unbounded)
2878
2883
  */
2879
2884
  computeUrgencyScore(review, now, backlogMultiplier) {
2880
2885
  const scheduledAt = import_moment.default.utc(review.scheduledAt);