Validate and apply portfolio snapshot settings - #757
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
snapshot.jsonintervals to the safe15mdefault and keep the Demo API contract alignedRoot cause
Portfolio previously persisted every non-empty custom interval, while
snapshotSchemaaccepted any string. UTA's boot-timecreatePumpaccepts only positiveh/m/sdurations and throws for values such asnonsense. In addition, generic snapshot config writes did not request a UTA reload, so valid changes appeared saved in the UI but the running scheduler retained its old settings until a later restart.User impact
Users now receive immediate, field-level guidance for invalid intervals. Valid enable and cadence changes are applied to the running product through a supervised UTA restart, without causing a restart merely from visiting Portfolio. Existing invalid persisted values are repaired during upgrade before strict validation loads them.
Verification
pnpm exec vitest run src/core/config.spec.ts src/migrations/0027_repair_snapshot_interval/index.spec.ts src/migrations/runner.spec.ts src/webui/routes/config-snapshot.spec.ts ui/src/pages/PortfolioPage.snapshot-settings.spec.tsx ui/src/demo/handlers/configKeys.spec.ts— 55 passedpnpm build:migration-indexnpx tsc --noEmitcd ui && npx tsc -bpnpm -F open-alice-ui build:demopnpm -F @traderalice/guardian-runtime typecheckpnpm -F @traderalice/guardian-runtime buildpnpm test:e2e— 30 passed, 3 skippedpnpm test:smoke— isolated Alice/UTA/Vite boot, migration 0027 application, UTAstartedAtchange after restart, and clean teardown passedpnpm test— 3400 passed, 9 skipped/portfolio: verifiednonsensekeeps the custom interval invalid with an inline alert;2h15mclears the alert and becomes saveablegit diff --checkBoundary touch
UTA supervision and persisted snapshot configuration. No broker credentials, account state, order writes, or live-paper trading were used.