report: the domain quotient generator writes one final newline, and the

witness is current again

Every section of the report appends a trailing "" separator, so
`"\n".join(L) + "\n"` turned the last separator into a blank final line and
`git diff --check` was red at DOMAIN_QUOTIENT_REPORT.md:1966 — on the one file
that is generated and never hand-edited. The generator now drops the trailing
separators before writing.

The report is also regenerated, because docs/DOMAIN_MAP.md links it as the
witness behind the pinned baseline and the committed copy was bound to HEAD
5187fcdc with 488 modules, 80 of them still `classification=proposed`, and a
domains.toml sha that no longer exists. It now reads 509 modules, zero
proposed, manifest drift none.

Pinned: the artifact ends with exactly one newline and the generator keeps the
strip. Deliberately NOT pinned: byte-identity to a regeneration — the header
carries a HEAD sha and a tree fingerprint, so that gate belongs to
docs/DOMAIN_MAP.md, whose only input is the manifest.
This commit is contained in:
Ouroboros 2026-09-02 15:35:51 +00:00
parent 6dd6e539e4
commit be7c8b0cbc
3 changed files with 404 additions and 330 deletions

File diff suppressed because it is too large Load diff

View file

@ -235,6 +235,12 @@ def main() -> int:
L.append(f"- `{path}:{lineno}`")
L.append("")
# Sections append a trailing "" as their separator, so the last one leaves a
# blank element: joining it would end the file with a blank LINE, which the
# repository's whitespace gate (`git diff --check`) reports. Drop the
# trailing separators and write exactly one final newline.
while L and not L[-1]:
L.pop()
REPORT.parent.mkdir(parents=True, exist_ok=True)
REPORT.write_text("\n".join(L) + "\n", encoding="utf-8")
print(f"wrote {REPORT}")

View file

@ -19,6 +19,24 @@ def _read(rel: str) -> str:
return (REPO / rel).read_text(encoding="utf-8")
def test_the_domain_quotient_report_ends_without_a_blank_line():
"""The report generator wrote a blank line at EOF, so the whitespace gate
(`git diff --check`) was red on the one file nobody edits by hand.
Its sections append a trailing "" separator, and `"\\n".join(L) + "\\n"` then
turned the last separator into a blank final line. The generator now drops
the trailing separators; this pins both the artifact and that fix, without
pinning the report's CONTENT — the header carries a HEAD sha and a tree
fingerprint, so byte-identity to a regeneration is deliberately not a gate
(that gate belongs to `docs/DOMAIN_MAP.md`, whose input is the manifest).
"""
report = _read("docs/v7next/DOMAIN_QUOTIENT_REPORT.md")
generator = _read("scripts/v7next_domain_report.py")
assert report.endswith("\n") and not report.endswith("\n\n")
assert "while L and not L[-1]:" in generator
def test_the_domain_manifest_is_reachable_from_the_handbook():
"""The domain SSOT and its generated map were reachable from neither doc.