Skip to content

Validate dangling component-story references#40

Merged
paul-sheridan merged 1 commit into
mainfrom
feature/validate-dangling-component-stories
Jun 17, 2026
Merged

Validate dangling component-story references#40
paul-sheridan merged 1 commit into
mainfrom
feature/validate-dangling-component-stories

Conversation

@odinlake

Copy link
Copy Markdown
Member

What

Adds a new ontology validation that flags collection Component Stories entries referencing stories that don't exist in the ontology — the same class of issue as the existing "Undefined theme" check, but for collection membership.

Why

The themeontology data has real cases of this: e.g. Marvel Cinematic Universe / Spider-Man list movie: SpiderMan: No Way Home (2021), and TRIPOD films lists movie: Unforgiven (1992) (which exists only without the movie: prefix) — none of which resolve to a story. Nothing currently surfaces these.

How

  • New TOImpl.validate_components() (in to_base.py), mirroring validate_storythemes(): for each story, any Component Stories name not in self.o.story yields a warning.
  • Wired into ThemeOntology.validate() (so it flows through print_warnings() and the to-validate CLI).
  • New fixture tests/data/dangling-component.st.txt + TestValidation::test_component_warning.
  • Version bumped to 2.1.4.

Tests

pytest --cov=totolo112 passed, 100% coverage.

Add ThemeOntology validation that flags collection "Component Stories"
entries pointing to stories not present in the ontology, mirroring the
existing undefined-theme check. Wired into validate()/print_warnings.

Bump version to 2.1.4.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@odinlake odinlake self-assigned this Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5e86761) to head (c82fd87).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #40   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         1601      1607    +6     
=========================================
+ Hits          1601      1607    +6     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

@odinlake odinlake requested a review from paul-sheridan June 16, 2026 17:30
@paul-sheridan paul-sheridan merged commit 20058fe into main Jun 17, 2026
9 checks passed
@paul-sheridan paul-sheridan deleted the feature/validate-dangling-component-stories branch June 17, 2026 09:23
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.

2 participants