Skip to content

feat(action): Add review mode with two-pass summary and CI smoke tests#93

Merged
mhiro2 merged 3 commits into
mainfrom
feat/action-review-mode
Apr 28, 2026
Merged

feat(action): Add review mode with two-pass summary and CI smoke tests#93
mhiro2 merged 3 commits into
mainfrom
feat/action-review-mode

Conversation

@mhiro2

@mhiro2 mhiro2 commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a mode: diff | review switch to action/action.yaml so the same composite action can either render a schema diff (existing default) or run relune review for migration risk reporting.
  • Drive review-mode outputs (has-findings, has-blocking-findings, summary-{breaking,caution,warning,info}) from a dedicated summary pass that re-runs the CLI without --deny, keeping outputs accurate when the user pass exits with rc=10.
  • Propagate the new dialect input to the existing diff path so the flag is not silently review-only.
  • Cover review mode end-to-end in .github/workflows/test-action.yaml with no-findings, warning-only, blocking, fail-on-blocking, and invalid-mode cases.
  • Rename the action to "Relune Schema Diff & Review" so the marketplace listing reflects both modes.

Changes

  • 0fa5180 : feat(action): add review mode with 2-pass summary
    • Wire the composite step to dispatch on mode, expose review inputs (deny, rules, except-rules, except-tables, dialect, fail-on-blocking) and the new outputs, and keep has-changes working unchanged for diff users.
    • Add action/review.sh that runs the user-facing review with all filters first, then a JSON-only summary pass without --deny whose rc must be 0; aggregate counts via jq and only exit non-zero when fail-on-blocking=true and a blocking finding was detected.
    • Update action/diff.sh to forward --dialect whenever the input is set and not auto, so both modes honor the dialect input consistently.
  • 03c4851 : test(action): smoke-test review mode in test-action.yaml
    • Add five review smoke steps that exercise the no-findings, warning-only, blocking-without-fail, blocking-with-fail-on-blocking, and invalid-mode paths.
    • Use continue-on-error: true on the steps that are expected to fail and assert on steps.X.outcome so a real regression still breaks the workflow.
  • ef967a6 : chore(action): rename action to "Relune Schema Diff & Review"
    • Update the action name and description so the marketplace listing advertises both relune diff and relune review rather than the diff path only.

mhiro2 added 2 commits April 28, 2026 22:38
Add `mode: diff | review` input to action.yaml and a new review.sh that
runs `relune review` twice — once with the user's --deny / filters to
drive has-blocking-findings via rc=10, then again without --deny to a
JSON summary path so has-findings and summary-* outputs reflect the true
finding set even when no threshold is configured. The summary pass
fails the action on any non-zero rc to avoid emitting broken outputs.

Also propagate the new `dialect` input to the existing diff path so the
flag is not silently review-only.
Cover the four review outcomes (no findings, warning only, blocking
without fail, blocking with fail-on-blocking) plus an invalid-mode
case. The fail-on-blocking and invalid-mode steps use
continue-on-error so the workflow can assert on `steps.X.outcome`
instead of crashing on the expected non-zero exit.
@mhiro2 mhiro2 self-assigned this Apr 28, 2026
@mhiro2 mhiro2 added the enhancement New feature or request label Apr 28, 2026
@github-actions

This comment has been minimized.

The composite action now covers both `relune diff` and `relune review`,
so the marketplace name and description should call out both modes
instead of advertising only the diff path.
@github-actions

Copy link
Copy Markdown

Code Metrics Report

main (3d610d9) #93 (737b77a) +/-
Coverage 94.6% 94.6% 0.0%
Test Execution Time 1m34s 1m36s +2s
Details
  |                     | main (3d610d9) | #93 (737b77a) | +/-  |
  |---------------------|----------------|---------------|------|
  | Coverage            |          94.6% |         94.6% | 0.0% |
  |   Files             |             81 |            81 |    0 |
  |   Lines             |          36827 |         36827 |    0 |
  |   Covered           |          34864 |         34864 |    0 |
- | Test Execution Time |          1m34s |         1m36s |  +2s |

Reported by octocov

@mhiro2
mhiro2 merged commit 1bd599a into main Apr 28, 2026
5 checks passed
@mhiro2
mhiro2 deleted the feat/action-review-mode branch April 28, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant