Skip to content

feat(cli): --plan replay execution wires generateReview (#878 A2-3-impl)#935

Merged
s977043 merged 1 commit into
mainfrom
feat/a2-3-impl
May 28, 2026
Merged

feat(cli): --plan replay execution wires generateReview (#878 A2-3-impl)#935
s977043 merged 1 commit into
mainfrom
feat/a2-3-impl

Conversation

@s977043

@s977043 s977043 commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Final functional slice of #878. runReviewExecReplay now executes the source plan's selectedSkills against the current diff instead of echoing findings: []. This lifts the last silent-skip on the exec path.

The #927 todo-marked failing test is now a passing integration test.

Behavior

Invocation Result
exec --plan <p> --artifact diff=... executes, findings populated
exec --plan <p> (no diff resolved) echo contract (findings: [])
exec --plan <p> --dry-run echo only, no execution

Contract (per design doc #910)

  • No re-plan: selectedSkills come verbatim from the source plan.
  • Diff from current tree: resolved via resolveAllArtifacts / --artifact, NOT snapshotted in the plan (avoids artifact bloat — intentional design decision).
  • Carry-over context: fileTypes / relatedADRs / reviewMode / riskAssessment read from the source plan's debug.execution.snapshot (the field feat(runners): buildExecutionPlan emits snapshot carry-over (#878 A2-3-runners) #933 A2-3-runners made buildExecutionPlan emit). When the source predates the snapshot, generateReview falls back to engine defaults — graceful degradation, not silent skip.
  • debug.execution.replaySnapshotUsed records whether the carry-over was present.

Files

  • src/lib/review-plan.mjsrunReviewExecReplay gains execution params (executeReview, cwd, cliArtifacts, artifactsDir, impls) and the generateReview wiring.
  • src/cli.mjs — replay dispatch passes executeReview: !parsed.dryRun + cwd + artifacts.
  • tests/cli-review-exec-replay.test.mjs — 3 passing cases (was 1 todo).
  • runners/github-action/dist/** — rebuilt on Node 22.

Test plan

  • node --test tests/cli-review-exec-replay.test.mjs → 3/3 pass
  • npm test → 1113/1113 pass, 0 todo (was 1106 + 1 todo)
  • npm run build:action Node 22
  • node scripts/fix-dashes.mjs --check clean
  • CI green

Self-review (per AGENTS.md from #904)

  • 3 failure scenarios:
    1. Source plan predates debug.execution.snapshotsourceSnapshot is null, generateReview uses defaults; replaySnapshotUsed: false records it. Verified by the "no-diff echo" + manual older-plan path.
    2. Diff resolves but is empty/garbage → parseUnifiedDiff returns empty files, generateReview runs with no changed files (no crash).
    3. --dry-run with a diff present → must NOT execute. Covered by the dry-run test case.
  • Reopen / exception: drift detection (debug.replay.drift) is deferred to a follow-up slice per Codex; this PR scopes to execution + carry-over only.
  • Gray zone: findings COUNT depends on LLM availability — heuristics may return 0. The test asserts execution reach (skillsExecuted, replaySnapshotUsed), not finding volume, so CI without API keys is deterministic.

#878 epic status after this merge

Remaining optional follow-up: debug.replay.drift summary (separate issue if wanted). #878 can close on this merge; drift is a nice-to-have, not a silent-skip.

Final functional slice of #878. runReviewExecReplay now executes the source
plan's selectedSkills against the current diff instead of echoing findings: [].

Per docs/development/a2-3-replay-execution-design.md:
- Replay does NOT re-plan: selectedSkills come verbatim from the source plan.
- Diff is resolved from the current working tree / --artifact, NOT snapshotted
  in the plan (intentional — avoids artifact bloat).
- Carry-over context (fileTypes / relatedADRs / reviewMode / riskAssessment)
  is read from the source plan's debug.execution.snapshot (#933 A2-3-runners).
  When the source predates the snapshot, generateReview uses engine defaults
  (graceful degradation, not silent skip).
- debug.execution.replaySnapshotUsed records whether the carry-over was present.

Behavior matrix:
- exec --plan <p> --artifact diff=...      → executes, findings populated
- exec --plan <p> (no diff)                → echo contract (findings: [])
- exec --plan <p> --dry-run                → echo only, no execution

#927's todo-marked failing test is now a passing integration test (3 cases:
execution reach, no-diff echo fallback, dry-run echo).

Action dist rebuilt (Node 22) — cli.mjs transitively bundled.

drift detection (debug.replay.drift) is deferred to a follow-up per Codex
slice judgment; this PR delivers execution + carry-over.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-review-kit Ready Ready Preview, Comment May 28, 2026 2:29am

@github-actions

Copy link
Copy Markdown
Contributor

River Reviewer

  • フェーズ: midstream
  • LLM: skipped (dry-run enabled)
  • Planner: off
  • Impact tags: javascript, observability, reliability, tests
  • 変更ファイル数: 7
  • トークン見積もり: 1230911

選択されたスキル (1)

  • rr-midstream-logging-observability-001
スキップされたスキル (87)
  • adversarial-review: routing skill: not an executable review skill
  • river-reviewer-architecture: routing skill: not an executable review skill
  • river-reviewer-code: routing skill: not an executable review skill
  • river-reviewer-performance: routing skill: not an executable review skill
  • river-reviewer-security: routing skill: not an executable review skill
  • river-reviewer-testing: routing skill: not an executable review skill
  • river-reviewer: routing skill: not an executable review skill
  • rr-downstream-review-policy-standard-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-downstream-coverage-gap-001: phase mismatch: downstream !== midstream; missing inputContext: tests
  • rr-downstream-flaky-test-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-downstream-test-existence-001: phase mismatch: downstream !== midstream; missing inputContext: tests
  • rr-downstream-test-naming-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-downstream-test-plan-review-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-downstream-test-review-sample-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-a11y-accessible-name-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-independent-review-synthesis-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-modern-web-a11y-interactive-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-modern-web-browser-compat-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-modern-web-performance-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-modern-web-semantic-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-nextjs-app-router-boundary-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-review-policy-standard-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-agent-skill-bridge-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-api-compatibility-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-config-json-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-gh-address-comments-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-hello-skill-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-i18n-unused-key-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-loading-state-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-logic-torturing-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-normalization-consistency-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-nullability-contract-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-review-automation-boundary-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-review-comment-triage-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-security-basic-001: applyTo did not match any changed file
  • rr-midstream-suppression-feedback-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-type-driven-design-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-typescript-nullcheck-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-typescript-strict-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-war-game-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-midstream-code-quality-sample-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-review-policy-standard-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-test-code-nextjs-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-test-code-php-laravel-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-test-code-react-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-test-code-remix-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-test-code-unit-python-pytest-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-test-code-unit-ts-jest-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-test-code-vue-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-adr-decision-quality-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-api-design-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-api-versioning-compat-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-architecture-boundaries-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-architecture-diagrams-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-architecture-risk-register-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-architecture-traceability-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-architecture-validation-plan-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-availability-architecture-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-bounded-context-language-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-cache-strategy-consistency-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-capacity-cost-design-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-change-communication-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-context-budget-tuning-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-create-plan-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-data-flow-state-ownership-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-data-model-db-design-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-dr-multiregion-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-eval-driven-skill-design-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-event-driven-semantics-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-external-dependencies-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-failure-modes-observability-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-integration-contracts-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-migration-rollout-rollback-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-multitenancy-isolation-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-openapi-contract-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-operability-slo-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-plangate-exec-conformance-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-plangate-gc-deterministic-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-plangate-plan-integrity-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-plangate-rule-promotion-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-plangate-verification-audit-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-pr-template-qa-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-pre-mortem-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-requirements-acceptance-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-security-privacy-design-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-trust-boundaries-authz-001: dry-run: LLM必須スキル(ヒューリスティック未対応)
  • rr-upstream-architecture-sample-001: dry-run: LLM必須スキル(ヒューリスティック未対応)

優先度サマリー

  • P1 (must fix before merge): 0 件
  • P2 (should fix or waive): 0 件
  • P3 (recommended improvement): 0 件
  • P4 (informational): 0 件

スコア (参考値)

結果(スコア): 100/100
判定: auto-approve

内訳:

  • 可読性: 100/100
  • 拡張性: 100/100
  • パフォーマンス: 100/100
  • セキュリティ: 100/100
  • 保守性: 100/100

スコアは severity と axis から決定論的に算出された 参考値 (derived: true)。HITL レビューと併用してください。

指摘

No findings.

@github-actions

Copy link
Copy Markdown
Contributor

PlanGate Review

  • decision: pass
  • plan status: skipped-by-label
  • exec status: skipped-by-label

PlanGate review decision: pass

severity count policy
critical 0 fail
major 0 fail-if-required / warn
minor 0 comment-only
info 0 skipped

ポリシー: critical=fail / major=fail-if-required (warn) / minor=comment-only / info=skipped — spec: pages/reference/cli-review-plan-spec.md

@s977043 s977043 merged commit f74fa0a into main May 28, 2026
16 checks passed
@s977043 s977043 deleted the feat/a2-3-impl branch May 28, 2026 02:33
s977043 added a commit that referenced this pull request May 30, 2026
README.md:
- Mark npm publish workflow as implemented (#942, not roadmap)
- Name the three publishable packages (@river-reviewer/*)
- Note NPM_TOKEN activation step; npx river try is still separate
- Update Epic 1 roadmap row: B2 implemented, token setup pending

pages/reference/cli-review-exec-spec.md/.en.md:
- Add addendum: river review exec --plan <file> is now implemented
  via PR #935 (2026-05-29), produces Review Artifact via generateReview
- Note: exec without --plan still exits 3

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
s977043 added a commit that referenced this pull request May 30, 2026
…ills (#950)

docs/review/troubleshooting.md:
- Update exec --plan note: PR #935 (v0.68.0) now invokes generateReview,
  findings are real (not always [])

docs/development/execution-context-contract.md:
- Add PR #935 addenda to replay contract section (Stage 3 now invoked)

pages/reference/plangate-cli-roadmap.md:
- Mark public entrypoint row as implemented (v0.68.0+); review
  plan/exec/verify are wired in src/cli.mjs

runners/github-action/action.yml:
- Fix output_format validation regex: add yaml to allowed values
  (documented but previously rejected)

skills: promote design-token-enforcement and design-system-component-reuse
- Add golden outputs for all 4 fixtures (rubric verified)
- Flip recommended: false → true in registry.yaml

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
s977043 added a commit that referenced this pull request Jun 1, 2026
Version pins:
- README.md/en: @v0.42.0 → @v0.70.0 in Action examples
- pages/tutorials: @v0.68.0 → @v0.70.0 version references
- pages/guides: @v0.68.0 → @v0.70.0, actions/checkout@v6 → @v4

Content accuracy:
- README.md/en: mark river review exec --plan as shipped (v0.68.0/#935)
- README.md/en: update Epic 1/2 roadmap rows to reflect current state
- README.en.md: align npm distribution note with README.md (PR #942 shipped)
- pages/explanation/skills.md: remove unimplemented skill: prefix example
- pages/explanation/river-architecture.en.md: add missing Mermaid diagrams
  (component, GitHub Actions sequence, local CLI sequence) matching JA version
- pages/reference/skill-metadata.md: remove duplicate Phase type declaration

Runbook:
- docs/runbook/community-skill-eval.md: document agent-based eval path
  (nightly-eval.yml / skill-eval.yml / evaluate-all.mjs) alongside promptfoo

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
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