From PLAN.md step 8. Spec: docs/spec.md. Phase 1.
⟂ Parallel-safe — touches files no other concurrent step touches.
Files: src/flabel/labels.py, src/flabel/provenance.py, src/flabel/notice.py, tests/test_labels.py, tests/test_provenance.py
Changes: Build SourceEntry values, deriving label_basis from source class and carrying admission_basis and licence. Canonical serialisation per spec §10. Assemble the run block including every loss-condition field. Emit NOTICE for sources that actually asserted a label.
Test that proves it: canonical output is byte-identical across two serialisations of the same data, and the labels array sorts by (ts_first, uid) regardless of input order. Required-fields check: every SourceEntry carries every field the spec §4 table demands — this is the automated form of Goal 1, with no "where applicable" escape. ioc-name sources yield indicator-reference; all other labelling classes yield direct. NOTICE lists a GPL/CC-BY source that asserted a label and omits a source that asserted none. Every loss-condition field exists in the run block.
Depends on: 2. Parallel with: 7.
From
PLAN.mdstep 8. Spec:docs/spec.md. Phase 1.Files:
src/flabel/labels.py,src/flabel/provenance.py,src/flabel/notice.py,tests/test_labels.py,tests/test_provenance.pyChanges: Build
SourceEntryvalues, derivinglabel_basisfrom source class and carryingadmission_basisandlicence. Canonical serialisation per spec §10. Assemble the run block including every loss-condition field. EmitNOTICEfor sources that actually asserted a label.Test that proves it: canonical output is byte-identical across two serialisations of the same data, and the
labelsarray sorts by(ts_first, uid)regardless of input order. Required-fields check: everySourceEntrycarries every field the spec §4 table demands — this is the automated form of Goal 1, with no "where applicable" escape.ioc-namesources yieldindicator-reference; all other labelling classes yielddirect.NOTICElists a GPL/CC-BY source that asserted a label and omits a source that asserted none. Every loss-condition field exists in the run block.Depends on: 2. Parallel with: 7.