memento-mori-jester 0.1.52 → 0.1.53
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to Memento Mori Jester are tracked here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.1.53
|
|
8
|
+
|
|
9
|
+
- Made `npm run fixtures:check` self-contained so it works from the published npm package, where `src/` files are intentionally not shipped.
|
|
10
|
+
- Added a production-readiness guard to prevent the fixture validator from depending on source-only files.
|
|
11
|
+
|
|
7
12
|
## 0.1.52
|
|
8
13
|
|
|
9
14
|
- Added `npm run fixtures:check`, a local fixture authoring validator for duplicate IDs, weak metadata, unsafe-looking content, duplicate content, and explicit expected/absent rule intent.
|
package/ROADMAP.md
CHANGED
|
@@ -6,6 +6,7 @@ Memento Mori Jester is usable today as a CLI, MCP server, GitHub Action, and git
|
|
|
6
6
|
|
|
7
7
|
## Recently Shipped
|
|
8
8
|
|
|
9
|
+
- Published-package fixture validator fix in v0.1.53 so `npm run fixtures:check` works outside a source checkout.
|
|
9
10
|
- Fixture authoring validator in v0.1.52 for duplicate IDs, missing expected/absent rule intent, weak metadata, unsafe-looking content, and duplicate content.
|
|
10
11
|
- Maintainer triage guide in v0.1.51 for turning useful false-positive reports into redacted fixture coverage.
|
|
11
12
|
- Security policy and GitHub issue templates in v0.1.50 for bug reports, false positives, feature requests, and vulnerability intake.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# v0.1.53 Release Notes
|
|
2
|
+
|
|
3
|
+
This patch fixes the newly added fixture authoring validator so it works from the published npm package, not only from a source checkout.
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
- Made `scripts/check-fixtures.mjs` self-contained by removing its source-file reads.
|
|
8
|
+
- Added a production-readiness guard that prevents `fixtures:check` from depending on `src/config.ts` or `src/types.ts`.
|
|
9
|
+
|
|
10
|
+
## Behavior Notes
|
|
11
|
+
|
|
12
|
+
- No CLI, MCP, config, rule, playground, GitHub Action runtime, or release automation behavior changed.
|
|
13
|
+
- Review fixture expectations remain unchanged.
|
|
14
|
+
|
|
15
|
+
## Release Validation
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
npm.cmd test
|
|
19
|
+
npm.cmd run fixtures:check
|
|
20
|
+
npm.cmd run production:check
|
|
21
|
+
npm.cmd run demo:svg:check
|
|
22
|
+
npm.cmd run pack:dry
|
|
23
|
+
git diff --check
|
|
24
|
+
node .\dist\cli.js doctor --json
|
|
25
|
+
git diff | node .\dist\cli.js diff --fail-on block --subject "v0.1.53 published fixture validator fix"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Post-publish smoke:
|
|
29
|
+
|
|
30
|
+
```powershell
|
|
31
|
+
npm.cmd exec --yes --package memento-mori-jester@latest -- npm run fixtures:check --prefix <published-package-path>
|
|
32
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memento-mori-jester",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.53",
|
|
4
4
|
"description": "A local court-jester sidecar for AI coding agents: review plans, commands, diffs, and final claims before they get too pleased with themselves.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -10,20 +10,8 @@ function read(path) {
|
|
|
10
10
|
return readFileSync(join(root, path), "utf8");
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const match = source.match(new RegExp(`export const ${constName} = \\[([^\\]]+)\\] as const`));
|
|
16
|
-
|
|
17
|
-
if (!match) {
|
|
18
|
-
failures.push(`Could not read ${constName} from ${path}.`);
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return [...match[1].matchAll(/"([^"]+)"/g)].map((entry) => entry[1]);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const allowedPresets = new Set(readConstStringArray("src/config.ts", "configPresetNames"));
|
|
26
|
-
const allowedKinds = new Set(readConstStringArray("src/types.ts", "reviewKinds"));
|
|
13
|
+
const allowedPresets = new Set(["default", "node", "python", "web", "api", "infra", "ai", "security"]);
|
|
14
|
+
const allowedKinds = new Set(["plan", "command", "diff", "final"]);
|
|
27
15
|
const allowedVerdicts = new Set(["pass", "caution", "block"]);
|
|
28
16
|
const unsafeContentPatterns = [
|
|
29
17
|
{ name: "private key block", pattern: /-----BEGIN [A-Z ]*PRIVATE KEY-----/ },
|
|
@@ -26,6 +26,13 @@ function requireText(path, pattern, description) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
function forbidText(path, pattern, description) {
|
|
30
|
+
const content = read(path);
|
|
31
|
+
if (pattern.test(content)) {
|
|
32
|
+
failures.push(`${path} should not include ${description}.`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
29
36
|
function requirePackageFile(packageJson, value) {
|
|
30
37
|
if (!Array.isArray(packageJson.files) || !packageJson.files.includes(value)) {
|
|
31
38
|
failures.push(`package.json files should include ${value}.`);
|
|
@@ -107,6 +114,7 @@ requireText("examples/fixtures/README.md", /Adding A Fixture From A Report/, "fi
|
|
|
107
114
|
requireText("examples/fixtures/README.md", /fixtures:check/, "fixture authoring check guidance");
|
|
108
115
|
requireText("scripts/check-fixtures.mjs", /duplicated/, "duplicate fixture id check");
|
|
109
116
|
requireText("scripts/check-fixtures.mjs", /unsafeContentPatterns/, "unsafe fixture content checks");
|
|
117
|
+
forbidText("scripts/check-fixtures.mjs", /src\/config\.ts|src\/types\.ts/, "source-only fixture validator dependencies");
|
|
110
118
|
requireText("package.json", /"fixtures:check": "node scripts\/check-fixtures\.mjs"/, "fixture authoring check script");
|
|
111
119
|
requireText("package.json", /npm run fixtures:check/, "fixture authoring check in npm test");
|
|
112
120
|
requireText("SECURITY.md", /doctor --json/, "doctor JSON redaction guidance");
|