Allow sites to select immutable Relay mail template versions
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start with community_base.mail.service.send() and the existing EmailDelivery.template_version handling, then read the mail and kernel hook docs and docs/plan/phase-6.md. Trace the idempotency, resend, worker, and Relay paths, and add the resolver without site imports or a migration. Done means the listed acceptance criteria and package quality gates pass, CI comparisons are reported, and v0.5.35 and its release wheel are verified.
索引モデルが issue の本文から書いたものです。
説明
Allow sites to select immutable Relay mail template versions
Status: in progress
Plan card: C6.2b in docs/plan/phase-6.md
Depends on: C1.2b
Blocks: AI-Shipping-Labs/website#2009
Goal
Let each consuming site select the published Relay template version for a mail purpose while every
EmailDelivery remains pinned and immutable. AI Shipping Labs needs reviewed version 2 templates
after removing its local renderers. DataTalksClub and unconfigured consumers must remain on version
1.
Scope
- Add
COMMUNITY_BASE["MAIL_TEMPLATE_VERSION_RESOLVER"], accepting a callable or dotted path with
contract(purpose: str) -> int; no override resolves to1. - Resolve the version once in
community_base.mail.service.send()before any delivery or job is
created. Persist it in the existingEmailDelivery.template_version; the worker and Relay
backend continue using that stored value. - Accept only a strictly positive integer. Reject booleans, zero, negative integers, strings,
None, and other types withMailError("invalid mail template version")and no writes. - Keep
template_versionin the immutable idempotency comparison. An exact replay returns the
original delivery. If the resolver changes for the same idempotency key, raiseMailConflict
without mutating or requeueing the pinned delivery. A new audited resend resolves the current
version for its new idempotency key. - Keep the package free of site imports.
AI-Shipping-Labs/website#2009will configure the dotted
hookemail_app.relay_versions.template_version_for, selecting version 2. DTC config remains
unchanged and therefore selects version 1. - Add no model field or migration. Do not add a row-mutation command or resolve the version again
in the worker. - Update the mail/kernel hook docs and architecture list. Bump package version and changelog for
immutable releasev0.5.35. - No AWS access, production data, containers, or real sends. No unrelated package work.
Acceptance Criteria
- With no resolver configured,
send()persiststemplate_version=1and the Relay request
sends version 1 exactly as before. - A callable or dotted-path resolver receives the exact purpose and its positive integer result
is persisted and sent to Relay. - Invalid results, including booleans, fail with
MailError("invalid mail template version")
before anyEmailDeliveryorJobIntentis created or enqueued. - Exact replay with the same resolved version returns the original delivery and creates no
second job or send. - Resolver drift for the same idempotency key raises
MailConflictand leaves the original
delivery version, job, and dispatch unchanged. -
resend()resolves the current version into its new logical delivery. - No migration is generated and package boundary tests confirm there is no site import.
- Package mail tests and all quality gates pass with all extras installed and the collected
test count recorded. - Package CI reports DTC baseline versus linked and AISL baseline versus linked separately,
with no new linked failure; a pre-existing baseline failure is reported rather than called green. - Package
mainis green before immutablev0.5.35and its release wheel are created; AISL
does not pin the package before the tag exists.
Verification
uv sync --all-extrasuv run pytest tests/mailuv run pytestuv run ruff check .uv run ruff format --check .uv run python testproject/manage.py checkuv run python testproject/manage.py makemigrations --check --dry-run- Fresh SQLite
uv run python testproject/manage.py migrate uv run pytest tests/test_boundaries.pypython3 scripts/plan.py check- After direct
HEAD:mainpush: package CI plus both P16 consumer comparison jobs. git ls-remote --tags origin v0.5.35and GitHub release wheel verification.
Workflow Override
The owner authorized direct HEAD:main delivery with no pull request for this dependency. Package
implementation, tester review, product acceptance, CI observation, immutable-tag rules, and both
consumer checks still apply.
- 主要言語
- Python
- スター
- 0
- フォーク
- 0
- 平均マージ
- 1時間 5分
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DataTalksClub/community-base のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
DataTalksClub/community-base#285 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
DataTalksClub/community-base#417 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
DataTalksClub/community-base#415 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
DataTalksClub/community-base#414 · コメント 7 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
DataTalksClub/community-base#410 · コメント 1 件 ·
DataTalksClub/community-base の issue をすべて見る
似ている issue
-
documentation good first issue priority: P2 status: ready
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
RhinoLink-Tech/data-fabric#500 ·
メンテナーはふだん 1 日以内に返信
-
backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EchoTools/nevr-runtime#2384 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: The H2 series' and the H3C's fan 3 is labelled "Chamber Fan", Bambu calls it the exhaust fanオープンarea:ui
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
btclib-org/btclib#3062 ·
メンテナーはふだん 1 日以内に返信
-
area:evals area:infra enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
jse-avl/support-bot#4 · コメント 1 件 ·