Repository navigation
feat(agent-logs): add safe github comment posting (#937) - #977
Conversation
Split stable ownership markers from digest markers for agent_run_report/v1 comment upserts, add final posting guards that reuse the canonical validator surface, and cover create/update/noop/dry-run/error flows with mocked REST tests.
Preview URLPreview removed (PR #977 closed). |
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Mergeability
- mergeable=MERGEABLE, merge_state_status=BEHIND
Evidence Check
- AC coverage: PR 本文の
## 受け入れ条件の達成状況で AC1-AC8 がすべて[x]となっており、#937 の contract と整合しています。 - Allowed Paths:
allowed_paths_review_gate.py再計算でstatus=ok、changed files 12 件はすべて #937 の Allowed Paths 内でした。 - CI Verification:
ci_verdict_summary.pyを headaf396ed82e4cb67b895f36bb4aed91277f364db1に固定して再確認し、status=all_passでした。 - 検証コマンド結果: PR 本文の検証結果と #937 実装完了コメントの VC 列挙は一致しています。
TEST_VERDICT_MACHINEコメントは見当たらなかったため、本判定はCI_CHECK_RUN_SCOPEDを正本証跡として扱います。
Blockers
- なし
Non-blockers
mergeable=MERGEABLEかつmerge_state_status=BEHINDのため、merge-ready 化には branch update が必要です。
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "af396ed82e4cb67b895f36bb4aed91277f364db1"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "BEHIND"
blockers: []
required_auto_actions:
- kind: update_branch
executor: implementation-worker
skill: implement-issue.update_branch
blocking_merge_ready: true
mechanical: true
expected_head_sha: "af396ed82e4cb67b895f36bb4aed91277f364db1"
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "74866bc60499ec63449257ba350ad1bb6ff79bf2"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
VerdictREQUEST_CHANGES。 確認対象は PR #977 本文・diff・コメント、#937 本文とコメント、親 #928、依存 #934/#935/#936、関連 PR #951/#426/#314 コメント、および GitHub REST / GitHub CLI / GitHub Actions / upload-artifact の一次情報です。手元で CI は再実行していません。 良い点この PR は、#937 の過去レビューで指摘された「digest を ownership marker に混ぜると update 対象を見失う」問題を正しく分離しています。実装では ownership marker と digest marker を別行にし、digest は
GitHub REST の選択も方向性は正しいです。GitHub の Issue comments API は issue と pull request の comment を同じ API 群で扱い、Pull Request は Issue として扱われます。対象 issue/PR の comments list endpoint は
Blocker 1:
|
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "b92b05a5670488e9bb5c53c8d85785179f0dc5d3"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
review_scope_notes:
- "2026-06-18 の再確認では current head の GitHub state は is_draft=true だが、merge_state_status=BLOCKED は再現せず、gh pr view では mergeable=MERGEABLE / merge_state_status=CLEAN。よって BLOCKED の由来は current head では draft・branch protection・other GitHub-side gate のいずれとも断定不能。"
- "TEST_VERDICT_MACHINE コメントは未検出。Verification Commands 8/8 PASS と focused adversarial tests PASS の自己申告に加え、expected_head_sha 一致の ci_verdict_summary.py status=all_pass を CI_CHECK_RUN_SCOPED 証跡として採用。"
Summary
agent_run_report/v1向けに stable ownership marker と digest marker を分離した GitHub comment posting surface を追加しました。validateAgentRunReportrenderPublicMarkdownvalidateMarkdownCandidateを再利用する final posting guard と、Issue / PR comment の marker-addressed upsert helper を追加しました。agent-run:postpackage script を追加しました。Checks
test -f tests/agent-logs/github-comment-marker-format.test.tsを PASS しました。test -f tests/agent-logs/github-comment-upsert-flow.test.tsを PASS しました。test -f tests/agent-logs/github-comment-marker-ownership.test.tsを PASS しました。test -f tests/agent-logs/github-comment-post-guard.test.tsを PASS しました。test -f tests/agent-logs/github-comment-body-size.test.tsを PASS しました。test -f tests/agent-logs/github-comment-dry-run.test.tsを PASS しました。test -f tests/agent-logs/github-comment-upsert.test.tsを PASS しました。rg -n '"agent-run:post"' package.jsonを PASS しました。pnpm typecheckpnpm lintpnpm testpnpm buildをすべて PASS しました。Schema Change Applicability
Schema Consumer Inventory
N/A
schema を変更していないため、この PR では inventory は不要です。
Safety Claim Matrix
N/A
reason: GitHub comment posting helper と mocked REST tests の追加であり、safety-sensitive path には該当しません。
受け入れ条件の達成状況
agent-run:postscript を追加し、既存 validator 正本から分岐しない実装にしました。検証コマンド結果
test -f tests/agent-logs/github-comment-marker-format.test.tsを PASS しました。test -f tests/agent-logs/github-comment-upsert-flow.test.tsを PASS しました。test -f tests/agent-logs/github-comment-marker-ownership.test.tsを PASS しました。test -f tests/agent-logs/github-comment-post-guard.test.tsを PASS しました。test -f tests/agent-logs/github-comment-body-size.test.tsを PASS しました。test -f tests/agent-logs/github-comment-dry-run.test.tsを PASS しました。test -f tests/agent-logs/github-comment-upsert.test.tsを PASS しました。rg -n '"agent-run:post"' package.jsonを PASS しました。pnpm typecheckpnpm lintpnpm testpnpm buildをすべて PASS しました。Allowed Paths 遵守
scripts/agent-logs/**の契約対象ファイル、tests/agent-logs/github-comment-*.test.ts、package.jsonのみに限定しました。package.jsonは 実装: agent_retro_index/v1 の canonical parent marker と trusted post-merge workflow を追加する #938 / 実装: EntireCLI safety checker と conditional adoption guard を追加する #941 / 実装: AI作業ログ public-safe 要約スクリプトを追加する #947 と重複しますが、script entry 追加だけのためC1: benign overlapとして扱っています。Notes
.claude/worktrees/issue-937-agent-run-posting-guardです。worktree-issue-937-agent-run-posting-guardです。