Skip to content

chore: Move unity-package release root to Packages/src and fence dispatcher paths - #1454

Merged
hatayama merged 6 commits into
v3-betafrom
chore/release-boundary-restructure
Jul 2, 2026
Merged

hatayama merged 6 commits into
v3-betafrom
chore/release-boundary-restructure

Conversation

@hatayama

@hatayama hatayama commented Jul 2, 2026 •

Copy link
Copy Markdown
Owner

Why

The repository-root release-please package attributed every root-level change (workflows, scripts, dispatcher files) to unity-package releases, and dispatcher-only changes kept regenerating the unity-package / project-runner release PR (#1453).

This is Phase 1 (stop-the-bleed) of the release boundary restructure: fix commit attribution without moving any directories.

What

  • Move the unity-package release root from . to Packages/src so only package content drives its releases
    • changelog-path and extra-files are now package-root relative; /.uloop/project-runner-pin.json uses the leading-slash absolute form already used by the cli package
    • The manifest key carries 3.0.0-beta.48 over; tags stay in the v<version> line (include-component-in-tag: false unchanged)
  • Drop the now-dead exclude-paths: ["cli"] from unity-package (cli is outside the new root)
  • Exclude dispatcher-owned directories (cli/cmd/dispatcher, cli/internal/dispatcher) from uloop-project-runner releases; dispatcher releases stay owned by dispatcher-publish
    • cli/dispatcher-contract.json is intentionally NOT listed: release-please matches exclude-paths as directory prefixes only, so a plain-file entry is a silent no-op (verified against the pinned release-please v17.3.0 source). Dispatcher-contract-only commits keep counting toward project-runner releases until the file moves into a dispatcher-owned directory in a later phase — a known, accepted transitional leak
  • Pin the new boundary in scripts/test-release-please-config.sh: fixed package roots, dispatcher exclusions, exclude-paths entries must be existing directories, and no legacy . manifest key

Self-review hardening (post-review commits)

An adversarial self-review of the first commit found and fixed two release-blocking issues plus five smaller ones:

  • Release sync survival across the key rename: release_commit_updates_package_version matched a commit on the manifest line OR the changelog heading, so the rename commit itself (which adds "Packages/src": "3.0.0-beta.48") would be resolved as "the release commit" for the already-published v3.0.0-beta.48 release, making ensure_release_points_to_commit exit 1 on every push after merge. Now both the manifest entry AND the changelog heading are required, with a regression fixture replaying the rename
  • Directory-only exclude semantics pinned by a generic config test loop (see above)
  • cli/internal/dispatcher/*.go added to dispatcherReleaseInputPatterns so changes there cannot escape both project-runner release attribution and the dispatcher version-bump guard
  • Sync test fixtures migrated to the Packages/src schema (the old . fixtures left the production code path uncovered); dead . branches removed; legacy-key manifest guard now uses jq -e 'has(".")' so a present-but-null key cannot slip past

Notes

  • Surrounding automation needs no other changes: sync-release-please-package-releases.sh enumerates config keys generically; label sync and the Go release PR automation only reference the unchanged component names
  • Root-only changes (.github/, docs/, scripts/, tests/, tools/) no longer ride any release. This is intended
  • After merge: close chore: release v3-beta #1453 and re-run the release-please workflow, then verify the regenerated release PRs no longer contain dispatcher-only changes

Verification

  • scripts/test-release-please-config.sh green (each change test-first: red before, green after)
  • All release-automation shell suites pass: test-sync-release-please-package-releases.sh (incl. the new key-rename regression), test-sync-published-release-pr-labels.sh, test-is-release-please-release-commit.sh, test-resolve-native-cli-release-target.sh, test-resolve-dispatcher-release-target.sh, test-mark-release-pr-tagged.sh
  • scripts/check-go-cli.sh passes (fmt, vet, lint, tests, native binary rebuild)

…atcher paths

The repository-root package attributed every root-level change
(workflows, scripts, dispatcher files) to unity-package releases, and
dispatcher-only changes kept regenerating unity-package /
project-runner release PRs (#1453).

- Move the unity-package release root from "." to Packages/src so only
  package content drives its releases; the manifest carries
  3.0.0-beta.48 over and tags stay in the v<version> line
- Drop the now-dead exclude of cli from unity-package (cli is outside
  the new root)
- Exclude dispatcher-owned paths (cmd/dispatcher, internal/dispatcher,
  dispatcher-contract.json) from uloop-project-runner releases;
  dispatcher releases stay owned by dispatcher-publish
- Pin the new boundary in test-release-please-config.sh: fixed package
  roots, dispatcher exclusions, and no legacy "." manifest key
@coderabbitai

coderabbitai Bot commented Jul 2, 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: 68b34df7-ca94-4fe8-a25c-1520f4f0cffe

📥 Commits

Reviewing files that changed from the base of the PR and between c544064 and eed9bde.

📒 Files selected for processing (6)
  • cli/internal/automation/dispatcher_version_bump_guard.go
  • cli/internal/automation/dispatcher_version_bump_guard_test.go
  • release-please-config.json
  • scripts/sync-release-please-package-releases.sh
  • scripts/test-release-please-config.sh
  • scripts/test-sync-release-please-package-releases.sh
💤 Files with no reviewable changes (1)
  • release-please-config.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/test-release-please-config.sh

📝 Walkthrough

Walkthrough

This PR renames the Unity release-please package boundary to Packages/src, updates related sync and validation logic, adds a key-rename regression test, and expands dispatcher release-input detection to include cli/internal/dispatcher/*.go.

Changes

Release-please package boundary rename

Layer / File(s) Summary
Manifest and config rename
.release-please-manifest.json, release-please-config.json
The Unity package entry moves from . to Packages/src, with matching changelog and extra-file path updates and expanded cli exclude-paths.
Sync path and release detection
scripts/sync-release-please-package-releases.sh
Package-path resolution no longer special-cases ., and package-release detection now requires both manifest and changelog additions.
Config and manifest validation
scripts/test-release-please-config.sh
Validation now checks Packages/src, verifies manifest keys and versions, and enforces directory existence for configured exclude paths.
Key-rename release fixture
scripts/test-sync-release-please-package-releases.sh
The sync test fixture parameterizes the Unity package key and changelog path, adds a key-rename repo fixture, and verifies the rename commit is not treated as a release commit.

Dispatcher version bump guard

Layer / File(s) Summary
Dispatcher input coverage
cli/internal/automation/dispatcher_version_bump_guard.go, cli/internal/automation/dispatcher_version_bump_guard_test.go
The guard now includes cli/internal/dispatcher/*.go in monitored release inputs, and the test covers changes under that package path.

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

Possibly related PRs

  • hatayama/unity-cli-loop#1089: Both PRs change the release-please package-key targeting logic around .release-please-manifest.json / release-please-config.json.
  • hatayama/unity-cli-loop#1104: Both PRs modify the release-sync machinery in scripts/sync-release-please-package-releases.sh and its tests.
  • hatayama/unity-cli-loop#1440: Both PRs adjust release-please-config.json and scripts/test-release-please-config.sh for release-please path/exclude-path handling.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the main boundary change and dispatcher fencing introduced by the PR.
Description check ✅ Passed The description matches the changes and explains the release-boundary hardening work in detail.
Linked Issues check ✅ Passed The PR updates the Unity root, preserves tags/versioning, fences dispatcher paths, and aligns with the release-flow requirements in #1453.
Out of Scope Changes check ✅ Passed The extra script and test changes support the release-boundary fix and are not unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 chore/release-boundary-restructure

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.

@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.

No issues found across 3 files

Re-trigger cubic

hatayama added 5 commits July 2, 2026 12:46
…ixtures

The sync test fixtures still fabricated the pre-restructure config schema
(package key ".", repo-root-relative changelog path), so after the
boundary move the CI-active suite only exercised a resolution branch that
production can no longer reach, and the real "Packages/src" + relative
changelog path had zero coverage.

- Parameterize write_release_files with the unity package key and
  changelog path, defaulting to the new Packages/src schema
- Drop resolve_package_path's "." special case, which this migration
  makes unreachable from both production config and tests (the generic
  join produces an equivalent path anyway)
…mits

release_commit_updates_package_version accepted a commit when its diff
added the manifest entry OR the changelog heading. The package-root
rename in this PR adds the line "Packages/src": "3.0.0-beta.48" while
keeping the version, so after merge the newest-first commit walk would
resolve the rename commit as "the release commit" for the already
published v3.0.0-beta.48 release, and ensure_release_points_to_commit
would exit 1 on every push until the next unity-package version bump,
blocking the release sync step.

Require the manifest entry AND the changelog heading in the same commit.
Real release-please commits always update both; the rename commit never
touches the changelog, and the pre-rename release commit simply yields
no match, which the existing-release path already tolerates.

Add a regression fixture that replays the rename on top of a published
release and asserts the sync run reuses the release instead of failing.
…ry-only semantics

release-please matches exclude-paths as directory prefixes only (a commit
file counts as excluded when it starts with "<entry>/"), so the
cli/dispatcher-contract.json file entry could never match anything and
silently did nothing; dispatcher-contract-only commits keep counting
toward uloop-project-runner releases until the file moves into a
dispatcher-owned directory in a later phase.

Remove the dead entry and replace the hand-listed existence checks with
a generic loop that requires every exclude-paths entry to be an existing
directory, so a file entry (or a typo) fails the config test instead of
silently weakening the release boundary.
The release boundary change declares cli/internal/dispatcher a
dispatcher-owned path and excludes it from uloop-project-runner release
attribution, but dispatcherReleaseInputPatterns had no pattern for that
directory (path.Match does not cross "/" boundaries). A change there
would ship in the next dispatcher build with no dispatcherVersion bump
and no changelog entry anywhere: excluded from project-runner releases
and invisible to check-dispatcher-version-bump.

Add the cli/internal/dispatcher/*.go pattern and a guard regression
test so the two dispatcher-ownership lists cannot silently diverge for
this directory.
- Detect the legacy "." manifest key with has(".") so a present-but-null
  value cannot slip past jq -e truthiness and silently pass the guard
- Remove assert_package_path_exists's "." special case, which the
  Packages/src root move made unreachable (this script only reads the
  real config, and the key-set assertion pins the keys)
@hatayama
hatayama merged commit f21dcc4 into v3-beta Jul 2, 2026
10 checks passed
@hatayama
hatayama deleted the chore/release-boundary-restructure branch July 2, 2026 04:22
RyanXie123 pushed a commit to RyanXie123/unity-cli-loop that referenced this pull request Sep 22, 2026
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