Skip to content

Make import-comments.rb start its own class and check all scripts - #290

Merged
ianheggie-oaf merged 2 commits into
mainfrom
bugfix/import-comments-class-name
Nov 9, 2026
Merged

ianheggie-oaf merged 2 commits into
mainfrom
bugfix/import-comments-class-name

Conversation

@ianheggie-oaf

@ianheggie-oaf ianheggie-oaf commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

What and why

import-comments.rb started ExportComments instead of ImportComments. The same slip went into three other scripts in March 2026 and was fixed there, but none of the four was caught because the script specs only check syntax.

A new spec checks that every entry script starts a class it defines or loads, so this can't slip through again.

  • This is the fix Sentry flagged on Make scripts run when started with "bundle exec ./script.rb" #286. It's built on that PR's branch because both change the same line, so merge that one first.
  • The script still can't run: it requires the mysql gem, which hasn't been in the Gemfile since 2020. The umbrella repo's runbooks already list it as a script not to run, so this doesn't change anything in production.

Type of change

  • Bug fix

How this was checked

The new spec fails for import-comments.rb only without the fix, and passes with it. RuboCop on the changed files is clean.

  • Ran the automated tests
  • Ran /code-review (or equivalent): fixed any concerns (and rechecked), linked follow-up issues above, or noted why they are not important above
  • GitHub Actions tests: likewise fixed so they pass or linked a follow-up issue / replied why not important directly on each comment (reviewer will mark resolved as part of review)
  • Documentation updated, or not needed

Assisted-by: Claude Code:claude-opus-5-5

Base automatically changed from bugfix/postcodes-script-args to main November 5, 2026 13:11
import-comments.rb started ExportComments instead of ImportComments, a
slip from March 2026 that was also made in three other scripts and
fixed there. Checking the syntax didn't catch any of them, so add a
spec that checks every entry script starts a class it defines or
loads.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Ian Heggie (OAF) <ian@oaf.org.au>
@ianheggie-oaf
ianheggie-oaf force-pushed the bugfix/import-comments-class-name branch from 7bf43d8 to 47a55d5 Compare November 5, 2026 13:14
@ianheggie-oaf
ianheggie-oaf marked this pull request as ready for review November 5, 2026 13:15
@ianheggie-oaf
ianheggie-oaf requested a review from a team as a code owner November 5, 2026 13:15
@ianheggie-oaf ianheggie-oaf changed the title Make import-comments.rb start its own class Make import-comments.rb start its own class and check all scripts Nov 5, 2026
@ianheggie-oaf ianheggie-oaf self-assigned this Nov 9, 2026
@ianheggie-oaf
ianheggie-oaf merged commit 2bb86ef into main Nov 9, 2026
5 checks passed
@ianheggie-oaf
ianheggie-oaf deleted the bugfix/import-comments-class-name branch November 9, 2026 05:03
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