@mmnto/totem 1.14.14 → 1.14.16
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/dist/compile-lesson.d.ts +7 -0
- package/dist/compile-lesson.d.ts.map +1 -1
- package/dist/compile-lesson.js +67 -15
- package/dist/compile-lesson.js.map +1 -1
- package/dist/compile-lesson.test.js +222 -10
- package/dist/compile-lesson.test.js.map +1 -1
- package/dist/compile-smoke-gate.d.ts +10 -6
- package/dist/compile-smoke-gate.d.ts.map +1 -1
- package/dist/compile-smoke-gate.js +17 -13
- package/dist/compile-smoke-gate.js.map +1 -1
- package/dist/compile-smoke-gate.test.js +42 -0
- package/dist/compile-smoke-gate.test.js.map +1 -1
- package/dist/compiler-schema.d.ts +93 -16
- package/dist/compiler-schema.d.ts.map +1 -1
- package/dist/compiler-schema.js +67 -1
- package/dist/compiler-schema.js.map +1 -1
- package/dist/compiler-schema.test.js +166 -0
- package/dist/compiler-schema.test.js.map +1 -1
- package/dist/compiler.test.js +9 -2
- package/dist/compiler.test.js.map +1 -1
- package/dist/lesson-pattern.d.ts +12 -0
- package/dist/lesson-pattern.d.ts.map +1 -1
- package/dist/lesson-pattern.js +23 -0
- package/dist/lesson-pattern.js.map +1 -1
- package/dist/lesson-pattern.test.js +93 -1
- package/dist/lesson-pattern.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -76,6 +76,16 @@ export declare const CompiledRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
76
76
|
* 1.14.9; flips to required when #1408 turns on the gate.
|
|
77
77
|
*/
|
|
78
78
|
badExample: z.ZodOptional<z.ZodString>;
|
|
79
|
+
/**
|
|
80
|
+
* Optional code snippet the rule MUST NOT match. mmnto-ai/totem#1580
|
|
81
|
+
* added the over-matching check: the compile-time smoke gate runs the
|
|
82
|
+
* rule against `goodExample` and rejects it with reason code
|
|
83
|
+
* `'matches-good-example'` if the pattern fires. Optional at the
|
|
84
|
+
* persisted-rule boundary for backward compatibility with pre-#1580
|
|
85
|
+
* rules; `CompilerOutputSchema` requires it for regex and ast-grep
|
|
86
|
+
* producers (see `refineGoodExampleRequired`).
|
|
87
|
+
*/
|
|
88
|
+
goodExample: z.ZodOptional<z.ZodString>;
|
|
79
89
|
/** ISO timestamp of when this rule was compiled */
|
|
80
90
|
compiledAt: z.ZodString;
|
|
81
91
|
/** ISO timestamp of when this rule was first created (survives recompilation) */
|
|
@@ -90,6 +100,17 @@ export declare const CompiledRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
90
100
|
status: z.ZodOptional<z.ZodEnum<["active", "archived"]>>;
|
|
91
101
|
/** Reason for archiving (when status is 'archived') */
|
|
92
102
|
archivedReason: z.ZodOptional<z.ZodString>;
|
|
103
|
+
/**
|
|
104
|
+
* ISO timestamp of when the rule was first archived (mmnto-ai/totem#1589).
|
|
105
|
+
* Preserved across compile-write round-trips so the institutional-ledger
|
|
106
|
+
* semantic of first-archive-provenance survives. Pre-#1589 Zod parses
|
|
107
|
+
* silently stripped this field during schema round-trips; every compile
|
|
108
|
+
* cycle erased prior `archivedAt` values from the rules file. Postmerge
|
|
109
|
+
* archive scripts (`scripts/archive-postmerge-*.cjs`) set this via raw
|
|
110
|
+
* JSON mutation; the field is additive on the schema side so manual
|
|
111
|
+
* archive workflows survive a subsequent `totem lesson compile --export`.
|
|
112
|
+
*/
|
|
113
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
93
114
|
/**
|
|
94
115
|
* True for rules generated by Pipeline 1 (manual `**Pattern:**` blocks). Set to
|
|
95
116
|
* `true` in `buildManualRule`. Used by `doctor.ts:checkUpgradeCandidates` and
|
|
@@ -139,11 +160,13 @@ export declare const CompiledRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
139
160
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
140
161
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
141
162
|
badExample?: string | undefined;
|
|
163
|
+
goodExample?: string | undefined;
|
|
142
164
|
createdAt?: string | undefined;
|
|
143
165
|
fileGlobs?: string[] | undefined;
|
|
144
166
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
145
167
|
severity?: "error" | "warning" | undefined;
|
|
146
168
|
archivedReason?: string | undefined;
|
|
169
|
+
archivedAt?: string | undefined;
|
|
147
170
|
manual?: boolean | undefined;
|
|
148
171
|
immutable?: boolean | undefined;
|
|
149
172
|
unverified?: boolean | undefined;
|
|
@@ -161,11 +184,13 @@ export declare const CompiledRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
161
184
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
162
185
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
163
186
|
badExample?: string | undefined;
|
|
187
|
+
goodExample?: string | undefined;
|
|
164
188
|
createdAt?: string | undefined;
|
|
165
189
|
fileGlobs?: string[] | undefined;
|
|
166
190
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
167
191
|
severity?: "error" | "warning" | undefined;
|
|
168
192
|
archivedReason?: string | undefined;
|
|
193
|
+
archivedAt?: string | undefined;
|
|
169
194
|
manual?: boolean | undefined;
|
|
170
195
|
immutable?: boolean | undefined;
|
|
171
196
|
unverified?: boolean | undefined;
|
|
@@ -183,11 +208,13 @@ export declare const CompiledRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
183
208
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
184
209
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
185
210
|
badExample?: string | undefined;
|
|
211
|
+
goodExample?: string | undefined;
|
|
186
212
|
createdAt?: string | undefined;
|
|
187
213
|
fileGlobs?: string[] | undefined;
|
|
188
214
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
189
215
|
severity?: "error" | "warning" | undefined;
|
|
190
216
|
archivedReason?: string | undefined;
|
|
217
|
+
archivedAt?: string | undefined;
|
|
191
218
|
manual?: boolean | undefined;
|
|
192
219
|
immutable?: boolean | undefined;
|
|
193
220
|
unverified?: boolean | undefined;
|
|
@@ -205,11 +232,13 @@ export declare const CompiledRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
205
232
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
206
233
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
207
234
|
badExample?: string | undefined;
|
|
235
|
+
goodExample?: string | undefined;
|
|
208
236
|
createdAt?: string | undefined;
|
|
209
237
|
fileGlobs?: string[] | undefined;
|
|
210
238
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
211
239
|
severity?: "error" | "warning" | undefined;
|
|
212
240
|
archivedReason?: string | undefined;
|
|
241
|
+
archivedAt?: string | undefined;
|
|
213
242
|
manual?: boolean | undefined;
|
|
214
243
|
immutable?: boolean | undefined;
|
|
215
244
|
unverified?: boolean | undefined;
|
|
@@ -228,7 +257,7 @@ export type CompiledRule = z.infer<typeof CompiledRuleSchema>;
|
|
|
228
257
|
* losing the hash/title pair. Fresh compile runs MUST NOT emit
|
|
229
258
|
* `'legacy-unknown'`; enforcement sits at producers, not the schema.
|
|
230
259
|
*/
|
|
231
|
-
export declare const NonCompilableReasonCodeSchema: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "legacy-unknown"]>;
|
|
260
|
+
export declare const NonCompilableReasonCodeSchema: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "missing-goodexample", "matches-good-example", "legacy-unknown"]>;
|
|
232
261
|
export type NonCompilableReasonCode = z.infer<typeof NonCompilableReasonCodeSchema>;
|
|
233
262
|
/**
|
|
234
263
|
* Strict Write schema for `nonCompilable` entries. Every persisted entry
|
|
@@ -246,17 +275,17 @@ export type NonCompilableReasonCode = z.infer<typeof NonCompilableReasonCodeSche
|
|
|
246
275
|
export declare const NonCompilableEntryWriteSchema: z.ZodObject<{
|
|
247
276
|
hash: z.ZodString;
|
|
248
277
|
title: z.ZodString;
|
|
249
|
-
reasonCode: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "legacy-unknown"]>;
|
|
278
|
+
reasonCode: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "missing-goodexample", "matches-good-example", "legacy-unknown"]>;
|
|
250
279
|
reason: z.ZodOptional<z.ZodString>;
|
|
251
280
|
}, "strip", z.ZodTypeAny, {
|
|
252
281
|
hash: string;
|
|
253
282
|
title: string;
|
|
254
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
283
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
255
284
|
reason?: string | undefined;
|
|
256
285
|
}, {
|
|
257
286
|
hash: string;
|
|
258
287
|
title: string;
|
|
259
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
288
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
260
289
|
reason?: string | undefined;
|
|
261
290
|
}>;
|
|
262
291
|
/**
|
|
@@ -270,17 +299,17 @@ export declare const NonCompilableEntryWriteSchema: z.ZodObject<{
|
|
|
270
299
|
export declare const NonCompilableEntryReadSchema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
271
300
|
hash: z.ZodString;
|
|
272
301
|
title: z.ZodString;
|
|
273
|
-
reasonCode: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "legacy-unknown"]>;
|
|
302
|
+
reasonCode: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "missing-goodexample", "matches-good-example", "legacy-unknown"]>;
|
|
274
303
|
reason: z.ZodOptional<z.ZodString>;
|
|
275
304
|
}, "strip", z.ZodTypeAny, {
|
|
276
305
|
hash: string;
|
|
277
306
|
title: string;
|
|
278
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
307
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
279
308
|
reason?: string | undefined;
|
|
280
309
|
}, {
|
|
281
310
|
hash: string;
|
|
282
311
|
title: string;
|
|
283
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
312
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
284
313
|
reason?: string | undefined;
|
|
285
314
|
}>, z.ZodObject<{
|
|
286
315
|
hash: z.ZodString;
|
|
@@ -294,12 +323,12 @@ export declare const NonCompilableEntryReadSchema: z.ZodEffects<z.ZodUnion<[z.Zo
|
|
|
294
323
|
}>]>, {
|
|
295
324
|
hash: string;
|
|
296
325
|
title: string;
|
|
297
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
326
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
298
327
|
reason?: string | undefined;
|
|
299
328
|
}, string | {
|
|
300
329
|
hash: string;
|
|
301
330
|
title: string;
|
|
302
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
331
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
303
332
|
reason?: string | undefined;
|
|
304
333
|
} | {
|
|
305
334
|
hash: string;
|
|
@@ -352,6 +381,16 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
352
381
|
* 1.14.9; flips to required when #1408 turns on the gate.
|
|
353
382
|
*/
|
|
354
383
|
badExample: z.ZodOptional<z.ZodString>;
|
|
384
|
+
/**
|
|
385
|
+
* Optional code snippet the rule MUST NOT match. mmnto-ai/totem#1580
|
|
386
|
+
* added the over-matching check: the compile-time smoke gate runs the
|
|
387
|
+
* rule against `goodExample` and rejects it with reason code
|
|
388
|
+
* `'matches-good-example'` if the pattern fires. Optional at the
|
|
389
|
+
* persisted-rule boundary for backward compatibility with pre-#1580
|
|
390
|
+
* rules; `CompilerOutputSchema` requires it for regex and ast-grep
|
|
391
|
+
* producers (see `refineGoodExampleRequired`).
|
|
392
|
+
*/
|
|
393
|
+
goodExample: z.ZodOptional<z.ZodString>;
|
|
355
394
|
/** ISO timestamp of when this rule was compiled */
|
|
356
395
|
compiledAt: z.ZodString;
|
|
357
396
|
/** ISO timestamp of when this rule was first created (survives recompilation) */
|
|
@@ -366,6 +405,17 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
366
405
|
status: z.ZodOptional<z.ZodEnum<["active", "archived"]>>;
|
|
367
406
|
/** Reason for archiving (when status is 'archived') */
|
|
368
407
|
archivedReason: z.ZodOptional<z.ZodString>;
|
|
408
|
+
/**
|
|
409
|
+
* ISO timestamp of when the rule was first archived (mmnto-ai/totem#1589).
|
|
410
|
+
* Preserved across compile-write round-trips so the institutional-ledger
|
|
411
|
+
* semantic of first-archive-provenance survives. Pre-#1589 Zod parses
|
|
412
|
+
* silently stripped this field during schema round-trips; every compile
|
|
413
|
+
* cycle erased prior `archivedAt` values from the rules file. Postmerge
|
|
414
|
+
* archive scripts (`scripts/archive-postmerge-*.cjs`) set this via raw
|
|
415
|
+
* JSON mutation; the field is additive on the schema side so manual
|
|
416
|
+
* archive workflows survive a subsequent `totem lesson compile --export`.
|
|
417
|
+
*/
|
|
418
|
+
archivedAt: z.ZodOptional<z.ZodString>;
|
|
369
419
|
/**
|
|
370
420
|
* True for rules generated by Pipeline 1 (manual `**Pattern:**` blocks). Set to
|
|
371
421
|
* `true` in `buildManualRule`. Used by `doctor.ts:checkUpgradeCandidates` and
|
|
@@ -415,11 +465,13 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
415
465
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
416
466
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
417
467
|
badExample?: string | undefined;
|
|
468
|
+
goodExample?: string | undefined;
|
|
418
469
|
createdAt?: string | undefined;
|
|
419
470
|
fileGlobs?: string[] | undefined;
|
|
420
471
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
421
472
|
severity?: "error" | "warning" | undefined;
|
|
422
473
|
archivedReason?: string | undefined;
|
|
474
|
+
archivedAt?: string | undefined;
|
|
423
475
|
manual?: boolean | undefined;
|
|
424
476
|
immutable?: boolean | undefined;
|
|
425
477
|
unverified?: boolean | undefined;
|
|
@@ -437,11 +489,13 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
437
489
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
438
490
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
439
491
|
badExample?: string | undefined;
|
|
492
|
+
goodExample?: string | undefined;
|
|
440
493
|
createdAt?: string | undefined;
|
|
441
494
|
fileGlobs?: string[] | undefined;
|
|
442
495
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
443
496
|
severity?: "error" | "warning" | undefined;
|
|
444
497
|
archivedReason?: string | undefined;
|
|
498
|
+
archivedAt?: string | undefined;
|
|
445
499
|
manual?: boolean | undefined;
|
|
446
500
|
immutable?: boolean | undefined;
|
|
447
501
|
unverified?: boolean | undefined;
|
|
@@ -459,11 +513,13 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
459
513
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
460
514
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
461
515
|
badExample?: string | undefined;
|
|
516
|
+
goodExample?: string | undefined;
|
|
462
517
|
createdAt?: string | undefined;
|
|
463
518
|
fileGlobs?: string[] | undefined;
|
|
464
519
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
465
520
|
severity?: "error" | "warning" | undefined;
|
|
466
521
|
archivedReason?: string | undefined;
|
|
522
|
+
archivedAt?: string | undefined;
|
|
467
523
|
manual?: boolean | undefined;
|
|
468
524
|
immutable?: boolean | undefined;
|
|
469
525
|
unverified?: boolean | undefined;
|
|
@@ -481,11 +537,13 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
481
537
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
482
538
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
483
539
|
badExample?: string | undefined;
|
|
540
|
+
goodExample?: string | undefined;
|
|
484
541
|
createdAt?: string | undefined;
|
|
485
542
|
fileGlobs?: string[] | undefined;
|
|
486
543
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
487
544
|
severity?: "error" | "warning" | undefined;
|
|
488
545
|
archivedReason?: string | undefined;
|
|
546
|
+
archivedAt?: string | undefined;
|
|
489
547
|
manual?: boolean | undefined;
|
|
490
548
|
immutable?: boolean | undefined;
|
|
491
549
|
unverified?: boolean | undefined;
|
|
@@ -502,17 +560,17 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
502
560
|
nonCompilable: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
503
561
|
hash: z.ZodString;
|
|
504
562
|
title: z.ZodString;
|
|
505
|
-
reasonCode: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "legacy-unknown"]>;
|
|
563
|
+
reasonCode: z.ZodEnum<["no-pattern-generated", "pattern-syntax-invalid", "pattern-zero-match", "verify-retry-exhausted", "security-rule-rejected", "no-pattern-found", "out-of-scope", "missing-badexample", "missing-goodexample", "matches-good-example", "legacy-unknown"]>;
|
|
506
564
|
reason: z.ZodOptional<z.ZodString>;
|
|
507
565
|
}, "strip", z.ZodTypeAny, {
|
|
508
566
|
hash: string;
|
|
509
567
|
title: string;
|
|
510
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
568
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
511
569
|
reason?: string | undefined;
|
|
512
570
|
}, {
|
|
513
571
|
hash: string;
|
|
514
572
|
title: string;
|
|
515
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
573
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
516
574
|
reason?: string | undefined;
|
|
517
575
|
}>, z.ZodObject<{
|
|
518
576
|
hash: z.ZodString;
|
|
@@ -526,12 +584,12 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
526
584
|
}>]>, {
|
|
527
585
|
hash: string;
|
|
528
586
|
title: string;
|
|
529
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
587
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
530
588
|
reason?: string | undefined;
|
|
531
589
|
}, string | {
|
|
532
590
|
hash: string;
|
|
533
591
|
title: string;
|
|
534
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
592
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
535
593
|
reason?: string | undefined;
|
|
536
594
|
} | {
|
|
537
595
|
hash: string;
|
|
@@ -553,11 +611,13 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
553
611
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
554
612
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
555
613
|
badExample?: string | undefined;
|
|
614
|
+
goodExample?: string | undefined;
|
|
556
615
|
createdAt?: string | undefined;
|
|
557
616
|
fileGlobs?: string[] | undefined;
|
|
558
617
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
559
618
|
severity?: "error" | "warning" | undefined;
|
|
560
619
|
archivedReason?: string | undefined;
|
|
620
|
+
archivedAt?: string | undefined;
|
|
561
621
|
manual?: boolean | undefined;
|
|
562
622
|
immutable?: boolean | undefined;
|
|
563
623
|
unverified?: boolean | undefined;
|
|
@@ -565,7 +625,7 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
565
625
|
nonCompilable?: {
|
|
566
626
|
hash: string;
|
|
567
627
|
title: string;
|
|
568
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
628
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
569
629
|
reason?: string | undefined;
|
|
570
630
|
}[] | undefined;
|
|
571
631
|
}, {
|
|
@@ -584,11 +644,13 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
584
644
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
585
645
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
586
646
|
badExample?: string | undefined;
|
|
647
|
+
goodExample?: string | undefined;
|
|
587
648
|
createdAt?: string | undefined;
|
|
588
649
|
fileGlobs?: string[] | undefined;
|
|
589
650
|
category?: "security" | "architecture" | "style" | "performance" | undefined;
|
|
590
651
|
severity?: "error" | "warning" | undefined;
|
|
591
652
|
archivedReason?: string | undefined;
|
|
653
|
+
archivedAt?: string | undefined;
|
|
592
654
|
manual?: boolean | undefined;
|
|
593
655
|
immutable?: boolean | undefined;
|
|
594
656
|
unverified?: boolean | undefined;
|
|
@@ -596,7 +658,7 @@ export declare const CompiledRulesFileSchema: z.ZodObject<{
|
|
|
596
658
|
nonCompilable?: (string | {
|
|
597
659
|
hash: string;
|
|
598
660
|
title: string;
|
|
599
|
-
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "legacy-unknown";
|
|
661
|
+
reasonCode: "no-pattern-generated" | "pattern-syntax-invalid" | "pattern-zero-match" | "verify-retry-exhausted" | "security-rule-rejected" | "no-pattern-found" | "out-of-scope" | "missing-badexample" | "missing-goodexample" | "matches-good-example" | "legacy-unknown";
|
|
600
662
|
reason?: string | undefined;
|
|
601
663
|
} | {
|
|
602
664
|
hash: string;
|
|
@@ -632,6 +694,17 @@ export declare const CompilerOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
632
694
|
* can name the engine and cite the ticket.
|
|
633
695
|
*/
|
|
634
696
|
badExample: z.ZodOptional<z.ZodString>;
|
|
697
|
+
/**
|
|
698
|
+
* Code snippet the rule MUST NOT match. Flipped from optional to
|
|
699
|
+
* engine-conditional required in mmnto-ai/totem#1580 - regex and
|
|
700
|
+
* ast-grep rules must carry a non-empty snippet so the compile-time
|
|
701
|
+
* smoke gate can assert the pattern does not over-match on known-good
|
|
702
|
+
* code before it lands in compiled-rules.json. The Zod field stays
|
|
703
|
+
* optional here; the `refineGoodExampleRequired` superRefine below
|
|
704
|
+
* enforces the engine-conditional requirement so the error message
|
|
705
|
+
* can name the engine and cite the ticket.
|
|
706
|
+
*/
|
|
707
|
+
goodExample: z.ZodOptional<z.ZodString>;
|
|
635
708
|
severity: z.ZodOptional<z.ZodEnum<["error", "warning"]>>;
|
|
636
709
|
/** LLM explanation for why a lesson was marked non-compilable */
|
|
637
710
|
reason: z.ZodOptional<z.ZodString>;
|
|
@@ -646,6 +719,7 @@ export declare const CompilerOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
646
719
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
647
720
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
648
721
|
badExample?: string | undefined;
|
|
722
|
+
goodExample?: string | undefined;
|
|
649
723
|
fileGlobs?: string[] | undefined;
|
|
650
724
|
severity?: "error" | "warning" | undefined;
|
|
651
725
|
reason?: string | undefined;
|
|
@@ -660,6 +734,7 @@ export declare const CompilerOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
660
734
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
661
735
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
662
736
|
badExample?: string | undefined;
|
|
737
|
+
goodExample?: string | undefined;
|
|
663
738
|
fileGlobs?: string[] | undefined;
|
|
664
739
|
severity?: "error" | "warning" | undefined;
|
|
665
740
|
reason?: string | undefined;
|
|
@@ -674,6 +749,7 @@ export declare const CompilerOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
674
749
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
675
750
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
676
751
|
badExample?: string | undefined;
|
|
752
|
+
goodExample?: string | undefined;
|
|
677
753
|
fileGlobs?: string[] | undefined;
|
|
678
754
|
severity?: "error" | "warning" | undefined;
|
|
679
755
|
reason?: string | undefined;
|
|
@@ -688,6 +764,7 @@ export declare const CompilerOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
688
764
|
rule: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
689
765
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
690
766
|
badExample?: string | undefined;
|
|
767
|
+
goodExample?: string | undefined;
|
|
691
768
|
fileGlobs?: string[] | undefined;
|
|
692
769
|
severity?: "error" | "warning" | undefined;
|
|
693
770
|
reason?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-schema.d.ts","sourceRoot":"","sources":["../src/compiler-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;;;;;;gCAIb,CAAC;AAEjB,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;gCAAmB,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"compiler-schema.d.ts","sourceRoot":"","sources":["../src/compiler-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;;;;;;gCAIb,CAAC;AAEjB,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;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AC;CACpB;AAID,oEAAoE;AACpE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,+FAA+F;IAC/F,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAID,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wEAAwE;AACxE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAC9B,KAAK,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,EACzC,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,gBAAgB,KACvB,IAAI,CAAC"}
|
package/dist/compiler-schema.js
CHANGED
|
@@ -62,6 +62,16 @@ const CompiledRuleBaseSchema = z.object({
|
|
|
62
62
|
* 1.14.9; flips to required when #1408 turns on the gate.
|
|
63
63
|
*/
|
|
64
64
|
badExample: z.string().optional(),
|
|
65
|
+
/**
|
|
66
|
+
* Optional code snippet the rule MUST NOT match. mmnto-ai/totem#1580
|
|
67
|
+
* added the over-matching check: the compile-time smoke gate runs the
|
|
68
|
+
* rule against `goodExample` and rejects it with reason code
|
|
69
|
+
* `'matches-good-example'` if the pattern fires. Optional at the
|
|
70
|
+
* persisted-rule boundary for backward compatibility with pre-#1580
|
|
71
|
+
* rules; `CompilerOutputSchema` requires it for regex and ast-grep
|
|
72
|
+
* producers (see `refineGoodExampleRequired`).
|
|
73
|
+
*/
|
|
74
|
+
goodExample: z.string().optional(),
|
|
65
75
|
/** ISO timestamp of when this rule was compiled */
|
|
66
76
|
compiledAt: z.string(),
|
|
67
77
|
/** ISO timestamp of when this rule was first created (survives recompilation) */
|
|
@@ -76,6 +86,17 @@ const CompiledRuleBaseSchema = z.object({
|
|
|
76
86
|
status: z.enum(['active', 'archived']).optional(),
|
|
77
87
|
/** Reason for archiving (when status is 'archived') */
|
|
78
88
|
archivedReason: z.string().optional(),
|
|
89
|
+
/**
|
|
90
|
+
* ISO timestamp of when the rule was first archived (mmnto-ai/totem#1589).
|
|
91
|
+
* Preserved across compile-write round-trips so the institutional-ledger
|
|
92
|
+
* semantic of first-archive-provenance survives. Pre-#1589 Zod parses
|
|
93
|
+
* silently stripped this field during schema round-trips; every compile
|
|
94
|
+
* cycle erased prior `archivedAt` values from the rules file. Postmerge
|
|
95
|
+
* archive scripts (`scripts/archive-postmerge-*.cjs`) set this via raw
|
|
96
|
+
* JSON mutation; the field is additive on the schema side so manual
|
|
97
|
+
* archive workflows survive a subsequent `totem lesson compile --export`.
|
|
98
|
+
*/
|
|
99
|
+
archivedAt: z.string().optional(),
|
|
79
100
|
/**
|
|
80
101
|
* True for rules generated by Pipeline 1 (manual `**Pattern:**` blocks). Set to
|
|
81
102
|
* `true` in `buildManualRule`. Used by `doctor.ts:checkUpgradeCandidates` and
|
|
@@ -163,6 +184,8 @@ export const NonCompilableReasonCodeSchema = z.enum([
|
|
|
163
184
|
'no-pattern-found',
|
|
164
185
|
'out-of-scope',
|
|
165
186
|
'missing-badexample',
|
|
187
|
+
'missing-goodexample',
|
|
188
|
+
'matches-good-example',
|
|
166
189
|
'legacy-unknown',
|
|
167
190
|
]);
|
|
168
191
|
/**
|
|
@@ -253,6 +276,17 @@ const CompilerOutputBaseSchema = z.object({
|
|
|
253
276
|
* can name the engine and cite the ticket.
|
|
254
277
|
*/
|
|
255
278
|
badExample: z.string().optional(),
|
|
279
|
+
/**
|
|
280
|
+
* Code snippet the rule MUST NOT match. Flipped from optional to
|
|
281
|
+
* engine-conditional required in mmnto-ai/totem#1580 - regex and
|
|
282
|
+
* ast-grep rules must carry a non-empty snippet so the compile-time
|
|
283
|
+
* smoke gate can assert the pattern does not over-match on known-good
|
|
284
|
+
* code before it lands in compiled-rules.json. The Zod field stays
|
|
285
|
+
* optional here; the `refineGoodExampleRequired` superRefine below
|
|
286
|
+
* enforces the engine-conditional requirement so the error message
|
|
287
|
+
* can name the engine and cite the ticket.
|
|
288
|
+
*/
|
|
289
|
+
goodExample: z.string().optional(),
|
|
256
290
|
severity: z.enum(['error', 'warning']).optional(),
|
|
257
291
|
/** LLM explanation for why a lesson was marked non-compilable */
|
|
258
292
|
reason: z.string().optional(),
|
|
@@ -278,7 +312,12 @@ function refineBadExampleRequired(data, ctx) {
|
|
|
278
312
|
const engineRequiresBadExample = data.engine !== 'ast';
|
|
279
313
|
if (!engineRequiresBadExample)
|
|
280
314
|
return;
|
|
281
|
-
|
|
315
|
+
// `.trim().length > 0` rather than `.length > 0` because the smoke gate
|
|
316
|
+
// treats whitespace-only snippets as no-ops via its own early-return,
|
|
317
|
+
// so a blank string would slip through schema validation but provide
|
|
318
|
+
// zero gate coverage. Flagged by CodeRabbit on mmnto-ai/totem#1591 for
|
|
319
|
+
// `goodExample`; the same hole existed on `badExample` since #1409.
|
|
320
|
+
if (typeof data.badExample === 'string' && data.badExample.trim().length > 0)
|
|
282
321
|
return;
|
|
283
322
|
ctx.addIssue({
|
|
284
323
|
code: z.ZodIssueCode.custom,
|
|
@@ -286,8 +325,35 @@ function refineBadExampleRequired(data, ctx) {
|
|
|
286
325
|
path: ['badExample'],
|
|
287
326
|
});
|
|
288
327
|
}
|
|
328
|
+
/**
|
|
329
|
+
* Symmetric counterpart of `refineBadExampleRequired` for the over-matching
|
|
330
|
+
* check shipped in mmnto-ai/totem#1580. Every Pipeline 2 / Pipeline 3
|
|
331
|
+
* compilable rule must carry a non-empty `goodExample` so the smoke gate
|
|
332
|
+
* can assert the pattern does not fire on known-good code. Same engine
|
|
333
|
+
* carve-out as badExample: `ast` engine exempt because the gate does not
|
|
334
|
+
* yet evaluate Tree-sitter S-expression queries.
|
|
335
|
+
*/
|
|
336
|
+
function refineGoodExampleRequired(data, ctx) {
|
|
337
|
+
if (!data.compilable)
|
|
338
|
+
return;
|
|
339
|
+
const engineRequiresGoodExample = data.engine !== 'ast';
|
|
340
|
+
if (!engineRequiresGoodExample)
|
|
341
|
+
return;
|
|
342
|
+
// `.trim().length > 0` rather than `.length > 0` so a whitespace-only
|
|
343
|
+
// goodExample cannot satisfy the required-field check. The smoke gate's
|
|
344
|
+
// early-return on `snippet.trim().length === 0` would treat the blank
|
|
345
|
+
// string as a no-op, producing zero over-matching coverage.
|
|
346
|
+
if (typeof data.goodExample === 'string' && data.goodExample.trim().length > 0)
|
|
347
|
+
return;
|
|
348
|
+
ctx.addIssue({
|
|
349
|
+
code: z.ZodIssueCode.custom,
|
|
350
|
+
message: 'goodExample is required (non-empty string) for regex and ast-grep engines (mmnto-ai/totem#1580)',
|
|
351
|
+
path: ['goodExample'],
|
|
352
|
+
});
|
|
353
|
+
}
|
|
289
354
|
export const CompilerOutputSchema = CompilerOutputBaseSchema.superRefine((data, ctx) => {
|
|
290
355
|
refineAstGrepMutualExclusion(data, ctx);
|
|
291
356
|
refineBadExampleRequired(data, ctx);
|
|
357
|
+
refineGoodExampleRequired(data, ctx);
|
|
292
358
|
});
|
|
293
359
|
//# sourceMappingURL=compiler-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-schema.js","sourceRoot":"","sources":["../src/compiler-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,uDA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