mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Three unresolved review findings on the auto-update feature: - killLocalDashboard (greptile P1): after SIGTERM, the wait loop gated on processExists(pid), which false-positives if the dashboard exits and its pid is recycled onto another same-user process — spinning the full timeout and then SIGKILLing the unrelated process. Gate purely on the port being freed (the property that actually lets the replacement bind). SIGKILL is now only reached when the port is still occupied, i.e. the process is still up and the pid is necessarily valid. - dev-env-state (greptile P2): validate the on-disk cliUpdateCheck cache shape on read; a non-string latestVersion would otherwise reach version parsing and throw. Malformed entries are treated as "no cache". - maybeReexecToLatest (cubic P2): documented "fail open" but readDevEnvState could throw (corrupt/bad-permission state file) and crash `stack dev`. Wrap the body in try/catch so any unexpected error falls through to the installed CLI. Tests: +4 — recycled-pid early-return without SIGKILL, malformed/well-formed cache read, and fail-open on a corrupt state file. 170 pass. |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| .eslintrc.cjs | ||
| package.json | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||