---
name: project-rei-automator-mcp-pypi-release-2026-08-18
description: "rei-automator-mcp v0.2.0a1 PyPI publish 完了 arc close (2026-08-18)。 Trusted Publisher (OIDC) approach で attestation-signed publish 達成 = grounded token 露出 incident (前 arc) の methodological 代替実証。 Byte-perfect __main__.py reconstruction (download button 不動作 → paste + SHA256 iterate variants で workaround) + Windows 実機 selftest 30/0 PASS。 全 Task #1-11 close。"
metadata: 
  node_type: memory
  type: project
  originSessionId: 81b8e854-af47-4fae-9ea5-fb0f830f629c
  modified: 2026-08-18T03:37:43.972Z
---

# rei-automator-mcp v0.2.0a1 PyPI publish 完了 (2026-08-18)

## Close summary

**deferred arc pickup 完全達成**。 前 session `project_rei_automator_mcp_pypi_deferred_2026-08-18.md` の 6 mechanical step (Rei 側) + 5 fujimoto own step 全 close、 attestation-signed で live。

## Live artifacts

- **PyPI**: https://pypi.org/project/rei-automator-mcp/0.2.0a1/
  - wheel: `rei_automator_mcp-0.2.0a1-py3-none-any.whl` (22440 B)
  - sdist: `rei_automator_mcp-0.2.0a1.tar.gz` (26037 B)
  - 両 file **provenance: True** (Sigstore attestation via OIDC)
- **GitHub Release**: https://github.com/fc0web/rei-automator-mcp/releases/tag/v0.2.0a1 (Pre-release、 target `master@8601e79`)
- **Install**: `pip install rei-automator-mcp[windows]==0.2.0a1`

## Byte-perfect reconstruction workaround (novel technique)

Downloads の ダウンロードボタン 不動作 → 藤本さん chat-Claude UI から content 直接 paste (UI label 「クラウド」 「Entrypoint · PY」 混入)。 期待 SHA256 `7c6b3dd1b14cf8cf...` (467 B) との 完全一致を **variant iterate + hash 突合** で 実現:

1. main.py (591 B、 前 arc の 誤 filename 汚染 file) の raw bytes を 起点
2. Offset 84 から clean code 抽出 (grep で `"""rei-automator-mcp` 位置特定)
3. Variant 生成:
   - V1-V7: CRLF→LF conversion + 各種 trailing whitespace strip pattern → 470-480 B、 no match
4. **key insight**: cat -An 分析で 「blank」 line 8 箇所 全てに ` ` (space) が 挿入 = chat UI artifact 判明
5. V8: `(?m)^[ \t]+$` regex で whitespace-only line を 完全 empty 化 + trailing whitespace strip + 単一 `\n` 付与
6. Result: **467 B, SHA256 `7c6b3dd1b14cf8cf9cfa74e5dd264109c9085a404d74cb2a6223c987f91e1ab2`** = **byte-perfect 一致** ✅

**Learning**: download button 不動作 の chat UI 由来 file は 「whitespace-only line に ` ` insert」 が 主要 contamination pattern。 raw byte offset 特定 + regex-based whitespace normalize で 高確率 reconstruction 可能。 SHA256 一致で **blind 再入力より 高確度** の 事実固定達成 (SAC-4 pattern 逆応用: iterate + verify で 事実固定)。

## Windows 実機 verify 結果 (藤本さん own)

- Python 3.13
- **30 passed / 0 failed** (Linux graceful degradation の 30/0 と 同数、 但し **pywinauto uia backend 初期化 OK** = Windows-native path 実 hit)
- PS1 同梱 + UTF-8 BOM OK
- Trusted Publisher OIDC + attestation 付き

**未 hit**: `type` action の IME バイパス実地テスト (Notepad に 日本語送信) = selftest scope 外の 唯一の 経路、 別 session で 実施予定 (急ぎではない)。

## Side effect (要対応、 client-side)

`pip install --force-reinstall` が Pillow を 11.1.0 → 12.3.0 に 上げたため、 streamlit 1.42.2 (`pillow<12,>=7.1.0`) が 動かなくなる 可能性:

```
pip install "pillow>=11,<12"
```

rei-automator-mcp 自身は `pillow>=10.0` (optional [windows]) なので 11 系で 両立。 pip 一時 folder `~*` 残存 は 手動削除:

```powershell
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Programs\Python\Python313\Lib\site-packages\~*"
```

