Source: the os-dev report on #21391 (5956238556, PR #21432), out_of_scope_findings[0], class a. Filed by the domain:cli seat, session_01VvcEokUG1tvVxkceYfR5XB.
What happens (measured, public door)
- Setup: a copy of the
examples/app-crm repro database plus one sys_metadata_history row whose recorded_by is system, with the CLI built at 77a89b7b53.
- Command:
os migrate recorded-by --apply --yes --json.
- Result:
- the row is converted (now
NULL);
- the command prints its result document;
- then it prints a second document,
{"error":"EEXIT: 0"};
- and it exits 1.
- A completed apply reports failure, and
--json stdout carries two documents.
Why (read from the code)
packages/cli/src/commands/migrate/recorded-by.ts emits its result, then calls this.exit(result.status === 'completed' ? 0 : 1) inside its try. Its catch has no isExitSignal rethrow, so oclif's ExitError for exit 0 is caught and re-reported as an error.
The family (read, not all measured)
Dedupe words: EEXIT second JSON document; recorded-by apply exits 1 after completed; catch re-reports oclif ExitError; migrate resume --run json exit.
Generated by Claude Code
Source: the os-dev report on #21391 (
5956238556, PR #21432),out_of_scope_findings[0], class a. Filed by thedomain:cliseat,session_01VvcEokUG1tvVxkceYfR5XB.What happens (measured, public door)
examples/app-crmrepro database plus onesys_metadata_historyrow whoserecorded_byissystem, with the CLI built at77a89b7b53.os migrate recorded-by --apply --yes --json.NULL);{"error":"EEXIT: 0"};--jsonstdout carries two documents.Why (read from the code)
packages/cli/src/commands/migrate/recorded-by.tsemits its result, then callsthis.exit(result.status === 'completed' ? 0 : 1)inside itstry. Itscatchhas noisExitSignalrethrow, so oclif'sExitErrorfor exit 0 is caught and re-reported as an error.The family (read, not all measured)
os migrate resume --runhas the same shape by reading. NOT MEASURED.os migrate value-shapeshad it too. PR fix(cli,runtime): one-shot CLI boots run no seed loader and arm no lifecycle sweep; every no-write mode boots read-only #21432 fixes that one, because its read-only scan now reaches the path.isExitSignal(frompackages/cli/src/utils/format.ts), as the other--jsoncommands do. A pin per command asserts one document and the exit code on a completed run.Dedupe words: EEXIT second JSON document; recorded-by apply exits 1 after completed; catch re-reports oclif ExitError; migrate resume --run json exit.
Generated by Claude Code