Skip to content

Added llms_enabled site setting #27995

Merged
ErisDS merged 2 commits into
mainfrom
codex/llms-enabled-setting
May 20, 2026
Merged

Added llms_enabled site setting #27995
ErisDS merged 2 commits into
mainfrom
codex/llms-enabled-setting

Conversation

@ErisDS
Copy link
Copy Markdown
Member

@ErisDS ErisDS commented May 20, 2026

Summary

  • New llms_enabled boolean setting (default: true) for controlling whether Ghost exposes structured data for LLMs and AI search engines
  • Migration in 6.40 to add the setting
  • All test infrastructure updated (snapshots, counts, hashes, framework fixtures)

Split out from #27984 so the schema/test-infrastructure changes land first and stop causing rebase conflicts on the feature PR. Admin UI toggle will ship in a follow-up once the setting actually controls behavior.

Test plan

  • Setting appears in API responses between secondary_navigation and meta_title
  • Migration adds the setting to existing databases
  • All snapshot/count/hash tests pass
  • Admin-x-framework test fixtures include the new setting

🤖 Generated with Claude Code

New boolean setting (default: true) that controls whether Ghost exposes
structured data for LLMs and AI search engines. Adds a toggle in the
Meta data > Search tab of admin settings.

This setting is the foundation for upcoming llms.txt support. Splitting
it out separately so the schema/test-infrastructure changes land first
and stop causing rebase conflicts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the migration [pull request] Includes migration for review label May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

It looks like this PR contains a migration 👀
Here's the checklist for reviewing migrations:

General requirements

  • ⚠️ Tested performance on staging database servers, as performance on local machines is not comparable to a production environment
  • Satisfies idempotency requirement (both up() and down())
  • Does not reference models
  • Filename is in the correct format (and correctly ordered)
  • Targets the next minor version
  • All code paths have appropriate log messages
  • Uses the correct utils
  • Contains a minimal changeset
  • Does not mix DDL/DML operations
  • Tested in MySQL and SQLite

Schema changes

  • Both schema change and related migration have been implemented
  • For index changes: has been performance tested for large tables
  • For new tables/columns: fields use the appropriate predefined field lengths
  • For new tables/columns: field names follow the appropriate conventions
  • Does not drop a non-alpha table outside of a major version

Data changes

  • Mass updates/inserts are batched appropriately
  • Does not loop over large tables/datasets
  • Defends against missing or invalid data
  • For settings updates: follows the appropriate guidelines

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

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

Run ID: a7644529-12c2-4d8c-af74-96ec060082f8

📥 Commits

Reviewing files that changed from the base of the PR and between 03bb7da and b147367.

⛔ Files ignored due to path filters (1)
  • ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap is excluded by !**/*.snap
📒 Files selected for processing (9)
  • apps/admin-x-framework/src/test/msw-utils.ts
  • apps/admin-x-framework/src/test/responses/settings.json
  • ghost/core/core/server/data/migrations/versions/6.40/2026-05-20-00-00-00-add-llms-enabled-setting.js
  • ghost/core/core/server/data/schema/default-settings/default-settings.json
  • ghost/core/test/e2e-api/admin/settings.test.js
  • ghost/core/test/legacy/models/model-settings.test.js
  • ghost/core/test/unit/server/data/exporter/index.test.js
  • ghost/core/test/unit/server/data/schema/integrity.test.js
  • ghost/core/test/utils/fixtures/default-settings.json

Walkthrough

This pull request adds a new llms_enabled boolean site setting to Ghost. The change includes defining the setting in the default-settings schema with a default value of true, creating a database migration to register it, updating test fixtures and mock responses to include the setting, and updating test assertion constants across multiple test suites to account for the new setting entry in the total settings count and ordering.

Suggested reviewers

  • 9larsons
  • cmraible
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a new llms_enabled site setting. It is concise, clear, and specific enough to understand the primary change.
Description check ✅ Passed The description is directly related to the changeset. It explains the purpose of the llms_enabled setting, mentions the migration, notes test infrastructure updates, and clarifies the split from a larger feature PR.
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 codex/llms-enabled-setting

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

The admin UI toggle for llms_enabled does not do anything yet - it should
ship in a second wave once the setting actually controls behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.82%. Comparing base (ddcd322) to head (b147367).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27995      +/-   ##
==========================================
- Coverage   73.82%   73.82%   -0.01%     
==========================================
  Files        1523     1523              
  Lines      128939   128941       +2     
  Branches    15485    15481       -4     
==========================================
- Hits        95192    95191       -1     
- Misses      32787    32813      +26     
+ Partials      960      937      -23     
Flag Coverage Δ
admin-tests 53.54% <ø> (-0.02%) ⬇️
e2e-tests 73.82% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ErisDS ErisDS merged commit baa4aec into main May 20, 2026
45 checks passed
@ErisDS ErisDS deleted the codex/llms-enabled-setting branch May 20, 2026 17:28
@ErisDS ErisDS changed the title Added llms_enabled site setting with admin UI toggle Added llms_enabled site setting May 20, 2026
ErisDS added a commit that referenced this pull request May 20, 2026
… entry

The llms_enabled migration now lives in 6.40 (from merged PR #27995).
Removed the old 6.31 migration and a duplicate snapshot entry left
by the rebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ErisDS added a commit that referenced this pull request May 21, 2026
These were left over from the original feature commit - the setting is
already in the correct position from the merged PR #27995.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

migration [pull request] Includes migration for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant