Skip to content

ci: add shared-inputs stamp drift check to CI and pre-commit - #2069

Merged
hatayama merged 3 commits into
v3-betafrom
ci/stamp-drift-guard
Jul 29, 2026
Merged

ci: add shared-inputs stamp drift check to CI and pre-commit#2069
hatayama merged 3 commits into
v3-betafrom
ci/stamp-drift-guard

Conversation

@hatayama

@hatayama hatayama commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • CI and the pre-commit hook now reject stale shared-inputs stamps before merge.
  • Agent docs note that full EditMode CI never runs on pull requests.

User Impact

  • Before: a stamp generated before a new shared input was git add-ed could ship with a silently stale hash. check-release-triggers only checked that stamp files were touched, not that their values were current (this happened in PR feat: replace unknown-command list with closest-match suggestions #2063 and was found only by manual recalculation in review).
  • After: CI regenerates the stamps and fails on any diff, and the pre-commit hook restamps automatically when shared inputs are staged.

Changes

  • Add a Check shared-inputs stamp drift step to build-cli in build-and-test.yml (regenerate-and-diff on the two stamp files only).
  • Extend .husky/pre-commit to detect staged shared-input paths, reject partial staging / unstaged stamp edits, restamp, and git add the stamp files.
  • Document in AGENTS.md that unity-editmode-tests.yml runs only on schedule / workflow_dispatch, never on PR CI.

Regenerate-and-diff reuses scripts/stamp-release-inputs.sh so the hash logic is not duplicated in Go. The hook's path filter is intentionally coarser than the stamp script's real input list; restamping is idempotent, so a false positive is a no-op.

Verification

  • scripts/stamp-release-inputs.sh on a clean branch: porcelain empty (no pre-existing drift).
  • Hook local checks: auto-restamp on new shared input; no-op when shared inputs are untouched; rejects partial staging; rejects unstaged stamp edits.
  • scripts/test-stamp-release-inputs.sh passed.

Review in cubic

hatayama and others added 2 commits July 29, 2026 21:20
A stamp generated before a new shared input is git-added is silently
stale; check-release-triggers only verifies that stamp files were
touched, not that their hashes are current. Regenerate-and-diff in CI
and auto-restamp in the pre-commit hook close that gap.

Co-authored-by: Cursor <cursoragent@cursor.com>
The full EditMode suite only runs on schedule or workflow_dispatch of
unity-editmode-tests.yml. Without this note, agents can wrongly assume
PR CI covers EditMode verification.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • .husky/pre-commit is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e4d9e58-ad0e-432e-b5b7-475df3f08bef

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

CI now checks regenerated shared release-input stamps for drift and documents that the full Unity EditMode suite runs only on scheduled or manually dispatched workflows.

Changes

CI consistency checks

Layer / File(s) Summary
Stamp validation and CI guidance
.github/workflows/build-and-test.yml, AGENTS.md
The build-cli job regenerates and verifies both shared-inputs stamp files, while AGENTS.md documents the scheduled and manual triggers for the full EditMode suite.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding shared-inputs stamp drift checks to CI and pre-commit.
Description check ✅ Passed The description is directly related to the changeset and accurately describes the CI and documentation 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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/stamp-drift-guard

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.

The per-file partial-staging loop only inspected staged paths, so an
unstaged edit to another shared input could still leak into the stamp
hash. A single dirty-path check covers both cases.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hatayama
hatayama merged commit 4f656ea into v3-beta Jul 29, 2026
11 checks passed
@hatayama
hatayama deleted the ci/stamp-drift-guard branch July 29, 2026 12:37
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