Skip to content

fix: update workflow contract tests for install-matrix job#1355

Merged
Astro-Han merged 3 commits into
devfrom
fix/workflow-contract-tests
Jun 18, 2026
Merged

fix: update workflow contract tests for install-matrix job#1355
Astro-Han merged 3 commits into
devfrom
fix/workflow-contract-tests

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Update workflow contract tests to account for the new install-matrix job added in PR #1352, and keep the new matrix assertion type-safe under tsgo.

Why

PR #1352 added an install-matrix job to desktop-smoke.yml but didn't update the contract tests that validate the workflow structure. This caused dev CI to fail on the merged commit.

Changes

  • desktop-smoke-workflow.test.ts: add install-matrix to expected job list and check.needs; assert the new Node 24/26 install matrix through a type-safe matrix record.
  • bun-version-workflow.test.ts: add the install-matrix setup-bun pin to the expected list.
  • desktop-smoke.yml: add an audit comment to install-matrix's bun-version line.

How To Verify

bun install --frozen-lockfile: passes
bun run typecheck (packages/opencode): passes
bun test test/github/desktop-smoke-workflow.test.ts test/github/bun-version-workflow.test.ts (packages/opencode): 4 pass, 0 fail
bun run test:ci (packages/opencode): 4008 tests, 3998 pass, 9 skip, 1 todo, 0 fail
git diff --check: clean

Checklist

  • Type label: bug
  • Routing labels: ci, harness
  • Priority label: P1
  • Human Review Status: Pending
  • Linked related issue: PR fix: upgrade Electron for Node 24.16+/26 install compatibility #1352
  • Review focus: test expectations match workflow structure
  • Risk notes: None; test/workflow-contract-only change
  • How To Verify: replaced with real verification
  • No unrelated changes
  • No visible UI changes
  • Platform impact considered: validates macOS install-matrix workflow contract only
  • No docs/release notes needed
  • Reviewed final diff
  • Targeting dev, Conventional Commits

Summary by CodeRabbit

  • Tests

    • Updated workflow automation tests to reflect the added job and revised step expectations for install and verification flows.
  • Chores

    • Added an internal documentation note highlighting the importance of preserving Bun audit exit-code semantics during workflow version changes.

Note: This release updates internal CI workflow coverage and documentation only, with no user-facing changes.

- Add install-matrix to expected job list in desktop-smoke test
- Add install-matrix to check.needs expectation
- Remove strategy/matrix assertions (now used by install-matrix)
- Add install-matrix setup-bun pin to bun-version test
- Add audit comment to install-matrix bun-version line
@Astro-Han Astro-Han added bug Something isn't working ci Continuous integration / GitHub Actions P1 High priority labels Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 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 Plus

Run ID: e35ac43c-2b89-408f-ae31-04a403bc0e7c

📥 Commits

Reviewing files that changed from the base of the PR and between f088b62 and d4bbda3.

📒 Files selected for processing (1)
  • packages/opencode/test/github/desktop-smoke-workflow.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/opencode/test/github/desktop-smoke-workflow.test.ts

📝 Walkthrough

Walkthrough

Adds a single warning comment in the desktop-smoke.yml workflow's install-matrix job under the setup-bun step, noting that bun audit exit semantics are load-bearing. Two test files are updated to align with the new install-matrix job: its key is added to the expected jobs list, it is added to the check job's needs, and its pinned bun-version step is included in the audit-verified pins array.

Changes

install-matrix job comment and test alignment

Layer / File(s) Summary
load-bearing bun audit comment in install-matrix
.github/workflows/desktop-smoke.yml
Inserts a comment in the install-matrix job's setup-bun section warning that bun audit exit semantics are load-bearing and that the Bun version must not be bumped without re-verifying advisory exit codes.
Workflow test assertions updated for install-matrix
packages/opencode/test/github/desktop-smoke-workflow.test.ts, packages/opencode/test/github/bun-version-workflow.test.ts
Updates desktop-smoke-workflow tests to expect install-matrix in the jobs keys and in the check job's needs array; updates bun-version-workflow tests to include desktop-smoke:install-matrix:step-3:bun-version: "1.3.14" in the pinned steps list and normalizes string-literal formatting across the assertions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Astro-Han/pawwork#990: The main PR's desktop-smoke.yml changes—Bun setup-bun comment about bun audit exit semantics and the associated Bun-version pin expectations in tests—directly overlap with this PR's bun 1.3.14/audit-semantics hardening in the same workflow.
  • Astro-Han/pawwork#1352: The main PR updates the desktop-smoke workflow tests to expect the new install-matrix job and its "Assert Electron install complete" verification steps, which matches this PR's addition of a pre-repair Electron install completion check in desktop-smoke.yml.

🐇 A comment tucked in, so small and light,
"Don't bump Bun's version without checking right!"
The install-matrix hops into the chain,
Tests updated so nothing goes in vain.
Exit codes matter — the rabbit knows best! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: update workflow contract tests for install-matrix job' accurately describes the main change, which is updating workflow contract tests to reflect the new install-matrix job.
Description check ✅ Passed The pull request description is comprehensive and well-structured, covering all required sections including Summary, Why, Related Issue, Human Review Status, Review Focus, Risk Notes, How To Verify, and a completed Checklist.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/workflow-contract-tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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 and usage tips.

@github-actions github-actions Bot added the harness Model harness, prompts, tool descriptions, and session mechanics label Jun 17, 2026

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

Suggested priority: P3 (only low-risk paths changed (.github/workflows/desktop-smoke.yml, packages/opencode/test/github/bun-version-workflow.test.ts, packages/opencode/test/github/desktop-smoke-workflow.test.ts)).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

- Check install-matrix needs, if, runs-on, timeout-minutes
- Assert strategy.matrix.node-version is ['24', '26']
- Assert setup-node uses matrix.node-version
- Assert bun install --frozen-lockfile and --assert-complete
- Change global strategy/matrix check to smoke-section-only check
@Astro-Han Astro-Han merged commit 1746982 into dev Jun 18, 2026
40 checks passed
@Astro-Han Astro-Han deleted the fix/workflow-contract-tests branch June 18, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci Continuous integration / GitHub Actions harness Model harness, prompts, tool descriptions, and session mechanics P1 High priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant