Skip to content

[codex] Add release recovery and trim Random noise-map CI#272

Open
Eli Pinkerton (wallstop) wants to merge 23 commits into
mainfrom
dev/wallstop/release-fixes-6
Open

[codex] Add release recovery and trim Random noise-map CI#272
Eli Pinkerton (wallstop) wants to merge 23 commits into
mainfrom
dev/wallstop/release-fixes-6

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a guarded manual recovery path to Release Publish for a tagged but externally unpublished release: dispatch with version, source_ref, and explicit allow_tag_recovery=true.
  • Freezes release package and .unitypackage jobs to the verified source SHA, and refuses tag create/retarget if npm or GitHub Release artifacts already exist.
  • Cuts the PR/default RandomTestBase.NextNoiseMap runtime to fixed representative dimensions while restoring the historical 1000-iteration sweep in the weekly Random benchmark lane.
  • Adds PowerShell contract coverage for the release recovery guardrails.

Release state note

Current external state for 3.4.0 is partial: the Git tag exists, but npm com.wallstop-studios.unity-helpers@3.4.0 and the GitHub Release are absent. This PR allows explicit manual recovery for that unpublished state. If the org treats tag movement as forbidden even before artifact publication, the safer operational path is to prepare a new patch version such as 3.4.1 instead of retargeting 3.4.0.

Validation

  • npm run test:sync-script-contracts
  • npm run test:release-tools
  • npm run test:unity-workflow-matrix-contract
  • npm run test:lint-workflow-run-expression-length
  • npm run lint:workflow-run-expression-length
  • npm run lint:tests
  • npm run lint:yaml
  • actionlint .github/workflows/release.yml .github/workflows/unity-benchmarks.yml
  • npm run format:yaml:check
  • npm run format:md:check
  • dotnet tool run csharpier check Tests/Runtime/Random/RandomTestBase.cs

Targeted Unity EditMode run for NextNoiseMap did not reach test execution because this devcontainer has no usable Unity license artifact or activation credentials.


Note

High Risk
Changes the release pipeline (tag creation, manual dispatch, tag retarget recovery) and npm/GitHub publish guards—operations-critical paths where mistakes affect shipping and artifact integrity.

Overview
Replaces automatic tag-triggered publishing with a manual Release Publish workflow (workflow_dispatch: version, source_ref, optional allow_tag_recovery). release-tag.yml is removed; tags are created or retargeted in a prepare-tag job only after npm pack and .unitypackage export succeed, with checks that npm and the GitHub Release are still unpublished. release-prepare PR text now tells operators to run Release Publish on main instead of waiting on Release Tag.

PR CI gains shared concurrency (cancel superseded pull_request runs) across lint/test workflows, plus test-pr-workflow-concurrency.ps1 wired into validate:tests. Unity Tests uses the same pattern and report-slow-tests.ps1 gets a warn-only 120s per-fixture budget on main, standalone, and single-threaded legs.

Test/runtime trimming: RandomTestBase.NextNoiseMap uses fixed representative map sizes in default CI; the weekly Random benchmark lane sets UH_RANDOM_NOISE_MAP_ITERATIONS (and full sample count) for the historical broad sweep. Several editor/runtime tests shrink grids or iteration counts and mark heavier cases Stress. Issue templates add package version 1.0.1.

Contract coverage expands for manual release inputs, tag preparation, and Release Tag retirement (test-sync-script-contracts.ps1).

Reviewed by Cursor Bugbot for commit 85bc88b. Bugbot is set up for automated code reviews on this repo. Configure here.

## Summary

- Add guarded workflow_dispatch recovery to Release Publish for unpublished tag/source recovery.
- Freeze release asset jobs to the verified source SHA and pin recovery guardrails with PowerShell contracts.
- Reduce default RandomTestBase.NextNoiseMap coverage to representative dimensions while restoring the historical sweep in the weekly Random benchmark lane.

## Validation

- npm run test:sync-script-contracts
- npm run test:release-tools
- npm run test:unity-workflow-matrix-contract
- npm run test:lint-workflow-run-expression-length
- npm run lint:workflow-run-expression-length
- npm run lint:tests
- npm run lint:yaml
- actionlint .github/workflows/release.yml .github/workflows/unity-benchmarks.yml
- npm run format:yaml:check
- npm run format:md:check
- dotnet tool run csharpier check Tests/Runtime/Random/RandomTestBase.cs

Targeted Unity EditMode run for NextNoiseMap did not reach test execution because this devcontainer has no usable Unity license artifact or activation credentials.
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 405baca. Configure here.

Copilot AI 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.

Pull request overview

Adds a guarded manual recovery path to the Release Publish workflow (for cases where a tag exists but external artifacts were never published), and trims PR CI runtime for Random noise-map tests while preserving deeper coverage in the weekly benchmark lane.

