Skip to content

Merge develop into v5 - #532

Merged
RetricSu merged 12 commits into
v0.5.xfrom
develop
Oct 8, 2026
Merged

RetricSu merged 12 commits into
v0.5.xfrom
develop

Conversation

@RetricSu

@RetricSu RetricSu commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

dependabot Bot and others added 11 commits September 14, 2026 10:33
#514)

Bumps the npm_and_yarn group with 1 update in the / directory: [adm-zip](https://github.com/cthackers/adm-zip).


Updates `adm-zip` from 0.6.0 to 0.6.1
- [Release notes](https://github.com/cthackers/adm-zip/releases)
- [Changelog](https://github.com/cthackers/adm-zip/blob/master/history.md)
- [Commits](cthackers/adm-zip@v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: adm-zip
  dependency-version: 0.6.1
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#515)

Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 4.3.1 to 4.3.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](nodeca/js-yaml@4.3.1...4.3.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.2
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the / directory: [@humanfs/node](https://github.com/humanwhocodes/humanfs/tree/HEAD/packages/node).


Updates `@humanfs/node` from 0.16.7 to 0.16.8
- [Release notes](https://github.com/humanwhocodes/humanfs/releases)
- [Changelog](https://github.com/humanwhocodes/humanfs/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/humanwhocodes/humanfs/commits/node-v0.16.8/packages/node)

---
updated-dependencies:
- dependency-name: "@humanfs/node"
  dependency-version: 0.16.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dates (#523)

Bumps the npm_and_yarn group with 2 updates in the / directory: [js-yaml](https://github.com/nodeca/js-yaml) and [proxy-addr](https://github.com/jshttp/proxy-addr).


Updates `js-yaml` from 5.2.2 to 5.4.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@5.2.2...5.4.1)

Updates `proxy-addr` from 2.0.7 to 2.0.8
- [Release notes](https://github.com/jshttp/proxy-addr/releases)
- [Changelog](https://github.com/jshttp/proxy-addr/blob/master/HISTORY.md)
- [Commits](jshttp/proxy-addr@v2.0.7...v2.0.8)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 5.4.1
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: proxy-addr
  dependency-version: 2.0.8
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bump pnpm overrides for hono, qs, ip-address, js-yaml, brace-expansion,
fast-uri, and add an override for @modelcontextprotocol/sdk.

Fixes #522
…) (#530)

The built-in accounts are public test keys, so hiding them behind
--show-private-keys only added friction on a local devnet. Print them by
default and add --hide-private-keys for runs whose output is captured in
logs. Mainnet forks re-encode the accounts as real ckb1 addresses, so keys
stay hidden there unless --show-private-keys is passed.
…#518) (#528)

* fix: propagate settings read/save errors and protect corrupted config (fixes #518)

- Use readSettingsStrict on configuration mutation entries (config set/rm) to abort on read/parse/validation errors, protecting corrupted config files from overwrite.
- Only fall back to default settings on true ENOENT so non-existent configs can be initialized on first write.
- Atomic write with a unique temporary file in the same directory using exclusive creation (flag: 'wx') and renameSync, preserving destination file mode (0o777 mask).
- Clean up temporary files on write/rename failure and throw Error with config path and reason.
- Propagate read/save errors along existing CLI error paths, exiting with non-zero exit code and ok: false in JSON mode.
- Add comprehensive unit and CLI error integration tests.
- Add changeset for @offckb/cli patch bump.

* test: parse CLI json stderr to verify configPath across platforms
)

* fix: stop the CKB miner when offckb exits and reap orphaned miners (#512)

The devnet node and miner were spawned as plain children with no exit
hooks. Anything other than a terminal Ctrl+C (which signals the whole
process group) killed offckb alone: a SIGTERM/SIGHUP to its PID, a crash,
or process.exit from the broken-pipe handler left 'ckb run' and
'ckb miner' re-parented to init/launchd, and the miner kept polling a dead
RPC forever. Nothing reaped those miners later.

- Track the CKB node and miner and SIGTERM them from a process 'exit'
  hook; turn SIGINT/SIGTERM/SIGHUP into process.exit(128+n) so the hook
  runs (deferring to the Fiber shutdown handlers when they own the signal).
- Before starting the devnet, stop 'ckb miner -C <devnet dir>' processes
  whose parent is no longer a Node process (orphans of an earlier run,
  including ones left by SIGKILL).
- Handle a node/miner that exited before the supervisor attached, and add
  SIGHUP to the Fiber shutdown handlers.

* fix: make offckb node own its signals explicitly and stop children on startup failure

Address review on #531:

- The lifetime guard now only owns the process 'exit' hook. SIGINT/SIGTERM/
  SIGHUP are owned by installSessionSignalHandlers() for the whole
  'offckb node' session, with explicit phases instead of a listener-count
  heuristic: startup exits with 128+n (the exit hook stops the children),
  the Fiber startup window is delegated explicitly, and once up every mode
  (not only --fiber) runs the shared runShutdownOnce before exiting, so the
  daemon pid file and env lock are cleaned up on signals too. A second
  signal always forces the exit, so a signal is never swallowed.
- Startup failures stop every tracked child before the guard is disposed.
- Fiber startup also handles SIGHUP.
- Tests: real child processes are stopped by the exit hook (in-process and
  in a separate Node process ending via process.exit, throw and rejection),
  session signal phases, SIGTERM shutdown without --fiber, and a startup
  throw after the miner spawned.

* refactor: share the miner argv with the stale-miner reaper and test process listing parsers

Address review on #531:

- minerArgs() is the single source for the miner spawn and the reaper's
  matcher; a test asserts the spawned command is recognized.
- Reuse NODE_EXECUTABLE_NAMES from util/daemon.
- Extract parsePosixProcessList/parseWindowsProcessList as pure functions
  with fixture tests (spaces in paths, CIM JSON single row, malformed).
- Reword the reap warning so it is accurate for hand-started miners.
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (5)
  • master
  • dev
  • releases/.*
  • develop
  • next-major

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 73fcddf8-2e04-4662-ac17-877f10753300

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

)

* fix: recognize the offckb daemon when its CLI path contains spaces

verifyDaemonIdentity tokenized the flat command line from 'ps -o args='
(macOS, or Linux without a readable /proc) with a quote-aware splitter.
ps never quotes, so a CLI entry under a path with spaces (macOS
~/Library/Application Support/...) was cut at the first space, the script
token never matched and 'offckb node stop' refused to stop a live daemon.

Match the command line instead: try every space as the executable/script
boundary and every later space (or the end) as the script end, accepting
only a Node executable followed by exactly this installation's CLI entry
(realpath-normalized, case-insensitive on Windows, quoted or not). The
exact-argv path (/proc) and the start-time check are unchanged.

Found during the review of #531.

* fix: compare daemon paths with the host path module, not process.platform

The previous commit chose posix/win32 path rules from process.platform.
Tests (and anything else) that override process.platform then compared
paths with the wrong rules: on a Windows runner the node stop tests set
platform to 'linux', so the '/path/to/offckb' token from the ps mock was
resolved with posix rules while the CLI entry is a native 'D:\path\to\offckb',
and every identity check failed.

Default to the host's own path module (as before #533), including
realpath and Windows case-insensitivity; the explicit platform argument is
only used by unit tests that exercise another OS's command lines.

* test: keep the real stale-miner process listing out of node command unit tests

On windows-latest, node-terminal-rpc timed out (5 s) in its first test:
since #531, foreground startNode/nodeDevnet runs reapStaleMiners, which
lists processes through PowerShell CIM on Windows and can take seconds on
a cold runner (the suite already took ~5.4 s on the previous run). The
second failure in that file was fallout from the timed-out test.

Mock reapStaleMiners in node-terminal-rpc, node-quiet-mode and
node-command like node-supervisor already does; the reaper has its own
tests.
@RetricSu
RetricSu merged commit d508137 into v0.5.x Oct 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants