Files
dacli/src/commands/kb
sswandClaude 2c38b4666d refactor(exit): P6c-2 — migrate 6 mutation commands to wrapCommand
Failures now route through ctx.fail → CommandLog (dacli log last) instead of bare
process.exit(1); success → ctx.success. Follows the form/delete exemplar.
- form/import (3 fails→ctx.fail), form/fix_entity (2 pre-flight guards kept, success→ctx.success),
  form/bindflow (persistence-verify fail→ctx.fail), app/logout, kb/deprecate, kb/entry
- pre-flight/interactive guards (未登录/未找到目录) stay as pre-flight process.exit (user abort, not loggable)

Scope note: app/use was NOT migrated (reverted) — it is a display command (like
app/status/context) whose value is its context output; wrapCommand's quiet-by-default
would suppress that. wrapCommand fits mutations, not display commands.

Verified: tsc 0; gate green (vitest 336); app use display intact; log lines net-zero
(only re-indented); form/delete exemplar already proved the ctx.fail runtime path.

Co-Authored-By: Claude <[email protected]>
2026-07-24 13:03:28 +08:00
..