pumuki 6.3.106 → 6.3.107

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
@@ -6,6 +6,14 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [6.3.107] - 2026-04-22
10
+
11
+ ### Fixed
12
+
13
+ - **Semántica inequívoca para sesión SDD expirada:** una sesión vencida deja de proyectarse como `active=true` y pasa a exponerse como inactiva (`active=false`) manteniendo `valid=false` y `remainingSeconds=0`.
14
+ - **Refresh de sesión expiradas todavía permitido:** `refreshSddSession` ya no exige `active=true`; basta con conservar el `changeId` para poder renovar una sesión caducada sin reabrirla manualmente.
15
+ - **Policy SDD alineada con esa semántica:** `evaluateSddPolicy` trata la sesión como `missing` solo cuando falta `changeId`, y conserva `SDD_SESSION_INVALID` para sesiones expiradas con contexto recuperable.
16
+
9
17
  ## [6.3.106] - 2026-04-22
10
18
 
11
19
  ### Fixed
@@ -6,6 +6,12 @@ This file keeps only the operational highlights and rollout notes that matter wh
6
6
 
7
7
  ## 2026-04 (CLI stability and macOS notifications)
8
8
 
9
+ ### 2026-04-22 (v6.3.107)
10
+
11
+ - **Sesión SDD expirada sin semántica ambigua:** la línea publicada deja de diagnosticar sesiones vencidas como `active=true` con `valid=false`; ahora las proyecta como inactivas y mantiene la señal de expiración con `remainingSeconds=0`.
12
+ - **Refresh reproducible de sesiones caducadas:** si el `changeId` sigue siendo válido, `session --refresh` vuelve a servir para recuperar la sesión sin exigir un `session --open` innecesario.
13
+ - **Rollout recomendado:** publicar `pumuki@6.3.107`, repin inmediato en `RuralGo` y revalidar `sdd validate --stage=PRE_WRITE --json` comprobando que `status.session.active=false`, `valid=false` y que la remediación siga permitiendo refresh sobre el mismo `changeId`.
14
+
9
15
  ### 2026-04-22 (v6.3.106)
10
16
 
11
17
  - **Cierre útil del literal residual en RuralGo:** `sdd validate --stage=PRE_WRITE --json` ya no recomienda activar SDD con `pumuki@latest`; devuelve el mismo runtime versionado que está diagnosticando.
@@ -12,6 +12,7 @@ import {
12
12
  readSddSession,
13
13
  refreshSddSession,
14
14
  } from './sessionStore';
15
+ import type { ILifecycleGitService } from '../lifecycle/gitService';
15
16
  import { resolveDegradedMode } from '../gate/degradedMode';
16
17
  import { getCurrentPumukiVersion } from '../lifecycle/packageInfo';
17
18
  import { resolveSddCompletenessEnforcement } from '../policy/sddCompletenessEnforcement';
@@ -78,10 +79,10 @@ const resolveMissingSessionGuidance = (repoRoot: string): {
78
79
  };
79
80
  };
80
81
 
81
- const buildStatus = (repoRoot: string): SddStatusPayload => {
82
+ const buildStatus = (repoRoot: string, git?: ILifecycleGitService): SddStatusPayload => {
82
83
  const openspec = detectOpenSpecInstallation(repoRoot);
83
84
  const compatibility = evaluateOpenSpecCompatibility(openspec);
84
- const session = readSddSession(repoRoot);
85
+ const session = readSddSession(repoRoot, git);
85
86
  return {
86
87
  repoRoot,
87
88
  openspec: {
@@ -171,7 +172,7 @@ const evaluateSessionRequirements = (params: {
171
172
  autoRefreshError?: string;
172
173
  }): SddDecision | undefined => {
173
174
  const { status } = params;
174
- if (!status.session.active) {
175
+ if (!status.session.changeId) {
175
176
  const guidance = resolveMissingSessionGuidance(status.repoRoot);
176
177
  const details: Record<string, string | number | boolean | bigint | symbol | null | Date | object> = {
177
178
  command: guidance.command,
@@ -229,7 +230,6 @@ const shouldAttemptSessionAutoRefresh = (params: {
229
230
  }): boolean =>
230
231
  params.stage !== 'PRE_WRITE'
231
232
  && params.autoRefreshEnabled
232
- && params.status.session.active
233
233
  && !!params.status.session.changeId
234
234
  && !params.status.session.valid;
235
235
 
@@ -553,5 +553,5 @@ export const evaluateSddPolicy = (params: {
553
553
  });
554
554
  };
555
555
 
556
- export const readSddStatus = (repoRoot?: string): SddStatusPayload =>
557
- buildStatus(repoRoot ?? process.cwd());
556
+ export const readSddStatus = (repoRoot?: string, git?: ILifecycleGitService): SddStatusPayload =>
557
+ buildStatus(repoRoot ?? process.cwd(), git);
@@ -86,7 +86,7 @@ const readConfig = (
86
86
  repoRoot: string,
87
87
  git: ILifecycleGitService
88
88
  ): SddSessionState => {
89
- const active = git.localConfig(repoRoot, SDD_KEYS.active) === 'true';
89
+ const rawActive = git.localConfig(repoRoot, SDD_KEYS.active) === 'true';
90
90
  const rawChangeId = git.localConfig(repoRoot, SDD_KEYS.change);
91
91
  const changeId =
92
92
  typeof rawChangeId === 'string' && rawChangeId.trim().length > 0
@@ -101,6 +101,7 @@ const readConfig = (
101
101
  : undefined;
102
102
 
103
103
  const validity = computeValidity(expiresAt);
104
+ const active = rawActive && !!changeId && validity.valid;
104
105
  return {
105
106
  repoRoot,
106
107
  active,
@@ -174,7 +175,7 @@ export const refreshSddSession = (params?: {
174
175
  const git = params?.git ?? new LifecycleGitService();
175
176
  const repoRoot = resolveRepoRoot(params?.cwd ?? process.cwd(), git);
176
177
  const current = readConfig(repoRoot, git);
177
- if (!current.active || !current.changeId) {
178
+ if (!current.changeId) {
178
179
  throw new Error('No active SDD session to refresh. Run `pumuki sdd session --open --change=<id>` first.');
179
180
  }
180
181
  const ttlMinutes = parsePositiveMinutes(params?.ttlMinutes ?? current.ttlMinutes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.106",
3
+ "version": "6.3.107",
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": {