Skip to content

sync: port shared configuration tests to RSpec - #499

Merged
p-linnane merged 1 commit into
mainfrom
shared-config-rspec
Oct 16, 2026
Merged

p-linnane merged 1 commit into
mainfrom
shared-config-rspec

Conversation

@p-linnane

@p-linnane p-linnane commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

As suggested in review of #498, this replaces test-shared-config.sh with shared-config_spec.rb, run with Homebrew's bundled RSpec, so the style job now also installs the tests gem group. The examples keep the shell suite's fixtures and assertions and add coverage for the GitHub Actions output, newer .ruby-versions, non-Markdown private docs and the Git error outside a repository.

GPT-6 Astra wrote the port. Claude Opus 5.5 reviewed it, ran the old and new suites with Portable Ruby 4.0.7 with and without the GitHub Actions environment and checked that deliberately broken versions of the sync script fail both.

Summary by CodeRabbit

  • Tests
    • Replaced the shell-based shared-configuration checks with an automated test suite covering repeat-run consistency, configuration selection and validation, Ruby and Swift file handling, dependency updates, documentation and workflow synchronisation, and failure scenarios.
    • Updated the workflow to install the required test and style dependencies and run the new suite.
    • The checks also verify that relevant GitHub Actions outputs are produced and that failures during repository inspection do not proceed to Ruby configuration changes.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 04:35

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.

🟢 Approval recommended

The test port preserves existing checks and updates CI consistently, with no identified blocking defects.

0 open findings

What changed in this PR

Ports the shared configuration sync tests from shell to Homebrew’s bundled RSpec, preserving existing checks and extending coverage.

Changes:

  • Replaces the shell suite with RSpec examples.
  • Adds checks for Actions output, newer Ruby versions, non-Markdown private docs, and Git error messages.
  • Updates CI to install test dependencies and run RSpec.
File Description
.github/​workflows/​sync-shared-config.yml Installs test dependencies and runs RSpec.
.github/​actions/​sync/​test-shared-config.sh Removes the replaced shell suite.
.github/​actions/​sync/​shared-config_spec.rb Adds the ported tests and expanded coverage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1e4888e1-d015-4838-95c3-9f5fdde14913
📥 Commits

Reviewing files that changed from the base of the PR and between 0bc3489 and 0bc3489.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 746f4a7b-1ff5-4acc-946c-29657aec13c4
📥 Commits

Reviewing files that changed from the base of the PR and between 9efef02 and 0bc3489.

📒 Files selected for processing: 1
  • .github/workflows/sync-shared-config.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The shared-configuration shell integration test was replaced by an RSpec suite. The workflow now installs the test group and runs the suite through Bundler. The suite covers configuration selection, tracked files, Gemfile and lockfile layouts, documentation, workflow templates, idempotence, and failure cases.

Changes: Shared configuration test migration

Layer / File(s) Summary
RSpec harness and workflow invocation
.github/actions/sync/shared-config_spec.rb, .github/actions/sync/test-shared-config.sh, .github/workflows/sync-shared-config.yml
The new suite adds subprocess helpers and repository fixtures. The workflow installs the tests group and runs the suite through Bundler instead of the deleted shell test.
Configuration, tracked files, and Ruby sync coverage
.github/actions/sync/shared-config_spec.rb
The suite tests configuration selection, CODEOWNERS validation, tracked Swift and Ruby files, Gemfile layouts, Bundler updates, and related sync behaviour.
Documentation, workflow, and failure-case coverage
.github/actions/sync/shared-config_spec.rb
The suite tests private documentation and template workflow syncing. It also checks that Git inspection fails outside a repository before Ruby configuration files change.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 0bc34

The RSpec migration retains the prior suite’s material sync checks and is wired to the test dependencies. The workflow’s separate assignment and export resolve the SC2155 concern, leaving no identified merge-blocking risk.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: replacing the shared configuration shell tests with an RSpec suite.
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.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cae33cfa-2936-462c-aa5a-8ce7cfeca55a
📥 Commits

Reviewing files that changed from the base of the PR and between 7e23bea and 9efef02.

📒 Files selected for processing: 3
  • .github/actions/sync/shared-config_spec.rb
  • .github/actions/sync/test-shared-config.sh
  • .github/workflows/sync-shared-config.yml
💤 Files with no reviewable changes: 1
  • .github/actions/sync/test-shared-config.sh

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread .github/workflows/sync-shared-config.yml
Signed-off-by: Patrick Linnane <patrick@linnane.io>
@p-linnane
p-linnane force-pushed the shared-config-rspec branch from 9efef02 to 0bc3489 Compare October 16, 2026 04:40
@p-linnane
p-linnane added this pull request to stack #501 October 16, 2026 04:48

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely, thanks!

Comment thread .github/workflows/sync-shared-config.yml
@p-linnane
p-linnane merged commit 9a73632 into main Oct 16, 2026
27 checks passed
@p-linnane
p-linnane deleted the shared-config-rspec branch October 16, 2026 15:41
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.

3 participants