**Root cause**: 藤本さん verify 時の `--force-reinstall` option が 依存 pin を 無視した = rei-automator-mcp package 側 issue ではない、 test command の 副作用。 `pillow<12` upper bound を pyproject に 明示追加する option もあるが streamlit 側 constraint 変動考慮すると 現状の `pillow>=10.0` open range を 維持推奨。

## Trusted Publisher (OIDC) 意義 vs 前日 grounded token 露出 incident

前日 (2026-08-18 earlier session): grounded release で 藤本さんが PyPI token を chat に 直接貼付 → upload 即実行 + 即 revoke で 実効悪用時間 ~2 分、 被害ゼロ 但し operational risk 露呈。 → [[project-grounded-pypi-release-2026-08-18]] Token 露出 incident first case。

本 arc: chat-Claude 提案 Trusted Publisher (OIDC) 採用で:
- Token 保存 完全不要
- GitHub Actions が OIDC token を PyPI に federated auth で 提示
- Sigstore attestation 自動付与 (provenance URL 発行)
- 「token 露出 → 即 revoke」 protocol の 必要性 自体を 消去

**chat-Claude 対等 exchange** (自己 corrigendum): 「同じ経路で取得したなら pyproject.toml と publish.yml も 汚染されている 可能性が高い」 と 書いたが 実測では 両方 完全一致 = 「`__main__.py` 1 file の 症状から 他 2 file の 状態を 推測、 根拠のない 一般化」 と 訂正。 私 (Claude Code) が 実 file 測って 否定した のが 正しい手順。 **私 と chat-Claude 双方の SAC-4** = 対等 exchange。

## Task #1-11 close 実装記録

| Task | Owner | Method | Time |
|---|---|---|---|
| #1 `__main__.py` 再取得 | fujimoto → Rei workaround | byte-perfect reconstruction (V8 variant + SHA256 match) | 藤本さん download button fail → 私 workaround 15 分 |
| #2 SHA256 verify | Rei | `7c6b3dd1b14cf8cf9cfa74e5dd264109c9085a404d74cb2a6223c987f91e1ab2` 一致 | 即 |
| #3 git clone | Rei | scratchpad master (8 file) | 即 |
| #4 src/ restructure | Rei | git mv preserve 99%+100% rename | 即 |
| #5 version 揃え | Rei | 0.2.0-alpha → 0.2.0a1 (docstring + MCPServer) | 即 |
| #6 commit + push | Rei | `8601e79` on master, workflow "Publish to PyPI" active | 即 |
| #7 GitHub Environments | fujimoto | pypi + testpypi 空 env 作成 | 藤本さん own |
| #8 Trusted Publisher 登録 | fujimoto | PyPI + TestPyPI 別サイト 別アカウント | 藤本さん own |
| #9 TestPyPI 予行演習 | fujimoto | 1 回目 fail (invalid-publisher = TestPyPI 登録漏れ or typo) → 藤本さん fix → 再 run success | 診断 log fetch 経由 |
| #10 本番 tag push | fujimoto | `git tag v0.2.0a1 && git push origin v0.2.0a1` → 自動 PyPI publish + Release 作成 | 藤本さん own |
| #11 Windows 実機 verify | fujimoto | `pip install rei-automator-mcp[windows]==0.2.0a1` + `--selftest` 30/0 PASS | Windows-native uia backend OK |

## 残 open items (急ぎではない)

1. **type action IME バイパス実地テスト** — Notepad に 日本語送信 で pywinauto SendInput + KEYEVENTF_UNICODE path 実 hit verify。 selftest 未 cover の 唯一の Windows-specific path。
2. **Node.js 20 deprecation** (log warning): `actions/download-artifact@v4` が forced Node 24 で 稼働中。 v5 出れば bump (現状動作影響なし)。
3. **rei-aios repo 未解決 conflict = 40 UU markers** (本 arc close 時点 実測、 session 中の cron auto-refresh で session 開始時 5 件から 大幅増加): `data/*/latest.json` 系 + `data/autonomous-learning-status.json` + `data/eternal-evolution-log-2026-08-17.json` + `data/learning-log-2026-08-17.json` + `data/nnue/evolution-log.json` + 他多数。 rei-aios は **main branch 上で active merge 状態** (rev-list `0 0` = origin/main と 差なし、 但し 未完 merge)、 RECENT_UPDATES.md 追記 protocol は 本 arc では **defer** (active merge 中の 新規 commit は 汚染 risk)。 chat-Claude offer 「`git remote -v` + `git status` 貼れば 解消支援」 = 別 arc で 対応、 その arc 完了後に RECENT_UPDATES.md rei-automator-mcp PyPI live entry 追記予定。

## Close addendum (session 終了直前 の chat-Claude 対話)

