Skip to content

Add draft GitHub approval evidence reader - #944

Merged
japan1988 merged 2 commits into
mainfrom
tasukeru-approval-reader-draft-20261005
Oct 6, 2026
Merged

japan1988 merged 2 commits into
mainfrom
tasukeru-approval-reader-draft-20261005

Conversation

@japan1988

Copy link
Copy Markdown
Owner

Prepare an unconnected, read-only reader for comparing GitHub approval evidence with a fixed Tasukeru proposal.

Add two files:

  • scripts/tasukeru_mediation_demo/github_approval_reader.py: compare reviewer identity fields, repository, run, attempt, environment, proposal/input hashes and deadlines; classify approved or rejected records.
  • tests/test_github_approval_reader_draft.py: 114 offline fixture tests, with network access blocked during module loading and each test.

Mismatches, expired proposals, rerun attempts, ambiguous reviews and unresolved reads stop the comparison. A matching record is evidence only: the reader always returns execution_allowed: false.

This module is not connected to the workflow, authenticated GitHub transport, Environment protections or the shared one-use approval store. The existing analysis, observer and confirmation workflows remain unchanged. No AI API calls, automatic repairs, final adoption or live approval are enabled.

Local validation on Python 3.12.14 passed:

  • 114 new reader tests and 114 existing confirmation tests.
  • 20 existing demo self-tests.
  • Python 3.10/3.11/3.12 syntax checks for the two added files; 3.10 and 3.11 execution has not been tested locally.

The proposal lifetime is 48 hours. The processing-start deadline must be supplied explicitly and remains a separate policy decision. Test deadlines are fixtures, not a finalized production policy.

GitHub CI verification is pending at PR creation. Leave merging to the user's manual review.

Copy link
Copy Markdown
Owner Author

目的は、将来の実ユーザー承認への接続に向けて、「誰が・どの提案について・どの実行に承認したか」を照合する部分を準備することです。

今回追加したのは、未接続の照合モジュールと、その模擬テストの2ファイルです。承認者・対象実行・Environment・提案と入力のハッシュ・期限を照合し、不一致、期限切れ、再実行、曖昧な記録、読み取り不能時は停止する設計です。記録が一致しても実行許可は発行しません。

ローカルでは、追加分114件、既存の確認テスト114件、既存デモ20件が合格しました。実ユーザーの認証、実行間の一回限りの承認消費、実バックエンドへの接続は未確認・未接続です。提案の有効期限は48時間とし、処理開始期限の確定は別段階に残しています。

公開リポジトリ・標準ランナー・模擬回答を使う方針を維持し、有料AI APIや常駐サーバーは追加していません。アカウント全体の保存容量と課金設定はまだ確認していません。

マージはユーザーが確認後に手動で行います。今回の追加だけでは実承認の処理は開始されません。

@japan1988
japan1988 merged commit 4cc1e5e into main Oct 6, 2026
3 checks passed
@japan1988
japan1988 deleted the tasukeru-approval-reader-draft-20261005 branch October 6, 2026 09:05
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