@jwilger/pi-development-system 0.29.0 → 0.30.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
CHANGED
package/src/core/review-flow.ts
CHANGED
|
@@ -31,7 +31,7 @@ export type DiffNow = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
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$/;
|
|
34
|
+
export const DECISION_LOG = /^docs\/decisions\/\d{4}-\d{2}\.md$/;
|
|
35
35
|
|
|
36
36
|
/** Every file in the current diff was in the last round's diff, byte for byte: a part of what was reviewed. */
|
|
37
37
|
const coveredByLastRound = (review: ReviewState, now: DiffNow): boolean => {
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "../core/commit-message.ts";
|
|
15
15
|
import type { Exec } from "../core/exec.ts";
|
|
16
16
|
import { resolveGit } from "../core/git-invocations.ts";
|
|
17
|
-
import { reviewGap } from "../core/review-flow.ts";
|
|
17
|
+
import { DECISION_LOG, reviewGap } from "../core/review-flow.ts";
|
|
18
18
|
import { type GateId, isParseError, parseGateId } from "../core/types.ts";
|
|
19
19
|
import type { Jev } from "../jev/client.ts";
|
|
20
20
|
import { judgeCommit, MIX_THRESHOLD, RATIONALE_FLOOR } from "../jev/questions/commit.ts";
|
|
@@ -176,7 +176,9 @@ const stagedThenEdited = (
|
|
|
176
176
|
.filter((i) => (i.sub === "commit" || i.sub === "add") && !isDryRun(i) && inThisDir(i, cwd))
|
|
177
177
|
.flatMap((i) => i.args.filter((a) => !a.startsWith("-")).map(cleanPath));
|
|
178
178
|
const covered = (name: string) => named.some((n) => name === n || name.startsWith(`${n}/`));
|
|
179
|
-
return names.staged.filter(
|
|
179
|
+
return names.staged.filter(
|
|
180
|
+
(name) => names.unstaged.includes(name) && !covered(name) && !DECISION_LOG.test(name),
|
|
181
|
+
);
|
|
180
182
|
};
|
|
181
183
|
|
|
182
184
|
const cleanPath = (arg: string): string => arg.replace(/^(\.\/)+/, "").replace(/\/+$/, "");
|