Day 73 of 74 · Saturday · Learning

Why AegisAI is on the device twice - idempotency and the send recordConcept

AegisAI and Groundwork each have two complete packages on the reMarkable, sent 9-7 and 9-8. The package build knew it had already run; the package send did not, because its name carries the send date. That difference has a name: idempotency.

Catch-up progress
73/74
Why this matters to you

The device holds 262 documents against a budget of 70 - up from 194 a week ago. Ten of the 68 new ones are exact duplicates: '9-7 AegisAI Research', '9-8 AegisAI Research', and so on through all five PDFs for both orgs. The manifest shows both sends; the tracker's own note says 'pursuit re-run 2026-09-08: package already complete, left untouched'. The files were left untouched. The send was not.

Idempotent means: doing it twice has the same effect as doing it once. A light switch set to ON is idempotent; a light switch you flip is not. pursuit.py's build step is idempotent by construction - it checks whether the five artifacts exist and skips regeneration. That is why the 9-8 re-run (the 9-7 queue was never marked drained, so the runner tried again) did not overwrite your files.

package_send.py is the flip. It names each PDF 'M-D <Org> <Part> - FOR REVIEW' where M-D is today - the naming grammar's rule that the send date sorts first on the device. To the device, a different name is a different document, so the 9-8 send created five new files beside the 9-7 five. The dedup that would have caught it lives one layer down: the manifest (PDB/data/remarkable-manifest.jsonl) records every send with its family and title. A check of 'same family, same title, sent within N days, no return yet' before naming would have made the send idempotent too.

Why it matters beyond ten files: every 5-minute rm_pull poll lists the whole device. Hold-by-default means Claude removes nothing without your tag, so duplicates stay until you act - and the 8-26 throttle crisis started at a lower count than today's.

Worked example

Find every family sent more than once within seven days, from the manifest alone.

python3 - <<'EOF'
import json, re
from collections import defaultdict
rows = [json.loads(l) for l in open('/Users/tom/Claude/PDB/data/remarkable-manifest.jsonl') if l.strip()]
byname = defaultdict(list)
for r in rows:
    stem = re.sub(r'^\d{1,2}-\d{1,2} ', '', r['name'])   # drop the M-D prefix
    byname[stem].append(r['ts'][:10])
for stem, days in sorted(byname.items()):
    days = sorted(set(days))
    if len(days) > 1 and days[-1] >= '2026-09-07':
        print(f'{stem:48s} {days}')
EOF
▶ Do it now
  1. Run the script. Expect the ten AegisAI and Groundwork parts, plus the legitimate daily families.
  2. On the device, open the 9-7 AegisAI and 9-7 Groundwork folders' files you never inked and tag each done. rm_pull releases them on its next poll; the local package files and outbox PDFs stay.
  3. Tomorrow, check the device count line in STATUS.md - it should read ten lower.

Gotchas

Go deeper: remarkable skill - naming grammar and the manifest · JobHunt package_send.py
One-card takeaway

Idempotent steps need a stable key; a name that starts with today's date is not one.