Skip to content

feat(runners): buildExecutionPlan emits snapshot carry-over (#878 A2-3-runners)#933

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

feat(runners): buildExecutionPlan emits snapshot carry-over (#878 A2-3-runners)#933
s977043 merged 1 commit into
mainfrom
feat/a2-3-runners

Conversation

@s977043

@s977043 s977043 commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

Third slice of #878 (after A2-3-pre #922 schema and A2-3-test #927 todo-marked failing test). Populates the carry-over snapshot in buildExecutionPlan output. The artifact-side wiring (read plan.snapshot, write artifact.debug.execution.snapshot) is the next slice (A2-3-impl); this PR only adds the producer.

Per the design doc (#910): A2-3-impl flips the { todo: true } test #927 to a regular test() when it lands.

Changes — runners/core/review-runner.mjs

  • New top-level snapshot: { fileTypes, relatedADRs, reviewMode, riskAssessment } in both planner and no-planner return branches.
  • New top-level riskAssessment field — previously computed in line 213 but never returned (silent-skip per fix(cli): propagate riskAssessment on review exec path (#802 Phase 3 A2-fix-4) #877 taxonomy; plan.riskAssessment consumers always saw undefined).
  • The empty-selection early return now also returns snapshot and fileTypes/riskAssessment so audit-trail consumers can record context even when no skill matched.

Dist rebuild

runners/github-action/dist/index.mjs rebuilt on Node 22 because runners/github-action/src/index.mjs transitively imports runners/core/review-runner.mjs via src/cli.mjs. Avoids the Action dist freshness CI failure pattern from #917.

Test plan

  • node --test tests/review-runner-snapshot-field.test.mjs → 4/4 pass
  • npm test → 1110/1110 pass (4 new tests, no regression)
  • npm run skills:validate:promptfoo clean
  • node scripts/fix-dashes.mjs --check clean
  • npm run build:action on Node 22 to rebuild dist

Codify-then-validate (per AGENTS.md from #904)

3 failure scenarios:

  1. Existing consumers that destructure plan.{fileTypes,relatedADRs,reviewMode} at top level → unchanged, additive only.
  2. Consumers that strictly disallow new top-level keys → riskAssessment and snapshot are added; Object.freeze / type-strict consumers would need updating. Searched — none today.
  3. The snapshot object holds references to the same arrays as the top-level fields, not copies. Mutation by a consumer would change both. Documented inline; consumers should treat output as read-only (existing convention).

Reopen / exception: if A2-3-impl decides the snapshot needs to be deep-cloned, that's a one-line change in src/lib/review-plan.mjs at copy time.

Gray zone: when no skills selected, the snapshot is partially synthetic (relatedADRs: [], reviewMode: null). Documented inline; consumers treating these as unknown rather than empty should branch on plan.selected.length === 0 instead.

Out of scope

  • A2-3-impl: artifact-side wiring + replay-path read. Separate PR; requires src/lib/review-plan.mjs change which is Ask before editing.
  • Verify CLI: separate issue (if needed).
  • Snapshot consistency check at read time (mismatched fields detection): A2-3-impl scope.

…3-runners)

Per docs/development/a2-3-replay-execution-design.md A2-3-runners slice:
populate the carry-over snapshot in buildExecutionPlan output so a future
A2-3-impl slice can attach it to artifact.debug.execution.snapshot for
--plan replay execution.

Additive shape:
- New top-level `snapshot: { fileTypes, relatedADRs, reviewMode, riskAssessment }`
- New top-level `riskAssessment` (was previously computed but never returned,
  silently breaking `plan.riskAssessment` consumers; #877 silent-skip
  taxonomy applies)

The empty-selection early return now also carries the snapshot (with
relatedADRs: [], reviewMode: null) so consumers can record the audit trail
even when no skills run.

Action bundle rebuilt (npm run build:action on Node 22) since cli.mjs
transitively imports review-runner.

Next slice: A2-3-impl wires src/lib/review-plan.mjs to copy plan.snapshot
into artifact.debug.execution.snapshot AND the replay path (runReviewExecReplay)
to read it back. That requires src/lib/ change; AGENTS.md "Ask before editing"
gate applies.
@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:07am

@github-actions

Copy link
Copy Markdown
Contributor

River Reviewer

  • フェーズ: midstream
  • LLM: skipped (dry-run enabled)
  • Planner: off
  • Impact tags: none
  • 変更ファイル数: 4
  • トークン見積もり: 1210768

選択されたスキル (0)

  • none
スキップされたスキル (88)
  • 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-logging-observability-001: applyTo did not match any changed file
  • 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): 1 件

  • P3 (recommended improvement): 0 件

  • P4 (informational): 0 件

  • 抑制済み: 1 件 (主な理由: low_confidence(1))

スコア (参考値)

結果(スコア): 96/100
判定: human-review-recommended

内訳:

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

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

指摘

  • runners/core/review-runner.mjs:210
    • Finding: マッチするスキルがなく自動指摘を生成できなかった
    • Evidence: LLM: dry-run enabled
    • Impact: 重要なリスクを見落とす可能性がある
    • Fix: このファイル種別に対応するスキルを追加するか、手動レビューを実施する
    • Severity: warning
    • Confidence: low

1 件の指摘を抑制しました (主な理由: low_confidence(1))

@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 34bf00c into main May 28, 2026
16 checks passed
@s977043 s977043 deleted the feat/a2-3-runners branch May 28, 2026 02:12
s977043 added a commit that referenced this pull request May 28, 2026
…pl) (#935)

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.
s977043 added a commit that referenced this pull request May 28, 2026
…on (#939)

The 2026-05-25..28 retrospective was written mid-session (#930). This addendum
captures the remaining arc (#878 epic, #868/#921/#929 closeout) and the one
durable lesson worth persisting:

"completed" report ≠ wired-through. #877 claimed to fix the riskAssessment
silent-skip but only wired the consumer side; the producer never emitted the
value, so plan.riskAssessment was always undefined. Found during A2-3-runners
(#933).

New P1 rule: a silent-skip fix needs a test asserting the value is RETURNED by
the producer AND consumed — not just "forwarded if present". A "forwards X"
test passes whether X is real or undefined.

Also records: the 4-slice design-doc-first delivery shape (#878) and the
design-only discipline held twice (#910, #938).

Full session totals: 38 PRs / 13 releases / 4 issues closed / 5 opened.
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