Artifact a8603cf455ab9bf7f5f777e1dd2018e98a08329e05bb6430ebc69ad6968e5ec0:
- Executable file
scripts/refresh-conformance-rfcs.sh
— part of check-in
[57a558fcbf]
at
2026-10-10 23:52:34
on branch trunk
— test(conformance): harness for an RFC conformance suite (#262) (#264)
Adds the conformance package that the per-draft suites build on. Nothing in the repository has yet checked go-libfossil against the Fossil drafts requirement by requirement.
- A Case names its requirement. A Gap (an issue) or Deviation (a reason) marks a known difference. A marked case still runs: while it fails it is skipped, and once it conforms it fails until the mark is removed, so the list of known failures cannot go stale. - Requirements tables pin the SHA-256 of the drafts and errata they were written against. Those are copied unmodified into conformance/rfcs by scripts/refresh-conformance-rfcs.sh. A changed draft fails the coverage test until its table has been re-read and its pin moved. - Coverage is derived from the cases rather than recorded: - COVERED: every case conforms. - PARTIAL: the table's row says what its cases leave out. - DEVIATION: a case is marked as a deliberate difference. - FAILING: a case is marked with an open gap. - GAP: no case yet.
CONFORMANCE_REPORT=<path> writes the requirement-by-requirement report as Markdown. - fossil(1) is run on every case's input, through test-parse-manifest, so a case's expectation is checked against fossil each time the suite runs. withZ appends the Z card, so a case that edits one card never also breaks the checksum.
The harness's own rules are tested in harness_self_test.go. No suites are registered yet; the artifact-format suite is next (#263). (user: [email protected], size: 758) [annotate] [blame] [check-ins using]
#!/bin/sh # Copy the Fossil drafts and errata the conformance suite is written against # from a zit checkout into conformance/rfcs, unmodified. # # A refreshed draft changes its SHA-256, so the coverage test fails until each # requirements table that pins it has been checked against the new text and # its pin moved. That is the point: a draft change must be read, not absorbed. # # Usage: scripts/refresh-conformance-rfcs.sh [path-to-zit-rfcs] set -eu src=${1:-"$HOME/zit/docs/rfcs"} dst=$(dirname "$0")/../conformance/rfcs for draft in artifact-format delta-format sync-protocol repo-state; do cp "$src/draft-fossil-$draft-00.txt" "$dst/" done mkdir -p "$dst/erratum" cp "$src"/erratum/*.md "$dst/erratum/" shasum -a 256 "$dst"/*.txt "$dst"/erratum/*.md