04: Remove edition support from the llms.txt pipeline - #3392
Merged
Conversation
Ticket 03 already stripped every edition marker from the docs; this removes the now-dead code that produced the "Editions: X, Y" line in llms.txt output. - Delete editions_from_frontmatter() and FRONTMATTER_EDITION_DISPLAY (llmstxt_preprocess.py): the frontmatter edition reader has no input left. - Drop the editions parameter and emitted line from inject_page_metadata() and update its caller in hooks.py accordingly. - Delete _process_inline_pills() / _pill_edition() (llmstxt_preprocess.py): unreachable now that the edition badge snippets are gone from docs/ and custom.js's runtime-injected pill carries no edition class. - PILL_CLASS_TO_EDITION stays: still used by _process_release_note_tags() for the surviving release-note categories. - Update module/function docstrings that referenced the removed helpers. Tests: remove the 7 tests asserting on editions_from_frontmatter/the editions line, and the 3 tests covering the now-deleted inline-pill merging. Retain and adjust the tests covering description injection, the llms.txt pointer, and their ordering (drop the editions kwarg/assertions). Change test_release_note_tags_appended_to_heading's sample pill classes to surviving categories (new-feature/first-release) since that function is kept. Rename test_description_and_editions_lines_are_kept to test_description_and_trailing_content_are_kept: it exercises strip_llms_txt_pointer's handling of trailing content, not editions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Preview of modified files: no change to preview. |
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.
Ticket 04 of the Cohesivo SaaS conversion. Base:
saas-batch-3.The contract half of the editions change. Ticket 03 removed the data, leaving
this code path inert but still present and still passing its tests. Separating
the code change keeps it reviewable on its own instead of hiding it inside an
80-file content diff.
This is the one place the conversion reaches beyond content into application
code.
Code removed —
tools/llms_txt/llmstxt_preprocess.pyeditions_from_frontmatter(), the frontmatter edition reader, and itsFRONTMATTER_EDITION_DISPLAYconstant._pill_edition()and_process_inline_pills(), dead once ticket 03 deletedthe badge snippets. Verified unreachable before removal: no edition
frontmatter and no badge snippet remains in
docs/, and the only runtimepill--inlineinjection (docs/js/custom.js) carries no edition class.inject_page_metadata()no longer emits anEditions:line and no longeraccepts an
editionsparameter.tools/llms_txt/hooks.pyupdated to match.PILL_CLASS_TO_EDITIONis kept — it is still used by_process_release_note_tags(), which survives.Tests: 100 → 90, and every one of the 10 accounted for
Removed 7 from
test_page_metadata.py(test_editions_inserted_after_first_h1,test_description_comes_before_editions,test_frontmatter_edition_string,test_frontmatter_editions_list,test_frontmatter_edition_and_editions_merged,test_unknown_edition_passes_through,test_empty_frontmatter) — all assertedon the editions line or exercised the deleted reader.
Removed 3 from
test_preprocess.py(test_inline_pill_becomes_parenthetical,test_adjacent_inline_pills_merged,test_three_adjacent_inline_pills_merged) —all covered the deleted inline-pill functions.
Tests retained, as the ticket requires
Description injection, the documentation-index pointer and their ordering all
keep their coverage:
test_llms_txt_pointer_always_inserted_after_first_h1andtest_prepended_when_no_h1lost only theireditions=arguments.test_release_note_tags_appended_to_headingkeeps its function under test; itssample pill classes moved from
pill--headless/pill--experienceto thesurviving
pill--new-feature/pill--first-release.test_description_and_editions_lines_are_keptis not an editions testdespite its name — it covers
strip_llms_txt_pointer. Retained, and renamedto
test_description_and_trailing_content_are_keptso the next reader is notmisled.
Verification
pytest -q→ 90 passed, delta of exactly 10, same single stale-baselinewarning as before.
mkdocs build --strict→ exit 0.grep -c "^Editions: " site/llms-full.txt→ 0, and noEditions:lineappears anywhere in
site/llms*.txt.invariants-baseline.yamlandtest_conversion_invariants.pyuntouched —ticket 20 owns those.
🤖 Generated with Claude Code