Skip to content

chore: Narrow shared release input triggers#1476

Merged
hatayama merged 2 commits into
v3-betafrom
refactor/dispatcher-release-inputs
Jul 3, 2026
Merged

chore: Narrow shared release input triggers#1476
hatayama merged 2 commits into
v3-betafrom
refactor/dispatcher-release-inputs

Conversation

@hatayama

@hatayama hatayama commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep release trigger checks focused on the release packages that actually consume each shared input.
  • Prevent dispatcher-only common changes from forcing unnecessary project-runner release stamps.

User Impact

  • Release automation becomes less noisy for maintainers when dispatcher-only inputs change.
  • Product, CLI, and Unity runtime behavior are unchanged.

Changes

  • Split shared common inputs from dispatcher-only common inputs in the release trigger guard.
  • Updated the stamp script and generated stamp files to match the narrower input sets.
  • Added regression coverage for dispatcher-only common files and ignored test helper packages.

Verification

  • sh scripts/test-stamp-release-inputs.sh
  • go test ./internal/automation (in cli/release-automation)
  • scripts/check-go-cli.sh

Review in cubic

Whitelist common package inputs by the dispatcher and project-runner dependency sets so dispatcher-only common changes no longer force project-runner release triggers.
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b21a6b4c-4552-4b7a-8bb8-d52a55282d69

📥 Commits

Reviewing files that changed from the base of the PR and between 77583ec and 187e822.

📒 Files selected for processing (3)
  • cli/release-automation/internal/automation/release_trigger_guard_test.go
  • scripts/stamp-release-inputs.sh
  • scripts/test-stamp-release-inputs.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/stamp-release-inputs.sh

📝 Walkthrough

Walkthrough

Release trigger detection now separates shared common inputs from dispatcher-only common inputs, and the stamping logic, tests, and stored hash outputs were updated to match the new split.

Changes

Shared vs Dispatcher-Only Common Input Handling

Layer / File(s) Summary
Trigger guard rule split and matchers
cli/release-automation/internal/automation/release_trigger_guard.go
releaseTriggerRules splits into shared-common and dispatcher-only-common rules; isCommonModuleSource is replaced by isSharedCommonModuleInput, isDispatcherOnlyCommonModuleInput, and isCommonGoSourceUnderPackageRoots driven by explicit package-root allowlists.
Trigger guard tests for shared/dispatcher-only changes
cli/release-automation/internal/automation/release_trigger_guard_test.go
Tests are renamed for shared common coverage, new dispatcher-only common cases are added, and helper logic derives expected package roots from go list -deps output.
Stamping script input enumeration and hashing
scripts/stamp-release-inputs.sh
Adds list_shared_common_inputs and list_dispatcher_only_common_inputs, updating common_hash and dispatcher_hash computation accordingly.
Stamping script test coverage and fixture updates
scripts/test-stamp-release-inputs.sh
Adds cli/common/version fixtures and test scenarios that verify shared and dispatcher-only common changes affect the expected stamp outputs.
Updated stamp hash outputs
cli/dispatcher/shared-inputs-stamp.json, cli/project-runner/shared-inputs-stamp.json
sharedInputsHash values are updated to the newly computed hashes.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • hatayama/unity-cli-loop#1462: Introduces the release trigger guard and stamping flow that this PR directly extends with shared/dispatcher-only input detection.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: narrowing release input triggers for shared inputs.
Description check ✅ Passed The description is clearly related to the changeset and summarizes the trigger, stamp, and test updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/dispatcher-release-inputs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
scripts/stamp-release-inputs.sh (1)

66-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider renaming common_hash for clarity.

Now that inputs are split into shared vs. dispatcher-only, common_hash (shared-only) could be renamed e.g. shared_common_hash to avoid ambiguity with the new list_dispatcher_only_common_inputs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/stamp-release-inputs.sh` around lines 66 - 67, Rename the
`common_hash` variable in `stamp-release-inputs.sh` to a clearer name like
`shared_common_hash`, since it now represents only `list_shared_common_inputs`
and can be confused with `list_dispatcher_only_common_inputs`; update the
assignment and any later references in the same script so the naming matches the
new shared-vs-dispatcher split.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@scripts/stamp-release-inputs.sh`:
- Around line 66-67: Rename the `common_hash` variable in
`stamp-release-inputs.sh` to a clearer name like `shared_common_hash`, since it
now represents only `list_shared_common_inputs` and can be confused with
`list_dispatcher_only_common_inputs`; update the assignment and any later
references in the same script so the naming matches the new shared-vs-dispatcher
split.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 90b323d5-c13d-4389-8160-7f45102fa47f

📥 Commits

Reviewing files that changed from the base of the PR and between 9c91756 and 77583ec.

📒 Files selected for processing (6)
  • cli/dispatcher/shared-inputs-stamp.json
  • cli/project-runner/shared-inputs-stamp.json
  • cli/release-automation/internal/automation/release_trigger_guard.go
  • cli/release-automation/internal/automation/release_trigger_guard_test.go
  • scripts/stamp-release-inputs.sh
  • scripts/test-stamp-release-inputs.sh

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="cli/release-automation/internal/automation/release_trigger_guard.go">

<violation number="1" location="cli/release-automation/internal/automation/release_trigger_guard.go:171">
P2: Release-trigger coverage can silently drift when new `cli/common` packages are added, because shared input detection is whitelist-only. This can let real binary input changes bypass release stamp requirements until someone manually updates `sharedCommonPackageRoots`; consider adding an automated dependency-equivalence test or a safe default classification for unknown common packages.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread scripts/stamp-release-inputs.sh Outdated
Comment thread scripts/stamp-release-inputs.sh Outdated
Comment thread cli/release-automation/internal/automation/release_trigger_guard.go
Align stamp generation with the release trigger guard's package-root matching and add dependency-based tests so common package whitelists cannot silently drift from shipped binary imports.
@hatayama
hatayama merged commit 712ad3a into v3-beta Jul 3, 2026
10 checks passed
@hatayama
hatayama deleted the refactor/dispatcher-release-inputs branch July 3, 2026 23:46
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