[EVI-7]: wire capture-pr into Evidence Action#39
Conversation
EVI-7 Wire capture-pr into the Evidence GitHub Action
Context / backgroundParent Project: Evidence PR Change Proof MVP ( Acceptance criteria
External validation gatesNone. Human acceptance for the whole MVP is consolidated in the Project-level human handoff issue. Out of scope
Inputs / dependenciesBlocked by: Target repository: Existing files to inspect:
The action must continue to work for both iOS and web platform modes. Risks / notes for implementer
Definition of DoneDone when a consuming repo can use the Evidence GitHub Action to run Architecture ImpactAdapter-layer change only. The GitHub Action should delegate policy to the CLI and avoid duplicating PR comparison logic in YAML or shell. Clean Architecture ShapeUse case:
Entities / value objects:
Ports:
Adapters:
Boundary rule:
Catalog update:
Mergeability / change ownershipSingle reason to change: expose PR evidence capture through the reusable GitHub Action. Primary code owner: |
There was a problem hiding this comment.
ReviewAutonomousPR
- Verdict:
approve - Reviewer boundary:
review_only - Acceptance criteria coverage: covered=9, missing=0, unclear=1
Summary
No blocking issues found. The PR wires capture-pr through the composite action, adds the requested inputs/defaults/comment behavior, documents artifact upload via the new example workflow, and keeps existing tests green.
Actionable findings
- None.
Acceptance criteria coverage
- covered — action.yml documents capture-pr as a supported subcommand.
- The subcommand input description and README include capture-pr.
- Actionability:
none - Evidence: action.yml input description; README action usage section
- covered — The action accepts explicit PR evidence inputs: pr, plan, before-ref, after-ref, keep-worktrees, summary-only.
- All requested inputs are declared and validated by ActionDefinitionTests.
- Actionability:
none - Evidence: action.yml inputs; Tests/EvidenceCLIKitTests/ActionDefinitionTests.swift
- covered — The action passes GitHub context defaults to the CLI on pull_request events.
- Repository, PR number, base/head SHA, GH_TOKEN, and GITHUB_TOKEN are wired into the run step, with explicit input override support.
- Actionability:
none - Evidence: action.yml Run evidence env and capture-pr args
- covered — The action preserves existing inputs and outputs for existing subcommands.
- Existing public inputs/outputs remain present; swift test passed.
- Actionability:
none - Evidence: swift test: 118 tests, 2 skipped, 0 failures
- covered — The PR comment for capture-pr includes report status, before SHA, after SHA, artifact count, and report path/link.
- The capture-pr comment branch parses report.md and emits the requested summary fields.
- Actionability:
none - Evidence: action.yml Comment on PR step; ActionDefinitionTests capture-pr comment assertions
- covered — The action exposes generated screenshots/videos/report as workflow artifacts through upload steps or documented example workflow.
- The new copy-paste workflow uploads the action output directory with actions/upload-artifact.
- Actionability:
none - Evidence: Examples/workflows/capture-pr-on-pr.yml
- covered — Example workflows include one copy-pasteable capture-pr-on-pr.yml for iOS PR evidence.
- The new macOS pull_request workflow checks out with fetch-depth 0, invokes capture-pr, comments, and uploads artifacts.
- Actionability:
none - Evidence: Examples/workflows/capture-pr-on-pr.yml; ExampleWorkflowsTests
- unclear — actionlint action.yml Examples/workflows/.yml .github/workflows/.yml passes.
- actionlint passes for workflow files, but actionlint treats composite action.yml as a workflow and fails on missing on/jobs. The PR notes document this and the repo uses ActionDefinitionTests for action.yml validation.
- Actionability:
follow_up - Evidence: actionlint Examples/workflows/.yml .github/workflows/.yml passed; actionlint action.yml ... fails because action.yml is a composite action manifest
- Suggested follow-up: Clarify composite-action linting standard for action.yml
- covered — Swift tests that validate action input wiring are updated.
- New ActionDefinitionTests cover capture-pr inputs, GitHub context defaults, CLI args, token wiring, and comment summary content.
- Actionability:
none - Evidence: Tests/EvidenceCLIKitTests/ActionDefinitionTests.swift
- covered — Existing web and iOS action examples continue to pass their current tests.
- Example workflow tests passed; full Swift suite passed with only pre-existing Node-dependent web integration tests skipped.
- Actionability:
none - Evidence: swift test: 118 tests, 2 skipped, 0 failures
Summary
capture-prAction inputs for PR number, plan path, before/after refs, worktree retention, and comment summary mode.ghmetadata reads.report.mdsummary and add a copy-paste iOS PR workflow that uploads the output directory.Reviewer-Boundary: review-only
Verification
swift buildpassed.swift testpassed: 118 tests, 2 skipped, 0 failures.actionlint Examples/workflows/*.yml .github/workflows/*.ymlpassed.git diff --checkpassed.Notes
actionlint action.yml Examples/workflows/*.yml .github/workflows/*.ymlwas attempted, but actionlint only validates workflow files and reportsaction.ymlas missing workflowonandjobssections. The repo'sActionDefinitionTestsvalidate the composite action manifest instead.