fix: recover remaining CI gaps - #1048
Open
code-yeongyu wants to merge 2 commits into
Open
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.
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.
Rebased onto current
main(20cd958c0) and reduced to the fixesmainstill lacks.While this work was in flight,
mainlanded an equivalent guard for the cursor-CLI shutdown pid-file race, so that commit is dropped here. Verified againstmainthat neither fix below is present.What this adds
ci(model-catalog)publish opt-in — 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. Requiresvars.PI_MODEL_CATALOG_PUBLISHalongside the existing event conditions; generation and the catalog check stay unconditional.fix(coding-agent)deleted-cwd guard — exportsrecoverValidCwd()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, which hung the child and blocked Vitest's own timeout through an unboundedspawnSync. The guard test now links both modules while the directory is still valid, invokes the preloaded functions afterwards, and carries a bounded deadlock backstop.Verification
npx vitest --run test/valid-cwd-guard.test.ts test/cursor-cli-oauth/shutdown.test.ts— 11 passed / 0 failed.actionlint— clean on the changed workflow.Supersedes #1047.
Summary by cubic
Stops failing scheduled model-catalog publishes in forks and lets
coding-agentrecover after the working directory is deleted. Previously, publishing always ran and failed without R2 creds and the cwd guard only ran at module load; now publishing runs only when explicitly opted in andrecoverValidCwd()can be called to restore a valid cwd.CI: model-catalog publish opt-in
publishjob in.github/workflows/publish-model-catalog.ymlnow requiresvars.PI_MODEL_CATALOG_PUBLISH == 'true'; generation and validation remain unconditional.PI_MODEL_CATALOG_PUBLISHtotrueand providePI_ARTIFACTS_R2_*secrets.coding-agent: deleted-cwd guard
recoverValidCwd()while retaining the module-level invocation; callers can restore a valid cwd after it was unlinked (falls back tohomedir()and logs).Written for commit dc2a4fa. Summary will update on new commits.