fix: recover failing CI checks - #1047
Closed
code-yeongyu wants to merge 3 commits into
Closed
Conversation
The publish job inherits R2 credentials this repository does not define, so every scheduled run failed at the upload step while generation and checking were healthy. Require vars.PI_MODEL_CATALOG_PUBLISH alongside the existing event conditions; generation and the catalog check stay unconditional.
Export recoverValidCwd() while keeping the module-level invocation, so a caller can trigger recovery after the working directory is already gone. On macOS the ESM loader wedges when a dynamic import starts after the cwd is unlinked, so the guard test now links both modules while the directory is still valid and invokes the preloaded functions afterwards. The child also carries a bounded deadlock backstop.
The fixture publishes the pid file with rename(2) before its first stdout event, so fs.watch never fires when the file already exists by the time the watcher is installed. Check the published state first and let the watcher cover only the not-yet-published case.
Owner
Author
|
Superseded by #1048. While this PR was in flight, |
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.
What was failing
vars.PI_MODEL_CATALOG_PUBLISH; generation and the catalog check stay unconditional.valid-cwd-guard. On macOS the ESM loader wedges when a dynamic import starts after the cwd is unlinked, so the child hung and the unboundedspawnSyncblocked Vitest's own timeout.recoverValidCwd()is now exported and the test links both modules while the directory is still valid.cursor-cli-oauth/shutdown. The fixture publishes its pid file withrename(2)before its first stdout event, sofs.watchnever fires when the file already exists by the time the watcher is installed.Verification
npx vitest --run test/valid-cwd-guard.test.ts test/cursor-cli-oauth/shutdown.test.ts— 11/11.npm testat repo root — exit 0.actionlintclean on all workflows.Summary by cubic
Recovers failing CI by gating model-catalog publishing and fixing two test hangs on macOS. Previously, the publish job always ran and failed with missing R2 credentials; now it runs only when
vars.PI_MODEL_CATALOG_PUBLISHistrue, while generation and validation stay unconditional.vars.PI_MODEL_CATALOG_PUBLISH='true'and configurePI_ARTIFACTS_R2_*secrets to re-enable uploads; otherwise only generate and validate the catalog.recoverValidCwd()(still invoked at module load) so callers can recover after the cwd is deleted; tests preload modules to avoid macOS ESM loader wedging and add a 30s timeout backstop.Written for commit 76bcae7. Summary will update on new commits.