Skip to content

04: Remove edition support from the llms.txt pipeline - #3392

Merged
mnocon merged 1 commit into
saas-batch-3from
saas-t04-llmstxt-editions
Sep 7, 2026
Merged

04: Remove edition support from the llms.txt pipeline#3392
mnocon merged 1 commit into
saas-batch-3from
saas-t04-llmstxt-editions

Conversation

@mnocon

@mnocon mnocon commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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.py

  • editions_from_frontmatter(), the frontmatter edition reader, and its
    FRONTMATTER_EDITION_DISPLAY constant.
  • _pill_edition() and _process_inline_pills(), dead once ticket 03 deleted
    the badge snippets. Verified unreachable before removal: no edition
    frontmatter and no badge snippet remains in docs/, and the only runtime
    pill--inline injection (docs/js/custom.js) carries no edition class.
  • inject_page_metadata() no longer emits an Editions: line and no longer
    accepts an editions parameter. tools/llms_txt/hooks.py updated to match.

PILL_CLASS_TO_EDITION is 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 asserted
on 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_h1 and
    test_prepended_when_no_h1 lost only their editions= arguments.
  • test_release_note_tags_appended_to_heading keeps its function under test; its
    sample pill classes moved from pill--headless/pill--experience to the
    surviving pill--new-feature/pill--first-release.
  • test_description_and_editions_lines_are_kept is not an editions test
    despite its name — it covers strip_llms_txt_pointer. Retained, and renamed
    to test_description_and_trailing_content_are_kept so the next reader is not
    misled.

Verification

  • pytest -q → 90 passed, delta of exactly 10, same single stale-baseline
    warning as before.
  • mkdocs build --strict → exit 0.
  • grep -c "^Editions: " site/llms-full.txt0, and no Editions: line
    appears anywhere in site/llms*.txt.
  • invariants-baseline.yaml and test_conversion_invariants.py untouched —
    ticket 20 owns those.

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Preview of modified files: no change to preview.

@mnocon
mnocon merged commit 9f21671 into saas-batch-3 Sep 7, 2026
7 of 11 checks passed
@mnocon
mnocon deleted the saas-t04-llmstxt-editions branch September 7, 2026 13:34
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.

1 participant