Commit Graph
32 Commits
Author SHA1 Message Date
jochen f24a4d858a issue 1859: move the mail page into internal/web, so the local run can serve it
A program cannot import a main package; the page's code moves to modules/mesh-mail-web/internal/web, and
cmd/mesh-mail-web is a two-line program calling it, so cmd/mail-page-dev (1859.5) serves the same handlers.
Nothing the module does changes.
2026-10-22 19:58:43 +02:00
jochen 4071349078 issue 1858: prove each act and its line in the real store (integration, compiled only)
The lead's try runs it: an act and its line kept together, a failed act keeping neither, correct's three
writes together, the removal of old lines, and handling gone with its entry.
2026-10-22 19:56:31 +02:00
jochen 0e9004664c issue 1858: write correct's line in its own transaction, and guard who writes the log (1858.6)
ADR 0517 §5: correct keeps the entry's change, its reading lesson and one corrected line together, or none
of them; a test reads the source to prove only the acts write the action log, and each new verb refuses an
ungranted caller. The README and the callers setting name the twelve verbs.
2026-10-22 19:56:16 +02:00
jochen 0ed94e5466 issue 1858: remove action lines older than 365 days each night (1858.5)
ADR 0517 §9: the action log keeps a line one year; the removal runs at start and each night at 03:00
(Europe/Brussels) and says how many it removed. Handling goes with its entry by the schema's cascade.
2026-10-22 19:54:57 +02:00
jochen da8a6a6df4 issue 1858: record the acts that change no entry, and answer the action log (1858.4)
ADR 0517 §3 to §5: record writes one line for a mail opened, a mode chosen or the page opened (the last
looked list answers); every other line is its own verb's. actions answers the log newest first.
2026-10-22 19:54:28 +02:00
jochen fac091756e issue 1858: answer the operator's list for a mode (1858.3)
ADR 0517 §4, ADR 0515 §1: list gives tasks under today, this week and later by due date in the operator's
zone, promises by kind, good to know, read later, handled today with its undo and the scam warnings, for the
mode's accounts, and when the operator last looked.
2026-10-22 19:53:47 +02:00
jochen a5ffe4eea7 issue 1858: handle, unhandle and remind an item, each with its own line (1858.2)
ADR 0517 §1, §2, §4, §5: an item is a task, a promise or the mail itself; each act and its action line are
kept in one transaction, a refused or failed act writes none, an undo lasts until the day ends and a
reminder shows the item again the next day (Europe/Brussels). The seat's serves list in mesh-mail's
manifest names the new verbs.
2026-10-22 19:51:54 +02:00
jochen fdd56d2259 issue 1858: keep the operator's handling and the action log (1858.1)
ADR 0517 §1 to §3, §9 to §11: migration 0005 and schema.sql add item_handling (per item, gone with its
entry) and action_line (what, mail id, item, mode, when; never mail text); the store writes each act and its
line in one transaction.
2026-10-22 19:50:15 +02:00
jochen 75ce0e8a8c issue 1857: read the last 14 days of inbox mail once more (1857.5)
ADR 0516 §5: so the operator's list does not start empty, the inbox mail of the last 14 days of each granted
account is read again in ordinary batches, after any mail just heard; it is kept as done in its own table
(migration 0004), and the journal says its start, end and count. The reader now invokes mail-store.search.
2026-10-22 19:48:21 +02:00
jochen af54720907 issue 1857: let correct say not a task, remove a promise, or set read later (1857.4)
ADR 0516 §4: each is kept as a reading lesson, as a change of mark or mail group is, so later batches with a
mail of that sender follow it; an item number the entry does not hold is refused.
2026-10-22 19:42:04 +02:00
jochen 6b759f708e issue 1857: judge at most 6 mails a batch (1857.3)
ADR 0516 §3: the answer grows by each mail's tasks and promises, so a batch holds 6 mails, not 10, to stay
within its 40 s; a test proves the largest question stays under 64 KiB with every mail whole.
2026-10-22 19:41:17 +02:00
jochen c3b504e26e issue 1857: ask and check each mail's tasks, promises and read-later (1857.2)
ADR 0516 §1, §2: the answer schema asks at most 3 tasks and 3 promises in the model's own words and the
read-later flag; ParseAnswer refuses a 4th, an unknown kind, a line over 120 characters or a bad date, and a
line sharing a run of 8 words with its mail's text fails the batch, so nothing copied is ever kept.
2026-10-22 19:40:33 +02:00
jochen daff20d351 issue 1857: keep a mail entry's tasks, promises and read-later (1857.1)
ADR 0516 §1: an entry holds at most 3 tasks and 3 promises in the model's own words, and whether it is read
later. Migration 0004 and schema.sql add mail_task, mail_promise and read_later; the store writes and reads
them with their entry, in one transaction.
2026-10-22 19:39:15 +02:00
jochen a3626e7920 issue 1580: say no batch has run yet until one has, then when it succeeded
The health answered that the last batch judgement succeeded on a fresh database, before any batch ran.
reader_health keeps when a batch last succeeded (migration 0003, backfilled from the last judged entry),
and the health and status say it, or that no batch has run yet.
2026-10-22 19:37:20 +02:00
jochen 92dc8e313c issue 1849: keep one mail entry per message, by its Message-ID, else its folder and UID
Gmail files one message in INBOX and All Mail, each with its own UID; the reader kept an entry per folder.
waiting_mail and mail_entry are now unique per account and message key (migration 0002 and schema.sql), a
mail that already has its entry no longer waits again, and the test double keeps PgStore's own keys
(issue 1548). A schema model test proves schema.sql equals the migrations in order.
2026-10-22 19:36:19 +02:00
jochen f3007eb242 Fix the try on 8000b637 and review round 2: RunBatches takes its gap as a parameter instead of reading the var BatchGap, and no tell while unhealthy is checked as an exact count, not a before/after that a same-pass tell could hide behind (issue 1520, 1524)
mesh/merge-gate head f3007eb242f8 merged into trunk 6c6d5f681c30 — pass: builds mesh-mail, mesh-mail-web, new: modules/mesh-mail-reader → novox; no bus ste…
mesh/repo-check head f3007eb242f8 merged into trunk 6c6d5f681c30 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery delivered
2026-10-21 01:52:58 +02:00
jochen 8000b63785 Review round 1: an unset mail-reading verb answers unavailable not unknown, cache the index instead of leaking a pool per call, a gone mail leaves the queue without going unhealthy, sort the judge's own cause by its words, drive RunBatches itself for its pacing test, and prove no tell while unhealthy against a genuinely untold mail (issues 1430, 1523, 1517, 1518, 1520, 1519, 1524) 2026-10-21 01:48:23 +02:00
jochen f89b73d936 Fix the try on 63980bf5: keep a test database's name within postgres's 63-byte limit so two calls in one long-named test never collide (issue 1517) 2026-10-21 01:30:52 +02:00
jochen cfea9de530 Fix the try on bb594652: a const batch gap unit tests assert directly, wait for the bundle's own subscribe before publishing, and a migration-0001 database built through the real path (issues 1520, 1518, 1431, 1517) 2026-10-21 01:24:57 +02:00
jochen 794de09c4d Fix the try: guard shared test state with mutexes, pgxpool over one conn, a short batch gap for integration builds, unique+forced database drops (issues 1431, 1524, 1517) 2026-10-21 01:11:48 +02:00
jochen 3d030c9b4f Prove a refused judgement fails loudly and catches up, and the page shows why (issue 1524) 2026-10-21 00:55:23 +02:00
jochen 95704c7410 Start mesh-mail-reader whole against the real bus and store: entries, no body kept, the tell, the cap (issue 1431) 2026-10-21 00:53:37 +02:00
jochen 35496d6381 Send the mail signal after each batch: messenger_check, tell, untold carried over (issue 1522) 2026-10-21 00:34:52 +02:00
jochen 72f4bc52a4 Build the mail signal's own words: headline, nearest due date first (issue 1429) 2026-10-21 00:31:14 +02:00
jochen e87269b0d2 Keep the operator's corrections as reading lessons at once: correct, lessons, undo (issue 1428) 2026-10-21 00:27:47 +02:00
jochen a13a6c5898 Serve entries, groups and status: filtered, sorted, with the weekly reading-lessons measure (issue 1521) 2026-10-21 00:22:37 +02:00
jochen 42bffb9363 Run the reader's batches: paced, judged, written as entries, unhealthy on failure (issue 1520) 2026-10-21 00:18:37 +02:00
jochen 83bc01e746 Build the batch's question and read its answer, bounded and out of shape when wrong (issue 1427) 2026-10-21 00:08:28 +02:00
jochen 183cc58347 Keep mesh-mail-reader's own health, surviving a restart (issue 1519) 2026-10-20 23:58:37 +02:00
jochen d7b5c87887 Hear mesh-mail's added events, recorded before acknowledged, in arrival order (issue 1518) 2026-10-20 23:56:17 +02:00
jochen 0d2d19daa0 Keep a mail entry per mail, never the body (issue 1517) 2026-10-20 23:53:48 +02:00
jochen d17b7e832d Declare the seat mail-reading and the module mesh-mail-reader's skeleton (issue 1426) 2026-10-20 23:50:02 +02:00