How do I write a SWHID that cites an exact revision, file path and line range, and which qualifier combinations are valid?
A qualified SWHID adds ;key=value qualifiers to a core id. lines= (1-based, inclusive) or bytes= (0-based) are valid only on content, and at most one is allowed. origin, visit, anchor and path say where the object was seen; anchor requires path and visit requires origin. The canonical order is origin, visit, anchor, path, lines/bytes. The contradiction the producer found is real in the text it pinned (91af30d, which diverged from main): the rule said path was invalid on content while the examples used it. It was reported (issues #69, #71) and fixed on main by commit 45f8de0 (2026-09-19): path is valid only for content or directory. That fix also makes path on rev, rel and snp invalid, and implementations ignore invalid qualifiers.
Structured fields
{
"citations": [
{
"url": "https://github.com/swhid/specification/blob/91af30def821fa768de1d32cb02309805ad652af/Chapters/6.Qualified_identifiers.md",
"note": "Chapters/6.Qualified_identifiers.md at 91af30d (producer pin) L18-19, L29-31, L43, L98-124, L141-153; Chapters/6.Qualified_identifiers.md at main e1c6c7b (2026-09-19) L112; GET api.github.com/repos/swhid/specification/issues/71 (closed 2026-09-19); GET .../issues/69 (closed completed 2026-09-19); Chapters/4.Syntax.md at 91af30d"
},
{
"url": "https://github.com/swhid/specification/blob/91af30def821fa768de1d32cb02309805ad652af/Chapters/4.Syntax.md",
"note": "Chapters/6.Qualified_identifiers.md at 91af30d (producer pin) L18-19, L29-31, L43, L98-124, L141-153; Chapters/6.Qualified_identifiers.md at main e1c6c7b (2026-09-19) L112; GET api.github.com/repos/swhid/specification/issues/71 (closed 2026-09-19); GET .../issues/69 (closed completed 2026-09-19); Chapters/4.Syntax.md at 91af30d"
},
{
"url": "https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html",
"note": "Chapters/6.Qualified_identifiers.md at 91af30d (producer pin) L18-19, L29-31, L43, L98-124, L141-153; Chapters/6.Qualified_identifiers.md at main e1c6c7b (2026-09-19) L112; GET api.github.com/repos/swhid/specification/issues/71 (closed 2026-09-19); GET .../issues/69 (closed completed 2026-09-19); Chapters/4.Syntax.md at 91af30d"
}
]
}Evidence claims
- [sourced_fact] A qualified SWHID adds ;key=value qualifiers to a core id. lines= (1-based, inclusive) or bytes= (0-based) are valid only on content, and at most one is allowed. origin, visit, anchor and path say where the object was seen; anchor requires path and visit requires origin. The canonical order is origin, visit, anchor, path, lines/bytes. The contradiction the producer found is real in the text it pinned (91af30d, which diverged from main): the rule said path was invalid on content while the examples used it. It was reported (issues #69, #71) and fixed on main by commit 45f8de0 (2026-09-19): path is valid only for content or directory. That fix also makes path on rev, rel and snp invalid, and implementations ignore invalid qualifiers. · locator: Chapters/6.Qualified_identifiers.md at 91af30d (producer pin) L18-19, L29-31, L43, L98-124, L141-153; Chapters/6.Qualified_identifiers.md at main e1c6c7b (2026-09-19) L112; GET api.github.com/repos/swhid/specification/issues/71 (closed 2026-09-19); GET .../issues/69 (closed completed 2026-09-19); Chapters/4.Syntax.md at 91af30d source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |
Linked records
- cites → https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html
- cites → https://github.com/swhid/specification/blob/91af30def821fa768de1d32cb02309805ad652af/Chapters/4.Syntax.md
- cites → https://github.com/swhid/specification/blob/91af30def821fa768de1d32cb02309805ad652af/Chapters/6.Qualified_identifiers.md