pumuki 6.3.48 → 6.3.50

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.
@@ -5,6 +5,32 @@ Detailed commit history remains available through Git history (`git log` / `git
5
5
 
6
6
  ## 2026-03 (enterprise hardening updates)
7
7
 
8
+ ### 2026-03-05 (v6.3.50)
9
+
10
+ - Atomicity remediation clarity (`GIT_ATOMICITY_TOO_MANY_SCOPES`):
11
+ - blocking message now includes `scope_files=` with per-scope file breakdown,
12
+ - remediation now includes explicit `Sugerencia split` wording for deterministic staging split.
13
+ - Gate summary `next_action` updated for this code:
14
+ - explicitly instructs to use `scope_files` before running split commands.
15
+ - Validation evidence:
16
+ - `npx --yes tsx@4.21.0 --test integrations/git/__tests__/gitAtomicity.test.ts integrations/git/__tests__/runPlatformGateOutput.test.ts` (`9 pass / 0 fail`)
17
+ - `npm run -s typecheck` (`PASS`)
18
+
19
+ ### 2026-03-05 (v6.3.49)
20
+
21
+ - Watch JSON contract clarity for staged scope:
22
+ - `lastTick.changed` now reflects real scoped file delta, not merely tick execution.
23
+ - In `scope=staged` with no staged files:
24
+ - `changed=false`
25
+ - `changedFiles=[]`
26
+ - `evaluatedFiles=[]`
27
+ - Operational impact:
28
+ - prevents false interpretation of activity in consumer diagnostics and backlog evidence.
29
+ - Validation evidence:
30
+ - `npx --yes tsx@4.21.0 --test integrations/lifecycle/__tests__/watch.test.ts` (`6 pass / 0 fail`)
31
+ - `npm run -s typecheck` (`PASS`)
32
+ - consumer smoke (Flux, local core bin): `watch --once --stage=PRE_COMMIT --scope=staged --json` -> `changed=false` with empty arrays.
33
+
8
34
  ### 2026-03-05 (v6.3.48)
9
35
 
10
36
  - Anti-drift hardening for consumer validation flows:
@@ -2546,4 +2546,60 @@
2546
2546
  - `sed -n '1,60p' /Users/.../R_GO/docs/.../pumuki-integration-feedback.md` (estado cerrado 100/0).
2547
2547
  - `gh issue close 720 --repo SwiftEnProfundidad/ast-intelligence-hooks ...`.
2548
2548
 
2549
- - 🚧 PUMUKI-189: Ejecutar siguiente bug prioritaria activa de Flux (`PUM-013`) sobre drift de dependencia en manifests durante validación y cerrar con fix + release + validación consumer.
2549
+ - PUMUKI-189: Ejecutar siguiente bug prioritaria activa de Flux (`PUM-013`) sobre drift de dependencia en manifests durante validación y cerrar con fix + release + validación consumer.
2550
+ - Resultado (2026-03-05):
2551
+ - issue upstream `#722` cerrada tras validación real en consumer.
2552
+ - `PUM-013` actualizado a `✅ Cerrado` en el MD externo de Flux.
2553
+ - verificación de no-mutación confirmada:
2554
+ - `package.json` hash before/after sin cambios,
2555
+ - `pnpm-lock.yaml` hash before/after sin cambios,
2556
+ - `watch --once --json` en `ALLOW` (`gateExitCode=0`).
2557
+ - Evidencia:
2558
+ - `npx --yes --package pumuki@latest pumuki watch --once --stage=PRE_COMMIT --scope=staged --json`
2559
+ - `gh issue close 722 --repo SwiftEnProfundidad/ast-intelligence-hooks ...`
2560
+ - `/Users/juancarlosmerlosalbarracin/Developer/Projects/Flux_training/docs/BUGS_Y_MEJORAS_PUMUKI.md` (`PUM-013` -> `✅ Cerrado`).
2561
+
2562
+ - ✅ PUMUKI-190: Ejecutar vigilancia activa del backlog canónico de RuralGo y abrir/cerrar loop solo ante nuevos hallazgos netos reproducibles (`OPEN/REPORTED`), manteniendo SAAS/Flux en validación de no-regresión sin tocar código consumidor.
2563
+ - Resultado (2026-03-05):
2564
+ - tick fleet ejecutado sobre los 3 backlogs externos (`SAAS`, `RuralGo`, `Flux`) sin hallazgos netos.
2565
+ - `non_closed_total=0`, `action_required_targets=0`, `has_action_required=false`.
2566
+ - no se abren issues nuevas ni se requiere fix técnico en este ciclo.
2567
+ - Evidencia:
2568
+ - `npm run -s validation:backlog-watch:tick`
2569
+ - salida JSON: `targets=3`, `entries_scanned_total=142`, `non_closed_total=0`.
2570
+
2571
+ - ✅ PUMUKI-191: Mantener monitorización continua multi-consumer (tick periódico) y abrir ejecución técnica inmediata solo cuando `has_action_required=true`, actualizando en el mismo ciclo el MD externo afectado + este MD interno.
2572
+ - Resultado (2026-03-05):
2573
+ - tick fleet detectó hallazgo neto nuevo en Flux (`PUM-014`) con `has_action_required=true`.
2574
+ - issue upstream creada: `#723`.
2575
+ - MD externo Flux actualizado a estado activo (`PUM-014` -> `🚧 En construccion (#723)`).
2576
+ - Evidencia:
2577
+ - `npm run -s validation:backlog-watch:tick` (run_id `819f019e-36ce-405f-ba24-3cb1372a2021`)
2578
+ - `gh issue create --repo SwiftEnProfundidad/ast-intelligence-hooks ...` -> `#723`
2579
+ - `/Users/juancarlosmerlosalbarracin/Developer/Projects/Flux_training/docs/BUGS_Y_MEJORAS_PUMUKI.md` actualizado.
2580
+
2581
+ - ✅ PUMUKI-192: Ejecutar fix de `PUM-014/#723` en `watch --json` para alinear `lastTick.changed` con delta real de archivos del scope, validar en tests y preparar cierre de leyenda externa.
2582
+ - Avance (2026-03-05):
2583
+ - fix aplicado en `integrations/lifecycle/watch.ts` (`changed` ahora depende del delta real del scope).
2584
+ - regresión añadida/actualizada en `integrations/lifecycle/__tests__/watch.test.ts`.
2585
+ - smoke en Flux con binario local del core:
2586
+ - `changed=false`, `changedFiles=[]`, `evaluatedFiles=[]`, `gateOutcome=ALLOW`.
2587
+ - issue `#723` actualizada con evidencia técnica.
2588
+ - Cierre (2026-03-05):
2589
+ - release publicada: `pumuki@6.3.49`.
2590
+ - validación final en Flux con `@latest`:
2591
+ - `changed=false`, `changedFiles=[]`, `evaluatedFiles=[]`, `gateOutcome=ALLOW`.
2592
+ - MD externo Flux actualizado: `PUM-014` -> `✅ Cerrado`.
2593
+ - issue `#723` cerrada.
2594
+
2595
+ - ✅ PUMUKI-193: Mantener monitorización continua multi-consumer (`SAAS` + `RuralGo` + `Flux`) y abrir fix inmediato solo ante hallazgo neto nuevo, actualizando en el mismo ciclo MD externo afectado + MD interno.
2596
+ - Resultado (2026-03-05):
2597
+ - tick fleet posterior al cierre de Flux detectó nuevo pendiente en SAAS: `PUMUKI-M009` (`needs_issue`).
2598
+ - issue upstream creada: `#724`.
2599
+ - MD externo SAAS actualizado a estado activo (`PUMUKI-M009` -> `🚧`, ref `#724`).
2600
+ - Evidencia:
2601
+ - `npm run -s validation:backlog-watch:tick` (run_id `0856d3f4-9508-4a93-9229-ce5c702c8b4d`)
2602
+ - `gh issue create --repo SwiftEnProfundidad/ast-intelligence-hooks ...` -> `#724`
2603
+ - `/Users/juancarlosmerlosalbarracin/Developer/Projects/SAAS:APP_SUPERMERCADOS/docs/pumuki/PUMUKI_BUGS_MEJORAS.md` actualizado.
2604
+
2605
+ - 🚧 PUMUKI-194: Implementar `PUMUKI-M009/#724` para que bloqueos `GIT_ATOMICITY_TOO_MANY_SCOPES` incluyan desglose accionable por scopes/archivos + `next_action` determinista de split.
@@ -172,6 +172,26 @@ const resolveScopeKey = (filePath: string): string => {
172
172
  return segments[0] ?? '';
173
173
  };
174
174
 
175
+ const collectScopePaths = (
176
+ changedPaths: ReadonlyArray<string>
177
+ ): ReadonlyMap<string, ReadonlyArray<string>> => {
178
+ const buckets = new Map<string, Array<string>>();
179
+ for (const path of changedPaths) {
180
+ const scope = resolveScopeKey(path);
181
+ if (scope.length === 0) {
182
+ continue;
183
+ }
184
+ const current = buckets.get(scope) ?? [];
185
+ current.push(path.replace(/\\/g, '/'));
186
+ buckets.set(scope, current);
187
+ }
188
+ const normalized = new Map<string, ReadonlyArray<string>>();
189
+ for (const [scope, paths] of buckets.entries()) {
190
+ normalized.set(scope, [...new Set(paths)].sort());
191
+ }
192
+ return normalized;
193
+ };
194
+
175
195
  const collectChangedPaths = (params: {
176
196
  git: IGitService;
177
197
  repoRoot: string;
@@ -259,25 +279,30 @@ export const evaluateGitAtomicity = (params: {
259
279
  });
260
280
  }
261
281
 
262
- const scopeKeys = new Set(
263
- changedPaths
264
- .map((filePath) => resolveScopeKey(filePath))
265
- .filter((scopeKey) => scopeKey.length > 0)
266
- );
282
+ const scopePaths = collectScopePaths(changedPaths);
283
+ const scopeKeys = new Set(scopePaths.keys());
267
284
  if (scopeKeys.size > config.maxScopes) {
268
285
  const sortedScopes = [...scopeKeys].sort();
269
286
  const suggestedScopeAdds = sortedScopes
270
287
  .slice(0, Math.max(1, Math.min(config.maxScopes + 1, 3)))
271
288
  .map((scope) => `git add ${scope}/`)
272
289
  .join(' && ');
290
+ const scopeBreakdown = sortedScopes
291
+ .map((scope) => {
292
+ const paths = scopePaths.get(scope) ?? [];
293
+ const sample = paths.slice(0, 3);
294
+ return `${scope}{count=${paths.length}; sample=[${sample.join(', ')}]}`;
295
+ })
296
+ .join(' | ');
273
297
  violations.push({
274
298
  code: 'GIT_ATOMICITY_TOO_MANY_SCOPES',
275
299
  message:
276
- `Git atomicity guard blocked at ${params.stage}: changed_scopes=${scopeKeys.size} exceeds max_scopes=${config.maxScopes}.`,
300
+ `Git atomicity guard blocked at ${params.stage}: changed_scopes=${scopeKeys.size} exceeds max_scopes=${config.maxScopes}. ` +
301
+ `scope_files=${scopeBreakdown}.`,
277
302
  remediation:
278
303
  `Agrupa cambios por ámbito funcional (máximo ${config.maxScopes} scopes por commit). ` +
279
304
  `scopes_detectados=[${sortedScopes.join(', ')}]. ` +
280
- `Sugerencia: git restore --staged . && ${suggestedScopeAdds} && git commit -m "<tipo>: <scope>".`,
305
+ `Sugerencia split: git restore --staged . && ${suggestedScopeAdds} && git commit -m "<tipo>: <scope>".`,
281
306
  });
282
307
  }
283
308
 
@@ -16,7 +16,7 @@ const BLOCK_NEXT_ACTION_BY_CODE: Readonly<Record<string, string>> = {
16
16
  GIT_ATOMICITY_TOO_MANY_FILES:
17
17
  'git restore --staged . && separa cambios en commits más pequeños',
18
18
  GIT_ATOMICITY_TOO_MANY_SCOPES:
19
- 'git restore --staged . && git add <scope>/ && git commit -m "<tipo>: <scope>"',
19
+ 'Revisa scope_files del bloqueo y aplica: git restore --staged . && git add <scope>/ && git commit -m "<tipo>: <scope>"',
20
20
  ACTIVE_RULE_IDS_EMPTY_FOR_CODE_CHANGES_HIGH:
21
21
  'Reconcilia policy/skills y reintenta PRE_COMMIT: npx --yes --package pumuki@latest pumuki policy reconcile --strict --json && npx --yes --package pumuki@latest pumuki-pre-commit',
22
22
  SKILLS_SKILLS_FRONTEND_NO_SOLID_VIOLATIONS:
@@ -373,6 +373,7 @@ export const runLifecycleWatch = async (
373
373
  });
374
374
  const changedFiles = collectChangedFilesFromFacts(facts);
375
375
  const evaluatedFiles = collectEvaluatedFilesFromFacts(facts);
376
+ const scopeHasFileDelta = changedFiles.length > 0 || evaluatedFiles.length > 0;
376
377
  const runEvaluation = async (): Promise<{
377
378
  gateExitCode: number;
378
379
  evidence: AiEvidenceV2_1 | undefined;
@@ -530,7 +531,7 @@ export const runLifecycleWatch = async (
530
531
 
531
532
  lastTick = {
532
533
  tick: ticks,
533
- changed,
534
+ changed: scopeHasFileDelta,
534
535
  evaluated: true,
535
536
  stage,
536
537
  scope,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.48",
3
+ "version": "6.3.50",
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": {