Conversation
E2E Tests FailedTo view the Playwright test report locally, run: REPORT_DIR=$(mktemp -d) && gh run download 32101607621 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR" |
no ref Service roots had accumulated incompatible export and lifecycle shapes. Standardising them on explicit init and service exports gives boot clear ownership and creates a stable base for generation and future boot-loader work.
ErisDS
force-pushed
the
codex/service-instantiation-pattern
branch
from
September 23, 2026 14:20
48d7bd3 to
33457ac
Compare
ErisDS
force-pushed
the
codex/standardise-all-services
branch
from
September 23, 2026 14:20
1dd74ea to
8e9c3c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core/server/servicesthe same public shape: an explicitinit()entry point and aservicefacade.This PR is based on #34 so the complete pattern and this repository-wide application can be reviewed separately.
What counts as a service here?
The conversion classifies all 73 top-level directories: 60 runtime service roots and 13 directories that do not represent independently initialized runtime services.
auth,api-version-compatibility,public-configinvitations,update-checkmailemail-rendering,exports,files,integrations,lib,tier-checkout-config,verificationThe rebase also brings the five runtime services added since the original PR into the same contract:
content-import,export-requests,jobs-service,members-metafields, andtinybird-sync.Non-service directories are classified by the contract test but are not forced into a lifecycle they do not have. Moving them to their eventual domain or Kernel locations is intentionally separate from this mechanical standardisation.
Implementation notes
{init, service}. TypeScript roots use equivalent named exports.init()owns construction and is safe to call more than once. Services whose state is intentionally refreshed on each Ghost boot, such as settings, permissions, themes, and route settings, retain that behaviour.mainbehaviour for background jobs, imports, exports, member metafields, Tinybird sync, and repeated in-process boots is preserved.Follow-ups
lazySingletonfacade is deliberately smaller than that future abstraction.Testing
pnpm exec vitest run test/unit/server/services/service-roots.test.js test/unit/server/services/email-service/email-service-factory.test.js test/unit/server/services/link-tracking/index.test.ts test/unit/server/services/recommendations/service/incoming-recommendation-email-renderer.test.ts test/unit/server/services/automations/poll.test.ts— 91 tests passedpnpm lint:server && pnpm lint:testpnpm lint:frontend && pnpm lint:sharedgit diff --cached --check