Program / data separation — configuration and strategy data now survive every upgrade.
This release is the prerequisite stage of the one-click upgrade plan. It does not yet add an in-application updater; it removes the root cause of "my settings disappeared after upgrading".
- User data moved out of the program folder. Configuration, strategy data, trigger settings, execution mode, logs and the HTTPS certificate now live under
%APPDATA%\Quant.Infra.Net.Pro\ (~/.config/Quant.Infra.Net.Pro/ on macOS/Linux). Overwriting the program folder — by zip or by installer — can no longer destroy user data. - Configuration layering. Shipped
appsettings.json (read-only defaults) → config/appsettings.user.json (your overrides) → environment variables → User Secrets. New settings introduced by a release arrive automatically as defaults; your edited values stay yours. - One-time automatic migration. On first launch the app moves License Key, Urls, RedirectUri, advanced overrides, the trigger configuration, the HTTPS certificate and the EULA acceptance record out of the old install folder. Idempotent: running it again changes nothing, and it never overwrites an existing file.
- Fixed trigger configuration bug. The rebalance trigger settings were written into the program folder but read from the user data folder, so saved trigger settings were never read back and were lost on upgrade. Read and write now use the same path.
- Manual / automatic execution mode is persisted. Previously it reset to Manual every time the Rebalance page was opened.
- SchemaVersion + migration pipeline. User data files carry a schema version and are upgraded by an ordered
IUserDataMigration pipeline. Deserialization tolerates unknown fields, so installing an older version back remains possible. - Export / import all settings (Settings page). Download a zip with your configuration and strategy data for machine migration or manual backup. Schwab credentials are excluded by default and require an explicit opt-in; authorization tokens are never exported.
- Data root override. The
QUANT_INFRA_DATA_DIR environment variable overrides the user data root, which is required for Linux service accounts running as root or under systemd. - Documentation corrected. The deployment guide claimed configuration files were preserved across an upgrade; that was not true before this release. README now documents where data lives.
程序与数据分离 —— 配置和策略数据从此不会被升级破坏。
本版本是一键升级方案的前置阶段。它尚未引入应用内升级器,而是先消除"升级后设置丢失"的根因。
- 用户数据移出程序目录。 配置、策略数据、触发配置、执行模式、日志与 HTTPS 证书统一迁移到
%APPDATA%\Quant.Infra.Net.Pro\(macOS/Linux 为 ~/.config/Quant.Infra.Net.Pro/)。 无论用 zip 覆盖还是安装器升级程序目录,都不会再破坏用户数据。 - 配置分层。 随程序发布的
appsettings.json(只读默认值)→ config/appsettings.user.json (你的覆盖项)→ 环境变量 → User Secrets。新版本新增的配置项自动获得默认值,你改过的值保持不动。 - 一次性自动迁移。 首次启动时自动把旧目录里的 License Key、Urls、RedirectUri、高级覆盖项、 触发配置、HTTPS 证书与 EULA 接受记录搬到用户数据区。幂等:重复运行不会产生变化,且绝不覆盖已存在的文件。
- 修复触发配置 Bug。 再平衡触发配置过去写入程序目录、却从用户数据区读取,导致保存的设置永远读不回来、 且升级即丢失。现读写使用同一路径。
- 手动/自动执行模式持久化。 此前每次打开再平衡页面都会重置为手动模式。
- SchemaVersion 与迁移管线。 用户数据文件带架构版本,由有序的
IUserDataMigration 管线升级。 反序列化容忍未知字段,因此仍可装回旧版本。 - 导出/导入全部设置(Settings 页面)。下载包含配置与策略数据的 zip,用于换机器或人工备份。 Schwab 凭据默认不包含、需明确勾选;授权 token 永不导出。
- 数据根目录可覆盖。 环境变量
QUANT_INFRA_DATA_DIR 可覆盖用户数据根目录, 这是 Linux 以 root/systemd 运行服务账号所必需的。 - 文档修正。 部署指南过去声称"配置文件会保留",在本版本之前该说法并不成立。 README 现已补充数据存放位置说明。