pumuki 6.3.12 → 6.3.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.
@@ -258,6 +258,8 @@ Estado consolidado del refactor con seguimiento de tareas y evidencia del avance
258
258
  - ✅ Ejecutar validación dirigida del lote iOS (detectors + heuristics + skills ruleset) y ajustar severidades finales por stage.
259
259
  - ✅ Extender cobertura semántica enterprise de SOLID (SRP/OCP/LSP/ISP/DIP) con señales AST no superficiales y contrato de evidencia.
260
260
  - ✅ Ejecutar validación determinista del lote SOLID (detectors TS + extractor heurístico + stage policies) y cerrar versión de pack heurístico.
261
+ - ✅ Corregir persistencia de trazabilidad en evidence (`matchedBy` y `source`) en `snapshot.findings` y `ai_gate.violations`, con tests de regresión en verde.
262
+ - 🚧 Publicar hotfix npm (`pumuki@6.3.13`) y revalidar en `pumuki-mock-consumer` que `.ai_evidence.json` conserva trazabilidad completa en escenario `violations`.
261
263
  - ✅ Cerrar implementación integral de reglas/skills (heurísticas iOS + SOLID TS + stage promotions + contracts skills) con validación completa (`typecheck`, `skills:lock:check`, `test:deterministic` y suite dirigida de policies/presets).
262
264
  - ✅ Endurecer `pumuki-mock-consumer` con una mini-app feature-first más elaborada y escenario `violations` ampliado para cubrir skills iOS/backend/frontend/android + heurísticas críticas (security/process/fs/browser/SOLID) mediante `docs/VIOLATION_SKILLS_MATRIX.md`.
263
265
  - ✅ Corregir carga de `pumuki.rules.ts` con `default export` en `integrations/config/loadProjectRules.ts` y añadir test de regresión.
@@ -38,6 +38,8 @@ const sampleEvidence = (repoRoot: string): AiEvidenceV2_1 => ({
38
38
  message: 'z finding',
39
39
  file: join(repoRoot, 'apps/ios/B.swift'),
40
40
  lines: [9.8, 1, 1, Number.NaN, 4],
41
+ matchedBy: 'FileContent',
42
+ source: 'git:staged',
41
43
  },
42
44
  {
43
45
  ruleId: 'a.rule',
@@ -46,6 +48,8 @@ const sampleEvidence = (repoRoot: string): AiEvidenceV2_1 => ({
46
48
  message: 'a finding',
47
49
  file: 'apps/backend/A.ts',
48
50
  lines: ' ',
51
+ matchedBy: 'Heuristic',
52
+ source: 'heuristics:ast',
49
53
  },
50
54
  ],
51
55
  },
@@ -106,10 +110,14 @@ test('writeEvidence escribe archivo estable y normaliza paths/orden/lineas', asy
106
110
  assert.equal(written.snapshot.findings[0]?.ruleId, 'a.rule');
107
111
  assert.equal(written.snapshot.findings[0]?.file, 'apps/backend/A.ts');
108
112
  assert.equal('lines' in (written.snapshot.findings[0] ?? {}), false);
113
+ assert.equal(written.snapshot.findings[0]?.matchedBy, 'Heuristic');
114
+ assert.equal(written.snapshot.findings[0]?.source, 'heuristics:ast');
109
115
 
110
116
  assert.equal(written.snapshot.findings[1]?.ruleId, 'z.rule');
111
117
  assert.equal(written.snapshot.findings[1]?.file.endsWith('/apps/ios/B.swift'), true);
112
118
  assert.deepEqual(written.snapshot.findings[1]?.lines, [1, 4, 9]);
119
+ assert.equal(written.snapshot.findings[1]?.matchedBy, 'FileContent');
120
+ assert.equal(written.snapshot.findings[1]?.source, 'git:staged');
113
121
 
114
122
  assert.equal(written.ledger[0]?.ruleId, 'a.rule');
115
123
  assert.deepEqual(written.ledger[0]?.lines, [2, 3]);
@@ -122,6 +130,13 @@ test('writeEvidence escribe archivo estable y normaliza paths/orden/lineas', asy
122
130
  'ios:z-bundle',
123
131
  ]);
124
132
  assert.deepEqual(written.ai_gate.violations.map((item) => item.ruleId), ['a.rule', 'z.rule']);
133
+ assert.deepEqual(
134
+ written.ai_gate.violations.map((item) => [item.ruleId, item.matchedBy, item.source]),
135
+ [
136
+ ['a.rule', 'Heuristic', 'heuristics:ast'],
137
+ ['z.rule', 'FileContent', 'git:staged'],
138
+ ]
139
+ );
125
140
  });
126
141
  });
127
142
  });
@@ -78,6 +78,8 @@ const normalizeFindingPath = (
78
78
  message: finding.message,
79
79
  file: toRelativeRepoPath(repoRoot, finding.file),
80
80
  lines: normalizeLines(finding.lines),
81
+ matchedBy: finding.matchedBy,
82
+ source: finding.source,
81
83
  };
82
84
  };
83
85
 
@@ -101,6 +103,8 @@ const toCompatibilityViolations = (
101
103
  message: finding.message,
102
104
  file: finding.file,
103
105
  lines: finding.lines,
106
+ matchedBy: finding.matchedBy,
107
+ source: finding.source,
104
108
  }));
105
109
  };
106
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.12",
3
+ "version": "6.3.13",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {