Goal
Add structural cases for members the schema requires to be non-empty strings. Today no fixture in the repository contains an empty string anywhere.
Why
The schema has one shared definition for this, and refers to it twenty-two times:
"nonEmptyString": {
"type": "string",
"minLength": 1
}
It governs title, description, decision.intent, decision.question, every outcome label, sources[].locator.value, escalation.target.name, metadata.license, and more. Core says the same in prose — the §4 root table calls title a "Non-empty human-readable title", and §6.1 says of decision.intent and decision.question that "Both are required human-readable strings."
Nothing tests it. grep -rn '""' conformance/carrier conformance/structural conformance/semantic conformance/valid conformance/evaluation/packs examples returns no matches: the corpus contains no empty string at all, and grep -c JPS-STRUCTURE-MINLENGTH conformance/manifest.json returns 0.
That gap has a specific shape. The corpus already has structural/missing-decision.json for an absent required member, so an implementation that checks presence — "title" in document — passes every case in the corpus while accepting "title": "". An empty title is a member that is there and says nothing, which is exactly the failure a presence check cannot see.
The repository's validator reports a single diagnostic for these, JPS-STRUCTURE-MINLENGTH at the offending pointer.
Scope
- Add fixtures under
conformance/structural/ for at least: an empty root title, an empty decision.question, an empty outcome label, an empty sources[].locator.value, and an empty escalation.target.name.
- Add one
conformance/manifest.json entry per fixture: layer: "structural", expectedResult: "invalid", the code and pointer the repository's validator reports, and the section that states the requirement (§4 for the root members, §6.3 and §6.7 for the nested ones).
- Leave the root
id out of this issue. An empty id fails the uri format assertion as well as minLength, so it produces two diagnostics and muddies the single primary expectation each case is supposed to carry.
- Update the document-corpus count statements; a harness test derives the number and its failure message names each stale one.
- Do not change the schema,
spec/judgment-pack-core.md, or any existing fixture or case.
Acceptance criteria
Contributor learning
The difference between a member being present and a member carrying meaning, and why a conformance corpus tests the second one explicitly.
Goal
Add structural cases for members the schema requires to be non-empty strings. Today no fixture in the repository contains an empty string anywhere.
Why
The schema has one shared definition for this, and refers to it twenty-two times:
It governs
title,description,decision.intent,decision.question, every outcomelabel,sources[].locator.value,escalation.target.name,metadata.license, and more. Core says the same in prose — the §4 root table callstitlea "Non-empty human-readable title", and §6.1 says ofdecision.intentanddecision.questionthat "Both are required human-readable strings."Nothing tests it.
grep -rn '""' conformance/carrier conformance/structural conformance/semantic conformance/valid conformance/evaluation/packs examplesreturns no matches: the corpus contains no empty string at all, andgrep -c JPS-STRUCTURE-MINLENGTH conformance/manifest.jsonreturns 0.That gap has a specific shape. The corpus already has
structural/missing-decision.jsonfor an absent required member, so an implementation that checks presence —"title" in document— passes every case in the corpus while accepting"title": "". An empty title is a member that is there and says nothing, which is exactly the failure a presence check cannot see.The repository's validator reports a single diagnostic for these,
JPS-STRUCTURE-MINLENGTHat the offending pointer.Scope
conformance/structural/for at least: an empty roottitle, an emptydecision.question, an empty outcomelabel, an emptysources[].locator.value, and an emptyescalation.target.name.conformance/manifest.jsonentry per fixture:layer: "structural",expectedResult: "invalid", the code and pointer the repository's validator reports, and the section that states the requirement (§4 for the root members, §6.3 and §6.7 for the nested ones).idout of this issue. An emptyidfails theuriformat assertion as well asminLength, so it produces two diagnostics and muddies the single primary expectation each case is supposed to carry.spec/judgment-pack-core.md, or any existing fixture or case.Acceptance criteria
python -m pip install -r requirements-dev.txtthenpython -m unittest discover -s tests -vpasses.git commit -s.Contributor learning
The difference between a member being present and a member carrying meaning, and why a conformance corpus tests the second one explicitly.