Changes:

  • Extend release.yml to support workflow_dispatch recovery inputs (version, source_ref, allow_tag_recovery) and freeze downstream packaging checkouts to the verified source SHA.
  • Reduce default NextNoiseMap iteration coverage to fixed representative dimensions, with an env override to restore the historical sweep in weekly benchmarks.
  • Add PowerShell contract tests to lock in the new release recovery guardrails and SHA-frozen checkout behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
Tests/Runtime/Random/RandomTestBase.cs Adds env-controlled noise-map iteration count and uses representative fixed dimensions by default to reduce PR CI runtime.
scripts/tests/test-sync-script-contracts.ps1 Adds contract checks to enforce the new release recovery inputs/guards and verified-SHA checkouts.
.github/workflows/unity-benchmarks.yml Restores full Random sampling and 1000-iteration noise-map sweep in the weekly benchmark lane via env overrides.
.github/workflows/release.yml Adds manual recovery mode, tag safety checks, and SHA-frozen downstream checkouts for release artifact generation.

Comment thread Tests/Runtime/Random/RandomTestBase.cs Outdated
Comment thread .github/workflows/unity-benchmarks.yml Outdated
Comment thread .github/workflows/release.yml
## Summary

- Keep release workflow source-ref as the original ref and use source-sha for downstream checkout pinning.
- Clarify the Random benchmark lane comment around where CI sets the Random env overrides.
- Rewrite NextNoiseMap bounds assertions so the asserted value is first.

## Validation

- npm run test:sync-script-contracts
- pwsh -NoProfile -File scripts/lint-tests.ps1 -VerboseOutput -Paths Tests/Runtime/Random/RandomTestBase.cs
- actionlint .github/workflows/release.yml .github/workflows/unity-benchmarks.yml
- npm run lint:yaml
- npm run lint:workflow-run-expression-length
- node scripts/run-prettier.js --check -- .github/workflows/release.yml .github/workflows/unity-benchmarks.yml
- dotnet tool run csharpier check Tests/Runtime/Random/RandomTestBase.cs
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

Comment thread .github/workflows/release.yml

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml Outdated
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

Comment thread Tests/Runtime/Random/RandomTestBase.cs
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread Tests/Runtime/Random/RandomTestBase.cs Outdated
Comment thread scripts/tests/test-sync-script-contracts.ps1 Outdated
Comment thread .github/workflows/release.yml

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

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f15e37d. Configure here.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7329642. Configure here.

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/release.yml Outdated
Comment thread scripts/tests/test-sync-script-contracts.ps1
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 17d4f24. Configure here.

Copilot AI 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.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated no new comments.

Retag the three high-count AssetDatabase batch-scope cycle cases as Stress so the PR lane keeps representative Count10 coverage while weekly Performance/Stress CI keeps the heavier Count50 repetition.

Co-authored-by: Codex <codex@openai.com>
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0d90bf7. Configure here.

Copilot AI 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.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated no new comments.

@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 28e17ee. Configure here.

Copilot AI 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.

Pull request overview

Copilot reviewed 50 out of 50 changed files in this pull request and generated 1 comment.

Comment thread Tests/Runtime/Random/RandomTestBase.cs Outdated
Comment on lines +891 to +899
if (NoiseMapIterationCount == FastNoiseMapDimensions.Length)
{
foreach ((int width, int height) in FastNoiseMapDimensions)
{
yield return (width, height);
}

yield break;
}
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit fe11415. Configure here.

Copilot AI 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.

Pull request overview

Copilot reviewed 50 out of 50 changed files in this pull request and generated 1 comment.

Comment on lines +500 to +513
if [ "${TAG_ACTION}" = "create" ]; then
gh api --method POST "repos/${GITHUB_REPOSITORY}/git/refs" \
--field ref="refs/tags/${TAG}" \
--field sha="${created_tag_sha}" >/dev/null
echo "::notice::Created release tag ${TAG} at ${SOURCE_SHA}."
elif [ "${TAG_ACTION}" = "retarget" ]; then
gh api --method PATCH "repos/${GITHUB_REPOSITORY}/git/refs/tags/${TAG}" \
--field sha="${created_tag_sha}" \
--field force=true >/dev/null
echo "::notice::Retargeted release tag ${TAG} to ${SOURCE_SHA}."
else
echo "::error::Unsupported tag action '${TAG_ACTION}'."
exit 1
fi
@wallstop

Copy link
Copy Markdown
Collaborator Author

Cursor (@cursor) review

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 85bc88b. Configure here.

Copilot AI 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.

Pull request overview

Copilot reviewed 50 out of 50 changed files in this pull request and generated no new comments.

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.

2 participants