Implementation sequencing update
This is the next implementation task after MVP-03A. The working branch ai/mvp-05-telegram-ingress has been created from the bounded MR !8 correction.
No Telegram domain changes will be published on top of a red schema baseline: issue #16 remains the hard dependency until the corrected native YDB inspection passes in the GitHub mirror. Once !8 is green/merged, this branch will be rebased onto main and implementation will proceed with the webhook, identity mapping, attachment storage, command flows, and durable delivery outbox.


Implementation update — Telegram ingress and durable delivery
The first MVP-05 vertical slice is published in MR !9, branch ai/mvp-05-telegram-ingress, commit 6627bac.
Delivered
- authenticated private-message webhook ingress with constant-time secret-token verification;
- opaque HMAC-derived tenant, actor, conversation, and subscription IDs that are stable across replicas and isolated per chat;
- text/photo/document normalization, bounded Telegram
getFiledownloads, tenant-prefixed Object Storage keys, and input manifests; - atomic YDB update deduplication plus run, attempt, input manifest, and dispatch outbox;
- a real
control-apiwebhook route and fail-closed secret/config construction; - bucketed durable delivery traversal, serializable claims, two-minute visibility-timeout crash recovery, exponential retry, and terminal states;
- Telegram sendMessage/sendDocument adapter and a real
telegram-senderprocess; - local Telegram fake file APIs, Compose wiring, integration coverage, README update, and a public Telegram runbook.
Local verification
make cipassed;- YDB and local-integration tagged packages compile;
git diff --checkand shell syntax checks passed.
Docker is unavailable on the development workstation, so MR !9 remains dependent on mirrored GitHub Actions for real YDB Local, MinIO, Telegram fake, Compose, and image verification.
Issue #8 intentionally remains open. The subscription commands (/connect codex, /compute status, disconnect) and explicit clean-context command are not claimed by this MR and will be implemented next on the same MVP-05 line.


Merge verification — first MVP-05 slice
MR !9 is merged into main as 74d9a3e. The merge contains the CI-fix commit e083de9.
The exact mirrored SHA e083de9a2767842ba4aaf59e1e090c15890fb9c3 passed GitHub Actions run 30469363810:
- Go verification — passed;
- YDB schema and state store — passed, including repeatable migrations and the delivery ready-index regression;
- Local multi-service stand — passed, including initialization, Telegram webhook deduplication, persistent stop/restart, and guarded volume reset;
- Runtime images — passed.
This completes the authenticated private-message/file ingress and durable delivery slice, including the post-failure corrections for delivery visibility-index cleanup and Docker-local YDB endpoint selection.
Issue #8 deliberately remains open. The following original scope is not part of MR !9 and still needs a follow-up implementation slice:
/connect codex;/compute status;/compute disconnect codex;- the explicit clean-context command and context-epoch transition.
No full MVP-05 completion claim is made until those flows and their acceptance coverage are merged.


Remaining MVP-05 scope implemented
The subscription and clean-context command slice is published in MR !10, branch ai/mvp-05-telegram-commands, commit 8a5bbbd.
Implemented:
/connect codex,/compute status,/compute disconnect codex, and/new;- unsupported slash commands resolve to durable help instead of AI dispatch;
- atomic Telegram-update deduplication + subscription/context mutation + terminal command run + inline delivery outbox;
- exactly-one context-epoch advancement without deleting Telegram history;
- command runs create no worker attempt or dispatch outbox;
- connect stores no credential and enters
reauthentication_requireduntil the isolated Codex authorization adapter exists; - disconnect clears credential references and enables no API-call billing fallback;
- the local Compose stand now runs
telegram-senderand verifies command replies through Telegram fake; - public README and architecture/runbook documentation updated in English.
Local verification passed: make ci, both tagged integration compile gates, shell syntax validation, and git diff --check.
Issue #8 remains open until the GitCode branch reaches the GitHub mirror and all mandatory jobs prove the exact commit against YDB Local, the multi-service stand, and runtime image builds.


Command-slice verification complete
The exact MR !10 head SHA 8a5bbbd8f758ee1ba2a00f32054490f577de44e3 passed GitHub Actions run 30474639513.
Go verification, YDB integration, the two-pass local multi-service stand with durable Telegram command replies, and runtime image builds are all green. The remaining MVP-05 implementation and verification scope is complete; issue #8 remains open only until MR !10 is merged into main and the merge is read back.


Completion report — MVP-05
MVP-05 is complete across MR !9 and MR !10.
MR !10 was merged into main as 85b94ce83ca3ed05a04eaff09f63ea1745676612. Its tree (92f0af2540baccbb209b65bd74c75ee77a53666b) is identical to the validated branch commit 8a5bbbd8f758ee1ba2a00f32054490f577de44e3.
The exact implementation tree passed GitHub Actions run 30474639513:
- Go verification;
- YDB schema and state store;
- local multi-service stand, including stop/restart;
- runtime images.
Delivered behavior:
- authenticated, idempotent Telegram text/file ingress with tenant-scoped blobs;
- durable Telegram delivery with retry and crash recovery;
/connect codex,/compute status,/compute disconnect codex, and/new;- atomic command state plus inline delivery, with no AI dispatch for commands;
- explicit context epochs without deleting Telegram history;
- no stored plaintext credential and no API-billing fallback.
The GitHub main mirror had not yet propagated merge commit 85b94ce at closure time, so the evidence above deliberately names the validated source commit and identical merge tree rather than claiming a post-merge mirror run.


Parent and architecture
Outcome
Implement the Go Telegram-facing control plane that durably accepts updates, exposes MVP commands and reliably delivers results without executing AI work inline.
Estimate
Scope
X-Telegram-Bot-Api-Secret-Tokenvalidation./connect codex,/compute status,/compute disconnect codexstate flows behind interfaces; provider login execution may remain fake until the Codex adapter task.Failure cases
Acceptance criteria
update_idproduces one durable run and at most one logical reply.