| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(install,update): resilience batch 1 from the second full review - discovery: recognize unscoped global installs (atomgit-cli) by deriving the npm root container per package-name shape; the fixed two-level walk misclassified the recommended coordinate as npm-local after its first self-update (--ignore-scripts wipes recorded metadata) - update.log is best-effort: an unwritable log (root-owned file, EISDIR) no longer rewrites a successful update as a failure - background "current" checks queue no next-launch summary and clear stale "available" notices (daily noise in the default notify mode) - bootstrap helper re-reads state under the lock (a minutes-old snapshot no longer rolls back notice flags) and records failures under the cross-process lock, skipping the write when another updater owns it - StartDetached runs the helper in its own session (Setsid on Unix, new process group + DETACHED_PROCESS on Windows) so closing the terminal or Ctrl+C cannot kill an in-flight install - npm-channel health check budget 10s -> 30s to cover first-run global metadata discovery on slow machines - alias symlink loops fall through to the actionable refusal instead of a raw ELOOP Closes #601 | 1 个月前 | |
fix(install,update): resilience batch 1 from the second full review - discovery: recognize unscoped global installs (atomgit-cli) by deriving the npm root container per package-name shape; the fixed two-level walk misclassified the recommended coordinate as npm-local after its first self-update (--ignore-scripts wipes recorded metadata) - update.log is best-effort: an unwritable log (root-owned file, EISDIR) no longer rewrites a successful update as a failure - background "current" checks queue no next-launch summary and clear stale "available" notices (daily noise in the default notify mode) - bootstrap helper re-reads state under the lock (a minutes-old snapshot no longer rolls back notice flags) and records failures under the cross-process lock, skipping the write when another updater owns it - StartDetached runs the helper in its own session (Setsid on Unix, new process group + DETACHED_PROCESS on Windows) so closing the terminal or Ctrl+C cannot kill an in-flight install - npm-channel health check budget 10s -> 30s to cover first-run global metadata discovery on slow machines - alias symlink loops fall through to the actionable refusal instead of a raw ELOOP Closes #601 | 1 个月前 | |
test(install,update): address review findings from batch 1 review - isolate the current/available summary tests from the host state dir - assert the available branch still queues a next-launch summary - tolerate partial reads in the session-leader polling loop - assert the Windows detach creation flags directly - record lastChecked in bootstrap failure state (cross-channel parity) - document the lock-stale vs worst-case hold arithmetic Refs #601 | 1 个月前 | |
fix(doctor): install diagnostics parity and guards Seven round-6 findings in the doctor install path: - Empty binary guard: DetectDistribution with an empty binary path read .gitcode-install.json from the current working directory (filepath.Dir of "" is "."), so running doctor from an npm package root could misreport the channel. It now short-circuits to the documented archive-or-source default. - JSON contract: commands.<name>.candidates serialized as null when nothing was found — the not-on-PATH case is doctor's main diagnostic path. commandCandidates now returns a non-nil slice. - PATHEXT parity: the Windows extension probe used a hardcoded order (.exe before .com) that contradicts cmd.exe's documented PATHEXT resolution. Both sides now expand the user's PATHEXT (fallback .com/.exe/.bat/.cmd), always append .ps1 (npm writes ps1 shims on every install), and keep the extensionless form last so Git Bash sh shims stay visible. - Symlink parity: distribution detection resolved symlinks before reading the adjacent manifest, but the bootstrap on-PATH check read the manifest next to the unresolved path — a symlinked invocation reported the channel from the resolved manifest while silently skipping the on-PATH diagnostic. Inspect now resolves once and feeds both consumers (Report.Binary keeps the invoked path). - Human output: doctor install --json always carried version/commit/ built and COMMANDS.md documents them, but the human output omitted all three; they now lead the report ((not found) placeholders when the build metadata is empty). - JS pathEntries split PATH on every separator, including inside quotes — a legal "C:\tools;a" entry produced phantom candidates and disagreed with the Go side (filepath.SplitList is quote-aware). It now mirrors the Go semantics. - Tests: the npm-prefix conflict branch (both outcomes, both goos variants — single-entry PATHs because SplitList is host-aware), the candidates-are-arrays JSON contract, the human version header, the symlinked-bootstrap on-PATH check, and the CWD-manifest guard; the JS side locks the quote-aware split and the PATHEXT expansion. Co-Authored-By: Claude Code <noreply@anthropic.com> | 1 个月前 | |
fix(doctor): install diagnostics parity and guards Seven round-6 findings in the doctor install path: - Empty binary guard: DetectDistribution with an empty binary path read .gitcode-install.json from the current working directory (filepath.Dir of "" is "."), so running doctor from an npm package root could misreport the channel. It now short-circuits to the documented archive-or-source default. - JSON contract: commands.<name>.candidates serialized as null when nothing was found — the not-on-PATH case is doctor's main diagnostic path. commandCandidates now returns a non-nil slice. - PATHEXT parity: the Windows extension probe used a hardcoded order (.exe before .com) that contradicts cmd.exe's documented PATHEXT resolution. Both sides now expand the user's PATHEXT (fallback .com/.exe/.bat/.cmd), always append .ps1 (npm writes ps1 shims on every install), and keep the extensionless form last so Git Bash sh shims stay visible. - Symlink parity: distribution detection resolved symlinks before reading the adjacent manifest, but the bootstrap on-PATH check read the manifest next to the unresolved path — a symlinked invocation reported the channel from the resolved manifest while silently skipping the on-PATH diagnostic. Inspect now resolves once and feeds both consumers (Report.Binary keeps the invoked path). - Human output: doctor install --json always carried version/commit/ built and COMMANDS.md documents them, but the human output omitted all three; they now lead the report ((not found) placeholders when the build metadata is empty). - JS pathEntries split PATH on every separator, including inside quotes — a legal "C:\tools;a" entry produced phantom candidates and disagreed with the Go side (filepath.SplitList is quote-aware). It now mirrors the Go semantics. - Tests: the npm-prefix conflict branch (both outcomes, both goos variants — single-entry PATHs because SplitList is host-aware), the candidates-are-arrays JSON contract, the human version header, the symlinked-bootstrap on-PATH check, and the CWD-manifest guard; the JS side locks the quote-aware split and the PATHEXT expansion. Co-Authored-By: Claude Code <noreply@anthropic.com> | 1 个月前 | |
fix(update): align lifecycle semantics and close lock-identity gaps A failing gc command skipped the update lifecycle entirely on the bootstrap channel (cobra skips PersistentPostRun when RunE errors), while the npm wrapper runs its lifecycle on every exit code: pending summaries, first-run notice and due background checks all stalled while a user's commands kept failing (e.g. an expired token). Execute now runs the lifecycle explicitly on the error path, mirroring gc.js. A background spawn that raced a mode flip to off still installed on the npm channel (shouldOnlyNotify has no off branch); the under-lock mode recheck now returns disabled for background runs — writing no state, so the winner's nextCheck stays put. updateMode trims whitespace on both JS channels (CRLF-contaminated profile values like " off" resolved differently than the Go side, which trims). A transient bootstrap failure over an existing permanent pause now says the pause remains (mirroring the npm channel's sticky guidance). Lock identity: the JS releaseLock's inode check always passes on Windows (libuv leaves st_ino at 0), so a stalled holder resuming after a stale reclaim would still delete the reclaimer's fresh lock there — the locks now record the holder pid and release verifies it by content (the Go side already did), keeping the inode check as the POSIX fast path. The stale-reclaim restore path used rename, which silently overwrites: a third process claiming the freed path between the retire and the restore would have its fresh lock clobbered; the restore now uses link+unlink (EEXIST means the path is taken — give up the hold) on all three implementations. writeState failures no longer vanish silently: mutateStateLocked reports them, and the hourly spawn backoff degrades to a single fixed "state is not writable" notice instead of reprinting the spawn detail on every command. Fifth review P3 backlog, issue 607 items 11, 12, 13, 14, 15, 17, 18. Co-Authored-By: Claude Code <noreply@anthropic.com> | 1 个月前 | |
fix(update): honor --json on killed checks and pflag =value flag forms RunCheck left --json consumers with empty stdout and a non-zero exit when the helper died before printing (the 120s deadline kill): the Go caller returns the error directly in --check mode, so nothing synthesized the JSON error object. RunCheck now writes a synthesized error object to stdout when the helper produced no parsable output, and the helper's stderr forwarding is disabled in --json mode (the returned error already carries the detail; forwarding printed it twice in text mode and broke the single-object contract in json mode). Both helper parsers rejected cobra/pflag's boolean --flag=value forms (--check=true exited with "unknown argument") while accepting them for --no-update-check. Boolean flags now parse both forms (only truthy values set the flag; non-boolean values are rejected), and the bootstrap helper's --manifest=/--parent-pid= value forms work alongside the space-separated ones. The off-mode branch gains a comment documenting that --check and --force are exempt by design — off disables the automatic daily checks, never an explicit command (verified end-to-end by the fifth-review exploration; recorded as a non-reproducible finding). Fifth review P3 backlog, issue 607 items 8, 9, 10. Co-Authored-By: Claude Code <noreply@anthropic.com> | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |