3.7 KiB
3.7 KiB
TODO
Durable backlog. Agents append here instead of leaving TODO comments in source.
Small, specific, independently actionable. Remove only when actually done.
Now
- Choose a linter/formatter (e.g. Biome), then add
linttopackage.json,AGENTS.mdanddocs/PERMISSIONS.md. - Add CI on Gitea Actions: install, typecheck, and test on SQLite and Postgres. Add a guard that fails if
AGENTS.mdis over 150 lines.
Next
- Phase 2 and Phase 3 plans (spec §12).
- Generate image thumbnails for attachments (Phase 1 sizes images with CSS).
Someday
Recurring
- Maintain
AGENTS.md:- Add a rule only in response to a real failure. When an agent repeatedly gets something wrong, that is a gap; add one line, ideally with a code example. Do not pre-empt hypothetical mistakes.
- Update in the same PR as the convention change. A stale rules file is worse than none, because it actively misleads.
- Prune quarterly. Delete rules whose convention has changed or whose mistake no longer occurs.
- Optional, cheap validation: run the same task twice in clean sessions, with and without the file, and compare steps and token use.
Known issues
- Plugins: reload re-imports entry files only; edits to a plugin's other modules need a server restart.
- Plugins: rate limiting is per run (each run builds its own client), not per plugin (spec §11); share a limiter per plugin in Phase 2.
- Plugins:
ctx.logreachessource_runs.logonly after the run ends, so a crash mid-run loses it. - Restore: a new child work whose parent+position collides with an existing child of a re-matched parent fails
with
ImportError("conflict")instead of being merged or repositioned. - Restore: an unlink of identical attachment bytes between the pre-write and the commit could remove the file; mitigated by re-writing after commit, not locked.
- Export bundles hold attachment bytes in memory; very large libraries need a streaming zip.
- Sync:
listrecords are snapshotted but not applied tolists(Trakt/Hardcover emit them). Decide the mapping (one list per record, items by matched work) and apply it through the change engine. - Sync: accepting a
removedevent on an engagement de-duplicated across sources soft-deletes it even if another connection still reports it; consider detaching that connection'sengagement_sourcesrow instead. - Sync: pending
changed/conflictevents for a value the source has since moved past stay pending; consider superseding them when a newer value for the same field arrives. - Sync: two concurrent runs of the same connection (outside the job queue, e.g. a manual run) can both insert a new
source_recordsrow for one key. Queued syncs are serialised bylockKey. - Sync:
ingestListensdoes one lookup and one insert per listen; batch it for large backfills. - Admin merge does not merge colliding children recursively; colliding children stay under the tombstoned parent.
- Matching: a shared parent resolved without external IDs or position (title/year reuse in
packages/core/src/matching.ts) has no unique key, so concurrent matches can create it twice. - Library search (
q) and the title sort use the work's title, not the user'soverrides.title(overrides are a JSON text column). Thetagfilter matches the JSON text with LIKE. - Library hierarchy rollup and orphan detection look three levels deep; deeper trees are not rolled up.
- Undoing a per-user move does not move copies or list items back, nor restore aliases that the move re-pointed.
bun run typecheckfails with TS18003 until source files exist underapps/,packages/orplugins/.