@7n/rules 1.49.12 → 1.49.13

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
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.49.13] - 2026-07-26
4
+
5
+ ### Fixed
6
+
7
+ - pass coverage mutation verdict feedback to the next ladder rung
8
+
3
9
  ## [1.49.12] - 2026-07-26
4
10
 
5
11
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7n/rules",
3
- "version": "1.49.12",
3
+ "version": "1.49.13",
4
4
  "description": "CLI еталонних правил і skills (префікс n-): синк у репозиторій, дельта-lint, конформність",
5
5
  "keywords": [
6
6
  "cli",
@@ -90,6 +90,7 @@ export async function fixWorker(violations, ctx, deps = {}) {
90
90
  const touchedFiles = []
91
91
  /** @type {Array<{provider: string, hook: string, files: string[], error: string}>} */
92
92
  const failed = []
93
+ let feedback = null
93
94
  const deferred = []
94
95
  /**
95
96
  * Викликає опційний fix-hook провайдера, збирає touchedFiles; виняток хука не
@@ -104,6 +105,7 @@ export async function fixWorker(violations, ctx, deps = {}) {
104
105
  try {
105
106
  const res = await provider[hook]({ ...args, cwd: ctx.cwd, ctx: hookCtx(ctx, deadlineAt) })
106
107
  touchedFiles.push(...(res?.touchedFiles ?? []))
108
+ if (res?.feedback?.previousError) feedback = res.feedback
107
109
  deferred.push(...(res?.deferred ?? []))
108
110
  for (const failure of res?.failed ?? []) {
109
111
  const error = failure?.error ?? 'невідома причина'
@@ -135,5 +137,5 @@ export async function fixWorker(violations, ctx, deps = {}) {
135
137
  }
136
138
  }
137
139
 
138
- return { touchedFiles, failed, deferred }
140
+ return { touchedFiles, failed, deferred, feedback }
139
141
  }
@@ -454,6 +454,10 @@ async function runRung(rung, worker, violations, feedback, rungDeps) {
454
454
 
455
455
  const vetoed = after.length === 0 && !error && (collateralAll.length > 0 || brokenTest !== null)
456
456
  const touchedFiles = workerResult?.touchedFiles ?? []
457
+ // Provider може повернути quality-verdict без worker exception (наприклад,
458
+ // generated coverage test зелений у Vitest, але не вбив target mutant). Це
459
+ // не змінює retry policy; лише дає наступному ladder rung-у конкретний feedback.
460
+ const workerFeedback = workerResult?.feedback?.previousError ?? null
457
461
 
458
462
  if (after.length === 0 && !error && !vetoed) {
459
463
  log(` ✅ ${rung.tier} (${rung.model}): ${ruleId}/${concernName}\n`)
@@ -501,7 +505,7 @@ async function runRung(rung, worker, violations, feedback, rungDeps) {
501
505
  outcome: {
502
506
  action: decideAfterFailure(rung, error),
503
507
  violations: after.length > 0 ? after : violations,
504
- feedback: { previousModel: rung.model, previousError: error ?? silentFailureNote }
508
+ feedback: { previousModel: rung.model, previousError: error ?? workerFeedback ?? silentFailureNote }
505
509
  }
506
510
  }
507
511
  }