Skip to content

test(validation): cover @vocab suppressing the coverage finding - #137

Open
LukasGold wants to merge 1 commit into
mainfrom
test/vocab-suppresses-coverage-finding
Open

test(validation): cover @vocab suppressing the coverage finding#137
LukasGold wants to merge 1 commit into
mainfrom
test/vocab-suppresses-coverage-finding

Conversation

@LukasGold

@LukasGold LukasGold commented Aug 28, 2026

Copy link
Copy Markdown

Closes the one demand in #120 that had no test behind it, and corrects two comments the context.coverage split left stale.

Changes

  • tests/data/oold/broken/vocab_covers_the_remainder.schema.json - new fixture. Byte-identical to missing_context_term.schema.json apart from $id, title, and one added @vocab, so the two are each other's control.
  • test_vocab_suppresses_the_coverage_finding - asserts context.coverage stays OK, and that context.predicates reports mapped: 2, which is what proves @vocab mapped orphan rather than the check simply standing down.
  • check_registry.py - the comment above the context.coverage CheckInfo opened "Deliberately cites no rule" three lines above rule="OOLD-SCH-21d7".
  • test_pipeline.py - the same claim in the docstring of test_missing_context_term_warns_and_names_the_orphan_property.

Why it matters

#120 (comment) required that the finding "must not fire at all when @vocab is declared". That was confirmed by an ad-hoc probe before the split of context.predicates into two checks, and never protected afterwards: no fixture in the corpus declared a @vocab at all, and the only @vocab in the suite asserted that the message text mentions it, which is a different claim. The permitted case was the one behaviour in that issue resting on nothing.

No production behaviour changes. The only non-test edit is a comment.

Verification

  • full suite: 560 passed, 9 skipped
  • make check: clean
  • uv run oold validate tests/data/oold --offline: PASS, 380 ok

Parity

Green: 6 passed against a fresh clone of oold-schema main.

An earlier revision of this description claimed parity was broken on main. That was wrong and is retracted. Three parity tests did fail here, but the cause was a local ~/.cache/oold/meta/remote-main that was 15 days old and still declared x-oold-reverse-default-properties, removed upstream in OO-LD/oold-schema#152. oold meta fetch --force turned all three green with no change to this repository. main was never broken and CI was never at risk, since a fresh runner has no cache.

That the stale cache is silent is a real defect and is now #138. It is not this PR's to fix.

Refs #120. Does not close it: the severity question raised in #120 (comment) is still open.

- add broken/vocab_covers_the_remainder.schema.json, missing_context_term
  with @vocab added and nothing else changed
- assert context.coverage stays OK and that @vocab is what maps the orphan
- correct two comments claiming context.coverage cites no rule; it cites
  OOLD-SCH-21d7
@github-actions

Copy link
Copy Markdown
Contributor

Release preview

No version bump from the current commits (stays at v0.18.1). Use conventional commit types (feat, fix, ...) to trigger a release.

Changelog preview (truncated)

Preview via python-semantic-release and conventional commits.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Click to see benchmark comparison
📊 Benchmark Comparison (threshold: 1.3x)
============================================================

➖ Unchanged (within threshold):
  ➖ test_simple_dict_document_store: 0.0017s → 0.0017s (+0.8%)
  ➖ test_sqlite_document_store: 0.0019s → 0.0019s (+0.4%)
  ➖ test_local_sparql_store: 0.0388s → 0.0384s (-0.9%)
  ➖ test_oneof_subschema: 0.0602s → 0.0597s (-0.9%)
  ➖ test_enum_docstrings: 0.0528s → 0.0502s (-4.9%)
  ➖ test_subclass_inheritance: 0.0539s → 0.0535s (-0.8%)
  ➖ test_class_hierarchy: 0.0516s → 0.0518s (+0.5%)
  ➖ test_core[v1]: 0.0392s → 0.0402s (+2.5%)
  ➖ test_core[v2]: 0.0445s → 0.0450s (+1.3%)
  ➖ test_schema_generation[v1]: 0.0017s → 0.0017s (-0.7%)
  ➖ test_schema_generation[v2]: 0.0028s → 0.0028s (+0.2%)
  ➖ test_simple_json: 0.0007s → 0.0007s (-1.8%)
  ➖ test_complex_graph: 0.0016s → 0.0016s (-0.9%)

============================================================
Summary: 0 regressions, 0 improvements, 13 unchanged
============================================================

✅ No significant performance regressions

Threshold: 1.3x (30% slower triggers a regression warning)

Note: Benchmarks are informational only and won't fail the build.

💡 Tip: Download the benchmark-results artifact for detailed JSON data

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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