Captures: binding a capture to an existing listing leaves its review data on the decided capture #523
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#523
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?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, checking every path that decides a capture.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The field and its comment are now atjobs/models.py:1127-1133;jobs/history.py,jobs/capture_views.pyandjobs/remembered.py:354have not moved.Capture.learningholds what a waiting capture's review learns from, "and nothing once it is decided" (jobs/models.py:1124-1130, #267). Saving, discarding and bulk discarding all empty it.bind_capture, the fourth way a capture is decided, marks it accepted and writes onlystatus,postingandupdated_at, so the remembered hints and the page's place digests stay on the row for as long as the capture exists, read by nothing.jobs/history.py:239-241(bind_capture); the other decision paths:jobs/capture_views.py:369and376(save, afterremembered.at_reviewempties it atjobs/remembered.py:354),jobs/capture_views.py:449-452(discard),jobs/capture_views.py:480(bulk discard). Called fromjobs/capture_views.py:412.ACCEPTEDwith itslearningJSON intact: the hint entries and, where the source was not kept, the bounded list of the page's places and digests.locked.learning = {}inbind_captureand add"learning"to itsupdate_fields. Better, move "decide a capture" into one helper injobs/that the save, bind and both discard paths call, so status andlearningchange together.Done when
tests/test_listing_history.py, beside the existingbind_capturetests, that gives a pending capture a non-emptylearning, binds it, and assertslearning == {}afterrefresh_from_db(). It fails today.Landed on main with a green Forgejo CI run. Its entry in the CHANGELOG's Unreleased section ends in (#523).