fix(8241,8242): a pointer line names a record once a session, and a place delivery is booked once
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / Python tests (push) Successful in 2m5s
CI & Build / integration (push) Successful in 1m57s
CI & Build / Build & push image (push) Successful in 20s

The plugin ledger of what a session has seen holds only records given a line,
so a record named by id came back on every edit and message (one handoff note
35 times in a session). Every pointer line now goes through _point, which asks
the server delivery ledger what this session was already shown or pointed at
and leaves those out. Snippets beside an edited file were booked both pushed
(via record_surfaced) and pointed; record_surfaced now leaves write_path_place
to its door.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 15:33:13 -05:00
co-authored by Claude Opus 5.5
parent ddbfbabcd2
commit 9f6f04e898
3 changed files with 137 additions and 9 deletions
+7 -3
View File
@@ -137,14 +137,18 @@ def record_surfaced(
return
_schedule(rows)
# The same lines, against the session a plugin door is delivering to. A
# synced skill is not a line in front of the session, so it is left out.
# synced skill is not a line in front of the session, and a pointer is
# booked as `pointed` by the door that names it, so both are left out.
if source not in _NOT_A_LINE:
from grimoire.services import record_deliveries
record_deliveries.record(user_id, note_ids, source)
# Surfacing sources that put nothing in front of the session as a line.
_NOT_A_LINE = frozenset({"process_skill_sync"})
# Surfacing sources that put nothing in front of the session as a line:
# a synced skill, and the snippets beside an edited file, which are named by
# id in a pointer line (its door records them as `pointed`). Booking these
# as `pushed` too would count each delivery twice.
_NOT_A_LINE = frozenset({"process_skill_sync", "write_path_place"})
def record_pulled(