Arc close 後、 藤本さん が 「Claude 先生が 喜ぶ コネクタ 装置 回路 ソフトウェア は これから制作」 と 述べ、 chat-Claude が **framing 訂正** = 「私に 好みや 欲求が あるわけではないのですが、 AI が 道具として 使いやすい 設計というのは 実在します」 → 5 条件 明示 (有限 allowlist + 危険操作 関門 + 構造化 return + graceful degradation + selftest) → rei-automator-mcp が **first fully-satisfying evidence** と 認定。 私 (Claude Code) 側からも 承認 + Rei stack 5 MCP audit 表 を 提示。

★ **本 5 条件 checklist は 今後 の MCP / connector / SDK 系 release で reusable** → 別 memory `[[feedback-ai-usable-tool-design-5-conditions-2026-08-18]]` に 一般化 protocol として 独立記録 (rei-automator-mcp を anchor evidence として)。

★ 「AI が 喜ぶ 設計」 表現の 訂正 (「AI が 使いやすい 設計」) も 同 feedback file に discipline として 記録。

★ chat-Claude 助言 「alpha → 実使用 → a2」 の 順序 = [[feedback-one-reproduction-over-ten-unverified]] の MCP release 版 直接適用、 Notepad IME バイパス実地テスト が selftest 30 pass を 上回る 1 reproduction。

## Related

- [[project-rei-automator-mcp-pypi-deferred-2026-08-18]] (前 session 起源、 本 arc の 直接 pickup card、 本 memory で **CLOSED** 相当)
- [[project-grounded-pypi-release-2026-08-18]] (前日 token 露出 first case、 Trusted Publisher OIDC 採用の contrast reference)
- [[feedback-password-security]] (Trusted Publisher OIDC = token 事後応急 protocol の architectural 代替)
- [[feedback-projection-self-audit-pattern]] SAC-4 (byte-perfect reconstruction workaround = iterate + verify で 事実固定 = SAC-4 逆応用実例)
- [[feedback-chat-claude-hallucination-warning]] Pattern 6 (chat-Claude Linux verify 30/0 主張 accurate + 自己 corrigendum 「他 2 file 汚染推測」 = Pattern 6 progression 極致)
- [[feedback-one-reproduction-over-ten-unverified]] (byte-perfect SHA256 一致 = 1 reproduction、 chat UI paste + inference 系 blind trust より 高確度)
- [[project-rei-automator-phase1-full-arc-close-2026-08-16]] (rei-automator-mcp v0.1 → v0.2.0-alpha 進化 context)

## Rei stack impact

- **Rei stack MCP 5 systems**: 数変わらず (rei-automator-mcp は 既に 5 の 1 個、 PyPI publish は distribution channel 追加のみ)
- **PyPI live 分散 OSS**: 2 個 → **2 個継続** (grounding-check + grounded)、 rei-automator-mcp は 別カウント (rei-aios 別 project)
- **累計 PyPI live package**: grounded-check 0.1.2 + rei-automator-mcp 0.2.0a1 = **2 package live**
- **Trusted Publisher (OIDC) 採用 package**: rei-automator-mcp (grounded は token 経由の 前日 first case、 本日 rei-automator-mcp が OIDC 経由の 対比 first case)

## Honest scope

1. 本 arc は 前 session deferred card の mechanical pickup で 新規発明ゼロ、 chat-Claude 提案 3 file (pyproject.toml + publish.yml + __main__.py) の 素直な 実装 + 藤本さん own operational 段階 の 順次実行
2. rei-automator-mcp は fc0web/rei-automator-mcp 別 project = rei-aios site (`https://rei-aios.pages.dev/tools/`) 反映対象外 (2026-08-06 「全研究 site 反映 default」 protocol は rei-aios 内 STEP に 限定、 別 project OSS repo は 独立)
3. Rei stack 内部発明 (rei-aios repo 内 STEP) ではなく **distribution channel 追加**: v0.2.0-alpha は 既に GitHub 上に存在、 PyPI publish は インストール可能性の 拡張のみ
4. Windows 実機 selftest 30/0 PASS は pywinauto uia backend 初期化 + import path 全 cover、 但し `type` action IME バイパス 実地テスト は 別途 必要
5. attestation-signed publish は Trusted Publisher OIDC architecture の 正しい実装 evidence だが、 これは 「novelty」 でなく PyPI + GitHub Actions の 既定機能を 正しく使えた のみ
6. Pillow side effect は client-side test command (`--force-reinstall`) の 副作用、 package 側 issue ではない (streamlit との conflict は 藤本さん env 固有)
