| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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(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(review): address multi-role review findings for the 609 batch Four independent reviewers (code/security/test/docs) over the 6-commit batch: one P1, five P2s, and a set of P3s — all fixed here. P1 (code review, reproduced end-to-end): the shadow-skip broke the PRIMARY install path. npx/npm exec prepends the package's own npx-cache node_modules/.bin to PATH, so firstProviderOnPath resolved the package's own shims and every completion was skipped with a misleading warning — on a clean machine too. A provider now counts as self when it resolves into the same package tree that is running the installer (providerIsRunningPackage, realpath against the running package root); a different persistent install of our coordinate still shadows. The npx shape is reproduced in a sandbox fixture: 6/6 completions install, zero skips or warnings. Docs P2s: the PowerShell completion example wrote to $PROFILE.Completions, a nonexistent property — the redirect drops the script silently; now appends to $PROFILE. The zsh notice pointed at a README section that does not exist (both pointers now name the Uninstall section). spec and .devcontainer still taught the deleted make release-snapshot; AGENTS.md still called 'make release' the official publish after it became --skip=publish. AI-GUIDE and INTRODUCTION carried half-migrated repository slugs (clone commands and -R demo targets that hit the retired coordinate); dev-facing test rules and links unified too. Code P3s: BASH_COMPLETION_USER_DIR now requires absolute entries like the XDG vars (a relative value produced a CWD-relative write target); the upload precheck also refuses batch-internal duplicate basenames; --clobber against a directory says so instead of a raw is-a-directory error; the main npm job's post-publish verification loop normalizes failed lookups into retries like every other dist-tag check. Test P3s: the Go PATHEXT helper gains the table test mirroring its JS twin (the parity this batch is about had no Go-side pin); the mutually-exclusive-flags test asserts the cobra flag-group error text (a bare err != nil stayed green if the check were dropped); the workflow contract requires BOTH dist-tag-guard invocations (strings.Count == 2); the doctor human-output test pins the header order; upload gains the wrapped not-found (exit 3) and directory/batch-duplicate tests; providerIsRunningPackage and the relative BCUD entries get unit tests. Recorded without changes: api-doc/ is a separate repository (its slug stays), sparse-checkout for the npm job and the pre-existing dual download-artifact pin are noted for later, shadow run-level positive coverage rides the sandbox fixture above. Co-Authored-By: Claude Code <noreply@anthropic.com> | 1 个月前 | |
fix(npm): restrict openharmony alias to arm64 and align platform docs Follow-up to !515 review (issue 583): - P1: platform.js openharmony alias was platform-level, implicitly supporting openharmony/x64 while docs only declare arm64. Narrow it via a platform-arch restriction table and pin the intent with openharmony/x64 negative test cases. - P2: fix the header comment claiming the code mirrors gc_cli/wrapper.py; the Python side relies on uname (reports Linux on OpenHarmony) and needs no alias. - P3: add OpenHarmony (arm64) to the npm bootstrap environment lists in README.md and docs/AI-GUIDE.md to match docs/INTRODUCTION.md and npm/README.md. | 1 个月前 | |
fix(install): bound installer subprocesses and correct stale references The installer's external processes ran without timeouts: a blocked child (AV scanning the fresh binary, a hung PowerShell) hung the whole install indefinitely. Bound runGc at 30s and the PATH-persisting PowerShell at 90s (the script itself waits up to 30s on the global PATH mutex). Completion skips now say why (command failed vs target not writable vs symlink) instead of a blanket "none writable". The postinstall pnpm branch still printed the npm-channel PATH-shadowing report, whose paths (a nonexistent <pnpm prefix>/bin) and attribution ("was installed by npm") were wrong and whose suggested commands could not work; the pnpm channel now records its metadata and stays silent. The homebrew reference formula pointed at the dead gitcode-cli organization for its tap, homepage and download URLs (404s); align it with the atomgit-cli pipeline the release workflow actually uses. --help now works in any argument position instead of only alone. Fourth review P3 backlog, issue 605 items 1, 2, 3, 4. 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 个月前 | |
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 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |