Repository navigation
Hook de dados operacionais trata caminhos C: com path.win32 em qualquer SO - #410
Open
gabrielakihiro-dev wants to merge 1 commit into
Open
gabrielakihiro-dev wants to merge 1 commit into
gabrielakihiro-dev wants to merge 1 commit into
Conversation
…er SO
No Linux, path.resolve("C:/repo/...") vira um caminho relativo ao cwd e
barras invertidas não são separadores, então o caso de worktree do Windows
falhava fora do Windows (a CI só roda os testes JS em windows-latest).
O hook passa a usar path.win32 quando a raiz tem letra de unidade, e o
teste monta os exemplos com path.win32 para ser o mesmo em todo SO.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Etk6cBbrVUxRVmptbMu3pM
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.
Problema
tests/frontend/test_protect_operational_data_hook.cjs, caso "worktree: aceita barras invertidas e maiúsculas do Windows", falhava no Linux (1 falha nonpm run verifylocal). A CI passava porque os testes JS rodam emwindows-latest.Causa raiz
.claude/hooks/protect-operational-data.cjs): usava opathdo sistema. No Linux,\não é separador e maiúsculas importam, então caminhosC:\...nunca eram reconhecidos.path.resolve("C:/repo/Simpress")no Linux vira<cwd>/C:/repo/Simpress, então nenhum caminhoC:\REPO\...cabia nessa raiz.Mudança
path.win32quando a raiz do projeto começa com letra de unidade (C:); senão, opathdo sistema. No Windows o comportamento não muda (pathjá épath.win32).require("node:path").win32. Nenhum caso pulado, desativado ou enfraquecido.Validação
node --test tests/frontend/test_protect_operational_data_hook.cjs→ 5 pass, 0 fail.npm run verify→ as 11 etapas OK (JS: 1130 pass, 0 fail).windows-latest) é a confirmação..codex/hooks/e.agents/plugins/simpress-maestro/hooks/não foram comparadas nem alteradas.Generated by Claude Code