tools/body-field-contract/
Capability: contract:body-field
Kind: interface
Vendor: agnostic
How every reader and writer finds the ### <Name> fields of a tracker issue body, stated once and independent of language:
what a field boundary is, which code blocks count, which heading is the field, what is ambiguous and must be refused,
the four operations an implementation provides (list fields, extract, replace, normalise) with their refusals,
and the two writer operations (escape text, escape body) that keep untrusted text from ever becoming a field.
A tracker whose reports use another layout reads them through a format adapter (formats/, the upstream home for them; format adapter interface).
See contract.md for the rules and conformance/cases.jsonl for the shared conformance cases,
which tools/github-body-field/tests/test_conformance.py runs against every implementation in the repository.
| Implementation | Language |
|---|---|
tools/github-body-field/ |
Python (reference) |
tools/vetted-ops/ |
Python (byte-identical copy) |
tools/local-tracker/ |
Python (byte-identical copy; escape text and escape body) |
tools/jira/ |
Python (byte-identical copy, after mapping wiki headings; escape body) |
groovy/ |
Groovy (basic implementation, every operation) |
tools/security-management/ |
Python (writer only: escape text, the import’s inert block) |
Prerequisites
- Runtime: None for the contract itself (Markdown and JSON Lines fixtures).
The Groovy implementation in
groovy/needs the Groovy runtime only (it was checked with Groovy 6.0.0 on JVM 27); it has no other dependency and pulls nothing with@Grab. - CLIs / credentials / network: None. The conformance runner lives in
tools/github-body-field/tests/and runs offline under its pytest. - Optional:
groovyonPATH, for the runner’s Groovy check; without it that check skips with the reason.