Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Subject: [PATCH kgl 0/4] Add conditional initial-arrival delivery rules
Date: Fri, 04 Dec 2026 22:56:15 -0800	[thread overview]
Message-ID: <20261204-delivery-rules-v1-0-80af76016200@gmail.com> (raw)

This series adds conditional initial-arrival delivery rules, intra-pull
message deduplication for Gmail and JMAP, and Gmail OAuth scope upgrade
handling.

Cross-posted patches and delayed list copies currently re-apply every
configured label on import, resurrecting already archived or read
messages in Gmail and JMAP. To preserve user triage state while
keeping literal delivery labels working without extra lookups, targets
now accept initial labels applied only when a Message-ID does not
already exist account-wide.

The series is organized in four patches:
- Require a terminal on standard input for interactive authentication to
  prevent background timers or cron jobs from hanging on missing tokens.
- Defer Gmail OAuth credential loading until message delivery and
  isolate target authentication and configuration failures across pull,
  retries, and digests, avoiding premature network operations and
  browser prompts during configuration startup.
- Add initial_labels support to Gmail and JMAP targets with intra-pull
  caching, avoiding duplicate uploads and handling Gmail scope upgrades.
- Add conditional initial-arrival delivery rules matching messages
  against address, subject, and arbitrary header criteria.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
Dmitry Torokhov (4):
      Disable interactive OAuth flows when stdin is not a terminal
      Defer Gmail OAuth loading until delivery and isolate target failures
      Add initial_labels, intra-pull dedup cache, and Gmail scope upgrades
      Add conditional initial-arrival delivery rules

 docs/configuration.rst                |  82 +++-
 korgalore-example.toml                |   5 +
 man/korgalore.toml.5                  |  31 +-
 src/korgalore/__init__.py             |   4 +
 src/korgalore/cli.py                  | 685 +++++++++++++++++++++++++---------
 src/korgalore/dummy_target.py         |   2 +
 src/korgalore/gmail_target.py         | 310 ++++++++++++++-
 src/korgalore/google_creds.py         | 232 ++++++++----
 src/korgalore/gui.py                  |  53 ++-
 src/korgalore/imap_target.py          |   7 +
 src/korgalore/jmap_target.py          | 190 +++++++++-
 src/korgalore/maildir_target.py       |   2 +
 src/korgalore/pi_feed.py              |  42 +++
 src/korgalore/pipe_target.py          |   2 +
 src/korgalore/rules.py                | 312 ++++++++++++++++
 tests/test_cli_deliveries.py          | 173 ++++++++-
 tests/test_cli_misc.py                | 196 +++++++++-
 tests/test_digest_cli.py              |  62 +++
 tests/test_gmail_target.py            | 321 +++++++++++++++-
 tests/test_google_creds.py            | 321 ++++++++++++++--
 tests/test_gui.py                     |  90 +++++
 tests/test_imap_target.py             |  19 +
 tests/test_jmap_target.py             | 162 ++++++++
 tests/test_pi_feed.py                 |  36 ++
 tests/test_pull.py                    | 390 ++++++++++++++++++-
 tests/test_rules.py                   | 222 +++++++++++
 tests/test_tracked_thread_delivery.py | 162 +++++++-
 27 files changed, 3775 insertions(+), 338 deletions(-)
---
base-commit: 6e2383fec5fbbc39fa93a528ebae77468b2a78a9
change-id: 20261106-delivery-rules-64c7fe1ba375

Thanks.

-- 
Dmitry


             reply	other threads:[~2026-12-05  6:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05  6:56 Dmitry Torokhov [this message]
2026-12-05  6:56 ` [PATCH kgl 1/4] Disable interactive OAuth flows when stdin is not a terminal Dmitry Torokhov
2026-12-05  6:56 ` [PATCH kgl 2/4] Defer Gmail OAuth loading until delivery and isolate target failures Dmitry Torokhov
2026-12-05  6:56 ` [PATCH kgl 3/4] Add initial_labels, intra-pull dedup cache, and Gmail scope upgrades Dmitry Torokhov
2026-12-05  6:56 ` [PATCH kgl 4/4] Add conditional initial-arrival delivery rules Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204-delivery-rules-v1-0-80af76016200@gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox