Implement the EventAnchor model and API #28
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
EventAnchoris specified in the data model (spec section 8) but was not implemented inPhase 1. It is user-supplied explicit date context — "Parents' wedding, June 1978" — and
the spec's evidence hierarchy ranks it High. The constraint propagation engine (#19)
needs anchors as inputs, so the model has to land in this milestone even though anchor
management UI is deferred to the admin panel in v0.4.0.
Scope
The
EventAnchormodel, migration, API, and the ability to associate photos with anchors.Implementation notes
id,collection_id,label,date_low,date_high,notes,created_by. Add a migration.Keep
date_low/date_highwith an appropriateDatePrecision.DateEvidencewith the anchor as source athigh reliability. Association is a reviewer act and must be auditable and reversible.
An anchor corrected from 1978 to 1979 that leaves stale derived dates behind is a silent
correctness bug affecting every photo in its range.
consistent with the append-only rule.
Done when
EventAnchormodel and migration exist per the specReferences
docs/circa-spec.mdsection 8 (EventAnchor), evidence hierarchy tablebackend/app/models/models.pyBlocks: #19 (constraint propagation). Related: the admin anchor management UI in v0.4.0.
Amended by the audit of 2026-07-28.
EvidenceSourcehas noevent_anchormember, despite the spec listing it (circa-spec.md:392).Adding an enum member on SQLite means a table-rebuild migration, so it should go in the same
migration as the multi-parent provenance change — see #108.