w3c / w3c/json-ld-api

Invalid '@base' IRI is accepted by the context processing algorithm in deserialization test suite.

Open
#533 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ErratumRaised spec:bug substantive:class 3 test:needs tests
Dominant language
HTML
Stars
106
Forks
40
PR merge metrics
No merged PRs in 30d

Description

From the step 5.7 of the context processing algorithm it is clear that a @base value is accepted iff it is null (step 5.7.2) or an IRI (5.7.3) or a relative IRI reference (5.7.4). In particular, if it is an invalid IRI reference, then an invalid base IRI error is always returned.

In the deserialization test #tli12, an invalid IRI reference is given as context @base, but the expansion algorithm is expected to succeed. This seems in contradiction with step 5.7.

My implementation strictly follows step 5.7, so it fails at processing the context defined in this test input, which in turns makes any deserialization algorithm based on my implementation to fail.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with deserialization test #tli12 and compare its expected expansion result with context processing algorithm step 5.7, especially the handling of an invalid @base IRI reference. Check the linked implementation issue for the observed failure, then determine whether the algorithm or the test expectation is inconsistent and update the relevant test or specification behavior accordingly.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.