@jwilger/pi-development-system 0.28.0 → 0.29.0
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/package.json +1 -1
- package/src/core/review-flow.ts +6 -1
package/package.json
CHANGED
package/src/core/review-flow.ts
CHANGED
|
@@ -30,11 +30,16 @@ export type DiffNow = {
|
|
|
30
30
|
readonly files?: Readonly<Record<string, string>>;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
// The departure log is the system's own record (devsys_record_departure writes it), not work under review.
|
|
34
|
+
const DECISION_LOG = /^docs\/decisions\/\d{4}-\d{2}\.md$/;
|
|
35
|
+
|
|
33
36
|
/** Every file in the current diff was in the last round's diff, byte for byte: a part of what was reviewed. */
|
|
34
37
|
const coveredByLastRound = (review: ReviewState, now: DiffNow): boolean => {
|
|
35
38
|
const reviewed = review.rounds.at(-1)?.files;
|
|
36
39
|
if (reviewed === undefined || now.files === undefined) return false;
|
|
37
|
-
return Object.entries(now.files).every(
|
|
40
|
+
return Object.entries(now.files).every(
|
|
41
|
+
([path, digest]) => reviewed[path] === digest || DECISION_LOG.test(path),
|
|
42
|
+
);
|
|
38
43
|
};
|
|
39
44
|
|
|
40
45
|
export function reviewGap(state: DevsysState, slice: SliceRef, now: DiffNow): string | undefined {
|