Skip to content

test: add Read the Docs golden fixture - #62

Merged
FROWNINGdev merged 1 commit into
FROWNINGdev:mainfrom
JJordan0C:fix/add-readthedocs-golden-fixture
Jul 30, 2026
Merged

test: add Read the Docs golden fixture#62
FROWNINGdev merged 1 commit into
FROWNINGdev:mainfrom
JJordan0C:fix/add-readthedocs-golden-fixture

Conversation

@JJordan0C

@JJordan0C JJordan0C commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Add Read the Docs as the sixth real-world golden fixture, including its generated snapshot, reproducible fetch metadata, and MIT attribution. This expands coverage to 16 additional Django models and 142 fields while preserving byte-stable snapshots and the existing performance gate.

Type of change

  • Bug fix (non-breaking, restores expected behaviour)
  • Feature (non-breaking, adds a capability)
  • Breaking change (existing users have to update config or code)
  • Docs / README / comments only (no runtime effect)
  • Internal refactor (no behaviour change, no public API change)
  • Dependency bump
  • CI / build / tooling

Test plan

  • cd cli && python -m pytest -q tests/test_golden_fixtures.py tests/test_golden_snapshots.py — 14 passed in 0.20s
  • cd cli && python -m pytest -q — 448 passed, 2 skipped, 41 subtests passed
  • cd cli && python -m ruff check django_orm_lens tests — passed
  • cd cli && python -m mypy django_orm_lens — passed
  • npm test — build succeeded, 109 passed
  • Verified the vendored fixture is byte-identical to upstream readthedocs/projects/models.py at blob cf1e913d78d4751c86defc837ef80bf872b96d4e

Checklist

  • I ran the full test suite locally (cd cli && pytest -q for Python, npm test for TypeScript) and it is green
  • I added or updated tests that cover the change (bugfixes should get a regression test)
  • If the change is user-facing I updated the CHANGELOG under ## [Unreleased] (not user-facing; no entry required)
  • If the change touches the MCP tool contract (new tool, new arg, new error code) I updated the tool description in mcp_server.py and the relevant tests in test_mcp_server.py (not applicable)
  • If this is a breaking change I called it out under ## Summary above and suggested a migration path (not applicable)

Related issues / discussions

Closes #51

Summary by CodeRabbit

  • New Coverage

    • Added Read the Docs as a supported project in golden snapshot validation.
    • Added comprehensive model schema fixture coverage for Read the Docs.
  • Documentation

    • Updated fixture attribution, licensing information, fetch metadata, and project listings.
  • Tests

    • Expanded regression checks to validate six project fixtures, including Read the Docs.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4cf22b3a-ea1d-4fda-87de-a466ff901014

📥 Commits

Reviewing files that changed from the base of the PR and between 57a35b4 and b29a967.

📒 Files selected for processing (6)
  • cli/tests/fixtures/golden/README.md
  • cli/tests/fixtures/golden/readthedocs.snapshot.json
  • cli/tests/fixtures/golden/readthedocs/readthedocs/projects/models.py
  • cli/tests/test_golden_fixtures.py
  • cli/tests/test_golden_snapshots.py
  • scripts/fetch_golden_fixtures.py

📝 Walkthrough

Walkthrough

Adds Read the Docs as a sixth vendored Django golden fixture, commits its parsed model snapshot, updates regression coverage, and records the project’s source attribution and fetch metadata.

Changes

Read the Docs golden fixture

Layer / File(s) Summary
Fetch and vendor Read the Docs models
scripts/fetch_golden_fixtures.py, cli/tests/fixtures/golden/readthedocs/...
Adds the Read the Docs fetch configuration and vendors its project, notification, domain, feature, environment-variable, and automation models.
Record the parsed model schema
cli/tests/fixtures/golden/readthedocs.snapshot.json
Adds the complete parsed schema snapshot and scan metadata for the Read the Docs fixture.
Integrate regression tests and attribution
cli/tests/test_golden_snapshots.py, cli/tests/test_golden_fixtures.py, cli/tests/fixtures/golden/README.md
Adds Read the Docs to the six-project test suite and updates attribution text, licensing metadata, and fetch date.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: frowningdev

Sequence Diagram(s)

sequenceDiagram
  participant FetchScript
  participant GitHub
  participant ScanWorkspace
  participant SnapshotTests
  FetchScript->>GitHub: Fetch readthedocs/projects/models.py
  GitHub-->>FetchScript: Return vendored source
  SnapshotTests->>ScanWorkspace: Scan Read the Docs fixture
  ScanWorkspace-->>SnapshotTests: Return parsed model schema
  SnapshotTests->>SnapshotTests: Compare with readthedocs.snapshot.json
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a Read the Docs golden fixture.
Linked Issues check ✅ Passed The PR adds Read the Docs as a sixth fixture, vendors models.py at the original path, and updates attribution, snapshot, and tests.
Out of Scope Changes check ✅ Passed The changes stay focused on the golden fixture addition and related test/docs updates, with no unrelated edits evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@FROWNINGdev
FROWNINGdev merged commit 0f5ffb9 into FROWNINGdev:main Jul 30, 2026
18 checks passed
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.

Tests: add a sixth golden fixture from a real-world Django project

2 participants