mjolnir-qa 0.5.36 → 0.5.38
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 +12 -0
- package/dist/cli.d.mts +64 -2
- package/dist/cli.mjs +538 -15
- package/dist/mcp/stdio.mjs +537 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,18 @@ 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.38] — 2026-09-09
|
|
13
|
+
|
|
14
|
+
### Changes since 0
|
|
15
|
+
|
|
16
|
+
- P7: agent loop — mjolnir verify + MCP verify tool + install surfaces (#68)
|
|
17
|
+
|
|
18
|
+
## [0.5.37] — 2026-09-08
|
|
19
|
+
|
|
20
|
+
### Changes since 0
|
|
21
|
+
|
|
22
|
+
- P5: mutation evidence reader — Stryker/mutmut, E1→E2 derivation, report-only (#67)
|
|
23
|
+
|
|
12
24
|
## [0.5.36] — 2026-09-08
|
|
13
25
|
|
|
14
26
|
### Changes since 0
|
package/dist/cli.d.mts
CHANGED
|
@@ -141,6 +141,17 @@ interface Finding {
|
|
|
141
141
|
* stamped with the corroboration pass. Additive within schemaVersion 1.
|
|
142
142
|
*/
|
|
143
143
|
trustLevel?: TrustLevel;
|
|
144
|
+
/**
|
|
145
|
+
* Mutation evidence (master plan P5, plan 1788853205786): what a
|
|
146
|
+
* mutation-testing report says about the code this finding points at.
|
|
147
|
+
* PROVENANCE, not proof — a survived mutant is code the suite would
|
|
148
|
+
* not notice changing; matching findings consolidate E1→E2 BY
|
|
149
|
+
* DERIVATION (documented in docs/RULE-LIFECYCLE.md), and trustLevel
|
|
150
|
+
* never rises from mutation evidence alone (nothing ran). Absent
|
|
151
|
+
* means no mutation report was available or nothing matched — never
|
|
152
|
+
* fabricated. Additive within schemaVersion 1.
|
|
153
|
+
*/
|
|
154
|
+
mutationEvidence?: MutationEvidence | undefined;
|
|
144
155
|
/** Repo-relative path with forward slashes, regardless of OS. */
|
|
145
156
|
file: string;
|
|
146
157
|
/** 1-based. */
|
|
@@ -169,6 +180,34 @@ interface Finding {
|
|
|
169
180
|
*/
|
|
170
181
|
fixGroupId?: string;
|
|
171
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Mutation evidence (master plan P5, plan 1788853205786 — flag 6,
|
|
185
|
+
* decision 8): provenance from a mutation-testing report
|
|
186
|
+
* (`mjolnir mutation <report>`), stamped on matching findings.
|
|
187
|
+
*
|
|
188
|
+
* PROVENANCE IS NOT TRUTH: a survived mutant is code the suite would
|
|
189
|
+
* not notice changing — evidence FOR a nearby finding, never a claim
|
|
190
|
+
* the finding is "proven real". The E1→E2 consolidation is BY
|
|
191
|
+
* DERIVATION and lives in src/mutation/derive.ts (documented in
|
|
192
|
+
* docs/RULE-LIFECYCLE.md + the machine-contract docs). trustLevel never
|
|
193
|
+
* rises from mutation evidence alone: nothing ran.
|
|
194
|
+
*/
|
|
195
|
+
interface MutationEvidence {
|
|
196
|
+
/** Which mutation tool produced the report. */
|
|
197
|
+
source: "stryker" | "mutmut";
|
|
198
|
+
/** How many survived mutants matched this finding. */
|
|
199
|
+
matchedMutants: number;
|
|
200
|
+
/** The mutator names of the matched mutants (deduped, sorted). */
|
|
201
|
+
mutators: string[];
|
|
202
|
+
/**
|
|
203
|
+
* "line" = the mutant's span contains the finding's position
|
|
204
|
+
* (Stryker evidence); "file" = file-level match only (mutmut —
|
|
205
|
+
* its JUnit report carries no per-mutant lines — or an unplaceable
|
|
206
|
+
* Stryker span). Same prefer-claiming-less rule as the runtime
|
|
207
|
+
* corroboration's granularity fallback.
|
|
208
|
+
*/
|
|
209
|
+
granularity: "line" | "file";
|
|
210
|
+
}
|
|
172
211
|
interface DimensionScore {
|
|
173
212
|
category: RuleCategory;
|
|
174
213
|
score: number;
|
|
@@ -744,7 +783,7 @@ declare const runScan: typeof runScan$1, buildUniversalRules: typeof buildUniver
|
|
|
744
783
|
* `scripts/sync-sarif-version.cjs` on release and guarded by
|
|
745
784
|
* `tests/version-consistency.spec.ts` locally.
|
|
746
785
|
*/
|
|
747
|
-
declare const CLI_VERSION = "0.5.
|
|
786
|
+
declare const CLI_VERSION = "0.5.38";
|
|
748
787
|
/** A usage-error detail: the offending token, when one exists. */
|
|
749
788
|
interface UsageErrorDetail {
|
|
750
789
|
/** The unknown flag or rejected value (e.g. `--nope`, `loud`). */
|
|
@@ -815,6 +854,19 @@ declare function runTriageCommand(argv: string[], io?: {
|
|
|
815
854
|
out: Output;
|
|
816
855
|
err: Output;
|
|
817
856
|
}): number;
|
|
857
|
+
/** Testable `mutation` handler (master plan P5, plan 1788853205786).
|
|
858
|
+
* Reads a mutation report (Stryker JSON / mutmut junitxml), renders the
|
|
859
|
+
* survived-mutant leaderboard, and — with `--scan <path>` — re-scans the
|
|
860
|
+
* target, stamps matching findings with `mutationEvidence` (E1→E2 by
|
|
861
|
+
* derivation) and renders the stamped findings. NEVER spawns mutation
|
|
862
|
+
* tools: it reads reports the user already produced. Exit 2 when
|
|
863
|
+
* nothing in the report is recognized — honest no-evidence, not an
|
|
864
|
+
* error. Exit 0 in every other case: the reader is report-only, never a
|
|
865
|
+
* gate. */
|
|
866
|
+
declare function runMutationCommand(argv: string[], io?: {
|
|
867
|
+
out: Output;
|
|
868
|
+
err: Output;
|
|
869
|
+
}): Promise<number>;
|
|
818
870
|
/** Testable `badge` handler (Tier 1 #5). */
|
|
819
871
|
declare function runBadgeCommand(argv: string[], io?: {
|
|
820
872
|
out: Output;
|
|
@@ -846,6 +898,16 @@ declare function runBaselineCommand(argv: string[], io?: {
|
|
|
846
898
|
err: Output;
|
|
847
899
|
}): Promise<number>;
|
|
848
900
|
/** Testable `diff` handler (Sprint 6 Task 24) — new/worsened debt only. */
|
|
901
|
+
/** Testable `verify` handler — the agent-loop verb (master plan P7,
|
|
902
|
+
* plan 1788853205786). Scans the target and diffs against the committed
|
|
903
|
+
* baseline, rendering the before/after digest the agent loop consumes
|
|
904
|
+
* (resolved per §15 · new · unchanged by ruleId+location · score delta).
|
|
905
|
+
* Exit semantics are the frozen contract: 0 clean · 1 new error
|
|
906
|
+
* findings · 2 partial scan or no baseline · 20 internal. */
|
|
907
|
+
declare function runVerifyCommand(argv: string[], io?: {
|
|
908
|
+
out: Output;
|
|
909
|
+
err: Output;
|
|
910
|
+
}): Promise<number>;
|
|
849
911
|
declare function runDiffCommand(argv: string[], io?: {
|
|
850
912
|
out: Output;
|
|
851
913
|
err: Output;
|
|
@@ -891,4 +953,4 @@ declare function runHelpCommand(argv: string[], io?: {
|
|
|
891
953
|
}): number;
|
|
892
954
|
declare function isEntryPoint(): boolean;
|
|
893
955
|
//#endregion
|
|
894
|
-
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 };
|
|
956
|
+
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, runMutationCommand, runPrCommentCommand, runPwReportCommand, runRulesCommand, runScan, runScanCommand, runStatsCommand, runSuppressions, runTriageCommand, runVerifyCommand, usageErrorMessage };
|