fix(weave): do not compact mesh IRIs into invalid sflo: prefixed names - #35
Conversation
A mesh published under the SFLO vocabulary namespace — the sflo mesh itself, at https://semantic-flow.github.io/sflo/ with its ontology payload at the `ontology/` designator — has resources whose IRIs begin with the vocabulary namespace, e.g. <https://semantic-flow.github.io/sflo/ontology/_knop/_sources>. renderNamedNodeTerm compacted those to `sflo:_knop/_sources`. A Turtle prefixed name's local part may not contain `/`, so the carried support facts Weave had just rendered failed to re-parse, and every weave of that mesh refused with "Could not parse carried Knop support facts Turtle." Found by dogfooding the sflo published-mesh regeneration. - compact to `sflo:` only when the local name has no path separator; otherwise fall through to the existing mesh-relative or absolute IRI form, so no other mesh's output changes - regression: carried support facts for a mesh at the vocabulary namespace must re-parse and must contain no prefixed name whose local part carries a separator; fail-on-old recorded (the test fails against the unmodified renderer) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LHrFYeUefDr227gLuWWuq1
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe renderer now avoids invalid ChangesSFLO IRI Rendering
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Found by dogfooding: the sflo published-mesh regeneration (
wa.task.2026.2026-08-01_2032-regenerate-sflo-published-mesh) could not weave a single payload.The defect
The sflo mesh is published at
https://semantic-flow.github.io/sflo/and its ontology payload sits at theontology/designator — so its own mesh resources have IRIs likehttps://semantic-flow.github.io/sflo/ontology/_knop/_sources. That prefix is alsoSFLO_NAMESPACE, the vocabulary namespace.renderNamedNodeTermcompacted those mesh resources tosflo:_knop/_sources. A Turtle prefixed name's local part may not contain/, so the carried support facts Weave had just rendered failed to re-parse:Every weave of that mesh refused with
Could not parse carried Knop support facts Turtle.sflo is plausibly the only affected mesh, because it is the one that self-hosts the vocabulary it is published under — which is likely why its currentgh-pagesstate is a commit literally titled "lovely manual re-creation".The fix
Compact to
sflo:only when the remaining local name contains no/; otherwise fall through to the existing mesh-relative or absolute IRI form. Deliberately surgical: no other mesh's generated bytes change, so there is no fixture churn.Evidence
0 passed | 1 failed) and passes with the fix.deno task cianddeno task build:npm-libgreen.🤖 Generated with Claude Code
https://claude.ai/code/session_01LHrFYeUefDr227gLuWWuq1
Summary by CodeRabbit