# STEP 1956 — orphan-gauge-v06-alpha-dashboard

**Timestamp**: 2026-09-11T02:15 (JST)
**Tab worktree**: main (rei-aios-9b)
**Commit**: (this commit)

## 一行 summary

v0.6-alpha audit dashboard = append-only timeline history + fetch script + static HTML with inline SVG line chart + honest cap-artifact ⚠ marker、STEP 1955 role shift の 実装。

## 主要 finding / evidence

### 変更 (3 file + 1 dir)

- **`data/orphan-gauge/history/timeline.json`** (new): 7 entries seeded — step-1947 (v0.1) / step-1948 (v0.2) / step-1952 (v0.4) / step-1954-run1 (v0.5 baseline) / step-1954-run2 (verify identical) / step-1955-calibration (n=50 sample review layered) / step-1956-dashboard-launch (今回 smoke test)
  - schemaVersion, generatedAt, description, entries (append-only), honestScope
  - Per-entry: runId, at, version, commit, capArtifact flag, capMaxFiles, counts, inScope, scopedOut, optional note + sampleReview
- **`scripts/orphan-gauge-append-history.ts`** (new, 96 line): gauge run + append entry to timeline
  - `--label <run-id>` + optional `--note`
  - Duplicate runId check (exit 2 if collision)
  - Git commit hash auto-capture
  - capArtifact auto-set (maxFiles < 50000 = true)
  - Currently v0.5 hard-coded version tag
- **`public/tools/orphan-gauge-dashboard/index.html`** (new, ~210 line): static HTML dashboard
  - Inline SVG line chart (4 series: LIVE/ORPHAN/RUIN/DEAD, 5 Y-tick grid, X-axis run labels rotated -15°)
  - Cap-artifact ⚠ marker per entry (v0.1-v0.4 entries)
  - Entries table with per-column color coding (LIVE=green, ORPHAN=grey, RUIN=amber, DEAD=slate)
  - Honest scope block prominent (device role shift STEP 1955 justified)
  - Related links to STEP 1926/1909 + GitHub source
- **`dist-renderer/tools/orphan-gauge-dashboard/index.html`** (mirror, md5 一致 `9d07fd90f1028e82f4e99a055c4ceda1`)

### Smoke test (append script)

```
$ npx tsx scripts/orphan-gauge-append-history.ts --label step-1956-dashboard-launch --note "STEP 1956 v0.6-alpha dashboard launch smoke test."
Running orphan-gauge with defaultConfig (v0.5+ settings)...
gauge complete in 22.1s
  in-scope=22695  scoped-out=10201
  counts={"LIVE":687,"ORPHAN":1279,"RUIN":1555,"DEAD":19174}
Appended entry 'step-1956-dashboard-launch' to timeline (7 total entries)
```

**Determinism check**: RUIN 1,555 unchanged vs STEP 1954 run1 (+step-1954-run2 + step-1955-calibration 三 identical) — 22.1s gauge runtime、+6 files in-scope + minor LIVE/ORPHAN delta from commits landing between runs = expected time-dependent drift、structural determinism preserved。

## Honest scope

- **主張しないこと**:
  - v0.6-alpha は **cleanup guidance value 増加 は 主張しない** (STEP 1955 finding = ~0% actionable、v0.6+ で 改善しない前提)
  - Dashboard は **audit / measurement / discipline enforcement** の role のみ、cleanup source としては 依然 useless
  - 時系列 chart は cap-artifact entries を 含む = 「trend」 として 読み込むと misleading、⚠ marker で mitigating が 完全 fix ではない (v0.6-beta で cap-artifact entries を optional filter する UX 追加候補)
  - `fetch('/data/...')` は CF Pages 相対 root、 相対 fallback あるが nginx 等 の 環境 では 未 verify
- **前提**:
  - CF Pages が `/data/orphan-gauge/history/timeline.json` を serve する (既存 dist-renderer/data/ mirror pattern 継承)
  - JavaScript enabled が dashboard viewing の 前提 (fallback 表示 は table + honest scope block、chart なしで 部分機能)
  - Future append は `--label <run-id>` の unique 命名 discipline に依存、duplicate check あるが 事後訂正 は 新 entry で

## Failure mode (機械学習用 dataset)

- **(hhh) Timeline "trend" 誤読 by cap-artifact mixing**: v0.1-v0.4 entries と v0.5+ entries を line chart で 直接繋ぐと、 RUIN drop (1,136 → 334) が 装置改善 と 誤読 されうる (実際は maxFiles cap 差)。 Prevention: cap-artifact entries に ⚠ marker + honest scope block で 明示、v0.6-beta で optional filter で 「v0.5 以降のみ表示」 モード 追加候補。
- **(iii) Append-only discipline の 事後訂正 誤解**: past entries を 直接 edit すると audit trail 破壊、 corrigendum note は 新 entry で 追加 が rule。 Prevention: schema に `correctedBy: <runId>` field 追加 candidate (v0.6-beta)、 現状 は README + honestScope block で discipline 明示。
- **(jjj) Fetch path portability の 環境依存**: CF Pages で `/data/...` root fetch と、 独立 host 上の 相対 fallback、 両方対応済 だが 3rd deployment (e.g., GitHub Pages) で untested。 Prevention: dashboard fetch は 2 URL fallback で 実装、 環境依存 誤動作は console.error で report + 表示劣化 (chart 消失、 table 表示 継続)。

## 詳細参照 (任意)

- Timeline data: `data/orphan-gauge/history/timeline.json` (7 entries as of STEP 1956)
- Append script: `scripts/orphan-gauge-append-history.ts` (96 line)
- Dashboard page: `public/tools/orphan-gauge-dashboard/index.html` (~210 line)
- Mirror: `dist-renderer/tools/orphan-gauge-dashboard/index.html` (md5 一致)
- Related STEP: 1926 (v0.1) → 1947 (calibration) → 1948 (v0.2) → 1949 (v0.3-lite) → 1950 (cleanup) → 1951 (site) → 1952 (v0.4) → 1953 (top pill) → 1954 (v0.5 stability) → 1955 (v0.5 recalibration) → **1956 (v0.6-alpha dashboard、this)** → 1957 (upcoming, arc-wide site update)

## 追加 section — v0.6-beta candidates

- **Cap-artifact filter toggle**: chart UI に "hide cap-artifact entries" checkbox 追加、 v0.5+ のみ 表示 mode
- **Append-history CI hook**: git post-commit で auto-run で毎 commit ごと entry 追加 (cost = 22s/run、 過剰 になる 可能性、 defer)
- **Timeline schema v0.2**: `correctedBy: <runId>` + `deprecated: bool` field 追加 で past entry の 誤読 mitigate、 immutable content preserving
- **Multi-dimensional dashboard**: LIVE/ORPHAN/RUIN/DEAD 以外 に scoped-out rate や cluster-level 内訳 も 表示、 monitoring value 拡張

**私 推奨**: v0.6-alpha は 現状 committing で 一旦 close、 v0.6-beta 起票 は 実 use case (「dashboard を 週次 update」 or 「藤本さん daily check」 等) が 立ち上がってから、 過剰 pre-optimization avoid。
