fix: enable --ensure-no-loss false flag to disable functionality#187
Merged
troykessler merged 2 commits intoKYVENetwork:mainfrom Feb 2, 2026
Merged
fix: enable --ensure-no-loss false flag to disable functionality#187troykessler merged 2 commits intoKYVENetwork:mainfrom
troykessler merged 2 commits intoKYVENetwork:mainfrom
Conversation
- Update option definition to accept [value] parameter in both kysor and protocol - Change default from boolean true to string "true" for proper parsing - Fix kysor.ts logic to properly handle false case by passing --ensure-no-loss false - Add proper type normalization to handle both string and boolean types - Update version numbers in package.json files This completes the fix for ensureNoLoss flag, allowing users to disable the functionality by passing --ensure-no-loss false.
troykessler
reviewed
Jan 30, 2026
troykessler
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR completes the fix for the
--ensure-no-lossflag, allowing users to properly disable the functionality by passing--ensure-no-loss false.Changes
Updated option definition in both
tools/kysor/src/commands/start.tsandcommon/protocol/src/index.ts:--ensure-no-loss(boolean flag) to--ensure-no-loss [value](option that accepts a value)trueto string"true"for proper parsingfalseto disableFixed kysor.ts logic (
tools/kysor/src/kysor.ts):--ensure-no-loss falseUpdated version numbers in package.json files
Expected Behavior
--ensure-no-lossor no flag → defaults totrue(enabled) ✅--ensure-no-loss false→ disables the functionality ✅--ensure-no-loss true→ explicitly enables (same as default) ✅Testing
After applying these changes, verify:
./kysor start --valaccount <name> --ensure-no-loss falseshould disable ensureNoLoss./kysor start --valaccount <name> --ensure-no-lossshould enable ensureNoLoss (default)./kysor start --valaccount <name>(without flag) should enable ensureNoLoss (default)Related
This completes the fix that was partially addressed in PR #185, which fixed parsing but didn't allow users to pass
--ensure-no-loss falseto disable the functionality.