mjolnir-qa 0.5.19 → 0.5.23
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 +27 -0
- package/README.md +1 -0
- package/dist/cli.d.mts +33 -21
- package/dist/cli.mjs +300 -125
- package/dist/mcp/stdio.mjs +300 -125
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,33 @@ Rule behavior changes (new rules, FP-rate changes against the corpus,
|
|
|
9
9
|
severity changes) are first-class entries here — rule IDs are immutable
|
|
10
10
|
once shipped, so this file is the record of what changed between versions.
|
|
11
11
|
|
|
12
|
+
## [0.5.23] — 2026-09-08
|
|
13
|
+
|
|
14
|
+
### Changes since 0.5.22
|
|
15
|
+
|
|
16
|
+
- docs(corpus): D14 as amended by owner — re-baseline-per-wave is blocking, PARTIAL repos are tracked debt (never baselines, never a certification gate); zero-PARTIAL is the end state, not the gate
|
|
17
|
+
|
|
18
|
+
## [0.5.22] — 2026-09-07
|
|
19
|
+
|
|
20
|
+
### Changes since 0.5.21
|
|
21
|
+
|
|
22
|
+
- chore: gitignore bench artifacts (machine-local timings + fixture scratch)
|
|
23
|
+
- test(corpus): D14 re-baseline after Wave-1 merges — QA-PW-124 now adapter-gated (configRule metadata), QA-TEST-003/010 surface on repos whose baselines predate the TS project split, corpus regen of partial scans pending quiet-machine rerun
|
|
24
|
+
- chore(qa): eslint-ignore the verbatim QA evidence area (raw probes are committed DATA, certification protocol)
|
|
25
|
+
- chore(qa): commit FINAL-RELEASE certification evidence verbatim (cycle 0, RC 151186b) + lint/format exclusions for raw evidence area (certification plan 1788804968910 protocol)
|
|
26
|
+
|
|
27
|
+
## [0.5.21] — 2026-09-07
|
|
28
|
+
|
|
29
|
+
### Changes since 0.5.20
|
|
30
|
+
|
|
31
|
+
- Integrity layer: category + measurement consistency, measurement census, §27 design pass (Phases 1+4+7) (#56)
|
|
32
|
+
|
|
33
|
+
## [0.5.20] — 2026-09-07
|
|
34
|
+
|
|
35
|
+
### Changes since 0.5.19
|
|
36
|
+
|
|
37
|
+
- Doctor status model + --json contract + certification CI gate (Phase 5, G2/G5/G6) (#55)
|
|
38
|
+
|
|
12
39
|
## [0.5.19] — 2026-09-07
|
|
13
40
|
|
|
14
41
|
### Changes since 0.5.18
|
package/README.md
CHANGED
|
@@ -200,6 +200,7 @@ and you're done. Everything else is optional.
|
|
|
200
200
|
| `mjolnir badge` | shields.io endpoint JSON + snippet |
|
|
201
201
|
| `mjolnir rules --md` | Full rule catalog (JSON or Markdown) |
|
|
202
202
|
| `mjolnir doctor` | Self-audit of Mjölnir's own rule base |
|
|
203
|
+
| `mjolnir doctor --json` | The same self-audit as a machine-readable contract |
|
|
203
204
|
| `mjolnir create-rule <ID>` | Scaffold a new rule + fixtures |
|
|
204
205
|
| `mjolnir --format mermaid` | Test-architecture diagram for a PR comment |
|
|
205
206
|
|
package/dist/cli.d.mts
CHANGED
|
@@ -32,8 +32,17 @@ type EvidenceLevel = (typeof EVIDENCE_ORDER)[number];
|
|
|
32
32
|
* for the QA engineer's actual job, in their vocabulary.
|
|
33
33
|
*/
|
|
34
34
|
type QaImpact = "BLOCKS-RELEASE" | "FLAKY-RISK" | "FALSE-GREEN" | "HYGIENE";
|
|
35
|
-
/**
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* The closed set of rule categories (plan §5.5, certification-audit D6).
|
|
37
|
+
* Declared FIRST as the single source of truth: the RuleCategory type is
|
|
38
|
+
* DERIVED from this list (compile-time exhaustiveness — a category added
|
|
39
|
+
* to the type without the value list, or vice versa, cannot compile).
|
|
40
|
+
* `--category` values are validated against this list — unknown
|
|
41
|
+
* categories are a usage error, not a silent no-op. Rule namespaces are
|
|
42
|
+
* frozen public API (§18.4): IDs are never reused.
|
|
43
|
+
*/
|
|
44
|
+
declare const RULE_CATEGORIES: readonly ["QA-TEST", "QA-TQUAL", "QA-PW", "QA-CI", "QA-PY", "QA-ENV", "QA-JV", "QA-CS", "QA-CYP", "QA-SE", "QA-WDIO", "QA-PPTR", "QA-APM"];
|
|
45
|
+
type RuleCategory = (typeof RULE_CATEGORIES)[number];
|
|
37
46
|
/**
|
|
38
47
|
* Trust levels (Verification Trust Evolution Plan §16): the OVERALL
|
|
39
48
|
* trust a consumer can place in one finding, combining the static
|
|
@@ -687,6 +696,26 @@ declare function isValidFindingRecord$1(f: unknown): f is Omit<Finding, "ruleId"
|
|
|
687
696
|
*/
|
|
688
697
|
declare function runScan$1(args: CliArgs, hooks?: ScanHooks): Promise<ScanResult>;
|
|
689
698
|
//#endregion
|
|
699
|
+
//#region src/cli-io.d.ts
|
|
700
|
+
/**
|
|
701
|
+
* Shared process IO sinks (certification-audit Phase 5, G6): the variadic
|
|
702
|
+
* console sinks and the internal-error reporter lived in cli.ts, which
|
|
703
|
+
* made every command module that wanted honest IO depend on the dispatch
|
|
704
|
+
* table (or duplicate it). Extracted so command modules (doctor-run et
|
|
705
|
+
* al.) and cli.ts share ONE implementation.
|
|
706
|
+
*/
|
|
707
|
+
/** The variadic IO signature shared by all command handlers. */
|
|
708
|
+
type Output = (...parts: unknown[]) => void;
|
|
709
|
+
declare const out: Output;
|
|
710
|
+
declare const err: Output;
|
|
711
|
+
declare function internalErrorMessage(err: unknown, emit: (s: string) => void, debug: boolean): void;
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region src/commands/doctor-run.d.ts
|
|
714
|
+
declare function runDoctorCommand(argv: string[], io?: {
|
|
715
|
+
out: Output;
|
|
716
|
+
err: Output;
|
|
717
|
+
}): number;
|
|
718
|
+
//#endregion
|
|
690
719
|
//#region src/cli.d.ts
|
|
691
720
|
declare const runScan: typeof runScan$1, buildUniversalRules: typeof buildUniversalRules$1, fallbackWorkspace: typeof fallbackWorkspace$1, pathMatchesGlob: typeof pathMatchesGlob$1, isValidFindingRecord: typeof isValidFindingRecord$1, discoverRuntimeReport: typeof discoverRuntimeReport$1, KNOWN_RULE_IDS: ReadonlySet<string>, OVERLAP_META_BY_RULE_ID: ReadonlyMap<string, OverlapMeta>, EVIDENCE_OVERRIDES: ReadonlyMap<string, string>, SUITE_INVALIDATING_RULE_IDS: ReadonlySet<string>;
|
|
692
721
|
/**
|
|
@@ -699,7 +728,7 @@ declare const runScan: typeof runScan$1, buildUniversalRules: typeof buildUniver
|
|
|
699
728
|
* `scripts/sync-sarif-version.cjs` on release and guarded by
|
|
700
729
|
* `tests/version-consistency.spec.ts` locally.
|
|
701
730
|
*/
|
|
702
|
-
declare const CLI_VERSION = "0.5.
|
|
731
|
+
declare const CLI_VERSION = "0.5.23";
|
|
703
732
|
/** A usage-error detail: the offending token, when one exists. */
|
|
704
733
|
interface UsageErrorDetail {
|
|
705
734
|
/** The unknown flag or rejected value (e.g. `--nope`, `loud`). */
|
|
@@ -718,9 +747,6 @@ declare function nearestFlags(flag: string, max?: number): string[];
|
|
|
718
747
|
* to stderr; findings/usage stay on their documented streams.
|
|
719
748
|
*/
|
|
720
749
|
declare function usageErrorMessage(detail: UsageErrorDetail): string;
|
|
721
|
-
type Output = (...parts: unknown[]) => void;
|
|
722
|
-
declare const out: Output;
|
|
723
|
-
declare const err: Output;
|
|
724
750
|
/** Testable `ci install` handler. Returns the process exit code. */
|
|
725
751
|
declare function runCiInstall(argv: string[], io?: {
|
|
726
752
|
out: Output;
|
|
@@ -741,11 +767,6 @@ declare function runDoctorPlaywright(argv: string[], io?: {
|
|
|
741
767
|
out: Output;
|
|
742
768
|
err?: Output;
|
|
743
769
|
}): Promise<number>;
|
|
744
|
-
/** Testable `doctor` handler — self-audit of Mjölnir's own rule base. */
|
|
745
|
-
declare function runDoctorCommand(argv: string[], io?: {
|
|
746
|
-
out: Output;
|
|
747
|
-
err: Output;
|
|
748
|
-
}): number;
|
|
749
770
|
/** Testable `rules` handler — rule catalog with Trust Metadata. */
|
|
750
771
|
declare function runRulesCommand(argv: string[], io?: {
|
|
751
772
|
out: Output;
|
|
@@ -852,15 +873,6 @@ declare function runHelpCommand(argv: string[], io?: {
|
|
|
852
873
|
out: Output;
|
|
853
874
|
err: Output;
|
|
854
875
|
}): number;
|
|
855
|
-
/**
|
|
856
|
-
* Friendly exit-20 path (plan M2): the crash says it's Mjölnir's bug,
|
|
857
|
-
* not the user's repo, carries the underlying message for a report, and
|
|
858
|
-
* prints the stack ONLY when `debug` is set (uniform across
|
|
859
|
-
* subcommands — they don't parse scan flags). Tests pin
|
|
860
|
-
* /internal error/i. Exported so the --debug stack arm is directly
|
|
861
|
-
* spec-coverable (spawning a real crash under --debug would be flaky).
|
|
862
|
-
*/
|
|
863
|
-
declare function internalErrorMessage(err: unknown, emit: (s: string) => void, debug: boolean): void;
|
|
864
876
|
declare function isEntryPoint(): boolean;
|
|
865
877
|
//#endregion
|
|
866
|
-
export { CLI_VERSION, type CliArgs, EVIDENCE_OVERRIDES, KNOWN_RULE_IDS, OVERLAP_META_BY_RULE_ID, Output, SUITE_INVALIDATING_RULE_IDS, type ScanHooks, UsageErrorDetail, buildUniversalRules, discoverRuntimeReport, err, exitForFindings, fallbackWorkspace, internalErrorMessage, isEntryPoint, isValidFindingRecord, levenshtein, main, nearestFlags, out, parseArgs, pathMatchesGlob, runBadgeCommand, runBaselineCommand, runCiInstall, runCreateRuleCommand, runDebtCommand, runDiffCommand, runDoctorCommand, runDoctorPlaywright, runExplainCommand, runFixCommand, runForensicsCommand, runHandoverCommand, runHelpCommand, runImpactCommand, runInitCommand, runPrCommentCommand, runPwReportCommand, runRulesCommand, runScan, runScanCommand, runStatsCommand, runSuppressions, runTriageCommand, usageErrorMessage };
|
|
878
|
+
export { CLI_VERSION, type CliArgs, EVIDENCE_OVERRIDES, KNOWN_RULE_IDS, OVERLAP_META_BY_RULE_ID, type Output, SUITE_INVALIDATING_RULE_IDS, type ScanHooks, UsageErrorDetail, buildUniversalRules, discoverRuntimeReport, err, exitForFindings, fallbackWorkspace, internalErrorMessage, isEntryPoint, isValidFindingRecord, levenshtein, main, nearestFlags, out, parseArgs, pathMatchesGlob, runBadgeCommand, runBaselineCommand, runCiInstall, runCreateRuleCommand, runDebtCommand, runDiffCommand, runDoctorCommand, runDoctorPlaywright, runExplainCommand, runFixCommand, runForensicsCommand, runHandoverCommand, runHelpCommand, runImpactCommand, runInitCommand, runPrCommentCommand, runPwReportCommand, runRulesCommand, runScan, runScanCommand, runStatsCommand, runSuppressions, runTriageCommand, usageErrorMessage };
|