[GH-ISSUE #132] Preserve CLI error details for unknown-record/update failures #81

Closed
opened 2026-10-15 18:20:55 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/132

Problem

Residual-unknown CLI commands often print error: null when returning a failure, which removes actionable failure details from operators and scripts.

unknown-record and unknown-update pass raw registry Result objects directly through command returns. Invalid inputs or domain-transition failures produce ok: false and an UnknownRegistryError, but CLI output renders only error: null.

Reproduction

# invalid mutation evidence id (must be ev_<hex64>)
node scripts/rea.mjs unknown-record --question "x" --severity high --domain d --authority analyst-inference --confidence observed --evidence bad_zz
# -> ok: false\nerror: null

# valid record then invalid update transition
ID=unk_<from previous successful record>
node scripts/rea.mjs unknown-update --id "$ID" --revision 1 --status resolved --severity high --evidence ev_$(node -e "process.stdout.write('b'.repeat(64))")
# -> ok: false\nerror: null

Expected

Failure output should include reason and any validation detail so users/agents can correct inputs.

Actual

Errors are surfaced as null, losing actionable diagnostics.

Files

  • src/cliUnknownCommands.ts
  • src/cli.ts (command wiring)
Originally created by @morluto on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/132 ### Problem Residual-unknown CLI commands often print `error: null` when returning a failure, which removes actionable failure details from operators and scripts. `unknown-record` and `unknown-update` pass raw registry `Result` objects directly through command returns. Invalid inputs or domain-transition failures produce `ok: false` and an `UnknownRegistryError`, but CLI output renders only `error: null`. ### Reproduction ```bash # invalid mutation evidence id (must be ev_<hex64>) node scripts/rea.mjs unknown-record --question "x" --severity high --domain d --authority analyst-inference --confidence observed --evidence bad_zz # -> ok: false\nerror: null # valid record then invalid update transition ID=unk_<from previous successful record> node scripts/rea.mjs unknown-update --id "$ID" --revision 1 --status resolved --severity high --evidence ev_$(node -e "process.stdout.write('b'.repeat(64))") # -> ok: false\nerror: null ``` ### Expected Failure output should include `reason` and any validation detail so users/agents can correct inputs. ### Actual Errors are surfaced as null, losing actionable diagnostics. ### Files - src/cliUnknownCommands.ts - src/cli.ts (command wiring)
bsakaguchi 2026-10-15 18:20:55 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@morluto commented on GitHub (Jul 17, 2026):

Superseded by removal of the standalone residual-unknown CLI commands cited here. Current MCP unknown operations use boundary parsing and the typed tool-result error mapping.

<!-- gh-comment-id:5001295722 --> @morluto commented on GitHub (Jul 17, 2026): Superseded by removal of the standalone residual-unknown CLI commands cited here. Current MCP unknown operations use boundary parsing and the typed tool-result error mapping.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#81
No description provided.