fix(scripts): renew stale frontend node_modules anonymous volumes (#306)#308
Merged
alexandervazquez98 merged 10 commits intoJun 21, 2026
Merged
Conversation
2793915 to
cc020a1
Compare
This was referenced Jun 21, 2026
alexandervazquez98
added a commit
that referenced
this pull request
Jun 21, 2026
Mirror the proven changed-files pattern from .github/workflows/lint.yml L97-123: detect touched shell files with tj-actions/changed-files (same SHA pin and CVE-2025-30022 comment as lint.yml) and run shellcheck -x only against that subset. Trigger paths filters and the push-to-main trigger are preserved unchanged. Drops the redundant Install ShellCheck step — Ubuntu 24.04 runners ship shellcheck preinstalled, the same assumption lint.yml relies on. Adds an explicit 'No shell files changed — skipping.' branch to match the proven skip behavior. Fixes #313 by unblocking PR #308 (and any future PR that touches a non-shell path): pre-existing findings in unmodified scripts no longer gate unrelated work. PR #308's own 22 findings in scripts/test-refresh-frontend-deps.sh and scripts/test-safe-rebuild-frontend-volume.sh remain PR #308's responsibility. Co-authored-by: Alex <alex@alex.dev>
alexandervazquez98
pushed a commit
that referenced
this pull request
Jun 21, 2026
Re-run CI after the shellcheck.yml scoping fix landed on main to confirm pre-existing shellcheck findings in scripts/test-check-frontend-deps.sh and scripts/validate-env.sh no longer block this PR. PR #308's own new findings in test-refresh-frontend-deps.sh and test-safe-rebuild-frontend-volume.sh remain as blockers and must be cleaned up by this PR's author.
added 10 commits
June 21, 2026 16:18
Also fixes the test grep invocations to pipe LAST_OUT through stdin instead of treating it as a filename argument (POSIX sh limitation).
…cdb651 Moves the change folder to openspec/changes/archive/2026-06-21-renew-frontend-node-modules-volumes/ and promotes the delta spec to the canonical capability at openspec/specs/frontend-dependency-volume-renewal/spec.md. Branch fix/306-renew-frontend-node-modules-volumes is ready for review; PR to be opened by user or next session. Main SHA at archive: NOT YET MERGED. Linked PR: NOT YET OPENED. See openspec/changes/archive/2026-06-21-renew-frontend-node-modules-volumes/archive-report.md for cycle summary, accepted warnings (shellcheck unavailable, .env dry-run precondition, non-POSIX local in test helpers), and lessons learned. Capability: frontend-dependency-volume-renewal (R1-R8). Out of scope: docker-compose.yml anonymous volume removal, frontend-prod, .github/workflows/cd.yml, destructive volume cleanup, --pull on docker compose build, --renew-frontend-anon-volumes safe-rebuild flag. Issue: #306.
Re-run CI after the shellcheck.yml scoping fix landed on main to confirm pre-existing shellcheck findings in scripts/test-check-frontend-deps.sh and scripts/validate-env.sh no longer block this PR. PR #308's own new findings in test-refresh-frontend-deps.sh and test-safe-rebuild-frontend-volume.sh remain as blockers and must be cleaned up by this PR's author.
96e39be to
dfc8ab8
Compare
2 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descripción del Cambio
Cierra #306.
El dev
frontendservice monta./frontend:/app+ un volumen anónimo en/app/node_modulespara hot reload. Cuando cambiafrontend/pnpm-lock.yaml, el volumen anónimo viejo oculta las dependencias recién construidas y deja al container con módulos faltantes (caso real:sonnerfaltó aunque la imagen sí lo tenía).Qué hace este PR
scripts/safe-rebuild.shahora detecta cambios enfrontend/pnpm-lock.yamlcomparando el hash SHA-256 contra un sentinel en$BACKUP_DIR/frontend-pnpm-lock.sha256. Si cambió, emitedocker compose up -d --force-recreate --renew-anon-volumes frontend(scoped al serviciofrontend, nunca service-wide).scripts/refresh-frontend-deps.sh(nuevo) da a los operadores un recovery explícito cuando aparece este síntoma en producción sin esperar al próximosafe-rebuild.docs/backup-restore.mdyREADME.mdaclaran la distinción entre volúmenes de datos (preservar:postgres-data,neo4j-data, backups) y volúmenes build-artifact (renovar cuando aplica:/app/node_modules).scripts/test-safe-rebuild-frontend-volume.sh,scripts/test-refresh-frontend-deps.sh) cubren los 8 requirements del specfrontend-dependency-volume-renewal.Cambios
scripts/safe-rebuild.shcompute_frontend_lockfile_hash,frontend_lockfile_changed,maybe_renew_frontend_anonymous_volume) + wiring entredocker compose buildy elup -dpost-build. Pre-backup mount (L188) queda intacto.scripts/refresh-frontend-deps.shsh,--dry-run,require_command docker.scripts/test-safe-rebuild-frontend-volume.shscripts/test-refresh-frontend-deps.shdocs/backup-restore.mddocker compose down -v.README.mdopenspec/specs/frontend-dependency-volume-renewal/spec.mdopenspec/changes/archive/2026-06-21-renew-frontend-node-modules-volumes/Tipo de Cambio
¿Cómo se probó?
sh scripts/test-safe-rebuild-frontend-volume.sh→ exit 0 (9 helper + sandbox assertions verdes)sh scripts/test-refresh-frontend-deps.sh→ exit 0 (8 CLI assertions verdes)sh scripts/test-safe-rebuild-path-validation.sh→ exit 0 (regresión preexistente OK)sh scripts/test-neo4j-offline-backup-flags.sh→ exit 0 (regresión preexistente OK)sh scripts/test-ci-cd-check-runner-contract.sh→ exit 0 (regresión preexistente OK)sh scripts/test-check-frontend-deps.sh→ exit 0 (3/3, regresión preexistente OK)sh -nsyntax check sobre los 4 scripts nuevos/modificados → OKsh scripts/safe-rebuild.sh --dry-runcon.envválido → exit 0, emite+ docker compose up -d --force-recreate --renew-anon-volumes frontendentredocker compose buildy elup -dfinalsh scripts/refresh-frontend-deps.sh --dry-run→ exit 0, imprime el comando sin ejecutar Dockershellcheckinstalado). El verify-report marca esto como WARNING; si la política del repo requiere shellcheck en CI, correr en un host con la herramienta antes de mergear.Verify report completo:
openspec/changes/archive/2026-06-21-renew-frontend-node-modules-volumes/verify-report.md.Checklist de Seguridad
.gitignore(.envno se commitea).Generado por SDD cycle (auto mode) sobre issue #306.