Skip to content

Fix scripted /history output routing - #132

Open
rustemar wants to merge 1 commit into
portdeveloper:mainfrom
rustemar:fix/history-stdout
Open

rustemar wants to merge 1 commit into
portdeveloper:mainfrom
rustemar:fix/history-stdout

Conversation

@rustemar

Copy link
Copy Markdown
Contributor

What this changes

Closes #129.

Send successful /history output, including the empty-history result, to stdout so a scripted read can be redirected. Preserve the existing interactive text, diagnostics and exit behavior.

How I tested it

  • npm run build succeeds
  • npm run smoke prints SMOKE_OK
  • Ran the REPL and exercised the change
  • Dry-run send
  • Real gasless send (paste the tx hash if so):

npm test: 635 passed. The six new child-process tests run the real CLI startup, slash dispatch and exit path with fixed offline wallet/model boundaries and separate stdout/stderr capture. The three history-output regressions fail on the unchanged base; the three error/usage/exit controls pass there.

Independent checks cover exact result text, mixed reads, CRLF input, sticky failure status and actual interactive PTY input with both redirected and terminal stdout. No live model or wallet was used. The application smoke stops at missing WDK_SEED, before wallet or model initialization, so SMOKE_OK is unverified.

A temporary combination with #131 (78fa77c) also builds and passes all 640 tests, including the history stream regressions and gas-mode startup checks.

Model / platform tested on: fixed wallet/model fixtures; Linux x64, Node 22.22.2. Windows runtime verification is left to the configured CI matrix.

Scope check

  • This stays within v0 scope (native MON, single account, testnet), OR
  • This grows the scope, and I've described the new surface above.

Conventions

  • I used npm (not pnpm/yarn) and did not add a global sodium-native override.
  • I did not commit .env, seeds, keys, or model weights.

Route successful history output to stdout while retaining diagnostics and exit behavior. Cover the real CLI output streams with offline child-process regressions.
@rustemar

Copy link
Copy Markdown
Contributor Author

Hi @portdeveloper, just following up on this PR. CI is green on Linux and Windows. Could you take a look when you have a chance? Happy to address any feedback.

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.

Print successful /history results to stdout in scripted mode

1 participant