Publish 受け入れマトリクスと実装 issue 分割
状態と読み方
提案・未実装(2026-10-05)。#7224 の実装受け入れ条件と後続 issue の仕様をまとめます。ドメイン/API は Publish Next ADR、pgen/OGP 実行系は Publish OGP ADR が決定の正本です。現行機能の説明は Publication Design と Publish API を参照してください。
ここに記載する後続 issue は起票可能な仕様案であり、起票・実装・リリース済みを意味しません。現在の作業では runtime、UI、本番設定、公開/デプロイを変更しません。UI prototype #7223 は後続受け入れとし、synthesis #7222 はこの分割の対象外です。
内蔵 Publish は明示的に渡された note snapshot を公開する狭い経路です。frontmatter の固定 schema や保存時の自動公開を導入せず、zudo-doc の階層ドキュメント/build contract を引き受けません。
証拠と適用範囲
| 証拠 | SHA / 区分 | この文書での扱い |
|---|---|---|
| 現行実装を調査したコード | 750f131eaf6108ce0f00e02586689e41a3d79ee7 | 現行 route、row、Pro write gate、snapshot、password、asset の説明を固定する根拠。 |
| Publish Next ADR(#7229) | 910924319b6b4255d2022d309300eca7df5bc46a | ドメイン/API/URL/lifecycle/entitlement の提案。現行コードの証拠ではない。 |
| Publish OGP ADR(#7230) | cd6e17924343bd64ed06fe83e0eeda4cae758e31 | adapter/job/R2/cache/privacy の提案。現行機能の証拠ではない。 |
| pgen integration guide | 8478d9637121f5f6f527bd8b7032ce25a925d27f | 上流 source の API 契約を調べた記録。npm release の必要 export、Cloudflare 実環境、production readiness の証明ではない。 |
| 要求の出典 | zudolab/zudo-text#7224 | 必須 deliverable とシナリオの一覧。要求文は現行動作の証拠ではない。 |
ADR が「現行」と記す事実は 750f131 のコード調査に基づきます。たとえば現行 public path は /u 形式、現行 write 操作は Pro gate の一部を持ち、OGP は明示 share image が中心です。各 ADR が別途定める v2 API、unlisted、Free publishing、automatic OGP、job、registry、R2 association は将来案です。実装 issue はコードを調査し直し、外部 package や provider の変化も再確認してから着手します。
7224 の deliverable 対応
| #7224 deliverable | 決定・仕様の所在 | 状態 |
|---|---|---|
| architecture / entity model | Publish Next ADR | 提案済み。実装前に schema と現行 row の対応を再確認する。 |
| API boundaries / public queries | Publish Next ADR | owner mutation と public read の v2 契約を記録。 |
| URL / canonical / rename | Publish Next ADR | 現行 /u を維持し、導入後の rename のみ alias 化する提案。 |
| publish / update / unpublish lifecycle | Publish Next ADR | explicit snapshot、revision、idempotency、archive/password gate を定義。 |
| pgen interface / production render strategy | Publish OGP ADR | browser executor を本番目標に選択。package と本番 readiness は未達。 |
| R2 storage / cache identity / privacy | Publish OGP ADR | private R2、pgen provenance、authorization-before-read、GC を提案。 |
| Free / Pro permission matrix and branding | Publish Next ADR | server-authoritative policy と構造化 footer を提案。 |
| tag normalization / rename semantics | Publish Next ADR | 固定 Unicode rules と per-post tag change を提案。 |
| observability | Publish OGP ADR と Publish Next ADR | 個人情報を記録しない集計値、保持期間、render/job 計測を提案。 |
| transition from existing behavior | Publish Next ADR と Publication Design | /u route intent を保ち、historical backfill / format migration を追加しない提案。 |
| testing / traceability | 本ページ「受け入れマトリクス」 | 全 #7224 シナリオと追加 gate を決定的テスト / 後続 smoke に分ける。 |
| implementation issue breakdown | 本ページ「後続実装 issue の仕様案」 | bounded scope、対象 repository、dependency、受け入れ条件、risk、requirement mapping を示す。issue 自体は未起票。 |
この計画は旧 format の移行・backfill を追加しません。導入後の新関連 record がない既存 post は ADR に定義した既定状態として扱い、private note からの自動補完や公開はしません。既知の現在 route は可能な範囲で維持します。契約導入前に記録されていない username / slug rename history は推測せず、未知の URL を alias にしません。
受け入れマトリクス
決定的テストは fixture、共有 validation fixture、DB/Worker integration、fake executor/object store で再現可能に動かします。deployment smoke は Browser binding、実 browser fingerprint、font load、R2、session cleanup などローカル fake で証明できない境界だけに使い、本番 readiness の別途承認後に実行します。公開中の実利用者の投稿を smoke data にしません。
| シナリオ | 決定的 test / contract | 後続 deployment smoke と gate | 要求 |
|---|---|---|---|
| 初回 publish | valid snapshot で一度だけ post と public association を commit。同じ idempotency key は同じ安全な結果を返し、preflight failure は post/public row を作らない。 | isolated staging で authorized disposable fixture を publish/read/delete。Browser + R2 readiness 後。 | #7224 first publish |
| title 更新と新 OGP URL | title が描画入力なら新 render identity / URL、古い association は無効。render 中の失敗では従前 snapshot 一式を維持。 | 実 adapter で metadata と PNG digest、古 URL の gate を確認。 | #7224 title change |
| 同一 adapter 内の反復 render | 同じ registry revision、normalized input、seed、slice、adapter fingerprint で cache identity と再利用 bytes が安定。異なる adapter 間の pixel parity は要求しない。 | exact release と実 browser version/platform を記録し、同じ identity の再実行を確認。package/local proof 後。 | #7224 deterministic repeat |
| tag の追加・削除 | NFKC / ASCII case / 日本語 / 禁止文字 / byte・件数上限 fixture、DB uniqueness、timeline と tag query を検証。 | 不要。 | #7224 tag add/remove |
| username / slug collision、rename、既存 URL | concurrent claim は一意、競合は 409、alias は current canonical へ 1 hop。既存 /u route と明示 share asset を fixture row で確認。未記録 rename は 404。 | deploy smoke は staging route の canonical/redirect を確認するときだけ。historical alias 作成や backfill はしない。 | #7224 collision / old URL |
| Free attribution | server plan matrix が Free/default を解決し、shell に必須 attribution と official link を出す。client request で外せない。 | authorized staging HTML render で shell の可視性と link を確認。 | #7224 free branding |
| Pro branding replacement | Pro entitlement 時だけ bounded CTA または none を許可。任意 HTML/CSS/script、downgrade での記事削除は拒否。 | authorized staging HTML render で CTA と downgrade 後 attribution を確認。 | #7224 Pro replacement |
| missing template/slice、font/preflight refusal | unknown registry revision、missing/ambiguous slice、寸法違い、未対応 glyph / font digest は publish 前に安全な field error、保存なし。PNG decode / dimensions / digest を検査。 | 承認済み Japanese font/template fixture を exact browser runtime で確認。package/local proof 後。 | #7224 missing template / font |
| renderer timeout と recovery | fake executor で deadline、abort、late completion、cleanup failure、同 key retry、idempotent commit を検証。失敗 update は以前の公開 snapshot を維持。 | Browser binding で 15 秒 deadline、5 秒 close、reaper、cold start、429/quota、R2/D1 race を測る。production readiness authorization 後。 | #7224 timeout / recovery |
| mobile / web parity | bridge DTO と validation fixture を共有し、create/update/error/retry/revision を全 client adapter で同じ payload/result にする。 | #7223 acceptance 後に承認済み UI surface の手動/host smoke。 | #7224 client parity |
| password gates / unlisted discovery | unauthenticated protected response は generic、body/title/canonical/image を漏らさない。unlisted は direct URL のみで timeline/tag/sitemap に載らない。 | isolated staging で HTML/JSON/asset gate を確認。 | 追加 security |
| stale revisions / idempotent retries | competing revisions は stale conflict、same key/same input は replay、same key/different input は conflict。HTTP disconnect 後に owner read/retry で commit 結果を一意にする。 | durable storage / queue を使う authorized staging smoke。 | 追加 lifecycle |
| archive / restore | archive で即時非公開、restore 後は unpublished、明示 publish まで再表示しない。delete と stale render の競合で resurrection しない。 | isolated staging の lifecycle smoke。 | 追加 lifecycle |
| protected metadata / asset leak | HTML、public JSON、alias、timeline、sitemap、/og、legacy asset、cache header を gate matrix で検証。旧 hash・保護 hash を知るだけでは 404。raw source / verifier / provenance leak を検査。 | authorized staging で Browser/R2 側の auth-before-read、no-store と object GC を確認。 | 追加 security |
「deployment smoke が不要」とされた行も production readiness の全体承認を省略する意味ではありません。決定的 test を先に完了し、provider/browser 境界を含む行は別途認可された staging でのみ確認します。#7224 は実際の publish や deploy を今回の docs task に求めていません。
後続実装 issue の仕様案
以下は起票前の分割案です。issue 作成・実装順の変更・production readiness の認可は parent workflow 側で行います。
A. 公開ドメイン・storage・owner mutation API
目的. Publish Next ADR の profile/post/tag/theme model と v2 owner API を一つの整合した contract として実装する。この issue は schema と owner mutation に範囲を限定する。現行 row を読み続けられる構成を優先し、古い format の migration/backfill や v1 dual-write を追加しない。
対象 repository. workers/sync-server/migrations、workers/publish-server/src/types.ts、publish-mutations.ts、handlers/profile-handlers.ts、handlers/page-handlers.ts、utils/validation.ts、route dispatch。
依存関係. #7229 の決定を仕様として使う。実装開始時に 750f131 の現行 schema/handlers と差分を再調査する。backend implementation は #7223 UI acceptance を待たない。
完了条件・テスト.
profile, post, tag join, claim/alias, revisions, idempotency ledger の constraints と owner scope を D1 integration tests で確認する。
tag Unicode fixture、username/slug validation、same-owner uniqueness、cross-owner join denial を確認する。
create/update/replace/metadata/source/password/unpublish/archive/restore/delete の revision、CAS、safe replay、stale/conflicting request を網羅する。
snapshot 更新は明示入力だけを保存し、note save や source path から公開本文を再取得しない。restore は unpublished のまま。
主なリスク. 既存 row が不完全でも private note の推測補完や公開範囲拡大を行わない。transaction が alias、revision、idempotency result の一部だけを commit しない。
対応する要求. #7224 entities, API boundaries, tag rules, lifecycle, migration/transition, tags, stale revision/idempotency, username/slug collision.
B. public query・timeline・URL・visibility contract
目的. /u canonical を保ちながら public profile/post/tag query、signed cursor、forward-only alias、visibility/password gate を実装し、HTML と JSON の同じ可視性を保証する。この issue は public read と route に範囲を限定する。
対象 repository. workers/publish-server/src/handlers/public-handlers.ts、templates/user-page.ts、templates/password-challenge.ts、asset-read-handlers.ts、route dispatch、sitemap/robots generation。
依存関係. A の storage/DTO contract。#7229 の current /u path と alias namespace decision。#7223 の見た目決定には依存しない。
完了条件・テスト.
active public のみ timeline/tag/sitemap に出し、unlisted は direct URL のみ、protected は gate 後だけ本文を返す。
cursor の改ざん、期限、profile/filter/limit mismatch、同時投稿と同時更新、timestamp tie-break を決定的 DB test で検証する。
username/slug rename の競合、1 hop redirect、未記録の旧 URL、inactive/archived/protected target の generic response を route contract tests で確認する。
no-store、canonical、末尾 slash、予約語、未知 route、legacy /u と page asset route の behavior を確認する。
主なリスク. redirect や cursor error が protected post/profile の存在を漏らさない。unlisted/private tags が counts、sitemap、cache に残らない。
対応する要求. #7224 URL/canonical/redirect, public profile/timeline query, visibility, existing URLs; password/unlisted, archive/restore, protected metadata gates.
C. server entitlement・Free / Pro・構造化 branding
目的. subscription を server で判定し、Free publish と標準 OGP、Pro theme override、Free attribution / bounded Pro CTA、downgrade 後の公開状態を契約どおり適用する。この issue は entitlement と server-owned footer に範囲を限定する。
対象 repository. workers/publish-server/src/handlers/capabilities.ts、profile/page mutation handlers、server-owned document shell and styles, policy/registry types。
依存関係. A の owner contract、B の HTML/public read shell、Publish Next ADR。client capability は表示補助に限定する。
完了条件・テスト.
Free、active Pro、trial grace、expired、malformed subscription、service failure、developer exception、downgrade の server matrix を unit / Worker tests で確認する。
Free の attribution は HTML shell に必須で、Pro CTA は bounded plain text + HTTPS URL。arbitrary HTML/CSS/script と client entitlement spoof を拒否する。
downgrade は post/theme/snapshot を削除・非公開化せず、既存 Pro theme を固定した記事訂正と Free footer 適用を確認する。
主なリスク. subscription outage で公開停止・削除・保護操作を塞がない。資格不明の public branding は Free policy に倒す。
対応する要求. #7224 Free/Pro enforcement, attribution/footer, profile publishing policy and SEO quality.
D. pgen release consumer・registry・local adapter proof
目的. immutable product registry から approved template, field mapping, fixed slice, font manifest, policy を解決し、公開済み pgen API で安全な OGP adapter を実装する。この issue は package consumer と local proof に範囲を限定し、production Browser binding は扱わない。Markdown/body/source を pgen に渡さない。
対象 repository. workers/publish-server の新規 OGP registry/adapter module、package manifest/lockfile、adapter contract fixtures。新しい shared package が必要なら packages の開発境界 を確認する。
依存関係. upstream #6301 の merge だけでは不十分。必要 subpath exports と headless bundle を含む exact npm release と integrity を確認する。ADR の 2026-10-05 調査では公開 4.0.0 に必要 export がなく、release readiness は未達。source code を npm package の代用にしない。
完了条件・テスト.
disposable consumer から正確な release exports/declarations を import し、fixed registry fixture で 1200×630 PNG を生成・decode・digest 検証する local adapter proof を先に通す。
allowed fields/tokens/slice、field-to-template mapping、template revision、Japanese glyph coverage、unknown/removed revision、bad PNG/digest を contract fixture で検証する。
同じ adapter fingerprint 内の repeat identity/bytes、意味ある title/author/theme change の新 identity、description/tag/bio-only change の reuse、raw pgen error の安全な mapping を確認する。
browser/native adapter の cache key を分離し、実 runtime fingerprint が未知なら fail closed にする。
主なリスク. upstream source success を released consumer API と取り違えない。font licensing/bytes/glyph coverage、template fidelity、adapter determinism は実際の approved asset と runtime に依存する。
対応する要求. #7224 pgen boundary, theme-to-template mapping, automatic OGP, cache inputs, missing template/slice/font failure and deterministic rendering.
E. durable OGP job・Browser executor・private R2
目的. publish commit と image association を原子的に行い、browser render の timeout/lease/admission、private R2 stage/read/GC、public /og authorization を実装する。この issue は durable job と private asset path に範囲を限定する。採用目標は publish Worker → dedicated browser executor → pgen headless Canvas → private R2。
対象 repository. workers/publish-server/src job/queue handlers, D1 migrations, private R2 bindings, publish Worker config, /og read handler, cleanup/reaper and observability modules。
依存関係. A、C、D の contract と local adapter proof。production Browser binding、paid provider usage、R2/D1 production configuration、deploy/smoke は別途認可された production-readiness step まで gate を閉じる。
完了条件・テスト.
fake executor/D1/R2 tests で first publish failure、update rollback、same-key replay/conflict、disconnect, R2 success + D1 fail、CAS loser、late completion、lease loss、GC race、profile coalescing を検証する。
browser page は trusted bundle/font だけを受け取り、network/navigation/storage/credentials を遮断。15 秒 deadline と 5 秒 cleanup、late launch catch、reaper が durable slot を保持する契約を確認する。
public /og は current profile/post/state/gate/current association を検証してから private object を読む。protected, unpublished, archived, retired hash は 404/no-store。PNG type, size, dimensions, digest を検証する。
separately authorized staging smoke では cold start, browser fingerprint, font load, quota/429, timeout/abort, cleanup, R2/D1 association, orphan GC, cost budget, kill switch を測り、実測値を記録する。
主なリスク. provider 秒数/価格/quota は変化する。Browser prototype/typecheck や local R2 mock を production readiness と呼ばない。late job は post を再公開できない。
対応する要求. #7224 production rendering strategy, OGP pipeline, R2/cache/invalidation, resource bounds, timeout/recovery, privacy and observability.
F. bridge / client contract parity
目的. desktop, web, mobile client が同じ typed Publish API DTO と shared validation fixture を使い、明示 snapshot、revision、idempotency、asset re-upload、safe error を同じ意味で扱う。この issue は API contract の client parity に範囲を限定し、画面構成は決めない。
対象 repository. packages/backend-bridge/src/publish-api-client.ts、tauri-app/renderer/hooks/use-publish.ts、および各 publish client adapter/surface。UI composition は承認された prototype decision に従う。
依存関係. A の DTO/API implementation plan。visible composer flow の実装・受け入れは #7223 UI prototype が承認されるまで開始しない。
完了条件・テスト.
shared contract fixtures を各 client adapter で実行し、wire payload、normalization、status/error mapping、request replay、stale revision、workspace/account switch cancellation が一致する。
desktop/web/mobile の同じ request fixture が同じ Worker result を得る contract test を行う。別の client 側 entitlement/slug/tag rule を複製しない。
prototype acceptance 後に approved UI wiring のみを smoke し、private note を自動 publish しないことを確認する。
主なリスク. client parity は同じ visual UI を意味しない。prototype が決める前に field ownership や composer flow を固定しない。
対応する要求. #7224 mobile/web contract parity, explicit publish/update behavior, tags/theme/visibility client inputs.
G. cross-layer security acceptance と readiness closeout
目的. A–F を通した source-to-response acceptance を実行し、現行 behavior と実装済み変更の差、未達 gate、privacy/cost evidence を release decision に残す。この issue は統合検証と readiness 記録に限定し、新しい product behavior を追加しない。
対象 repository. publish Worker integration tests、publication-renderer tests、backend-bridge contract tests、architecture docs and readiness evidence.
依存関係. A–F の実装と deterministic test pass。実 browser/provider/R2 checks は別途認可された staging readiness 後。#7223 UI acceptance が client UI smoke の前提。
完了条件・テスト.
上の matrix 全行を runnable test または明記した external gate に対応付け、HTML/JSON/alias/timeline/tag/sitemap/asset/OGP/owner preview を privacy matrix 全体で確認する。
source/workspace ID, private Markdown, password verifier, capability cookie, raw provenance, render job ID, internal owner ID が public response/log/URL に出ないこと、old hash/auth-before-cache bypass と unlisted discovery を確認する。
cache key, adapter/browser update quarantine, no-store, asset GC, retry/idempotency と mobile/web bridge parity の evidence を記録する。
production readiness 未承認なら deployment smoke を実施済みと記載せず、feature admission/configuration を閉じた状態と未達事項を明記する。
主なリスク. fake tests が provider semantics を代替しない。public release は別の owner decision と最新の quota/cost/security evidence を必要とする。
対応する要求. #7224 full deliverable coverage, testing strategy, privacy/security, chosen deployment strategy and final implementation acceptance.
2026-10 amendments
採択した実装契約(2026-10-06、#7328 / #7329)。以下は承認済み UI に合わせた追記です。この追記と以前の提案・現行説明が矛盾する場合は追記を優先します。追記自体は runtime の実装・release・deploy の証拠ではありません。上書きの全体表と型の正本は Publish Next ADR、描画境界は Publish OGP ADR を参照してください。
承認済み UI と F の gate
#7223 acceptance に相当する方向は #7328 の 採択記録 に採択済みです。issue F の visible composer flow 開始 gate は満たしました。a1-r4 composer、b4-r3 public pages、c1-r4 settings を実装入力とします。この UI 承認は S20 release-consumer proof や provider / production readiness の代わりではありません。
A–G の以前の分割にある v2 owner/public route、claim/alias/rename、purge、ledger v2 の受け入れは下の延期リストへ移し、この epic の合格条件にしません。v1 namespace のまま presentation version 2、post thumbnail / sharingCard、capabilities、PublicProfile defaults、items timeline を client/server 一緒に実装します。旧 version 1 の stored document 配信は維持し、owner update は新 composer からの republish まで 409 snapshot_required。歴史的 format の migration/backfill や private note の推測補完は追加しません。
追加・更新する受け入れ行
| シナリオ | 決定的 test / contract | 視覚確認・外部 gate |
|---|---|---|
| crop-once thumbnail | 写真を client で 1200×800 に一度 crop、hero / grid が同じ thumbnail を使用。1200×630 derivative、roles thumb / ogp、inspectImage 比率 1.5 ± 0.01 / 1.905 ± 0.01、不正実寸・digest を拒否。version 2 に cover / focalPoint / sharing.image がない。 | 3:2 の profile grid、tag page、article hero と狭幅 list を承認 prototype に照合。 |
| picture-only OGP | pattern は thumb-3x2 / ogp、同じ PictureSpec / seed で title を描かない。写真は必須 ogpAsset derivative を使用。post ID 発行前後で identity 不変。 | 1200×630 の写真 / pattern を実 PNG で確認。automatic picture の delivered 判定は S20 proof 後。 |
| picture-title + treatment | pattern title / author と plain / outline / plate / band の mapping、新 identity / renderHash、custom colors と seedCounter 0–999 の検証。写真 + title は拒否。legibility verdict は保存しない。 | 承認 font で日本語、長題、treatment ごとの可読性。round4/ogp-matrix.html を参照。 |
| Free / Pro card modes | Free は 4 themes、3 templates + 2 palettes、card / picture と必須 attribution。Pro は全 themes、overrides、treatments、custom colors、unlinked picture、branding。403 capability_required に field、client spoof を拒否。 | Free / Pro の UI 選択肢、footer の attribution / own text / CTA を確認。 |
| timeline cursor + tag page | / は contractVersion: 2 と pages でなく items / nextCursor、thumbnailUrl を返す。既定 limit と署名 cursor、同時投稿、tie-break、改ざん、tag mismatch、public/unlisted/protected の発見性を検証。 | profile / tag ページと next page、狭幅 list を承認 prototype に照合。 |
| profile settings persistence | themeSelection / branding / customPalette / sharingCardDefault / thumbnailDefault を一組の Save as defaults として保存・再読込。expectedProfileRevision、409 profile_revision_stale、is_active 不変、明示 reactivate、profile 未作成 step を検証。 | c1-r4 settings の reload と新 composer の default コピー、既存 post 不変を確認。 |
| atomic protection + render | create/replace の visibility と任意 initial password が最初の snapshot に付く。admission open の初回失敗は公開なし、update 失敗は旧 association 維持。closed は status none + generic card で成功。 | S20 と provider readiness を分けて記録し、fallback 成功を automatic pictures 提供済みと呼ばない。 |
| authorization-before-cache | HTML / JSON / /p/ / /og / thumbnail の全応答が両 no-store header。unlisted / protected は noindex、gate 前に内部 bytes cache を読まない。旧 hash と gate 変更後の漏れを検証。 | shared cache の 600 秒残留を許さない route coverage を確認。 |
以前の matrix の snapshot 明示性、revision、source ownership、archive/restore、protected metadata、retry と privacy の行は維持します。docs check の合格は runtime / PNG / UI の検証済みを意味しません。実装 sub-issue が各 runnable test と実施した visual / release / provider proof を報告します。
この epic からの延期
次の項目を後続 epic へ移します。このリストは実装済み・互換経路の追加を意味しません。
/route set。api/ v2 username/slug alias tables と、それらを使う 308 aliases。
POST /posts/:id/rename。POST /。posts/ archives/ purge idempotency ledger v2 fingerprint rules。
写真 thumbnail 上の
picture-title(photo + title)。pgen が image inputs を受け付けるまで延期。named presets。v1 は profile 上の一組の既定値だけを持ち、操作名は Save as defaults。