Skip to content

Added manifests for tests previously described in the readmes#76

Merged
adanilenka merged 3 commits intomainfrom
GH-39-manifests
May 17, 2025
Merged

Added manifests for tests previously described in the readmes#76
adanilenka merged 3 commits intomainfrom
GH-39-manifests

Conversation

@adanilenka
Copy link
Collaborator

Issue #39

  1. Moved to manifests.ttl descriptions for the tests made before manifests appeared and deleted the readmes.
  2. In test descriptions, removed redundant info like "Prefix table dis/enabled." if it does not provide any additional info about the test case.
  3. Removed reported jelly-cli errors (e.g., from negative tests for RDF-star). Currently, negative cases have explanations from the specification why something should not work. After closing issue Define what "throw an error" means #28 changes SHOULD be done to negative cases description to reflect the expected error-throwing behaviour.

Also reviewed some of the tests' contents.

Propose to remove in the next review PR:

  1. from-jelly/triples_rdf_1_1/neg_004 -- concerns version tag being too high (3), while as of now the max version is 2. Although makes sense in jelly-cli, this test will have to be updated every time a new major version appears. Also, the specification says that The consumer **SHOULD** throw an error if the version tag is greater than the version tag of the implementation. So it is not a requirement per se.
  2. from-jelly/triples_rdf_1_1/neg_009 -- checks if the consumer rejects PHYSICAL_STREAM_TYPE_UNSPECIFIED. As of our internal discussion, it was proposed to leave the consumer to figure out how to treat this situation, e.g., assume some default type. Hence, this test is redundant.

Requires attention:
from-jelly/triples_rdf_1_1/neg_011 -- the second stream options row is not the same as the first one. Specification currently prohibits sending different stream options: It (stream options row) MAY appear more than once in the stream (also after other rows), but it MUST be identical to all previous occurrences. But the specification does not describe what the consumer should do if a new stream options row is received and differs from the original one.
As of now, jelly-cli rdf validate throws an error in this case, but jelly-cli rdf from-jelly deserializes w/o any problem. So a decision should be made on the expected consumer behaviour in this case.

@adanilenka adanilenka requested a review from Ostrzyciel May 17, 2025 12:06
) .

<triples_rdf_1_1/neg_001> a jellyt:TestNegative, jellyt:TestRdfFromJelly ;
mf:name "Single frame, max_name_table_size set to 32000. For security reasons, consumers must always validate that the requested size of a prefix, name, or datatype lookup table is not overly large. The configurable max size of the name table in Jelly-JVM is up to 4096." ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that it's an imported case, but that name table size of 32k still seems realistic. Can you change that to, say, 10 million? Then it wouldn't make sense at all.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doned :)

mf:result <triples_rdf_1_1/pos_011/out_001.nt> .

<triples_rdf_1_1/pos_012> a jellyt:TestPositive, jellyt:TestRdfFromJelly ;
mf:name "Two (2) frames, logical type = LOGICAL_STREAM_TYPE_GRAPHS. Prefix table disabled." ;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this info is in the stream options, but it would be useful to know this just by looking at the name of the test case. I'd keep it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this particular case, or in every case? bc to me, the question is then why only the prefix table? Should the datatype table also be included?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all cases, that's really helpful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

returned all prefix table notes in the positive test cases

@Ostrzyciel
Copy link
Member

from-jelly/triples_rdf_1_1/neg_004 -- concerns version tag being too high (3), while as of now the max version is 2. Although makes sense in jelly-cli, this test will have to be updated every time a new major version appears. Also, the specification says that The consumer SHOULD throw an error if the version tag is greater than the version tag of the implementation. So it is not a requirement per se.

Well, yeah, let's remove it.

from-jelly/triples_rdf_1_1/neg_009 -- checks if the consumer rejects PHYSICAL_STREAM_TYPE_UNSPECIFIED. As of our internal discussion, it was proposed to leave the consumer to figure out how to treat this situation, e.g., assume some default type. Hence, this test is redundant.

If there is no MUST in the spec... yeah, let the consumer do whatever they like.

from-jelly/triples_rdf_1_1/neg_011

I'd say, "SHOULD throw an error", because the consumer could take the sensible default of just using the first stream options (which is what Jelly-JVM does). Can you make a PR to the spec to update it?

@adanilenka
Copy link
Collaborator Author

adanilenka commented May 17, 2025

I'd say, "SHOULD throw an error", because the consumer could take the sensible default of just using the first stream options (which is what Jelly-JVM does). Can you make a PR to the spec to update it?

but wouldn't using a default or the initial options threaten the validity of the stream? Bc the IDs that come in the stream later can assume different lookup tables, for instance. Like if the size of the table has changed or suddenly the prefix table starts being used.

@Ostrzyciel
Copy link
Member

but wouldn't using a default or the initial options threaten the validity of the stream? Bc the IDs that come in the stream later can assume different lookup tables, for instance. Like if the size of the table has changed or suddenly the prefix table starts being used.

Yes, but that's the thing with using features undefined in the spec. We don't define the behavior, so you should not rely on implementations being consistent in that regard. Simple.

@adanilenka adanilenka requested a review from Ostrzyciel May 17, 2025 15:08
@adanilenka adanilenka merged commit 176820c into main May 17, 2025
10 checks passed
@adanilenka adanilenka deleted the GH-39-manifests branch May 17, 2025 15:15
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