Skip to content

feat: build an auditable A-share research workbench - #175

Open
xiaoming032097 wants to merge 26 commits into
shy3130:mainfrom
xiaoming032097:codex/a-share-v2
Open

feat: build an auditable A-share research workbench#175
xiaoming032097 wants to merge 26 commits into
shy3130:mainfrom
xiaoming032097:codex/a-share-v2

Conversation

@xiaoming032097

@xiaoming032097 xiaoming032097 commented Aug 12, 2026

Copy link
Copy Markdown

What changed

  • Add immutable, self-validating end-of-day research snapshots and refresh strategies before publishing the daily decision evidence.
  • Prevent post-close realtime refreshes and concurrent quote writes from mutating an already sealed research day.
  • Add a beginner-oriented daily brief with deterministic candidate ordering, multi-day confirmation progress, explicit invalidation conditions, and data-gate explanations.
  • Turn the paper account into a safer practice workspace with T+1 checks, fee assumptions, position weights, cash usage, HHI concentration, and single-stock risk warnings.
  • Add explicit Tushare Pro and AKShare provider plugins, provider selection/trust receipts, adjustment-factor normalization, and financial/share-history improvements.
  • Harden job coordination, atomic file I/O, Docker health checks, loopback-only deployment, CORS/cookie handling, and trusted-proxy boundaries.
  • Add credential-free verified backup/restore tooling and private Tailscale deployment documentation.
  • Expand frontend explanations and tests for data trust, provider selection, active jobs, watchlists, advisor actions, and portfolio risk.
  • Synchronize the branch with the latest upstream main, preserving upstream regime, composite-strategy, index, monitor, and UI work.

Why

The previous workflow could publish an end-of-day recommendation snapshot and then let the realtime quote service rewrite the same source partitions. That invalidated otherwise valid research evidence after restarts or later refreshes. Historical candidate health also compared archived snapshots against mutable current partitions, which could collapse the model-health window to a misleading result. The simulated account did not explain portfolio concentration, and deployment/data-provider/backup boundaries were not sufficiently explicit for a reliable personal research system.

This change makes the application fail closed when evidence is incomplete, preserves historical decision evidence, and explains what a beginner may research or simulate without connecting to a broker or placing orders.

User and developer impact

  • Daily research evidence remains stable after publication and across container restarts.
  • Historical model-health counts use verified archived snapshots instead of mutable current files.
  • Candidates advance through explicit confirmation states rather than presenting an unexplained score as a trade signal.
  • The paper account exposes concentration and cash risk while remaining simulation-only.
  • Local, Docker, private HTTPS, data-provider, and backup behavior now have testable contracts and documentation.

Validation

  • uv run pytest -q: 874 passed after synchronizing upstream main
  • pnpm.cmd test: 52 passed
  • pnpm.cmd build: production build passed
  • git diff --check origin/main...HEAD: passed
  • Final PR credential/private-key scan: passed; no real .env, authentication file, private key, or token committed
  • Docker image rebuilt and container reached healthy before publication
  • Real browser validation confirmed the advisor page, 8/10 historical model-health window, portfolio-risk panel, and a newly published same-day research snapshot
  • Container restart regression confirmed both sealed source-file SHA-256 hashes stayed unchanged and the research snapshot remained valid

Safety boundary

This remains a personal research and simulation application. It does not connect to a brokerage account, submit orders, or promise returns.

@xiaoming032097
xiaoming032097 marked this pull request as ready for review August 12, 2026 14:30
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.

2 participants