Skip to content

fix: gate release workflow on tests and add build branding guards#157

Merged
anandgupta42 merged 4 commits intomainfrom
fix/release-ci-gate
Mar 15, 2026
Merged

fix: gate release workflow on tests and add build branding guards#157
anandgupta42 merged 4 commits intomainfrom
fix/release-ci-gate

Conversation

@anandgupta42
Copy link
Contributor

What does this PR do?

  • Adds a test gate job (typecheck + unit tests) to the release workflow — build and publish only proceed if tests pass
  • Adds 12 branding guard tests to catch upstream merge regressions in build.ts and package.json
  • Updates keepOurs config assertions to include build.ts, publish.ts, bin/**, CHANGELOG.md

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Issue for this PR

Closes #156

How did you verify your code works?

  • All 269 branding/publish tests pass locally (bun test test/branding/ test/install/publish-package.test.ts)
  • Reviewed release.yml job dependency graph: test → build → publish-npm → github-release, test → publish-engine

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • New tests added for build branding guards

🤖 Generated with Claude Code

Release workflow:
- Add test job (typecheck + bun test) that must pass before build/publish
- Both build and publish-engine now depend on test job

Branding guard tests (upstream-merge-guard.test.ts):
- build.ts binary name is 'altimate' not 'opencode'
- build.ts user-agent is 'altimate/' not 'opencode/'
- build.ts embeds ALTIMATE_ENGINE_VERSION
- build.ts reads engine version from pyproject.toml
- build.ts creates altimate-code backward-compat symlink
- build.ts has sourcemap: "external"
- package.json bin entries are correct (no 'opencode')
- package.json has no junk fields or echo-stub scripts
- bin/opencode does not exist
- keepOurs config includes build.ts, publish.ts, bin/**, CHANGELOG.md

Publish package test:
- Assert 'altimate' bin points to ./bin/altimate
- Assert no 'opencode' bin entry exists
@github-actions
Copy link

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Scope the release workflow test job to branding and install tests
only, with --timeout 30000 for consistency with package.json.
Prevents unrelated flaky tests from blocking releases while still
catching branding regressions and packaging issues.
- Replace broken `curl altimate.ai/install` with `npm install -g @altimateai/altimate-code`
  (altimate.ai/install returns HTML, not a shell script)
- Replace upstream TEAM_MEMBERS with actual AltimateAI collaborators
  so internal PRs skip the duplicate check
…ve TEAM_MEMBERS

- Split symlink guard regex into two explicit assertions to prevent
  false positives (Unix symlink + Windows .exe checked independently)
- Lowercase TEAM_MEMBERS entries and make grep case-insensitive (-i)
  since GitHub logins are case-insensitive
@anandgupta42 anandgupta42 merged commit f17eb99 into main Mar 15, 2026
8 checks passed
anandgupta42 added a commit that referenced this pull request Mar 17, 2026
* fix: gate release workflow on tests and add build branding guards

Release workflow:
- Add test job (typecheck + bun test) that must pass before build/publish
- Both build and publish-engine now depend on test job

Branding guard tests (upstream-merge-guard.test.ts):
- build.ts binary name is 'altimate' not 'opencode'
- build.ts user-agent is 'altimate/' not 'opencode/'
- build.ts embeds ALTIMATE_ENGINE_VERSION
- build.ts reads engine version from pyproject.toml
- build.ts creates altimate-code backward-compat symlink
- build.ts has sourcemap: "external"
- package.json bin entries are correct (no 'opencode')
- package.json has no junk fields or echo-stub scripts
- bin/opencode does not exist
- keepOurs config includes build.ts, publish.ts, bin/**, CHANGELOG.md

Publish package test:
- Assert 'altimate' bin points to ./bin/altimate
- Assert no 'opencode' bin entry exists

* fix: scope release test job to release-critical tests only

Scope the release workflow test job to branding and install tests
only, with --timeout 30000 for consistency with package.json.
Prevents unrelated flaky tests from blocking releases while still
catching branding regressions and packaging issues.

* fix: fix pr-management duplicate check and update TEAM_MEMBERS

- Replace broken `curl altimate.ai/install` with `npm install -g @altimateai/altimate-code`
  (altimate.ai/install returns HTML, not a shell script)
- Replace upstream TEAM_MEMBERS with actual AltimateAI collaborators
  so internal PRs skip the duplicate check

* fix: address code review findings — regex precedence and case-sensitive TEAM_MEMBERS

- Split symlink guard regex into two explicit assertions to prevent
  false positives (Unix symlink + Windows .exe checked independently)
- Lowercase TEAM_MEMBERS entries and make grep case-insensitive (-i)
  since GitHub logins are case-insensitive
@anandgupta42 anandgupta42 deleted the fix/release-ci-gate branch March 17, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release workflow does not gate on tests

1 participant