Skip to content

fix(frame): treat a bare @reverse term as reference-valued - #164

Merged
simontaurus merged 1 commit into
mainfrom
fix/reverse-term-reference-signal
Sep 21, 2026
Merged

simontaurus merged 1 commit into
mainfrom
fix/reverse-term-reference-signal

Conversation

@simontaurus

Copy link
Copy Markdown
Contributor

Port of OO-LD/oold-js#4; same defect, since this module is a port.

reference_properties keyed on "@type": "@id" alone, so a term mapped with @reverse was only recognised when the author also wrote the coercion - which JSON-LD 1.1 §4.1.10 makes redundant, since a reverse term's values are node references by definition. Without the subframe, framing embeds the reverse targets, which is the defect OO-LD/oold-schema#160 closed.

Every existing fixture passed because the specification's worked example writes both spellings. Spec change: OO-LD/oold-schema#181.

504 passed, 7 skipped across tests/test_validation/.

A reverse term's values are node references by definition, so "@type":
"@id" beside it is redundant and authors omit it. Keying only on @type
missed the idiomatic spelling, and framing embedded the targets.

Refs OO-LD/oold-schema#181
@github-actions

Copy link
Copy Markdown
Contributor

Release preview

Merging this PR would release v1.0.2 (current: v1.0.1).

Changelog preview (truncated)
## v1.0.2 (2026-09-21)

### Bug Fixes

- **frame**: Treat a bare @reverse term as reference-valued
  ([`82724e1`](https://github.com/OO-LD/oold-python/commit/82724e143868b9272d873fa4e597747646cf859a))

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.0020s → 0.0019s (-0.7%)
  ➖ test_sqlite_document_store: 0.0021s → 0.0021s (-0.3%)
  ➖ test_local_sparql_store: 0.0387s → 0.0381s (-1.6%)
  ➖ test_oneof_subschema: 0.0616s → 0.0616s (-0.1%)
  ➖ test_enum_docstrings: 0.0520s → 0.0519s (-0.2%)
  ➖ test_subclass_inheritance: 0.0550s → 0.0562s (+2.2%)
  ➖ test_class_hierarchy: 0.0524s → 0.0522s (-0.4%)
  ➖ test_core[v1]: 0.0360s → 0.0377s (+4.5%)
  ➖ test_core[v2]: 0.0438s → 0.0447s (+2.0%)
  ➖ test_schema_generation[v1]: 0.0017s → 0.0016s (-1.5%)
  ➖ test_schema_generation[v2]: 0.0038s → 0.0038s (-1.2%)
  ➖ test_simple_json: 0.0007s → 0.0007s (+1.7%)
  ➖ test_complex_graph: 0.0017s → 0.0016s (-0.5%)

============================================================
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 Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/oold/validation/frame.py 50.0% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@simontaurus
simontaurus merged commit 6199a31 into main Sep 21, 2026
20 of 21 checks passed
@simontaurus
simontaurus deleted the fix/reverse-term-reference-signal branch September 21, 2026 04:58
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