@patternbank/core 0.1.0 → 0.1.2
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.
- package/README.md +90 -0
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -580,10 +580,12 @@ declare function filterReviewEventsToProblems(events: ReviewEvent[], problemIds:
|
|
|
580
580
|
declare function reviewEventKey(event: ReviewEvent): string;
|
|
581
581
|
/**
|
|
582
582
|
* Two events are the same review when their keys match exactly, or when they
|
|
583
|
-
* hit the same problem within 5 seconds ON THE SAME calendar date
|
|
584
|
-
* timestamp mismatch between platforms). The date
|
|
585
|
-
* behavior: near-midnight events on different dates
|
|
586
|
-
* and must both survive a merge.
|
|
583
|
+
* hit the same problem within 5 seconds ON THE SAME calendar date WITH THE
|
|
584
|
+
* SAME confidence (legacy timestamp mismatch between platforms). The date
|
|
585
|
+
* gate is canonical core behavior: near-midnight events on different dates
|
|
586
|
+
* are distinct streak days and must both survive a merge. The confidence
|
|
587
|
+
* gate keeps a genuine same-day re-rate alive — one review can't carry two
|
|
588
|
+
* ratings, so differing confidence means distinct reviews, not drift.
|
|
587
589
|
*/
|
|
588
590
|
declare function reviewEventsMatch(a: ReviewEvent, b: ReviewEvent): boolean;
|
|
589
591
|
interface MergeReviewEventsOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -580,10 +580,12 @@ declare function filterReviewEventsToProblems(events: ReviewEvent[], problemIds:
|
|
|
580
580
|
declare function reviewEventKey(event: ReviewEvent): string;
|
|
581
581
|
/**
|
|
582
582
|
* Two events are the same review when their keys match exactly, or when they
|
|
583
|
-
* hit the same problem within 5 seconds ON THE SAME calendar date
|
|
584
|
-
* timestamp mismatch between platforms). The date
|
|
585
|
-
* behavior: near-midnight events on different dates
|
|
586
|
-
* and must both survive a merge.
|
|
583
|
+
* hit the same problem within 5 seconds ON THE SAME calendar date WITH THE
|
|
584
|
+
* SAME confidence (legacy timestamp mismatch between platforms). The date
|
|
585
|
+
* gate is canonical core behavior: near-midnight events on different dates
|
|
586
|
+
* are distinct streak days and must both survive a merge. The confidence
|
|
587
|
+
* gate keeps a genuine same-day re-rate alive — one review can't carry two
|
|
588
|
+
* ratings, so differing confidence means distinct reviews, not drift.
|
|
587
589
|
*/
|
|
588
590
|
declare function reviewEventsMatch(a: ReviewEvent, b: ReviewEvent): boolean;
|
|
589
591
|
interface MergeReviewEventsOptions {
|
package/dist/index.js
CHANGED
|
@@ -4607,6 +4607,7 @@ function reviewEventsMatch(a, b) {
|
|
|
4607
4607
|
if (reviewEventKey(a) === reviewEventKey(b)) return true;
|
|
4608
4608
|
if (a.problemId !== b.problemId) return false;
|
|
4609
4609
|
if (a.date !== b.date) return false;
|
|
4610
|
+
if (a.confidence !== b.confidence) return false;
|
|
4610
4611
|
const aTime = timestampMs(a.timestamp);
|
|
4611
4612
|
const bTime = timestampMs(b.timestamp);
|
|
4612
4613
|
if (!aTime || !bTime) return false;
|