Attach per-string provenance to assembled text #105

Closed
opened 2026-07-01 00:54:09 +00:00 by manlycucumber · 1 comment
manlycucumber commented 2026-07-01 00:54:09 +00:00 (Migrated from github.com)

Problem

The platform requires per-string provenance for all text. Assembled output must carry the source and licence of every Latin and English string.

Acceptance criteria

  • Every assembled string carries source and licence metadata
  • Assembly fails if any string lacks provenance
  • Provenance is queryable in the output
  • Tests verify provenance presence across an office

Notes

Reuses the corpus provenance shape from v0.1.0.

## Problem The platform requires per-string provenance for all text. Assembled output must carry the source and licence of every Latin and English string. ## Acceptance criteria - [ ] Every assembled string carries source and licence metadata - [ ] Assembly fails if any string lacks provenance - [ ] Provenance is queryable in the output - [ ] Tests verify provenance presence across an office ## Notes Reuses the corpus provenance shape from v0.1.0.

Done in fd26918 and 70f3133, with the locator half of the rule closed later in d073227.

ACs: every assembled string carries source + rights ✓ (TextLeaf); assembly fails if any string lacks provenance ✓ — fail-closed at both the build gate (tools/generator/src/provenance.mjs, thrown from build.mjs) and at assembly (CorpusOfficeTextProviderTest::testProperFailsClosedWhenTheReferenceHasNoLatin); provenance queryable in the output ✓ — carried on each leaf in the office block; tests verify provenance across an office ✓ — tests/Office/CorpusOfficeTextProviderTest.php, plus tests/Golden/GoldenProvenanceLockTest.php gating digest moves.

Note d073227 tightened this after the fact: the gate checked that a text leaf cited a public-domain source but not that the citation carried a :locator, though the schema and comments claimed it did. Build-time guard only — corpus and golden digest unmoved.

Done in `fd26918` and `70f3133`, with the locator half of the rule closed later in `d073227`. ACs: every assembled string carries `source` + `rights` ✓ (`TextLeaf`); assembly fails if any string lacks provenance ✓ — fail-closed at both the build gate (`tools/generator/src/provenance.mjs`, thrown from `build.mjs`) and at assembly (`CorpusOfficeTextProviderTest::testProperFailsClosedWhenTheReferenceHasNoLatin`); provenance queryable in the output ✓ — carried on each leaf in the `office` block; tests verify provenance across an office ✓ — `tests/Office/CorpusOfficeTextProviderTest.php`, plus `tests/Golden/GoldenProvenanceLockTest.php` gating digest moves. Note `d073227` tightened this after the fact: the gate checked that a text leaf cited a public-domain source but not that the citation carried a `:locator`, though the schema and comments claimed it did. Build-time guard only — corpus and golden digest unmoved.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Directorium/Core#105
No description provided.