Skip to content

Stabilize review v2 workflow and English contracts#190

Closed
atomchung wants to merge 1 commit into
mainfrom
codex/stabilize-review-v2
Closed

Stabilize review v2 workflow and English contracts#190
atomchung wants to merge 1 commit into
mainfrom
codex/stabilize-review-v2

Conversation

@atomchung

Copy link
Copy Markdown
Owner

Summary

  • replace the long agent-owned workflow with a thin cross-agent skill entry and deterministic prepare/preview/finalize orchestration
  • add resumable session bundles, atomic finalization, public/private card separation, and repairable projections
  • persist thesis evidence and require a claim plus source before an add can be classified as new evidence
  • add ETF-aware instrument policy so diversified allocation ETFs are exempt from single-company concentration checks while focused and leveraged ETFs remain risk exposures
  • move implementation contracts, lens configs, and developer documentation to English while keeping GTM and localized product copy in explicit locale files
  • add bilingual card rendering, English runtime dimension IDs, schemas, flows, references, evals, and release documentation

Why

The previous workflow depended on agents following one long skill prompt and mixed deterministic calculations with agent judgment. That made interruption recovery, cross-agent parity, ETF handling, thesis learning, and card output less predictable.

This change moves lifecycle, validation, persistence, localization, and rendering into shared code. Agents retain the narrow judgments that matter: interpreting motive, connecting evidence to thesis evolution, and writing the narrative.

User and developer impact

  • one canonical command starts a review: python3 engine/review.py prepare <CSV...> --language en
  • interrupted reviews resume without refetching live prices
  • preview validation rejects unsupported numbers or evidence classification
  • finalization commits one user-chosen rule, with skip as a valid outcome
  • private trade details cannot leak into the public card projection
  • broad allocation ETFs no longer trigger single-company sizing false positives
  • future mixed-language drift in implementation surfaces fails a deterministic test

Validation

  • python3 tests/run_all.py
  • all 14 suites passed
  • 68 engine unit tests passed
  • 75 TR_JSON/state contract checks passed
  • 9 v2 session, ETF, localization, and E2E tests passed
  • 3 implementation-language boundary tests passed
  • 2 opt-in network persona probes were skipped as designed
  • git diff --check

@atomchung

Copy link
Copy Markdown
Owner Author

Review 結論(4 路深查 + E2E 實測,base c6850f0 / head fcd802d)

架構方向正確(薄入口+flows/references 漸進披露、prepare/preview/finalize 確定性編排、原子 session bundle、schema gate 實測有牙齒、#166 冪等保留、#89 data-agnostic 保留),但以現狀不可直接 merge:

CONFIRMED merge-blockers(將以 fix PR 疊在本 PR 上處理)

  1. 公卡洩漏:custom commitment rule 無過濾原樣上公卡(review.py:354-358 → card_renderer.py:375),實測含 ticker/價位/日期的自訂規矩直接印在「已移除金額、日期、標的」badge 下——命中 release doc 自己的 no-go 條件
  2. repair-projections 把 test-drive demo 灌進真實教練記憶(session.py:246-258 無 persist 過濾),實測 last_state.json 被 mock 狀態覆蓋
  3. test-drive 照文檔跑不通:未帶 --root 時 root=隨機 mkdtemp(review.py:282-285),preview 必報 pending not found——promotion demo 步驟 1-4 當場翻車
  4. BACKLOG 北極星反轉:fix(docs): BACKLOG 北極星敘事對齊 2026-07-05 糾偏 — 約束在卡品質非分發找人 (closes #112) #189(closes [process·P1] 關鍵產品假設無時效標記,過時結論被跨 session 複讀(Stage 0 話術案例) #112,分支前 11 小時 merge)的「約束在卡品質非分發找人」被刪除並反轉回分發導向敘事
  5. 英文公卡混中文(「behavioral pressure in 部位 sizing」,card_renderer.py:357-360 漏走 dim 映射)

靜默推翻既有拍板 / 產品線斷裂(一期恢復)

拆二期(需 owner 判斷或獨立接線)

為什麼 14 套測試全綠仍有這些

測試與實作同 PR 換血:新測試只驗 v2 新行為(公卡只測 candidate 路徑、隔離只測 finalize 當下),舊行為斷言(EVALS B 系列)被同 PR 刪除/泛化——測試綠證明新實作自洽,不證明行為保真

認領:fix PR 將從 fcd802d 開 branch 疊修復(上列 blockers+拍板恢復),測試全綠後開 PR 供 view,merge 後本 PR 由該 PR supersede。

🤖 Generated with Claude Code

@atomchung

Copy link
Copy Markdown
Owner Author

Fix PR is up: #195 (contains this PR's commit fcd802d plus three fix commits — blockers, ruled-behavior restorations, and doc contract). Once #195 merges, this PR can be closed. Phase-2 decisions live in #191#194.

atomchung added a commit that referenced this pull request Jul 15, 2026
…ersedes #190) (#195)

v2 rewrite (prepare/preview/finalize orchestration, thin SKILL entry, atomic session bundles, bilingual renderer, ETF policy) plus review fixes: public-card leak sealed, demo projection isolation, test-drive --root handoff, #82 agent-authored honesty weaving, acct_perf pillar + unlock invitation (#179/#181), reconciliation opener (#151), ETF avgdown/problem/thesis exemption, #112 north star restored, honest lens licensing wording. Phase-2: #191-#194.
@atomchung

Copy link
Copy Markdown
Owner Author

Superseded by #195 (merged to main as 97ffb52): contains this PR's full content plus the review fixes. Phase-2 decisions tracked in #191-#194.

@atomchung atomchung closed this Jul 15, 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