Conversation
sun-970
pushed a commit
that referenced
this pull request
Sep 7, 2026
spawnSync returns null status when npm is killed by signal or not found on PATH. Three return sites in runWithRetry passed null through to process.exit, which Node treats as 0 — failing the audit gate silently. Add `?? 1` at the two unguarded sites (:67, :85) and remove the redundant 4th spawnSync after loop exhaustion (review finding #1), reusing the last loop result with the same `?? 1` guard. All three sites now aligned.
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.
Tracking
Refs bytefolk#139
Supersedes bytefolk#140 (rebased onto latest
mainto resolveCHANGELOG.mdconflict).Consumed requirement revision: #139 R1. This PR must not auto-close the issue; merge and product acceptance remain separate decisions.
Scope
Repairs only the local Qoder checkpoint persistence path on current
main. It adds a persistent per-checkpoint OS advisory-lock sidecar, merges competing writes under that lock without allowingLastLineor associated diagnostic state to regress, and replaces the shared*.tmpname with a unique private staging file plus sync and atomic rename.Traceability
flock/ AIXfcntl/ WindowsLockFileEx); staging uses same-directoryCreateTemp; an owner process exits throughos.Exitwhile holding the lock and a waiting writer proceeds after kernel release..lockand transient private temp files are added beside local state.Validation
go test ./...andgo test -race -p 1 ./...pass.gofmt,go vet ./..., and build pass.Risk / rollback
The lock is advisory and applies only to participating
memcheckpoint writers on a filesystem with normal OS locking semantics. Revert this PR to restore the prior writer. No remote API, transcript format, release artifact, dependency, or repository-setting change is included.