Compare commits
base: sulthan/mangaBookmark:84291c3635be03a7b208297084e562dc34282ed7
sulthan/mangaBookmark:main
sulthan/mangaBookmark:prod
sulthan/mangaBookmark:vision-check
sulthan/mangaBookmark:spec-137
sulthan/mangaBookmark:spec-136
sulthan/mangaBookmark:skills-plan-tickets
sulthan/mangaBookmark:spec-135
sulthan/mangaBookmark:spec-134
sulthan/mangaBookmark:docs/context-stall-correction
sulthan/mangaBookmark:docs/context-admin-terms
sulthan/mangaBookmark:prototype/admin-surface-122
sulthan/mangaBookmark:docs/gitea-skill
sulthan/mangaBookmark:docs/agents-cite-code-only
sulthan/mangaBookmark:fix/71-cover-byte-cap
sulthan/mangaBookmark:chore/remove-graphify
sulthan/mangaBookmark:fix/asleep-browser-lane-not-stalled
sulthan/mangaBookmark:fix/demonic-interstitial-false-positive
sulthan/mangaBookmark:feat/103-sightings
sulthan/mangaBookmark:feat/102-admin-page
sulthan/mangaBookmark:feat/100-poll-lanes
sulthan/mangaBookmark:comix-browser-site
sulthan/mangaBookmark:docs/poll-lane-and-sighting-vocabulary
sulthan/mangaBookmark:docs/cloudflare-bot-score-correction
sulthan/mangaBookmark:feat/reader-ownership
sulthan/mangaBookmark:feat/db-change
sulthan/mangaBookmark:docs/agent-security-rules
sulthan/mangaBookmark:feat/rebrand-novelSupport
sulthan/mangaBookmark:v1.6.0
sulthan/mangaBookmark:v1.5.1
sulthan/mangaBookmark:v1.5.0
sulthan/mangaBookmark:v1.4.3
sulthan/mangaBookmark:v1.4.2
sulthan/mangaBookmark:v1.4.1
sulthan/mangaBookmark:v1.4.0
sulthan/mangaBookmark:v1.3.0
sulthan/mangaBookmark:v1.2.1
sulthan/mangaBookmark:v1.2.0
sulthan/mangaBookmark:v1.1.0
sulthan/mangaBookmark:v0.1.2
..
compare: sulthan/mangaBookmark:a48aba67b8b2c2c99043ad1fb23983144ef65a3c
sulthan/mangaBookmark:main
sulthan/mangaBookmark:prod
sulthan/mangaBookmark:vision-check
sulthan/mangaBookmark:spec-137
sulthan/mangaBookmark:spec-136
sulthan/mangaBookmark:skills-plan-tickets
sulthan/mangaBookmark:spec-135
sulthan/mangaBookmark:spec-134
sulthan/mangaBookmark:docs/context-stall-correction
sulthan/mangaBookmark:docs/context-admin-terms
sulthan/mangaBookmark:prototype/admin-surface-122
sulthan/mangaBookmark:docs/gitea-skill
sulthan/mangaBookmark:docs/agents-cite-code-only
sulthan/mangaBookmark:fix/71-cover-byte-cap
sulthan/mangaBookmark:chore/remove-graphify
sulthan/mangaBookmark:fix/asleep-browser-lane-not-stalled
sulthan/mangaBookmark:fix/demonic-interstitial-false-positive
sulthan/mangaBookmark:feat/103-sightings
sulthan/mangaBookmark:feat/102-admin-page
sulthan/mangaBookmark:feat/100-poll-lanes
sulthan/mangaBookmark:comix-browser-site
sulthan/mangaBookmark:docs/poll-lane-and-sighting-vocabulary
sulthan/mangaBookmark:docs/cloudflare-bot-score-correction
sulthan/mangaBookmark:feat/reader-ownership
sulthan/mangaBookmark:feat/db-change
sulthan/mangaBookmark:docs/agent-security-rules
sulthan/mangaBookmark:feat/rebrand-novelSupport
sulthan/mangaBookmark:v1.6.0
sulthan/mangaBookmark:v1.5.1
sulthan/mangaBookmark:v1.5.0
sulthan/mangaBookmark:v1.4.3
sulthan/mangaBookmark:v1.4.2
sulthan/mangaBookmark:v1.4.1
sulthan/mangaBookmark:v1.4.0
sulthan/mangaBookmark:v1.3.0
sulthan/mangaBookmark:v1.2.1
sulthan/mangaBookmark:v1.2.0
sulthan/mangaBookmark:v1.1.0
sulthan/mangaBookmark:v0.1.2
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
a48aba67b8 |
feat(backend)!: split Series from Bookmark, keeping the wire format flat
Series becomes a shared row keyed (site, series_id) owning title, cover, canonical URL, kind, latest chapter and last-checked time (ADR-0003). A bookmark keeps only progress, favourite, lifecycle bucket, updated_at. Store.Upsert decomposes one flat body across both tables in one transaction: client title/series_url/cover apply only when the series row is new, then only the poll may change them (security boundary — the row is shared and the values are scraped page content). Reads join series back in, so GET/PUT emit and accept exactly the flat field set they did before (ADR-0004), asserted by TestFlatWireFieldSet. The poller walks Series instead of Bookmarks: one fetch per shared series per due cycle, due queue ordered reader_count DESC then latest_checked_at ASC, orphaned series never due and never deleted, row still stamped before the fetch. Batch/stagger/interval unchanged. Migration 0002 backfills series from existing bookmarks; verified by TestMigration0002BackfillsExistingBookmarks. |
||
|
|
08749df050 |
feat(backend)!: run on Postgres with a migration-owned schema (#28)
Swap modernc.org/sqlite for jackc/pgx/v5 with no observable change: same endpoints, same wire format, same updated_at ordering rule. The schema now comes from numbered SQL embedded in the binary and applied on startup, one transaction each, recorded in schema_migrations. That replaces two pieces of SQLite-era machinery, both deleted rather than ported: the column probing (Postgres has ADD COLUMN IF NOT EXISTS, and there is no legacy database left to probe) and the Asura key rewrite, which has run clean on every start for months now that the userscripts strip build hashes before writing. Its regexp survives as latest.asuraBuildHash, where the poller still needs it to scope chapter links to a series whose slug carries a rotating hash. Types get real: favorite is a boolean, chapter numbers double precision, timestamps stay unix-ms bigint. SQLite's null-safe IS NOT becomes IS DISTINCT FROM, which is what implements the rule that only reading progress reorders a list. Inside COALESCE/NULLIF the status and kind parameters need an explicit ::text -- there is no target column to infer from and Postgres refuses to guess. Tests lose their free t.TempDir() database, so Docker is now a hard prerequisite for `go test ./...`: internal/pgtest starts one postgres:17-alpine per test binary and hands each test a database of its own. Also lands CONTEXT.md and the four ADRs written while scoping #18. BREAKING CHANGE: DB_PATH is retired for DATABASE_URL, which is required and has no default. Compose gains a postgres service on an internal network with its own volume; POSTGRES_PASSWORD joins .env. The old bookmarks-data volume is deliberately left undeclared so `docker compose down -v` cannot take the pre-migration database with it. main is not deployable until #25 and #26 land. Closes #20 Co-authored-by: Sulthan Zaki <sultankiki05@gmail.com> Co-committed-by: Sulthan Zaki <sultankiki05@gmail.com> |