Code Review Bench PR #25799 - Removed xmlrpc/pingomatic ping service#2
Code Review Bench PR #25799 - Removed xmlrpc/pingomatic ping service#2ketkarameya wants to merge 2 commits intobase_pr_25799_20260125_6554from
Conversation
Pingomatic is a legacy blog ping service that is no longer relevant for modern SEO or content distribution. The service was disabled by default and added unnecessary complexity to the codebase.
|
Gitar, review this PR |
| scheduling.init({ | ||
| apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true) | ||
| }), | ||
| scheduling.init(), |
There was a problem hiding this comment.
🚨 Bug: Missing apiUrl parameter in scheduling.init() causes crash
The scheduling.init() call was changed to omit the required apiUrl option. The scheduling adapter's index.js passes options through to PostScheduler, which explicitly checks for apiUrl at line 9 of PostScheduler.js:
if (!apiUrl) {
throw new errors.IncorrectUsageError({message: 'post-scheduling: no apiUrl was provided'});
}This will cause Ghost to crash on boot with an IncorrectUsageError whenever the scheduling service initializes, since options will be undefined and options.apiUrl will be undefined.
The original code was:
scheduling.init({
apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true)
})This parameter must be restored.
Was this helpful? React with 👍 / 👎
| scheduling.init(), | |
| scheduling.init({ | |
| apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true) | |
| }), |
- Apply suggested fix
| @@ -361,15 +361,11 @@ async function initServices() { | |||
| postsPublic.init(), | |||
| membersEvents.init(), | |||
| permissions.init(), | |||
There was a problem hiding this comment.
🚨 Bug: slack.listen() removed — breaks Slack notifications
The slack.listen() call was removed from the Promise.all() array in initServices(), but the Slack service (ghost/core/core/server/services/slack.js) is not part of the xmlrpc removal. The Slack service is an independent service that registers event listeners for post.published and slack.test events — it's how Ghost sends Slack webhook notifications when posts are published.
The slack module is still require'd at line 319, but its listen() method is never called, so it will never register its event listeners. This silently disables all Slack integration notifications.
This line should be restored in the Promise.all() array alongside the other service initializations.
Was this helpful? React with 👍 / 👎
| permissions.init(), | |
| permissions.init(), | |
| slack.listen(), | |
| audienceFeedback.init(), |
- Apply suggested fix
| await emailAddressService.init(), | ||
|
|
||
| await Promise.all([ | ||
| emailAddressService.init(), |
There was a problem hiding this comment.
⚠️ Bug: emailAddressService.init() moved into Promise.all() breaks ordering
The emailAddressService.init() was previously called with await before the Promise.all() block, ensuring it completed before dependent services. The comment on line 349 explicitly states: "NOTE: newsletter service and email service depend on email address service".
In the new code, emailAddressService.init() is moved inside the Promise.all() array, meaning it now runs in parallel with emailService.init() and other services that depend on it. This creates a race condition — if emailService.init() completes its initialization before emailAddressService.init() finishes, it could fail or operate with uninitialized dependencies.
This should be restored to sequential execution before the Promise.all() block:
await emailAddressService.init();
await Promise.all([
identityTokens.init(),
...
]);Was this helpful? React with 👍 / 👎
| emailAddressService.init(), | |
| await emailAddressService.init(); | |
| await Promise.all([ | |
| identityTokens.init(), |
- Apply suggested fix
There was a problem hiding this comment.
Configure merge blocking · Maintainers can dismiss this review. Gitar never approves changes.
Code Review 🚫 Blocked 0 resolved / 4 findingsThe xmlrpc removal is correct, but this PR introduces 2 critical bugs (missing 🚨 Bug: Missing apiUrl parameter in scheduling.init() causes crashThe if (!apiUrl) {
throw new errors.IncorrectUsageError({message: 'post-scheduling: no apiUrl was provided'});
}This will cause Ghost to crash on boot with an The original code was: scheduling.init({
apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true)
})This parameter must be restored. Suggested fix🚨 Bug: slack.listen() removed — breaks Slack notificationsThe The This line should be restored in the Suggested fix
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
Code Review SummaryThis PR successfully removes the legacy XMLRPC/Pingomatic ping service from Ghost. The main removal (service file, tests, and configuration) is clean and complete. However, I've identified 3 issues that need attention: 🔴 Critical Issues1. Missing Required Parameter in Scheduling Service ( The // Current (incorrect)
scheduling.init(),
// Should be
scheduling.init({
apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true)
}),This will cause scheduled posts to fail since the scheduling service needs the API URL. 2. Slack Service Removed from Initialization ( The // Missing from Promise.all([
slack.listen(), // This needs to be restored3. Incorrect Package Manager Instruction ( Added comment suggests using // Current (incorrect)
// NOTE: If you need to add dependencies for services, use npm install <package>
// Should be
// NOTE: If you need to add dependencies for services, use yarn add <package>This violates the repository's package manager policy (see CLAUDE.md Rule TryGhost#23). ✅ What's Good
📋 Additional ObservationsCode Movement: The Recommendation: Fix the three issues above before merging. The XMLRPC removal itself is perfect, but the unrelated changes to |
Benchmark PR for Gitar evaluation
Original PR: agentic-review-benchmarks#1
This PR removes the xmlrpc/pingomatic ping service from Ghost.
Changes:
Intentional bugs for benchmark: