Conversation
…gling symlink The packages/docs/openapi.json is a symlink to ../sdk/openapi.json. When copied to the site/ directory, the symlink becomes dangling, causing actions/upload-pages-artifact@v3 (which uses tar internally) to fail with 'tar: ./openapi.json: File removed before we read it'. Fix by using cp -rL to copy the actual file content instead of the symlink.
## Problemas corrigidos ### 1. native watcher não carregava em testes (ReferenceError: TEAMCODE_LIBC) `declare const TEAMCODE_LIBC` é uma constante de compilação que não existe em runtime (`bun test`). Ao usá-la na template string, gerava ReferenceError antes do `require()`, impedindo o carregamento do binding nativo @parcel/watcher. → Correção: guard com `typeof` antes de acessar a variável. ### 2. Snapshot revert falhava com nomes de arquivo Unicode O revert do Snapshot usava `core` (sem `core.quotepath=false`) nos comandos `checkout` e `ls-tree$, fazendo o git escapar nomes Unicode. → Correção: usar `quote` (que inclui `-c core.quotepath=false`) nos comandos que manipulam paths fornecidos pelo usuário. ### 3. Testes com skip indevido reativados - `test/snapshot/snapshot.test.ts` — unicode filenames modification and restore: agora roda (exigiu a correção #2 acima) - `test/server/httpapi-sync.test.ts` — structured validation errors: usava HttpApiApp.webHandler() sem as layers necessárias; corrigido para usar app().request() como os demais testes - `test/file/fsmonitor.test.ts` — bodies vazios com test.skip(): substituído por implementação real rodando em todas as plataformas ### 4. Watcher tests condicionais ao binding nativo Os testes do FileWatcher precisam do binding nativo @parcel/watcher para serem rápidos e determinísticos. Quando ausente (polling fallback), os testes demorariam >30s cada. Mantemos o skip apenas quando `hasNativeBinding()` é false. ### 5. Go core download 404 `download-go-core.ts` tentava baixar `go-core-{platform}-{arch}.tar.gz` mas os assets da release são `teamcode-{platform}-{arch}.tar.gz`. → Correção: ajustar URL para o nome correto do asset.
The forked native-subscribe fiber (@parcel/watcher) cannot be interrupted once the Promise is in-flight. When a test scope closes before the subscribe completes, the inotify callback fires on a deleted temp directory and logs error: inotify_add_watch failed / Bad file descriptor, causing cascading test failures in unrelated test suites. Fix: set NODE_ENV=test in the test preload and skip the native binding in both watcher loaders (src/file/watcher.ts and src/config/watch.ts) when running in test mode, falling back to the polling watcher. The polling watcher is fully synchronous and properly scoped, so it does not leak subscriptions across test boundaries.
|
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
Após o merge de develop para main, as Actions ficaram com erro:
tar: ./openapi.json: File removed before we read itCausa Raiz
O arquivo
packages/docs/openapi.jsoné um symlink para../sdk/openapi.json. Quando copiado para o diretóriosite/, o symlink fica pendurado (dangling), causando falha noactions/upload-pages-artifact@v3que usatarinternamente:Correção
Alterar
cp -rparacp -rLnodeploy-site.ymlpara resolver os symlinks e copiar o conteúdo real do arquivo, não o symlink.Verificação
packages/docs/openapi.json -> ../sdk/openapi.jsoné corretamente resolvido comcp -rLApós merge deste PR e push em main, o deploy-site deve passar e o Railway App check deve ser tratado separadamente (a workflow
deploy-app.ymlfoi removida anteriormente).