Skip to content

Review v2 stabilization + contract restoration (supersedes #190)#195

Open
atomchung wants to merge 4 commits into
mainfrom
claude/review-v2-contract-fixes
Open

Review v2 stabilization + contract restoration (supersedes #190)#195
atomchung wants to merge 4 commits into
mainfrom
claude/review-v2-contract-fixes

Conversation

@atomchung

Copy link
Copy Markdown
Owner

What this is

#190(review v2 重構)的 review 後修復版:包含 #190 全部內容(fcd802d)+ 三個修復 commit。review 全文與認領見 #190 的 comment。本 PR merge 後 #190 可直接 close。

一期修復(本 PR)

CONFIRMED blockers

  • 公卡洩漏:custom rule 原樣上公卡(實測含 ticker/價位/日期)→ candidate 一律解析成 copy 死文案、custom 印本地化泛句,commitment.origin 入 bundle;新增防洩漏測試
  • repair-projections 把 test-drive demo 灌進真實教練記憶、覆蓋 last_state.json → 跳過 persist:false bundle + 壞目錄容錯不中止
  • test-drive 照文檔跑不通(隔離 mkdtemp root 無人接力)→ prepare 輸出與 SKILL/AGENTS/flows/release-demo 全部補 --root <state_root> 接力;照文檔逐字重新驗證可走完 prepare→preview→finalize
  • BACKLOG 北極星反轉 → 恢復 [process·P1] 關鍵產品假設無時效標記,過時結論被跨 session 複讀(Stage 0 話術案例) #112 糾偏(約束在卡品質非分發;release 是驗證品質的載體)
  • en 公卡混中文「部位 sizing」 → 公卡 dim 走本地化映射

拍板行為恢復

工程修

  • --session-nonce 進 fingerprint(不再被同內容 pending resume 吞)
  • CSV 路徑一次 abspath(fingerprint 與 engine 子行程讀同一檔)
  • legacy projection 改 append-only delta(不重寫整檔、不刪外部寫入者的行)

二期(需 owner 判斷,已開 issue)

Validation

  • python3 tests/run_all.py 14/14 套全綠(v2 套件 9→16 個測試:公卡防洩漏、repair 隔離、honesty gate 三向、acct_perf 三情境、對帳段、nonce、ETF avgdown/問題帳豁免)
  • zh-TW + en test-drive 完整 E2E(照 release-demo 腳本逐字):誠實句融入、帳戶柱+解鎖邀請上卡、公卡無洩漏無混語、demo badge 正確
  • 13 mock persona avgdown 掃描:allocation_exempt_tickers 全空=現有 persona 卡零數字影響
  • git diff --check 乾淨

🤖 Generated with Claude Code

test and others added 4 commits July 15, 2026 08:21
…ive handoff, nonce/paths

Review findings on #190 (mechanism fixes):
- render_public never reuses user-authored text: candidate rules resolve to
  fixed copy strings, custom rules render a localized generic line; commitment
  carries origin. Custom rules with tickers/amounts/dates no longer leak into
  the shareable card.
- repair-projections skips persist:false bundles (test drive) so demo data can
  never be projected into real coach memory or overwrite last_state.json, and
  keeps going past corrupt session dirs instead of aborting.
- legacy projections append the delta instead of rewriting whole JSONL files:
  foreign/partial lines from other writers are never reformatted or dropped.
- test-drive prepare tells the agent to pass --root for later commands (the
  isolated mkdtemp root was undiscoverable, so documented preview/finalize
  always failed with "pending session not found").
- --session-nonce joins the fingerprint (was swallowed by same-content pending
  resume); CSV paths resolve to abspath once; preview gate now also enforces
  narrative.honesty coverage of required_honesty_keys (#82, renderer half in
  the next commit).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…pillar, reconciliation opener, ETF exemption completeness

Restores owner-ratified product behaviors that the v2 rewrite dropped or reversed:
- #82 honesty contract: the agent writes one digit-free sentence per triggered
  ledger key in narrative.honesty (schema + validator), and the renderer weaves
  each sentence into the section it qualifies — the standalone "Evidence
  boundaries" checklist section and its fixed copy strings are gone from new
  cards (copy remains only as a fallback for pre-contract bundles). The en
  public card no longer embeds the zh dimension label (dim goes through the
  localized dimension map).
- #179/#181 account performance: hold_twr pillar renders with its window;
  gated cash anchors render a localized unlock invitation instead of the
  engine's internal note; full anchors render acct TWR/IRR and a neutral,
  never-a-verdict cash-drag line.
- #151/#152 loop anchor: the card opens against the prior commitment with the
  metric's then/now values verbatim; the renderer never computes a delta.
- ETF allocation exemption now also covers dim_avgdown breaches, problem-ledger
  avgdown events, the tdiag thesis interrogation, and the oversize tag — an SPY
  DCA below cost is no longer interrogated as single-name conviction. All 13
  mock personas show zero exemption hits (no output drift).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…g wording, defer markers

- BACKLOG reopens with the owner's 2026-07-05 correction (#112): the constraint
  is card quality, not distribution — the promotion release is a vehicle for
  validating card quality, not a distribution goal.
- data-contract gains the dropped operating knowledge: full yfinance symbols
  for Taiwan (.TW/.TWO as agent world knowledge), ROC-date conversion, and the
  cash-anchor flow (read the statement's cash row, --cash JSON, list form for
  multi-currency, graceful degradation — never guess a balance).
- SKILL/AGENTS/flows document the test-drive --root handoff and the
  narrative.honesty authoring contract; card-spec gains per-key wording
  guidance and card-policy drops the standalone honesty section.
- README (en+zh-TW) licensing/disclaimer wording now matches reality: lens
  content is paraphrased principle distillation with per-lens source lists,
  no longer claimed as line-by-line cited quotation (#192 tracks whether the
  verbatim-quote evidence base returns).
- EVALS/card-spec rows describing not-yet-wired behaviors point at their
  phase-2 issues (#191 revisit backlog, #193 per-market lines) instead of
  reading as shipped; the release-demo script carries the --root step.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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