Skip to content

feat: add adapter-first ingestion, factor monitoring, and risk workbench - #3

Open
elexingyu wants to merge 62 commits into
mainfrom
codex/v0.4-factor-exposure
Open

feat: add adapter-first ingestion, factor monitoring, and risk workbench#3
elexingyu wants to merge 62 commits into
mainfrom
codex/v0.4-factor-exposure

Conversation

@elexingyu

@elexingyu elexingyu commented Jul 21, 2026

Copy link
Copy Markdown
Owner

概要

  • 新增 Adapter Pack、结构检测、profile draft 与可选的 OpenAI mapping assistant,让用户可以从现有 CSV / JSON / JSONL 仓位文件开始接入,而不必修改策略代码。
  • 新增版本化因子模型和策略导入、严格时点组合因子暴露、覆盖率、贡献拆解与独立风险健康度。
  • 将前端重构为真实的风险工作台,以整体态势、三条优先关注项、组合风险矩阵和证据检查器完成“发现问题 → 定位组合 → 核验证据”的主路径。
  • 刷新、缺失数据、未配置策略、严格来源身份和顶层因子策略证据均显式处理,不会把未知或陈旧结论伪装成健康。
  • 加固导入事务、修订语义、载荷完整性、资源上限、隔离生命周期和 JSON 深度边界,避免未来信息、半成品提交和 Python 版本差异。

测试覆盖

  • Python:675 passed,已在 Python 3.14 复现并验证原 CI 失败路径。
  • 前端:47 passed,覆盖风险投影、矩阵选择、证据检查器、刷新态、失败降级和严格身份。
  • Python 与 TypeScript 类型检查通过。
  • Vite 生产构建通过,产物约 216.77 kB,gzip 67.69 kB。

上线前审查

  • 独立对抗性审查发现 5 个风险展示问题,全部修复:未配置策略误报健康、遗漏顶层策略证据、Top-1 不可用误标中性、刷新时残留旧结论、失败通知丢失严格身份。
  • GitHub 旧后端 CI 失败根因为 Python 3.14 不再依赖 RecursionError 拒绝超深 JSON;现改为解析前显式深度限制。
  • 未发现 SQL、交易写入、LLM 信任边界或外部数据泄漏问题。

设计审查

  • 真实页面已在 1440、1200、900px 验证;899px 显示明确的不支持宽度提示。
  • 页面无横向溢出、无浏览器控制台错误。
  • 运行健康、因子风险、集中度与数据质量保持为独立维度,状态不依赖颜色单独表达。

计划完成度

  • 风险工作台实施计划与验收清单全部完成。
  • README 已更新 90 秒演示路径和真实应用截图。

边界

  • 本项目是只读监控与分析系统,不连接券商、不下单、不修改策略。
  • v0.4 消费用户已有的证券因子载荷;不生成因子、因子收益、回归 beta、VaR、压力测试或组合优化。
  • AI 只生成候选 mapping draft;本地校验与显式导入仍是写入边界。

测试计划

  • uv run pytest -q,675 passed
  • bun run test,47 passed
  • uv run ty check src scripts
  • bun run typecheck
  • bun run build
  • 浏览器验证 1440 / 1200 / 900 / 899px

版本

  • 0.4.0

文档

  • README 与贡献指南已同步 Python 3.13+ 支持范围。
  • README 已补充顶层 DESIGN.md 入口;架构、Adapter、因子、安全与变更日志均已按实际实现核对。

elexingyu added 30 commits July 20, 2026 20:39
Close race, privacy, terminal-safety, resource-limit, and bounded-inspection gaps found during the v0.3 pre-landing review.
Keep core-only installations type-checkable and cover missing dependency and configuration failures without leaking exception context.
elexingyu added 28 commits July 21, 2026 01:20
Reject excessive nesting before parsing so Python 3.13 and 3.14 preserve the same safe domain errors.
Replace the serial dashboard with a situation-first matrix and evidence inspector while preserving explicit loading, partial, unavailable, and synthetic-data states.
Document the new 90-second demo path, update the real application screenshot, and record the cross-version JSON boundary fix.
@elexingyu elexingyu changed the title feat: add adapter-first ingestion and factor exposure monitoring feat: add adapter-first ingestion, factor monitoring, and risk workbench Jul 30, 2026
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.

1 participant